Sound script not working. - Printable Version +- 2DWorlds Forums (http://2dworlds.buildism.net/forum) +-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4) +--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13) +--- Thread: Sound script not working. (/showthread.php?tid=7828) |
Sound script not working. - CoderRyne - 08-08-2011 Hi, I made a song today that I will make another post about later. I would like to share it with you all through putting it into a Buildism game. Would someone please explain to me how to get a sound to play in-game? Here is what I did: I have a Sound object titled "ThemeSong". I put it in the World obviously, and then I made a script inside of the World (not inside of the ThemeSong object) that plays the sound. This is how it looks: [lua] ThemeSongForGame = game.World.ThemeSong ThemeSongForGame.Sound = "http://www.mediafire.com/file/myfile.mp3" --Keep in mind that this is a fake link because I don't want anyone to locate my song for download. ThemeSongForGame:play() [/lua] Would someone please tell me what I'm doing wrong? Thank you! RE: Sound script not working. - Glome - 08-08-2011 Buildism does not support .mp3 files. I think it only supports .wav. Other than that the code looks fine. RE: Sound script not working. - CoderRyne - 08-08-2011 (08-08-2011, 02:31 AM)Glome Wrote: Buildism does not support .mp3 files. Glome, Thank you for your assistance. I uploaded the file to Mediafire again, but this time as a .wav file. The sound still refuses to play... |