How can I have the effect repeat?

Posted by user587381 
How can I have the effect repeat?
February 11, 2011 08:38PM
I have created a very simple block of dynamic text on the stage. I have applied the Station Panel text effect to the block of text. All works well. I have placed it in a div in my page in Dreamweaver CS5. All works well. When the page loads, the text effect works as planned. My question is, I would like for the effect to repeat, say after 10 seconds. How can I do that? Please be VERY specific about exactly what I need to do. I am only just learning Flash and no ActionScript experience. Thanks in advance for your help.
Re: How can I have the effect repeat?
February 14, 2011 07:34AM
In the component's package you can find an example which repeats an animation (5_loop_show_hide).
Also if you will search trough here you will find useful information regarding this matter.
Re: How can I have the effect repeat?
February 14, 2011 01:18PM
Thanks for the heads up. I looked in the component's package and I don't see anything called 5_loop_show_hide. I see something called FlashEff2ShowHide and FlashEff2ShowHideMC. So I assume I should use FlashEff2ShowHide, since I am using dynamic text and not a movie clip. So I dragged that from the components panel over my text, added the Stations Panel effect, chose show then chose hide. I see now that the effect happens once, then goes away, then happens again, then goes away and leaves a blank block. That won't work.

Wish you had a little more detailed instructions on exactly what needs to be done to get this to work. I mentioned before, I am not an expert in Flash.
Re: How can I have the effect repeat?
February 14, 2011 03:12PM
1. The simplest way to create a show and hide animation on the target object is to use a single
FlashEff2 Component instance (for both, the show and the hide animations). Once you managed
to create such an animation (please refer to tutorials 1 and 2) you need to make play again and
again, in other words, to loop.
2. For this, you simply need to expand the animation to as many frames as necessary to play the
entire animation.
3. First of all, we recommend that for such timeline animations, you start FlashEff2 from the
second frame on, so that the FlashEff2 has enough time to initialize. If you followed the tutorials
on how to create show/hide animations for images and texts, then from the timeline select the
frame(s) containing the target object and the FlashEff2 Component instance and drag them to the
second frame (you can otherwise create the show/hide animation directly on the second frame).
4. Next, you need to calculate how many frames should the animation play on the timeline. You
need to know the frame rate of your Flash clip (at how many frames per second it is set to play)
and the total time of your FlashEff2 animation.
The FlashEff2 animation contains a show animation that is set to play for an amount of time set in
the Tween sub?tab of the Show tab (tweenDuration parameter) which by default is 2 seconds. To
that time you need to add the delay before the show animation starts, which is given by the delay parameter in the Options sub?tab of the Show tab. This one is usually 0 so the show animation
starts as soon as the FlashEff2 Component instance is placed on the stage, over the target object.
Next, there is a pause between the show and hide animations which is set through the delay
parameter in the Options sub?tab of the Hide tab (this one is also 2 seconds by default) and finally
the hide animation which also has a tweenDuration parameter (2 seconds by default). If you add
up these four values you get the total amount of time that the FlashEff2 Component instance and
the target object should be on the stage, in case of a timeline animation. In this particular example
(all values are left as defaults) the total time would be 6 seconds: 0 seconds (delay for show) + 2
seconds (show animation) + 2 seconds (delay for hide) + 2 seconds (hide animations).
This value now has to be transformed into a number of frames. This can be achieved simply by
multiplying the time in seconds with the frame rate of your clip. In this case 6 seconds * 30 fps =
180 frames. So the FlashEff2 instance and the image should span across 180 frames, from the
second frame to the 181st frame.
5. So, on your timeline navigate to frame 181, select it and press F5 to expand the frames to 181. If
your FlashEff2 and image are placed on two separate layers (like the attached example), than you
need to do this operation for both frames.
6. If you test your clip now (Ctrl+Enter for Windows or Cmd+Enter for Mac OS) you'll see that the
show/hide animation of your target object is looping. Once the hide animation has finished the
playhead also reaches the end of the timeline and moves back to the first frame to play the
contents again and again.
Re: How can I have the effect repeat?
February 14, 2011 03:21PM
I have followed the steps you have in the manual and have studied your sample flash tutorial. I added frames as you suggested above. No where in the tutorial did it say to do that, I only figured it out by studying your example .fla tutorial file.

I put a blank keyframe on the first frame and started my animation on the second frame. I put my type on layer 1 and the FlashEff animation on layer 2, just like in your example.

If I leave out the blank keyframe on the first frame, the animation plays, then hides, then plays then hides permanently. If I add the blank keyframe at frame 1 back in, it doesn't work at all. No animation occurs and the type doesn't even show. I don't have time right now to keep trying to figure it out, but will work on it later. I think I am very close to solving the problem, but I sure wish there were better step-by-step instructions in one single place that a non-expert Flash user could follow.
Re: How can I have the effect repeat?
February 14, 2011 08:50PM
I finally figured out how to get this to work. Thanks for your suggestions. Awesome effects, by the way!
Re: How can I have the effect repeat?
January 06, 2012 04:03PM
How did you get it to work. Whenever I move the frame 1 stuff to frame 2, I lose the entire animation.
Re: How can I have the effect repeat?
January 12, 2012 04:23PM
Did you call stop method on the second frame?
Sorry, you do not have permission to post/reply in this forum.