/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
loader3D.visible = true; this.addEventListener(Event.ENTER_FRAME, loading); function loading(e:Event):void{ var total:Number = this.stage.loaderInfo.bytesTotal; var loaded:Number = this.stage.loaderInfo.bytesLoaded; loader_txt.text = Math.floor((loaded/total)*100)+ "%"; if (loaded == total){ gotoAndPlay(2); this.removeEventListener(Event.ENTER_FRAME, loading); loader3D.visible = false; } }