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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

button scroll over - IF and ELSE

Status
Not open for further replies.

abbott567

Technical User
Jun 18, 2007
38
GB
hey
i am making a movie clip that will be a button

when the mouse rolls over it plays and fades in
it then hits a stop(); command
then
when the mouse rolls out it plays a later set of frames where it fades out

this is all good and well except if your quickly swiped the mouse over the button - it begins to fade in then suddenly appears and fades out again

i was hoping i could use IF and ELSE commands to say
on roll over go to and play a frame and on roll out continue to play the entire fade in fade out sequence, and have it only stop on the frame i want IF the mouse pointer is still on the button

so if i have a faded out button on say frame 1. a tween to make it fade in beginning from frame 2 to frame 10, then a fade out tweening from frame 10 to frame 20 and a stop command on frame 10

i am using something like this at the moment

stop(); on frame 1
on(rollOver) {gotoAndPlay(2);}
on(rollOut) {gotoAndPlay(11);}
and a stop(); function on frame 10

i need to use something like

on(rollOver) {gotoAndPlay(2);)

then on the frame have something like

if (mouseOver) {stop();}
else {gotoAndPlay(11);}

but i am unsure on how to use the if, else and mouse over commands

thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top