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

mouseout goto and play movieclip (nr).

New Here ,
Nov 08, 2017 Nov 08, 2017

Copy link to clipboard

Copied

Hello There

since 8 years I never touched flash/animate again. Now I have want to make a simple button animation with a movie clip.

in my scene I have a button-object and when I hover over it the movie clip inside begins to play.

here is the fla-file: WeTransfer

It looks good but I want to have a smoother look when I hover-out with my mouse.

Because I have "stop" code in the middle of the animated movieclip. and I have following script on that button:

stage.enableMouseOver(3);

_this.archi.on('mouseout', function(){

_archi.archi_mov.gotoAndPlay(41);

});

Sadly the mouseout doesn't work. Did I select the right movieclip?

Can you look at the .fla file and tell me what I did wrong?

Thank you guys!

-tenzin

Views

182

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
Adobe Employee ,
Nov 08, 2017 Nov 08, 2017

Copy link to clipboard

Copied

Yes you should be able to do that easily.

FIrstly, you need to use the same symbol for both the states inside your button (archi_mov). You don't even need a button in the first place. Just using the inner movieclip should do.

Next, you should correct how you access your symbols in the code ('this.instanceName')

You can try the below code:

stage.enableMouseOver(3);

_this.archi.on('mouseover', function(){

this.archi_mov.gotoAndPlay(1);

});

_this.archi.on('mouseout', function(){

this.archi_mov.gotoAndPlay(40);

});

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 ,
Nov 08, 2017 Nov 08, 2017

Copy link to clipboard

Copied

LATEST

Hi Nipun,

Thank you for your answer.

Ok, great. So I don't need the button and can do it only with the movieclip.

I did tried you code but it seams that it wound play correctly.

Please look at the new .fla file: WeTransfer

(I did only the archi_mov clip)

thank you.

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