A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] Mouse cursor mask doesn't like buttons...

Hybrid View

  1. #1
    Senior Member Computer Dork's Avatar
    Join Date
    Mar 2001
    Location
    St. Louis
    Posts
    1,026

    resolved [RESOLVED] Mouse cursor mask doesn't like buttons...

    Having a problem with part of a project that I know is something small that I omitted someplace relating to mouseEnabled or mouseChildren, but I think I have tried everything and nothing seems to work.

    I set up a demo FLA that replicates the issue somewhat here (remove spaces)- t i n y u r l . com/4429vbx

    Basically, I have a little game that involves finding things in an image with a custom mouse cursor that is a magnifying glass. One large image over a smaller version of the same image, the cursor masks the large image. There's a bunch of Math figuring out the movement/positioning of the large image on MOUSE_MOVE to match up with what you are mousing over in the smaller one, and I have a Rollover/Rollout on the smaller image to swap the cursor in/out. The problem started when I put 5 invisible buttons down inside the large image. You get cursor flicker when rolling over the invisible buttons, because smallImage.rollOut is being triggered, then smallImage.rollOver, then out, then over, etc... and I have no idea why.

    I can't use startDrag() because of the large image movement needed on MouseMove, and I tried it with EnterFrame and it's worse.

    Anyway - in my demo file, I figured out that simply turning off the mask stops it from happening. Turn it back on, and it flickers again.

    Like I said, the demo isn't exactly what I have in my project, but it's close. There's no parallax math, and the project I have is class-based, but the demo is on the timeline. There are 3 levels - A is the root child, B inside of A, and 3 buttons AA, BB, CC inside of B. I have a simple circle Sprite as the mouse cursor.

    If you comment out the masking line inside of A, it stops.

    Any ideas? I have to use MOUSE_MOVE because of the parallax movement on the big image, and the buttons have to be clickable as well.

    Sick deadlines suck.

  2. #2
    Flactionscrish Baby Minion's Avatar
    Join Date
    Nov 2005
    Location
    Planet Earth
    Posts
    312
    Here's a thought:

    try looking at the event.currentTarget to make sure that the event being triggered is from the right object...

    http://help.adobe.com/en_US/FlashPla...#currentTarget
    ktu[k-two]
    he who hesitates is lost; so i guess i'll wander intently

    Are you sure this is real?
    Life is Love, Love is Blind, Blind we go through Life.
    Life isn't hard, dealing with your self is.

    The concept of life in a human brain is weakening day after day. Live every day like its your last. Take the chances, and opportunities, and never let authority push you around for fun.


  3. #3
    Senior Member Computer Dork's Avatar
    Join Date
    Mar 2001
    Location
    St. Louis
    Posts
    1,026
    That had nothing to do with it, it was mouse events tripping over each other.

    Set up the cursor on/off with hitTestPoint instead of rollover fixed it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center