Sound-manager keeps sound management intuitive and organized. Using lists as base, offer a way to control sound organizing by groups or individual items. Available callbacks:

  • onPlay – Fired when sound is started.
  • onPause – Fired when sound is paused.
  • onStop – Fired when sound is stopped.
  • onCancel – Fired when delay timeout is canceled.
  • onMute – Fired when sound is muted.
  • onUnMute – Fired when sound is unmuted.
  • onComplete – Fired when sound is completed.
  • onError – Fired when something goes wrong with the sound.
  • onLoad – Fired when stream is loaded.
  • onID3 – Fired when ID3 is received.
  • onIOError – Fired when something goes wrong on loading the stream.
  • onOpen – Fired when stream is opened.
  • onProgress – Fired when stream is being loaded.
  • onSampleData – Fired when sample data is received.


// You can add a sound instance.
sound().add("lorem", new SoundLorem);

// You can add a sound class.
sound().add("ipsum", SoundIpsum);

// You can add a sound class definition (make sure the class is instantiated before you add).
sound().add("dolor", "my.pkg.SoundDolor");

// Controling sound items by group.
sound().group("effects").add("explosion", new SoundExplosion);
sound().group("effects").add("shoot", new SoundShoot);
sound().group("effects").add("glow", new SoundGlow);

// Playing once all items inside group "effects" at the same time.

// Playing item "explosion" in loop.

// Playing item "shoot" three times after five seconds of delay.
sound().group("effects").item("shoot").play(3, 5);

// Playing item "glow" and when completed shows a message.
sound().group("effects").item("glow").play().onComplete = function() : void { trace("Just finished playing 'glow'!") };

// Start playing a stream.

// Start playing a stream in a single line. (idea sent via @hankpillow)

function progress( event : ProgressEvent ) : void {
    trace("Loading sound file:" + event.bytesLoaded + " - " + event.bytesTotal);

function load( event : Event ) : void {
    trace("File was loaded!", event);

function play() : void {

function stop() : void {

// Managing global sound (SoundMixer). Stopping all existing sounds, including files who aren't being managed by SoundManager. 

// Adding a simple mute/unmute control to context menu.
Sound . URL.