Looping/stopping with only 1 frame

Posted by brettestewart 
Looping/stopping with only 1 frame
December 15, 2008 11:20PM
Howdy admins; great product and you've already been very helpful.
I have a 1-frame animation using the powerful timing features of FLASHeff, and everything is great... but how do I loop and/or play/stop/restart?
Here's my example: [the41.com] and I had to refresh the page. Any good work-arounds?
THanks!
Re: Looping/stopping with only 1 frame
December 16, 2008 08:48AM
All you have to do is listen for the TRANSITION_END event dispatched by the last animation. Then, you need to start the animations again - use the same code that drives the animations (some startAnimations() or init() function would be good to have).
Re: Looping/stopping with only 1 frame
December 16, 2008 09:47AM
Thanks for pointing me in the right direction, I'm still new enough to AS3 to not really understand what to do... If you could provide a little bit of a more in-depth example that'd be awesome. Thanks!
Re: Looping/stopping with only 1 frame
December 16, 2008 12:58PM
It depends on how did you write the code for your current animation. You should have an init() or startAnimations() function which initializes the animations and starts the first animation. Listen for the TRANSITION_END animation to know when the transition is done. Then, start the second animation and the third and so on... Finally, when the last animation is over, call that init() or startAnimations() function again.
Re: Looping/stopping with only 1 frame
December 16, 2008 01:36PM
I actually didn't code anything; I put all the elements in one frame on the timeline and used the delay in eff to set the sequence.
Re: Looping/stopping with only 1 frame
December 17, 2008 06:23AM
Oh, in that case it's quite simple. Extend the frames (add non-keyframes) that would cover the whole length of your animation. So for example if your last animation starts at 12 seconds from the beginning of the entire animation and lasts for 6 seconds (hide transition included) than you would have to add extra frames that would cover 18 seconds worth of animation. The number of frames depend on your framerate, so if you have a framerate of 30 fps, you would have to add 18*30=540 frames. Also, we recommend starting FlashEff and TxEff animations from the second frame, so they have time to initialize.
Re: Looping/stopping with only 1 frame
January 29, 2009 11:44PM
I think i am trying to do the same thing. I want this effect to repeat or loop. is there an action to add at the end. I am not very familiar with flash but normally when i set up an motion effect if automatically repeats. please see effect at top of [martincrous.com]
Attachments:
open | download - crousbook2.fla (1 MB)
Re: Looping/stopping with only 1 frame
January 30, 2009 01:32PM
twogeeks
from what i see in your example you want effect to repeat after 44 seconds so in order to work i think that the simple way is to add a blank keyframe next to last frame....on the layer on which you have flash eff
Attachments:
open | download - crousbook2.fla (1.02 MB)
Re: Looping/stopping with only 1 frame
January 30, 2009 02:57PM
Your awesome! Thanks I didn't mean to have it that long but I understood what you meant. So is that all there is to loop an effect? - Add a blank keyframe to last frame that effect is on?
Re: Looping/stopping with only 1 frame
February 02, 2009 06:57AM
yes, that's all. you need this additional last blank frame in order to flasheff reinstantiate when is looping
Sorry, you do not have permission to post/reply in this forum.