HTML5 rollover isn't working
I have an HTML5 canvas animation in Adobe Animate and I've created some code to control the timeline (initial stop and gotoAndPlay functions so that the animation plays and loops when the mouse is over it) and I have some buttons that should use those functions on rollover but the functionality doesn't seem to be working when testing the published HTML.
Here's a temporary link of the published file: http://beckerstudio.com/test-HTML5/HomeIcon_02.html
The code I'm using is a follows:
Frame 1 (I want the initial state of the animation to be paused)
this.btn_overlay.addEventListener("mouseover", fl_btn_play);
function fl_btn_play()
{
this.gotoAndPlay("playme");
}
this.stop();
Frame 2 (Frame label of "playme")
Frame 48 (Frame that begins the loop - label = "loopme")
Frame 133: End of initial run of the animation
this.btn_overlay_loop.addEventListener("mouseover", fl_btn_play);
function fl_btn_play()
{
this.gotoAndPlay("loopme");
}
Frame 196: End of animation if we don't loop
this.stop();
this.btn_overlay_playagain.addEventListener("mouseover", fl_playagain);
function fl_playagain()
{
this.gotoAndPlay("playme");
}
---- end of Animation code ----
Link to FLA file: http://beckerstudio.com/test-HTML5/HomeIcon_02.fla
I feel like I'm a noobie and perhaps I am with HTML5 in Animate but I've used Flash since version 1. I'm able to get the functionality to work in AS3 but not in HTML5. I would appreciate any assistance!
Thanks, Chris