PDA

View Full Version : Custom Mouse Pointer Problem?



alex298
June 18th, 2008, 06:36 AM
Hi,

I used a custom Mouse Pointer for a Flash Movie. However when I used the custom Mouse Pointer to click on a button, the mouse event cannot send to the function. Here's my code:




Mouse.hide();

function moveMouse (motion:MouseEvent):void{
newMouse_mc.x = mouseX;
newMouse_mc.y = mouseY;
}
stage.addEventListener (MouseEvent.MOUSE_MOVE, moveMouse);

function clickButton (evt:Event):void{
myField_txt.text = "You clicked the button.";
}

myButton_btn.addEventListener(MouseEvent.CLICK, clickButton);



How can I make the custom Mouse Pointer works same as a normal Mouse Pointer?

Thanks and best regards

Alex

Felixz
June 18th, 2008, 08:25 AM
newMouse_mc.mouseEnabled=false;

alex298
June 18th, 2008, 10:13 AM
Hi Felixz,

Thanks for your help. It works perfectly :)

Best regards

Alex

tpspoons
June 18th, 2008, 11:51 AM
Could you not use newMouse_mc.startDrag (true)? Is there any difference in the two methods?

Felixz
June 18th, 2008, 11:58 AM
startDrag() should not be used for cursors regarding that startDrag() can be used on one object at a time and ity has dropTarget functionality