Reputation: 2773
I have a problem with flickering mouse custom cursor. I have a timeline which is my main clip and I want to show a pencil like cursor when I am over the timeline movie clip. I am using standard Mouse events, MOUSE_OVER and MOUE_OUT, MOUSE_MOVE. Also I use Mouse.hide()/show() functions to show and hide the mouse. Also the same principal or the pencil movie clip which I show and Hide.
On MOUSE_MOVE is set the coordinates of the pencil movieclip to be those on the Mouse cursor.
How ever I get a flickering of the mouse and the pencil movieclip while above the timeline movieclip. So they change from one to another all the time without stopping i.e filckering.
Any idea what is my problem?
(I am not using any code for this in enter_frame function)
public function setMouseOver(e:MouseEvent):void {////on MOUSE_OVER
pencilCursor.visible = true;
Mouse.hide();
mouseOverCont = true;
}
public function unsetMouseOver(e:MouseEvent):void {////on MOUSE_OUT
pencilCursor.visible = false;
Mouse.show();
mouseOverCont = false;
}
public function showHoverBaloon(e:MouseEvent):void {////on MOUSE_MOVE
pencilCursor.x = stage.mouseX;
pencilCursor.y = stage.mouseY;
}
Upvotes: 0
Views: 717
Reputation: 3907
Sounds like "something" gets in the way of the mouse cursor and triggers OVER and OUT events.
Set mouseEnabled
and mouseChildren
to false
on "pencilCursor".
pencilCursor.mouseEnabled = false;
pencilCursor.mouseChildren = false;
Upvotes: 3