1

I am starting to use Adobe Animate CC to make a 300x250 banner. I added this code from the code snippet section to my movieclip EDIT using HTML5 Canvas option.

this.bg_clickTag.addEventListener("click", fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage() {
    window.open("http://www.google.com", "_blank");
}

var frequency = 3;
stage.enableMouseOver(frequency);
this.bg_clickTag.addEventListener("mouseover", fl_MouseOverHandler);

function fl_MouseOverHandler()
{

    //this.bg_clickTag.cursor = "pointer";
    //bg_clickTag.cursor = "pointer";
    //cursor = "pointer";
    //alert("Moused over");

}

I get the click though just fine, the issue I am having is the the cursor/pointer is not changing once I mouse over.

I am able to get the cursor/pointer change if I change the movieclip to a button, but I would rather keep it a movieclip.

Seems like a easy fix just having trouble combining my previous flash experience and Javascript.

thanks!

Gonzo_e
  • 11
  • 1
  • 4
  • Try putting `bg_clickTag.cursor = "pointer"` at the top of the code you posted, outside the `mouseover` handler. – Aaron Beall Mar 03 '16 at 20:33
  • Thanks Aaron, that did the trick. `this.mc_bg_clickTag.cursor = "pointer"; this.mc_bg_clickTag.addEventListener("click", fl_ClickToGoToWebPage); function fl_ClickToGoToWebPage() { window.open("http://www.google.com", "_blank"); } var frequency = 3; stage.enableMouseOver(frequency);` – Gonzo_e Mar 04 '16 at 01:16
  • That's good to know. I'll convert to an answer. – Aaron Beall Mar 04 '16 at 15:24

1 Answers1

1

Put the cursor = "pointer" line outside the mouseover handler. When you set the cursor it will only show the cursor when the mouse is over the object:

this.bg_clickTag.cursor = "pointer";
this.bg_clickTag.addEventListener("click", fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage() {
    window.open("http://www.google.com", "_blank");
}

var frequency = 3;
stage.enableMouseOver(frequency);
Aaron Beall
  • 49,769
  • 26
  • 85
  • 103