Page 1 of 1
No sound plays in iPad with "beep" command
Posted: Tue Jan 01, 2013 2:47 pm
by rleiman
I tried to get a sound to play on an iPad using this lesson:
http://lessons.runrev.com/s/lessons/m/4 ... ios-device
and used the following code in the "Beep" button after importing the sound file according to the lesson:
Code: Select all
on mouseUp
set the beepsound to specialFolderPath("engine") & "/mysound.mp3"
beep
end mouseUp
No sound is heard even with the iPad volume turned up to maximum.
Is the lesson correct?
Thanks.
Re: No sound plays in iPad with "beep" command
Posted: Tue Jan 01, 2013 3:23 pm
by Dixie
The syntax is correct... but try using an .aiff file instead of type mp3.
Code: Select all
on mouseUp
set the beepSound to specialFolderPath("engine") & "/shortbeep.aiff"
beep
end mouseUp
Make sure that you have copied the sound file into the stack using the 'copy files' pane in 'standalone application settings'.
be well
Dixie
Re: No sound plays in iPad with "beep" command
Posted: Tue Jan 01, 2013 3:30 pm
by rleiman
Hi Dixie,
Thanks for the reply. Since I had only mp3 files I found the "Play" command.
I was able to get it working with the "Play" command using it like this:
Code: Select all
on mouseUp
play specialFolderPath("engine") & "/mysound.mp3"
end mouseUp
Re: No sound plays in iPad with "beep" command
Posted: Tue Jan 01, 2013 5:35 pm
by Klaus
Hi Emad,
since you may use this more than once, you could write a little handler for your "custom beep"
and put it into the stackscript like this:
Code: Select all
on myBeep
play specialFolderPath("engine") & "/mysound.mp3"
end myBeep
Now you can call it from every object/card etc. :
Best
Klaus
Re: No sound plays in iPad with "beep" command
Posted: Tue Jan 01, 2013 10:05 pm
by rleiman
Thanks very much Klaus.
Very helpful.
