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

Understanding how to add hover action to buttons on a Animate CC Canvas

Explorer ,
Mar 14, 2018 Mar 14, 2018

I have a simple button that I need to go to frame 25 when hovered over in Animate CC.

Can anyone offer some simple instructions?

Is there any way to upload the file?

Thanks

7.3K
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

Participant , Mar 15, 2018 Mar 15, 2018

There is the "window/Code Snippet" window, but its limited and you still need to poke around with the script it creates to get what you want..... based on the link, the bellow goodness does whats needed...remember animate isn't a wysiwyg program when it comes to the scripting, would be interesting to have a node based system like "playmaker" for unity for instance....

this.stop();

root = this;

stage.enableMouseOver();

this.MYBUTTON.addEventListener("mouseover", MYFUNCTION);

function MYFUNCTION()

{

r

...
Translate
Participant ,
Mar 14, 2018 Mar 14, 2018

Hello,

Depends, are you using ActionScript3 or HTML5 Canvas document ?

Here is an html5 sollution fro kglad:

create a "mouse over" interactive button in html5 canvas

Regards,

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
Explorer ,
Mar 14, 2018 Mar 14, 2018

Thanks but that just confuses the situation. Isn’t there a simple action for Canvas to gotoandplay or go toad stop ?

Sent from my iPad

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
Participant ,
Mar 15, 2018 Mar 15, 2018

There is the "window/Code Snippet" window, but its limited and you still need to poke around with the script it creates to get what you want..... based on the link, the bellow goodness does whats needed...remember animate isn't a wysiwyg program when it comes to the scripting, would be interesting to have a node based system like "playmaker" for unity for instance....

this.stop();

root = this;

stage.enableMouseOver();

this.MYBUTTON.addEventListener("mouseover", MYFUNCTION);

function MYFUNCTION()

{

root.gotoAndPlay(FRAMENUMBER);

}

Regards,

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
Explorer ,
Mar 15, 2018 Mar 15, 2018

Thanks Albert,

I understand  the MYBUTTON=My Instance Name
And FRAMENUMBER

But would MYFUNCTION = onrollover for hover?

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
Community Beginner ,
Apr 13, 2018 Apr 13, 2018
LATEST

Yes

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