Garbage man
2 answers
You can add things to your garbage collector and then destroy them as they finish.
var antiGC:Dictionary = new Dictionary(false);
var loaderwidth:Tween = new Tween(maskbox, "width", Regular.easeIn, 1, 1000, 25, false);
antiGC[loaderwidth] = loaderwidth;
loaderwidth.addEventListener(TweenEvent.MOTION_FINISH, lwfinished);
function lwfinished(e:TweenEvent){
loaderwidth.removeEventListener(TweenEvent.MOTION_FINISH, lwfinished);
antiGC[e.currentTarget] = null;
delete antiGC[e.currentTarget];
}
0
source to share