PDA

View Full Version : Detecting mouse click with Cust. Cursor?


klaushouse
01-24-2008, 08:23 PM
I have a custom cursor in the flash and I want to click a guy's head and it explodes, it works when I comment out the custom cursor but with the cursor it doesn't work, not sure what to do!! :(

Here's the code:

cursor.addEventListener(Event.ENTER_FRAME, customCursor);

function customCursor(Event)
{

Mouse.hide();

cursor.x = mouseX;
cursor.y = mouseY;

}

guy.addEventListener(MouseEvent.CLICK, clickListener);

function clickListener(e:MouseEvent):void {
guy.gotoAndPlay(2);
}



Thanks in advance for the help! :D

dr_zeus
01-24-2008, 08:25 PM
The cursor is probably taking all your mouse events.

cursor.mouseEnabled = false;

klaushouse
01-24-2008, 08:46 PM
It worked! Thanks :D