2015-03-13 20 views
0

我正在使用flash cc html5項目類型。我建立了我的項目並在桌面上進行測試,並且工作正常。一旦在ipad上測試,它不會播放音頻。它適用於Android設備,但不是我的iPad 4.我在我的Flash項目中使用MP3文件。如何使用Flash CC畫布項目在iPad上播放音頻

我試過了safari &我的ipad上的Chrome既沒有播放我的文件中的音頻。

鏈接到我的文件。

http://dev.wisc-online.com/prototypes/TestJosh/cis3405_html5.html http://dev.wisc-online.com/prototypes/TestJosh/cis3405_html5.js

+0

你有沒有嘗試[遠程調試](https://stackoverflow.com/questions/20408110/debug-ipad-safari-with-a-pc)在Safari中看到錯誤消息(如果有的話)你得到? – K3N 2015-03-16 09:55:06

+0

不,我沒有嘗試過。但我確實知道了。我不得不通過按鈕上的代碼啓動音頻。 soundJS。你不能像閃光燈那樣將它添加到閃光燈的時間軸上。 – CsharpBeginner 2015-03-16 14:21:05

+0

Ill爲任何有興趣的人提供代碼。 – CsharpBeginner 2015-03-16 14:21:29

回答

0

取而代之的將時間軸幀上的聲音,好像我是用閃光燈做你必須通過代碼來播放音頻得到它配備閃光燈CC HTML5項目在iPad上玩。此外,它現在需要通過點擊或觸摸事件觸發。

createjs.Sound.registerPlugins([createjs.WebAudioPlugin, 
createjs.FlashAudioPlugin]); 
createjs.Sound.alternateExtensions = ["mp3"]; 
createjs.Sound.registerSound("sounds/slide1_01.mp3", "page1"); 
createjs.Sound.registerSound("sounds/slide2.mp3", "page2"); 
createjs.Sound.registerSound("sounds/ending.mp3", "page3"); 

var Vpage1 = createjs.Sound.play("page1"); 
var Vpage2 = createjs.Sound.play("page2"); 
var Vpage3 = createjs.Sound.play("page3"); 

this.Next.addEventListener("click", fl_ClickToGoToAndStopAtFrame_7.bind(this)); 

function fl_ClickToGoToAndStopAtFrame_7() { 
    createjs.Sound.stop(); 
    this.gotoAndStop(1); 
    Vpage2.play(); 
}