I cannot get my animation to stop and start playing with a mouse rollover, but the listener does put a message box up. This says to me that the listener intercept is working, but the command to stop and start the animation is incorrect. How do I get the animation to stop and start playback with a mouse over event?
/* 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 times event should be trigerred.
*/
var frequency = 3;
stage.enableMouseOver(frequency);
canvas.addEventListener("mouseover", fl_MouseOverHandler_10);
function fl_MouseOverHandler_10()
{
// Start your custom code
// This example code displays the words "Moused over" in the Output panel.
alert("Moused over");
this.stop();
// End your custom code
}
/* Mouse Out Event
Mousing out of 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 out of.
*/
var frequency = 3;
stage.enableMouseOver(frequency);
canvas.addEventListener("mouseout", fl_MouseOutHandler_8);
function fl_MouseOutHandler_8()
{
// Start your custom code
// This example code displays the words "Moused out" in the Output panel.
alert("Moused out");
this.start();
// End your custom code
}