as3声音流不能在swf文件中工作

时间:2013-07-06 16:57:42

标签: actionscript-3

我正在使用Adobe Flash CS6和ActionScript 3创建一个简单的无线电应用程序。当我从源文件运行它时,下面的代码完全正常,但是当我从swf文件运行它时失败。

没有声音,但也没有发生错误。

var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var context:SoundLoaderContext = new SoundLoaderContext(3000, false);
var url:URLRequest = new URLRequest("http://66.45.232.131:9994")

mySound.load(url, context);

play_btn.addEventListener(MouseEvent.CLICK, onClickPlay);
function onClickPlay(e:MouseEvent):void {
    myChannel = mySound.play();
}

0 个答案:

没有答案
相关问题