Just a quickie, after watching the gotoandlearn.com tutorial about AS3 pre loading, I was amazed to see that this was the best way and i’ve been using this from the start, so i was quite chuffed by that. however, there is something puzzling me at the moment.
After the loader is finished and items are added to the stage, how would you hold the loader to do a transition to end the loader or make it aesthetically nicer.
below is the code, thank you!
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("content.swf"));
function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
}
function done(e:Event):void
{
removeChildAt(0);
percent = null;
addChild(l);
}