Page 1 of 1

Playing sounds on iPad/Iphone

Posted: Mon Jun 18, 2012 12:42 pm
by jizzle
Hi guys,
I'm having real difficulty getting my app sound to work on an iPad. I have tried 2 of the tutorials on the subject and have still seen no luck. I know you have to copy files to the standalone settings and reference them but there is still no sound coming out from my iPad when testing and also if I press play in live code it works fine.
Surely it shouldn't be so hard to play sounds? Can anyone please help...

Re: Playing sounds on iPad/Iphone

Posted: Mon Jun 18, 2012 1:01 pm
by Dixie
Jizzle...

Would you post your script...

be well

Dixie

Re: Playing sounds on iPad/Iphone

Posted: Mon Jun 18, 2012 1:09 pm
by jizzle
This is the one that is working on both Livecode and the simulator but not on actual IPad:


on mouseUp

set the folder to the engine folder
play "/Users/kingjamesii/Documents/Graphic Design/Alcohol App/VoiceOver/background.aif"

end mouseUp

and this is another effort:

on mouseUp
play specialFolderPath("engine")& "/Users/kingjamesii/Documents/Graphic Design/Alcohol App/VoiceOver/background.aif"
end mouseUp

thanks

Re: Playing sounds on iPad/Iphone

Posted: Mon Jun 18, 2012 1:44 pm
by Dixie
Jizzle..

This works on a mobile device.. note that through the 'copy files' pane, I have copied a folder 'musicTracks' that contains the audio file 'aa.aiff"

Code: Select all

on mouseUp
   put specialFolderPath("engine") & "/musicTracks/aa.aiff" into theFileToPlay
   play theFileToPlay
end mouseUp
be well

Dixie

Re: Playing sounds on iPad/Iphone

Posted: Mon Jun 18, 2012 2:29 pm
by jizzle
Thank You so much! you've saved the day for me :D