Return to Snippet

Revision: 21358
at December 11, 2009 08:43 by nalmeida


Initial Code
import flash.display.*;
stop();

loaderInfo.addEventListener(ProgressEvent.PROGRESS, plLoading);


function plLoading(event:ProgressEvent):void {
	var pcent:int=event.bytesLoaded/event.bytesTotal;
	trace(pcent);
	if (pcent>=1) {
		loaderInfo.removeEventListener(ProgressEvent.PROGRESS, plLoading);
                // LOADED!
		//nextScene();

	}
}

Initial URL


Initial Description
Add the code at the first frame.

Initial Title
AS3 Self Preloader

Initial Tags
flash

Initial Language
ActionScript 3