-
Mouse Coordinates
Anyone know how to grab the mouse coordinates and then display a movieClip exactly where those coordinates are when rolling over a button?
Also, is there a way where you could place the movieClip just a little off of those coordinates? say, maybe 50+/- pixels off of the y axis?
thanks.
4zero4
-
_root._xmouse is the mouse x position
_root._ymouse is the mouse y position
Is it just me, or does Flash
kick ass?
-
Check the Flash reference for MovieClip._xmouse
Property (read-only); returns the x coordinate of the mouse position.
You coud read this value, assign it to a variable, add 50 to the value and you have an offset from the x coordinate of the mouse.
-
This is what I did
Code:
onClipEvent(enterFrame){
this._y = _root._ymouse;
this._x = _root._xmouse;
}
one problem tho, the MC keeps following my mouse. is there way to do a rollOut where it will stop?
thanks.
4zero4
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
|