Oolite JavaScript Reference: Sound
From Elite Wiki
Prototype: Object
Subtypes: SoundSource
This class was added in Oolite test release 1.71.
The Sound class is used to play music or sound effects.
Properties
name
This property was added in Oolite test release 1.70.
name : String (read-only)
The file name of the sound file.
Methods
load
function load(soundFile : String)
Loads a music file to memory, to avoid stutter on playback.
playMusic
function playMusic(soundFile : String)
Starts playing the sound file. Stops upon reaching the end of the sound file.
stopMusic
function stopMusic([soundFile : String])
Stops the specified sound file from playing. If no file is specified, stops all music.