2007. szeptember 17., hétfő

Your Tweens aren’t finishing.

"Or your URLLoaders won’t load. Or your Timers stop ticking.

function doStuff():void
{
var x:Object = {};
}


When this method is called, it creates an object and stores a reference to it in the variable x. After the function finishes executing, there are no remaining references to the object, so the Flash Player clears it from memory (as soon as it gets around to it). Of course, this happens no matter what type of object we create.

Unfortunately, there are some situations where this behavior can cause major problems. Objects like Tween, Loader, and Timer are associated with asynchronous processes (animating, loading, etc..) that we expect to complete regardless of whether the objects that originated them are still in the player’s memory. "


http://exanimo.com/actionscript/never-use-tween-or-urlloader/

0 megjegyzés: