I decide to make some custom effects for movie clips of my own, but while doing it i found out that i don`t know what happens withe the effect object after his job is done.
package {
import flash.events.*;
import flash.display.*;
public class effTest extends MovieClip{
private var _effTarget:MovieClip;
public function effTest( target:MovieClip) {
_effTarget = target;
_effTarget.alpha = 0;
addEventListener(Event.ENTER_FRAME, doEff);
}
private function doEff(event:Event):void{
_effTarget.alpha += 0.01;
if(_effTarget.alpha == 1){
removeEventListener(Event.ENTER_FRAME, doEff);
}
}
}
}
This is very simple example of what i am doing in general. It is used also very simple
var customEff:effTest = new effTest(mc);
So the thing i am looking for is way to clean up after the effects is complete. And it will be great if the effects is able to do it on its own.
Thanks in advance
Regards Thovas