PDA

View Full Version : Button Movie causes Ignore Stop


dougcouch
06-15-2010, 02:07 AM
Note: very new to Flash...using Flash 8.

1. Trying to play a simple slide sequence (by any method) during Over state in a button. Tried using anim. GIF, .SWF & .AVI with results varying from "won't play" to "plays but ignores frame timing" (i.e.-zips lightning fast through frames that played normally outside the button).

2. Since this is only 6 images, extracted images and placed on their own timeline in a movie inside a button. (on Scene 1 stage, double-click button gives 4 states, on Over, double-click instance of movie gives 6-frame timeline with 1 image on each)

To pause the display for a given time on each frame, I inserted the following ActionScript (2?) which code works both here and in main timeline:

stop();
var interval:Number = setInterval(
function():Void {
play();
clearInterval(interval);
},
1500
);

(The above code is used six times, once on each frame inside the movie.)

When I play the main SWF timeline, all goes normally, with all other buttons working correctly (without internal animation). When I hover this button, it works just fine on Over, but when rollOut occurs, rather than returning to where it was (stopped on last frame of main timeline), it returns there and immediately restarts the main timeline sequence. Further, now the main timeline ignores the stop code in the last frame and the main SWF keeps replaying its animation (which is intended to play once, and has until now).

Could someone point out why this happens? Or in lieu of that, just some idea how to place a simple animation inside a button for display on hover?

Thanks, Doug

dougcouch
06-15-2010, 02:16 AM
After hours of searching for this, yesterday and today...of course, as soon as I posted here, an idea came to me. So I tried one more salty idea...and it worked. I extended the main timeline one more frame (F6) and placed the following code (in frame 91):

gotoAndStop('Scene 1', 90);

So all is well. Thanks for the psychic input! - Doug

dougcouch
06-15-2010, 10:37 AM
Turns out, this generated a new problem. When I hover the button, it works, and the main timeline goes back to normal. When I hover the button a second time, the animation no longer works. So, one nervous mouse episode and the animation is never seen. Ideas? - Doug