Create SoundFX

SoundFX - Basic Sound Controller prepared for LD27

Description: SoundFX is a singleton class that handles the sound effects and music in your game. Beeing a singleton it is easy to play sounds from anywhere in your classes or timeline.

Usage:(singleton)

import ld27.sound.SoundFX;

SoundFX.add([new Strike_1(), new Blow_1()], [new Intro_1(), new Music_2()]);
SoundFX.onInit = function():void{
	SoundFX.onMusicComplete = SoundFX.NEXT;
	SoundFX.playMusic("Intro_1");
	
	//SoundFX.playSound("Strike_1"); // play sound from the initial collection
	//SoundFX.playSound(new Explosion_1()); // play some new sounds
}




Usage:(as object)

var soundFX:SoundFX = new SoundFX([new Slide_1(), new Slide_2()]);
soundFX.playSound("Slide_1");
soundFX.playSound("Slide_2");
soundFX.playSound(new Slide_3());