0

这是代码:您可以在以下位置看到它:http: //humordestination.com/game/

stop();
this.addEventListener(Event.ENTER_FRAME, loadingPL);
function loadingPL(e:Event):void{
    var totalData:Number = this.stage.loaderInfo.bytesTotal;
    var loadedData:Number = this.stage.loaderInfo.bytesLoaded;
    loaderGreen.width = loadedData/totalData * progressText.width;
    progressText.text=String(Math.floor(loadedData/totalData*100)) + "%";
    TotalData.text=totalData.toString();
    LoadedYet.text=loadedData.toString();
    if (loadedData == totalData) {
            gotoAndStop(2);
            this.removeEventListener(Event.ENTER_FRAME, loadingPL);
    }
}
4

0 回答 0