audio.play

getAudio(id).play()

or getAudio(id).play("loop") (since PennController 1.6)

or getAudio(id).play("once") (since PennController 1.6)

Starts playing the audio file.

If you pass "loop" as a parameter, the audio will loop forever until the next stop command, or until play is called again, this time using the parameter "once". Note that if you use play("loop"), then stop playback using stop and use play() again later (that is, without passing "once" as a parameter) the audio will loop again.

Example:

[js highlight=”2″ try=”true”]newAudio(“test”, “test.mp3”)
.play()
.wait()[/js]

Starts playing the file test.mp3 (nothing is added onto the screen).