View Full Version : Restricting the Mouse
bcogswell11
September 21st, 2002, 04:09 AM
Hey guys, a simple question I hope. :) How can you restrict the mouse so that users cannot move thir mouse into a certain area, (or a certain y or x value)? This is useful to me because I need it for a game.
Thanks!
-brad-
Deril
September 21st, 2002, 07:25 AM
You cant do it , poinet is uncontrolable.. all you can do. is wach there the mouse is.. ...
I sugest you do that... hide the mose in that area...
if you want dont confuse users.. you can drow mouse pointer image and put it in the edge of the area ,in the spot there mouse enters "black" area and is hidin..
then user drags away the mouse from that area.. unhide mouse and delete that phantom mouse..
:-) hope that will help..
jsk
September 21st, 2002, 08:05 AM
Strictly speaking you can't limit the mouse movements but ...
if you substitute an MC for the mouse
mc._x=_xmouse
mc._y=_ymouse
Mouse.hide()
then specify allowable x,y coords
if (_x>=300) {
_x=300;
}
and use the updateAfterEvent(mouseMove);
it'll look just like it's locked
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.