Copy link to clipboard
Copied
Dear Friends,
i have an swf loaded in another frame, i want to show a custom cursor (hand pic). iam using the following code. its working fine in the loaded swf. when i move the mouse to the bottom of the screen that is navigation area in actual frame the cursor has to go back to flash arrow cursor.
var hide_m:Boolean = true;
stage.addEventListener(MouseEvent.MOUSE_MOVE, handmove);
function handmove(event:MouseEvent) {
trace(mouseY);
if (hide_m && mouseY<138) {
Mouse.hide();
hand.gotoAndStop(1);
hand.x = mouseX;
hand.y = mouseY;
} else {
showmouse();
}
}
function showmouse() {
//hide hand pic and show mouse....
hand.gotoAndStop(2);
}
it is not working, it shows the hand pic in the stage. but when i move the bottom area that is more than 138, the normal cursor is not coming back pls help me. to restrict the area to show the custom cursor....
Thanks in advance,
Syed Abdul Rahim
unless there is a Mouse.show() in frame 2 of hand, that's not going to work. to remedy, execute Mouse.show() in showmouse() and remove hand from the display list (removeChild).
use addChild() and Mouse.hide in the first conditional branch of handmove
Copy link to clipboard
Copied
unless there is a Mouse.show() in frame 2 of hand, that's not going to work. to remedy, execute Mouse.show() in showmouse() and remove hand from the display list (removeChild).
use addChild() and Mouse.hide in the first conditional branch of handmove
Copy link to clipboard
Copied
Thks Mr.kglad, its working fine! when i click on the particular button and hide my custom mouse and show my actual mouse. its shows the computer mouse in the same place where i click, is there any way to show or move the mouse to some where else in the stage?
Thanks in advance,
Regards,
Syed Abdul Rahim
Find more inspiration, events, and resources on the new Adobe Community
Explore Now