2013-05-26 23 views
0

我使用swiffy flash擴展在Flash CS6中創建項目並使用托盤在HTML5中發佈。在我的項目中,我創建了一些動畫,加載並使用一些聲音(.mp3)。當我將其導出爲HTML5(swiffy)時。我得到了這種輸出警告聲音和預加載程序在Flash CS6中不能工作到HTML5(swiffy)


Swiffy與Flash擴展程序爲Win V1.1.1 [Swiffy與V5.1.1] - 警告 - 音頻流不支持。 對外部資源的支持是實驗性的。 不支持ActionScript屬性flash.net.URLLoader.bytesLoaded。 不支持ActionScript屬性flash.net.URLLoader.bytesTotal。 該文件可能會很慢。


當我打開我的html文件,裝載機和聲音它不工作 我使用此代碼加載

this.loaderInfo.addEventListener(使用ProgressEvent.PROGRESS,onLoading); this.loaderInfo.addEventListener(Event.COMPLETE,onComplete);函數onLoading(evt:ProgressEvent):void { var loaded:Number = evt.bytesLoaded/evt.bytesTotal; percent_txt.text =(loaded * 100).toFixed(0)+「%」; }; function onComplete(event:Event):void { this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS,onLoading); this.loaderInfo.removeEventListener(Event.COMPLETE,onComplete); gotoAndPlay(2); };

請幫我

回答

0

對不起,不知道什麼ü在這裏期待!警告已經告訴你很清楚發生了什麼事。你試圖做的事情不是支持。
正確的解析器是:你正在做什麼,不能用swiffy來完成!

+0

是否有可用的任何其他很好的解決方案,閃到HTML 5 – Nav

0
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onLoading); 
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete); 

function onLoading(evt:ProgressEvent):void { 
    var loaded:Number = evt.bytesLoaded/evt.bytesTotal; 
    percent_txt.text = (loaded*100).toFixed(0) + "%"; 
}; 

function onComplete(event:Event):void { 
    this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onLoading); 
    this.loaderInfo.removeEventListener(Event.COMPLETE, onComplete); gotoAndPlay(2); 
}; 

是我們必須添加此代碼來獲取音頻...