View Full Version : Crusor pos...
Cragdo
12-24-2002, 02:40 AM
How do i find the position of the cursor?
on(press){
//getcuror pos x & y
}
Thanks!
ssjogus
12-24-2002, 05:04 AM
try this:
onClipEvent (mouseMove) {
_root.a = _xmouse;
_root.b = _ymouse;
}
u can have 2 text boxes (dynamic) named as a and b.
shruti.
jcgodart
12-24-2002, 08:49 AM
Use the _xmouse & _ymouse properties which are relative coordinates.
The real pb is determining which relative coordinates system you want.
_root._xmouse will give you the pos relative to stage
_root.mc._xmouse, relative to coordinates of mc. Say, if that mc has its registration point in the center and is placed on the center of the stage, then it's origin (0,0) is the center of the stage and moving the mouse to the top-left hand corner of the stage will give you negative coordinates. Then if its scaled or rotated, again, its coordinate system is scaled or rotated.
Not easy to explain, I hope you got it.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.