-
[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);
}
-
Total Universe Mod
try setting:
Actionscript Code:
rotator.leftArrow.mouseChildren = false;
-
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?
-
-
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?
-
cursorMC.mouseEnabled = false
cursorMC.mouseChildren = false
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|