Media_PlaySound ( container { ; inBackground {; start { ; end } } } )
Media_PlaySound allows you to play a sound in a container field or from a sound file, giving you precise control over playback.
Parameter | Description |
---|---|
container | Location of the sound to be played. |
inBackground | Optional parameter. “1” to play asynchronous in background, or “0” to play synchronous in FileMaker. |
start | Optional parameter. Point in the sound file to begin playing. | end | Optional parameter. Point in the sound file to end playing. |
The Media_PlaySound function can play all of the follow sound files:
- QuickTime reference [Created with right Insert QuickTime…]
- ‘snd ‘ resource, create with double click at the container
-
file reference eg.
filemac:/Macintosh HD/Users/tomas/Desktop/file.mp3
file:./file.mp3
filewin:/C/test.mp3
Foreground or Background Playback
The sound can be played synchronously or asynchronously.
Synchronous playback pauses other FileMaker operations until the sound is finished playing. (You can use ESC or CMD+period to stop playback.)
Asynchronous playback plays in the background, even when FileMaker is no longer the selected application.
To stop playback before the sound file is completed, use the Media_StopSound function.