Adding sounds. Help please.

LightBeamLightBeam

很久以前 | 帖子#1
I am having trouble adding sounds in my game when I use AS3.
The way I saw it being done is importing the sound file to the library then right click on it > properties. Check the box where it says Export to actionscript, and give it a class name. Then in the actioscript file I wrote the following code.

sound = new Sound(new URLRequest("nameofthefile.mp3");
sound.play();

This works locally, but when I upload it to nonoba it doesn't play anything. Any ideas? Appreciate your help.

LightBeamLightBeam

很久以前 | 帖子#2
Ok I figured it our. URLRequest doesn't work.

PatheticAssassinPatheticAssassin

8个月以前 | 帖子#3
Glad you figured it out, sorry you had no help from me in the forums

回复主题

现在就注册以回复主题

5dyouxi

5dyouxi.com是一个独立的游戏网站,在这里你将可以免费玩到各种好玩的单人和多人游戏。

开发者工具

如果你是一位flash游戏开发者,我们有一些非常强大的工具来帮助你开发更加优秀的游戏。

经典游戏

为什么不试试我们这里的一些最为优秀的在线flash游戏呢?这可是完全免费的!

Copyright ©2007-2012 5dyouxi™ - All rights reserved.31.2001ms on SERVER34096
注册 或者