/ Published in: ActionScript 3
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; if (total == loaded) { play(); this.removeEventListener(Event.ENTER_FRAME, loading); } }
URL: http://www.oman3d.com/tutorials/flash/basicwebsite/