Copy link to clipboard
Copied
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
}
1 Correct answer
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...
}
Copy link to clipboard
Copied
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...
}

