如何使用Flash CC画布项目在iPad上播放音频

How to play audio on IPad using Flash CC canvas project

本文关键字:iPad 音频 播放 项目 Flash 何使用 CC 布项目      更新时间:2023-09-26

我正在使用Flash cc html5项目类型。我构建了我的项目并在桌面上进行了测试,它工作正常。在ipad上测试后,它不会播放音频。它适用于安卓设备,但不适用于我的 ipad 4。我在我的 Flash 项目中使用 Mp3 文件。

我在Ipad上尝试了safari和Chrome,既没有播放文件中的音频。

链接到我的文件。

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

而不是像我习惯在Flash中那样将音频放在时间轴上,而是必须通过代码播放音频,使其在带有Flash 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();
}