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

please help on mouse rollover for starting and stopping the animation

New Here ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

I've never used flash...so i'm total newb..

I have a gif animation about 11sec long with 5sec sound in html 5 canvas.

I would like to make it start the animation and sound when the mouse is on the image

and stop when mouse is out.

can somebody help me how to do that?

Views

206

Translate

Translate

Report

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

LEGEND , Dec 01, 2016 Dec 01, 2016

You do not have "action coding". Canvas documents use vanilla JavaScript, plus the CreateJS library for audiovisual tasks.

The whole point of using a button is that you DON'T need any of that code. Flash/Animate handles it for you automatically. You put the static image in the Up frame and the animated movieclip in merged Over and Down frames.

How to create buttons with Animate CC

Votes

Translate

Translate
LEGEND ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

Things you will need to teach yourself to make this happen:

  • How Flash buttons work, specifically Over states
  • How to nest movieclips inside button states
  • How to stop all playing sounds in a Canvas document

Votes

Translate

Translate

Report

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
New Here ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

l have a layer that is changed to movie clip that goes the whole length of the animation.

and have action coding that goes

stage.enableMouseOver();

myLocalThis01 = this;

this.MouseTrk.addEventListener("mouseover", fl_MouseOverHandler);

function fl_MouseOverHandler()

{

myLocalThis01.play();

}

this.MouseTrk.addEventListener("mouseout", fl_MouseOutHandler);

function fl_MouseOutHandler()

{

myLocalThis01.stop();

}

like that.

do I need a transparent rectangle in the movie clip layer for it to work?

Votes

Translate

Translate

Report

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
LEGEND ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

LATEST

You do not have "action coding". Canvas documents use vanilla JavaScript, plus the CreateJS library for audiovisual tasks.

The whole point of using a button is that you DON'T need any of that code. Flash/Animate handles it for you automatically. You put the static image in the Up frame and the animated movieclip in merged Over and Down frames.

How to create buttons with Animate CC

Votes

Translate

Translate

Report

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