Combine HTML5 Canvas Code Snippets
Hi,
I am looking to combine two of the HTML5 Canvas Adobe Animate CC code snippets but I can't figure out quite how to do it. The code snippets I would like to combine are the following:
var frequency = 3;
stage.enableMouseOver(frequency);
this.instance_name_here.addEventListener("mouseover", fl_MouseOverHandler);
function fl_MouseOverHandler() {
}
and
this.addEventListener('tick', fl_FadeSymbolIn.bind(this));
this.instance_name_here.alpha = 0;
function fl_FadeSymbolIn() {
this.instance_name_here.alpha += 0.01;
if(this.instance_name_here.alpha >= 1) {
this.removeEventListener('tick', fl_FadeSymbolIn.bind(this));
}
}
I am trying to have a movie clip fade in when it is hovered over with the mouse.
Thank you in advance for any help.
Kind regards,
Peter
