PDA

View Full Version : Custom cursor problems


cma2007
07-22-2011, 01:22 PM
I have created a custom cursor that I'm having trouble pointing correctly to small buttons. It seems that the "pointer" is about 10 pixels to the right of where the button is. On larger buttons, it really isn't a problem. But on one particular small button, the user has a lot of trouble hitting the button. Here's my code for creating the custom cursor.

stage.addEventListener(MouseEvent.MOUSE_MOVE, redrawCursor);
stage.addEventListener(Event.MOUSE_LEAVE, hideCursor);
Mouse.hide();

function redrawCursor (event:MouseEvent):void {

myCursor_mc.visible = true;
myCursor_mc.x = event.stageX;
myCursor_mc.y = event.stageY;

}

function hideCursor (event:Event):void {

myCursor_mc.visible = false;

}

///////////////////////////////////////////////////////////

I wish I could post the page here for you to see it (says I have to have at least 50 posts in order to post a link). If someone can tell me how to post a link, I could show you the problem.
Thanks - Charlie

tweakz20
07-22-2011, 01:38 PM
Enter your MC, make sure the X and Y are 0 on your object.. By default X and Y are moved so that the object is in the middle of the MC.

cma2007
07-22-2011, 02:33 PM
Thanks, tweakz, I'll try that. It makes perfect sense.
Thanks. Charlie

cma2007
07-23-2011, 04:12 PM
Hey tweakz - I entered the MC and checked and I was set at 0,0. So that didn't make any difference. Any other suggestions. The page is sonicreplacementparts.com and the issue is with the Pipe Bollard - this is the protective pipe that is located just below and left of the Drive Thru window. The larger buttons (only the first five or so on the left side are working right now) seem to be ok. It's just this little one. You have to put the carhop slightly to the right of the pipe to get it to light up so you can click on it.