/ Published in: ActionScript

Colocar preferencialmente em uma cena dedicada, na frente de todas, com o mÃnimo possÃvel de elementos.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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(); }
Comments
