Back

CreateSound

JS Py
Hello World
Content:
- Properties
- Methods

Creates a sound object which can play audio files.

snd = gfx.CreateSound( file ) → game object: Sound

Properties

The following properties are available on the Sound object:

fileString

Methods

The following methods are available on the Sound object:

Pause()
Boolean
Number: milliseconds: delay before playback start
Number: milliseconds: time gap between two loops
String: path to file ( “/absolute/...” or “relative/...” )
snd.file
Contains the url of the loaded file.
snd.Pause
Pause the playback if the sound is currently palaying.
snd.Play
Start the playback of the current loaded audio file.