Copy link to clipboard
Copied
Hi guys new to Animate so please bare with me.
I am looking to create a trigger when rolled over to play an impoted GIF sequence, which works fine in ActionScript but cannot work out where I am going wrong in HTML5.
I have created the sequence code below which works fine 'on click' .
However, instead of 'on click' I need it to function 'on mouse over'
I have been searching YouTube and on here for over 3 hours and my brain is about to explode.
Any help would be much appreciated.
/* Stop at This Frame
The timeline will stop/pause at the frame where you insert this code.
Can also be used to stop/pause the timeline of movieclips.
*/
this.stop();
/* Click to Go to Frame and Play
Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and continues playback from that frame.
Can be used on the main timeline or on movie clip timelines.
Instructions:
1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.
2.Frame numbers in EaselJS start at 0 instead of 1
*/
this.movieClip_1.addEventListener("click", fl_ClickToGoToAndPlayFromFrame.bind(this));
function fl_ClickToGoToAndPlayFromFrame()
{
this.gotoAndPlay(2);
}
Copy link to clipboard
Copied
stage.enableMouseOver();
this.movieClip_1.addEventListener("mouseover",overF.bind(this));
function overF(){
this.gotoAndPlay("wherever");
}
Copy link to clipboard
Copied
Thank you so much!
Copy link to clipboard
Copied
you're welcome.