Audio.js (system script)

From Spheriki

Jump to: navigation, search

Audio.js is a system script that is intended to simplify sound playback.


Contents

Usage

RequireSystemScript("audio.js");


Variables and functions of audio.js

  • Sphere_Audio
    • global variable that holds the music
  • ChangeMusic(filename)
    • changes the current background music (BGM).
  • PlaySound(filename)
    • plays a sound.


Example

 RequireSystemScript("audio.js");
 RequireSystemScript("time.js");
 
 function game()
 {
   PlaySound("bing.wav");  
   Delay(2000);
 }


Note

  • The script is coded very badly! The easy-to-use methods of the Sphere sound object make it obsolete. Don't use it!
Personal tools