There are few option to accomplish the common mouse follower trick:
Using the function startDraglocked();
| onLoad () {
Mouse.hide();
startDraglocked();
} |
or using the _xmouse property to get the current X,Y position of the mouse.
| onLoad () {
Mouse.hide();
}
onEnterFrame() {
this._x=_root._xmouse;
this._y=_root._ymouse;
_root.posm1.text=math.round(this._x); // to display cursor postion
_root.posm2.text=math.round(this._y);
} |
The function Mouse.Hide() hide the cursor.
Both method should be used on the events of the object to move or custom mouse.
Sample: (Move mouse over the square below)