Flash Animation -> HTML5 - Audio stop and start by Button
I have a Flash Animation and try to convert in html5.
there is a mp3-file in the timeline and animations belonging to the sound.
In Flash I stop the animation by button and the sound stops also.
In HTML5 I can stop and start the timeline by button but not the sound.
I found solutions without soundfile in the timeline. but animation and sound should be connected.
I try
_main = this;
createjs.Sound.on("fileload", handleLoad);
createjs.Sound.registerSound("ich_1.mp3", "soundID");
function handleLoad(event) {
_main.audio1 = createjs.Sound.play("soundID");
}
this.buttonPause.addEventListener("click", fl_MouseClickHandler_8.bind(this));
function fl_MouseClickHandler_8()
{
this.audio1.paused = true;
this.stop();
}
this.buttonWeiter.addEventListener("click", fl_MouseClickHandler_9.bind(this));
function fl_MouseClickHandler_9()
{
this.audio1.paused = false;
this.play();
}
But it dosn't work 😞
