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

Animate CC HTML5 Canvas Mouse Over (2)

Explorer ,
Mar 15, 2018 Mar 15, 2018

I understand there is an answer posted to this question but I don't quite understand.

If someone would please explain this to me. What should I use as custom code?

I  have a button in  Animate CC Canvas that I want to go to frame 25 and stop I used the code snippet under HTML 5 Canvas and choose Mose Over from Events Handler but lost about what do next. Any advice. Thanks in advance.


Here's my actionscript;

/* Mouse Over Event

Mousing over the symbol instance executes a function in which you can add your own custom code.

Instructions:

1. Add your custom code on a new line after the line that says "// Start your custom code" below.

The code will execute when the symbol instance is moused over.

frequency is the number of the times event should be triggered.

*/

var frequency = 3;

stage.enableMouseOver(frequency);

this.mybutton2.addEventListener("mouseover", fl_MouseOverHandler_2);

function fl_MouseOverHandler_2()

{

// Start your custom code

// This example code displays the words "Moused over" in the Output panel.

alert("Moused over");

// End your custom code

}

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

Community Expert , Mar 15, 2018 Mar 15, 2018

var frequency = 3;

stage.enableMouseOver(frequency);

this.mybutton2.addEventListener("mouseover", fl_MouseOverHandler_2.bind(this));

function fl_MouseOverHandler_2()

{

this.gotoAndStop(24);  // or 25 depending on your understanding...

}

Translate
Community Expert ,
Mar 15, 2018 Mar 15, 2018
LATEST

var frequency = 3;

stage.enableMouseOver(frequency);

this.mybutton2.addEventListener("mouseover", fl_MouseOverHandler_2.bind(this));

function fl_MouseOverHandler_2()

{

this.gotoAndStop(24);  // or 25 depending on your understanding...

}

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