简体   繁体   中英

MouseOver javascript Timeline trigger in Adobe animate

I try to create an interactive HTML canvas Animation with the new Adobe Animate (NOT Edge). I can jump to Keyframes on the timeline using the offered code fragment

this.movieClip_1.addEventListener("click",
fl_ClickToGoToAndStopAtFrame.bind(this));

function fl_ClickToGoToAndStopAtFrame() {
  this.gotoAndStop(29);
}

Is there a way to access the timeline in a similar way using MouseOver instead of MouseClick? Unfortunately my javascript knowledge is pretty small.

this.movieClip_1.addEventListener("mouseenter", fl_ClickToGoToAndStopAtFrame.bind(this));

https://developer.mozilla.org/zh-CN/docs/Web/Events

Adobe Animate uses CreateJS, here you can have a list of available mouse interactions: http://www.createjs.com/tutorials/Mouse%20Interaction/

I quote:

There are a number of events you can listen for on display objects: click, mousedown, dblclick, pressmove, pressup, mouseover / mouseout, and rollover / rollout.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM