audio.play

description

Starts playing the audio file.

syntax

getAudio(ELEMENT_NAME).play()

alternate(s)

  • getAudio(ELEMENT_NAME).play("loop")

  • getAudio(ELEMENT_NAME).play("once")

notes

  • 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(s)


@newAudio("test", "test.mp3")
$    .play()
@    .wait()
  • Starts playing the file test.mp3 (nothing is added onto the screen).