I have problem in MOUSE_MOVE listener
the logic is that mouse should hide while hitTestObject and the custom mouse should appear.Problem is mouse is appearing but it is blinking and even i tried
[COLOR=DarkRed]sinu_mc.addEventListener(MouseEvent.MOUSE_OUT,outListener,true);[/COLOR]
in the above code cur(custom mouse) isn’t blinking but while moving out from hitTestObject custom mouse is appearing sometimes and it’s n’t so accurate and please help me to overcome this.
one more problem i faced
[COLOR=Navy]cur.x = mouseX;
cur.y = mouseY;[/COLOR] inside the [COLOR=SeaGreen]overlistener[/COLOR]
but the position is difference from mouseX and mouseY and how to make synchronize that
movieclip with mouseX,Y properties.
[FONT=Arial Black]-----------------------------------
[COLOR=Red] SOURCE CODE[/COLOR]
-----------------------------------[/FONT]
var cur:cursor = new cursor ();//movieclip with linkage id cursor
sinu_mc.addEventListener(MouseEvent.MOUSE_MOVE,[COLOR=SeaGreen]overListener[/COLOR]);
[COLOR=DarkRed]sinu_mc.addEventListener(MouseEvent.MOUSE_OUT,outListener);[/COLOR]
function overListener(m:MouseEvent){
if(sinu_mc.hitTestPoint(mouseX,mouseY,true)){
Mouse.hide();
sinu_mc.addChild(cur);
cur.startDrag(true);
cur.scaleX = cur.scaleY = .5;
[COLOR=Navy]cur.x = mouseX
cur.y = mouseY;[/COLOR]
}
}
function outListener(m:MouseEvent){
Mouse.show();
sinu_mc.removeChild(cur);
}