Código Javascript:
Ver original
var canvas, stage, exportRoot; function init() { canvas = document.getElementById("canvas"); var manifest = [ {src:"sounds/mi.mp3", id:"mimp3"} ]; var loader = new PreloadJS(false); loader.installPlugin(SoundJS); loader.onComplete = handleComplete; loader.loadManifest(manifest); } function handleComplete() { exportRoot = new lib.mimp3(); stage = new Stage(canvas); stage.addChild(exportRoot); stage.update(); Ticker.setFPS(24); Ticker.addListener(stage); } function playSound(name, loop) { SoundJS.play(name, SoundJS.INTERRUPT_EARLY, 0, 0, loop); }