Copy link to clipboard
Copied
I am creating HTML5 banners in Adobe Animate CC (HTML Canvas). But I have never found an answer to this question. If I want a visual MovieClip to change on rollover thats easy using a instance of a button or event a movieClip using an "addEventListener".
The problem coming when the animation is turned into a banner for DoubleClick Manger/Studio etc we have to add a "a href" around the div = "animation_container" inside the body tag... this then takes the focus away from the rollover of the MC!!!
I found a way to trigger this event on rollover of the whole canvas tag see below - but is there away to only trigger this on rollover/out of the movieClip only?
canvas.addEventListener("mouseover", over.bind(this));
function over()
{
this.btn.gotoAndPlay("over_start");
}
canvas.addEventListener("mouseout", out.bind(this));
function out()
{
this.btn.gotoAndPlay("out_start");
}
Copy link to clipboard
Copied
Give your movie clip a label of btn on any keyframe it exists on.
Copy link to clipboard
Copied
Thats doesn't work.. it already has label of btn.