/ Published in: ActionScript 3
can solve the IE reload problem
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
stop(); 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; lbar.scaleX = loaded/total; loader_txt.text = Math.floor((loaded/total)*100)+ "%"; if (total == loaded){ gotoAndPlay(2); this.removeEventListener(Event.ENTER_FRAME, loading); } }