开发者

No sound from Flash CS5?

I have 1.mp3 beside my .fla file and when I tried to run a movie test, it doesn't play any sounds. Only the stage has a g开发者_运维百科litch was it keep loop frame 1 and 2. What happen?

var mySoundReq:URLRequest = new URLRequest("1.mp3");
var mySound:Sound = new Sound();
mySound.load(mySoundReq);
mySound.addEventListener(Event.COMPLETE, playSong);

function playSong(event:Event):void {
mySound.play();
}

My test Movie with button on stage: http://img156.imageshack.us/img156/9950/cs5c.jpg


My hope is that the problem is with the event which you have added the play method.

Instead of adding it in the COMPLETE event , try it with the first frame without any event , which will run once at entering for frame.

else add a button and test the play method in the mouse_up or click event.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜