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
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