A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [RESOLVED] MovieClip flickering with MOUSE_OVER

Hybrid View

  1. #1
    Senior Member
    Join Date
    Feb 2003
    Posts
    129

    resolved [RESOLVED] MovieClip flickering with MOUSE_OVER

    Hello,

    I have a basic rollover function for my button, which seems to work, but whenever the mouse is moved to the right (but remaining inside the movieclip) the MOUSE_OUT function starts happening, and then when the mouse is stopped moving, the MOUSE_OVER code re-activates. I have no other movieclips in front of it, but it is masked using actionscript.

    I don't understand why it's doing this, because the mouse never goes outside the area of the movieclip, so the MOUSE_OUT function shouldn't activate. The movieclip doesn't change side or shape at all, it just changes colour.

    Does anyone know what's causing this problem?

    Code:
    rotator.leftArrow.addEventListener(MouseEvent.MOUSE_OVER, arrowHighlight);
    rotator.leftArrow.addEventListener(MouseEvent.MOUSE_OUT, arrowDeHighlight);
    
    function arrowHighlight(evt:MouseEvent) {
    	evt.target.gotoAndStop(2);
    }
    
    function arrowDeHighlight(evt:MouseEvent) {
    	evt.target.gotoAndStop(1);
    }

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    try setting:
    Actionscript Code:
    rotator.leftArrow.mouseChildren = false;

  3. #3
    Senior Member
    Join Date
    Feb 2003
    Posts
    129
    Hi jAQUAN, thanks for the reply.
    I've added that actionscript, but sadly the problem still remains.

    Does anyone know how to solve this bug?

  4. #4
    Senior Member
    Join Date
    Jan 2009
    Posts
    208
    can you post the link?

  5. #5
    Senior Member
    Join Date
    Feb 2003
    Posts
    129
    Found out the problem. Its because I'm hiding the original cursor and replacing it with a graphic of my own cursor, having it follow the mouse around. When the user drags to the right, the mouse obviously overlaps the cursor a little bit, causing it to roll out of the movieclip I'm referring to.

    The cursor code I'm using is:

    Code:
    Mouse.hide();
    
    stage.addEventListener(MouseEvent.MOUSE_MOVE,follow);
    function follow(evt:MouseEvent) {
    	cursorMC.visible = true;
    	cursorMC.x = mouseX;
    	cursorMC.y = mouseY;
    }
    
    stage.addEventListener(Event.MOUSE_LEAVE, hideCursor);
    function hideCursor(evt:Event) {
    	cursorMC.visible = false;
    }
    Anyone know a better way that will stop this from happening?

  6. #6
    Senior Member
    Join Date
    Jan 2009
    Posts
    208
    cursorMC.mouseEnabled = false
    cursorMC.mouseChildren = false

  7. #7
    Senior Member
    Join Date
    Feb 2003
    Posts
    129
    Absolutely brilliant. Thanks, regbolD.

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