Skip to main content
June 20, 2018
Answered

Rollover Hand Cursor Doesn't Work

  • June 20, 2018
  • 2 replies
  • 2361 views

Hi Adobe,

I keep having glitchy pointer cursor issues where it's there, it's not there, it's there, it's not there.

I have a basic empty button rollover called CLICK for clicktag and it works fine but the pointer cursor keeps turning off. It'll like flicker and then turn off. If I republish the thing 100 times it finally stays...and then it goes off again. What the heck is the solution?

Here's my first frame code for reference:

var frequency = 100;

stage.update();

stage.enableMouseOver();

myLocalTimeline = this;

this.CLICK.addEventListener("mouseover", fl_MouseOverHandler);

function fl_MouseOverHandler() {

myLocalTimeline.CTA.gotoAndStop(1);

}

this.CLICK.addEventListener("mouseout", fl_MouseOutHandler);

function fl_MouseOutHandler() {

myLocalTimeline.CTA.gotoAndStop(2);

}

this.CLICK.addEventListener("click", fl_MouseClickHandler);

function fl_MouseClickHandler() {

window.open("http://www.website.com", "_blank");

}

Still it doesn't work. If anybody has overcome this issue or has any suggestions, I'm all ears. Cuz I'm ready to sum up that Animate is just jenky.

Thanks for reading.

    This topic has been closed for replies.
    Correct answer albertd9194959

    HI There,

    You need to add the cursor change manually now.

    stage.canvas.style.cursor = "wait";

    HTML DOM Style cursor Property

    So on mouse over, change it to a hand, then on mouse out change it back to default.

    frequency i usually set to 25, the higher the number the more responsive it is, so it may be your setting is just too high.

    Regards,

    2 replies

    albertd9194959
    Inspiring
    June 21, 2018

    Hi there,

    Your using an Animate button symbol and a mouseover event listener simultaneously, this is the cause of the weirdness.

    They are conflicting as the button symbol has default mouse state listeners, even if you don't populate it with over/down/hit keyframes.

    Convert the button into a movie clip and you wont have that issue.

    The next issue is that the mouseover eventlister actually picks up the gap between the stroke and the fill, so you need to add an extra layer behind the graphic to fill the gap.

    Regards,

    June 21, 2018

    Strange, I convert the button to movieclip and make alterations and still there's no hand cursor.

    I change it back to a button symbol, now it works. ?? Some kind of overlap I suppose, what happens last ends up at the bottom of the script?

    That's good logic as to why I'm having conflicting symbols/responses. I can't seem to get movieclips to work as buttons though. It gets tangled. I can't remember what I did to get a clicktag to work weeks ago, but the rollover response was incredibly slow. So I did this that and the other and finally I got something to work. Kind of an enigma, really.

    The button works (for now). I will have to look into movieclip buttons more later I suppose. I tried that frequency jazz with no avail. It didn't matter on my end. I will have to investigate further.

    Thanks albertd9194959, that helps clarify some things for sure.

    p.s. whats even more odd is that now ALL of my units buttons rollovers work after editing one units button/movieclip. Animate = jenky and bizarre. glad it works now (just don't touch anything!)

    albertd9194959
    albertd9194959Correct answer
    Inspiring
    June 21, 2018

    HI There,

    You need to add the cursor change manually now.

    stage.canvas.style.cursor = "wait";

    HTML DOM Style cursor Property

    So on mouse over, change it to a hand, then on mouse out change it back to default.

    frequency i usually set to 25, the higher the number the more responsive it is, so it may be your setting is just too high.

    Regards,

    JoãoCésar17023019
    Inspiring
    June 20, 2018

    Hi.

    It usually happens because a custom hit area isn't defined so the whole button will be tested when checking mouse interactions. The problem is if your button contains text fields, gaps, and animations, for example, the chances of not having a pixel under the cursor is way bigger.

    If you are using the default button symbol, make sure to have only a single shape in the "hit" frame.

    June 20, 2018

    Hi Joao,

    It's currently a empty (light transparent blue) button symbol. As plain as it gets. Do I need to add something else to it so Animate understands it's a button? It's like the hand symbol flickers on at the edge then reverts to the arrow once on top of the button.

    Braniac
    June 20, 2018

    Link the .fla if you can so we can troubleshoot it for you.


    Copy and paste this code in and it should work now.

    stage.enableMouseOver();

    myLocalTimeline = this;

    this.CLICK.addEventListener("mouseover", fl_MouseOverHandler);

    function fl_MouseOverHandler() {

    myLocalTimeline.gotoAndStop(1);

    }

    this.CLICK.addEventListener("mouseout", fl_MouseOutHandler);

    function fl_MouseOutHandler() {

    myLocalTimeline.gotoAndPlay(1);

    }

    this.CLICK.addEventListener("click", fl_MouseClickHandler);

    function fl_MouseClickHandler() {

    window.open("http://www.axiom-media.com", "_blank");

    }