Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Flash Animation -> HTML5 - Audio stop and start by Button

Community Beginner ,
Apr 12, 2018 Apr 12, 2018

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 😞

1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Apr 16, 2018 Apr 16, 2018

From what I understand, you are able to stop the animation and sound by pressing a button during preview in Flash Pro. However, when you publish the file to HTML5, the animation stops when you click the stop button, but the sound continues playing.

I am not an expert on this topic, but just to be sure, have you had a look at these articles?

stop sound with action script?

flash - How can you stop a sound from playing in as3? - Stack Overflow

Thanks,

Preran

Translate
Adobe Employee ,
Apr 16, 2018 Apr 16, 2018
LATEST

From what I understand, you are able to stop the animation and sound by pressing a button during preview in Flash Pro. However, when you publish the file to HTML5, the animation stops when you click the stop button, but the sound continues playing.

I am not an expert on this topic, but just to be sure, have you had a look at these articles?

stop sound with action script?

flash - How can you stop a sound from playing in as3? - Stack Overflow

Thanks,

Preran

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines