||Plays the given sound file||The file name being played|
||Stops playing sound immediately|| Always returns
- The file name of a sound resource loaded into Sounds
- Sound formats recognized include: .aif, .mp3, .ogg, .snd, and .wav
The Audio command will play a given sound resource file to the Audio Output jack. The sound plays asynchronously, meaning that the command returns immediately while the sound plays in the background until it is finished, or it is interrupted by the Audio Stop command.
If a sound was already playing, issuing another Audio command will immediately stop playing the previous sound and begin playing the new sound.
The Audio Stop command will immediately stop any sound that is currently playing.
Audio "Sound Effect.wav"
Begins playing the Sound Effect.wav sound resource file.
Audio "Background Music.mp3"
Begins playing the Background Music.mp3 sound resource file.
Stops playing sound immediately.