How to play a sound file in iOS?

J. Landman Gay jacque at hyperactivesw.com
Sun Oct 9 23:55:42 EDT 2011


On 10/9/11 10:09 PM, Bill Vlahos wrote:
> How do I play a sound file?
>
> I've attached a wav and an mp3 file to the stack but the following
> statements don't do anything in the simulator.


You can only play files that are stored on disk. Include the sound files 
in the Copy Files pane of the standalone builder. In your scripts, 
provide a full path relative to the engine:

play specialFolderPath("engine") & slash & "gong.wav"

Also, older versions of the simulator (3.2) won't play sounds. In 4.2 
simulator they do play. They always played on a real device though.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list