Page 1 of 1

LiveCode 6.5.2 - Play Sound.

Posted: Wed Jan 27, 2016 5:13 am
by Googie85
Hello Guys!

I am writing a small game in LC 6.5.2 so that I get faster image animations rather than LC 7 or 8. I am tring to play a sound file
but the "Play "filename" isnt supported on the LC release I am using.

I came accross the mobileControlCreate "player" control that I am having trouble in getting it to work. My code is:

Code: Select all

on openCard
   put specialFolderPath("engine") & slash & "5.ogg" into soundgoal
   
mobileControlCreate "player", "sound"
put the result into sPlayerID
mobileControlSet sPlayerID, "filename", soundgoal
         end openCard
Am I doing this wrong? There is also the following, I havnt tried yet:

Code: Select all

mobilePlaySoundOnChannel sound, channel, type 
Any help would be really appreciated!

Many Thanks,

Matthew.

EDIT:

I have tried this but to no avail:

Code: Select all


   put specialFolderPath("engine") & slash & "5.ogg" into soundgoal
   
mobileControlCreate "player", "sound"
mobileControlSet "sound", "filename", soundgoal
mobileControlDo "sound", "play"


Re: LiveCode 6.5.2 - Play Sound.

Posted: Wed Jan 27, 2016 5:51 pm
by jacque
The most likely reason is that the path is wrong. After the line where you build it, insert a temporary line for testing:

answer there is a file soundgoal

That should tell you what the engine sees.