Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Caption rollOver help

Status
Not open for further replies.

typeofdoug

Programmer
Feb 2, 2007
4
US
I've pieced this together from a tutorial on captions. My goal is for a caption to pop up in a customized balloon when the user rolls over a button. I'd also like the balloon to feel like it's stuck to the end of the mouse while in the button's hitspace.

I think the way to do the above is through a startDrag and alpha property script.

I'm having trouble getting the correct captions to turn off and on (alpha) over the right buttons.

Plus, I'd like to gather all the script into the first layer and just reference my movieClips and buttons.

This is what I have on my first frame actions layer:
Code:
timeline2.captionMoon.startDrag( true);

timeline2.captionShip.startDrag( true);

I've placed this code on each caption moviClip
Code:
onClipEvent (enterFrame) {
	if (_root.x==1) {
		this._alpha = 100;
	} else {
		this._alpha = 0;
	}
}

And this on the button the caption is supposed to stick too
Code:
on (rollOver) {
	_root.x = 1;
}
on (rollOut) {
	_root.x = 0;
}


I know this is confusing. Well at least to me. So here's my fla file:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top