How to reset \ remove \ stop effects?

Posted by invivo 
How to reset \ remove \ stop effects?
April 01, 2009 03:46PM
I find that it's hard to reset the effects. We do a lot of slides with various builds that need to reset and re-build again.
The way I set up my files is have all the elements on one frame and attach the effects via FlashEff Panel.
I set "autoPlay" and "target is visible" to false. Then in my Document Class AS file I trigger the animations through code like so: myEff.showAutoPlay = true;

I have a reset function where I take the same line and set it to false ( i.e. myEff.showAutoPlay = false; )

This doesn't work very consistently. If my effect is still executing when reset() function is called, the movieClip won't hide and start over but will keep going until effect is complete. There's no way to kill it. Also, the "target is visible" doesn't seem to apply to text effects. If I have a delay, the target will be visible for the duration of delay.

I wish there was a better integration of the panel and code. It seems that you should either use one or the other. If I try to set duration or delay with code, the values in the panel will override it :(

But my main issue right now is being able to reset an effect and start it over, which would mean that it should hide and kill the effect if still playing and stay invisible during delay. Any tips?



Edited 1 time(s). Last edit at 05/18/2009 12:10PM by Ionut.
Re: how to reset effects?
April 02, 2009 06:42AM
Hi,

There a well documented method called removeEffect(). It removes all tweens and stops all animations. There are actually two variations of this method that does almost the same thing, I don't know exactly which one you'll like better but you can use on of two (actually you can use both, but one of them would be useless).
If your instance is named myEff, than your code would be something like this.

myEff.removeEffect() - this will remove all animations and stop all tweens from your target, however, this will not do anything if the target isn't in the middle of a transition.

myEff.removeAll() - Removes all the show/hide effects, filters, commands and button effects added through the FlashEff object, to the target object (symbol or text field), canceling any functionality provided by them. This method will not remove the FlashEff object. To remove the FlashEff object too, you'll need to remove it from the display list.

For a complete list of all the methods that FlashEff uses please take a look at: [www.flasheff.com]
Sorry, you do not have permission to post/reply in this forum.