Return to Snippet

Revision: 37073
at December 3, 2010 07:41 by dessimoni


Initial Code
stop();

loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loaderInfo.addEventListener(Event.COMPLETE, loadComplete);

function loadProgress( evt:ProgressEvent ):void {
  var ratio:Number = loaderInfo.bytesLoaded/loaderInfo.bytesTotal;
  var percent:int = int( radio*100 ); 
  trace( percent + "%" );
}
function loadComplete(e:Event):void {
  play();
}

Initial URL

                                

Initial Description
Colocar preferencialmente em uma cena dedicada, na frente de todas, com o mínimo possível de elementos.

Initial Title
AS3 Self-loader

Initial Tags
flash

Initial Language
ActionScript