-
mouseListener Help needed on multiple buttons
I want to change my mouse pointer to my own "new_cursor".
I have added a mouselistener that says if the mouse pointer hits my button, it makes the standard pointer invisible and replaces it with my own, or else, my pointer is invisible and the standard pointer is shown.
This works for one button, the problem I have is that I have 5 buttons that I need this mouselistener to work on.
My code that works for one button is below.... I have tried different variations to get this to work on the other buttons, but so far have had no luck.
Can you help me??????
new_cursor._visible = false;
new_cursor2._visible = false;
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function(){
if(buttonbios.hitTest(_xmouse, _ymouse, true)){
Mouse.hide();
new_cursor._visible = true;
new_cursor._x = _xmouse;
new_cursor._y = _ymouse;
new_cursor2._visible = true;
new_cursor2._x = _xmouse-10;
new_cursor2._y = _ymouse+8;
updateAfterEvent();
} else {
Mouse.show();
new_cursor._visible = false;
new_cursor2._visible = false;
}
}
Mouse.addListener(mouseListener);
-
Flashkit historian
HI and welcome to flashkit.
The lounge is our non techical forum, intended for socializing only.
I have moved your thread to a flash forum and left a redirect in the lounge.
Frets
SuperModerator
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|