PDA

View Full Version : Rotating Globe Help


JediNemesis
04-09-2002, 05:03 AM
This is a difficult problem for me to explain, but I will do my best. Basically, I need this button (actually a movie clip)to begin playing when the user's mouse is moved over it. When the user removes the mouse, I need it to play until it reaches a specific frame (number 24) and then jump to another frame (number 25). However, I need it to loop frames 5-24 until the mouse is removed. I can get it to start playing just fine using the "on (RollOver)" function, and I can get it to stop playing immediately using the "on (RollOut)" function. However, the I can't seem to get the clip to keep playing and then quit at a later time using the "on (RollOut)" function. It appears to me that the function stops immediately after the mouse is moved away, not allowing any loops to be called inside the function. I doubt much of this makes sense, but if you open the file, it should be somewhat clearer.

http://www.financialsolutions.bz/TestButton.fla
http://www.financialsolutions.bz/TestButton.swf

Thank you,
Will

glospinner
04-09-2002, 03:04 PM
maybe instead of having the mouse events controlling the timeline, just use a flag to determine whether or not to jump back or not. Like in your first frame have

jump = false;

and then your frame 24 have

if (jump){
gotoAndPlay(5);
}
else {
gotoAndStop(25);
}


the button actionscript can then look like this:

on(rollOver){
play();
jump = true;
}
on(rollOut){
jump = false;
}


this way, the timeline won't be stopped by the rollOut event, but when it gets back to frame 24, it tests the jump variable, and if it's false (which it is when the mouse isn't on the button) then it goes to frame 25 instead of looping.

Off the top of my head, that should do what you want... you get the idea anyway =)

That help?

JediNemesis
04-10-2002, 07:03 AM
That worked very well. Thank you.

Will