Files
DefinitelyTyped/soundjs/soundjs-tests.ts
s_kimura cea8091140 fixes bugs and discard redundant changes that have received pointed out in code review.
put it back the SpriteSheetFrame and TickerEvent class in easelJS.
2013-11-29 13:05:15 +09:00

13 lines
636 B
TypeScript

///<reference path="./soundjs.d.ts"/>
// Sample from : http://www.createjs.com/Docs/SoundJS/modules/SoundJS.html
// Feature set example:
createjs.Sound.addEventListener("fileload", createjs.proxy(this.loadHandler, this));
createjs.Sound.registerSound("path/to/mySound.mp3|path/to/mySound.ogg", "sound");
function loadHandler(event:Object):void {
// This is fired for each sound that is registered.
var instance = createjs.Sound.play("sound"); // play using id. Could also use full sourcepath or event.src.
instance.addEventListener("complete", createjs.proxy(this.handleComplete, this));
instance.setVolume(0.5);
}