
Код:
_root.onMouseDown = function(){
_root.chCursor_fn();
}
// tracking mouseDown event
// & than calling for the function
// that creates & handles custom cursor
_root.onMouseMove = function(){
this._l1._x = this._xmouse;
this._l1._y = this._ymouse;
}
// tracking mouse's movement
// and updating our custom cursor position
_root.onMouseUp = function(){
Mouse.show();
this._l1._visible = false;
}
// tracking mouseUp event
// restoring cursor 2 its original look
// & hiding ur custom cursor
function chCursor_fn(){
Mouse.hide();
var _l1:MovieClip = _root.createEmptyMovieClip("my_cursor", 1000);
_l1.beginFill(0x000000, 100);
_l1.moveTo(0, 0);
_l1.lineTo(5, 0);
_l1.lineTo(5, 5);
_l1.lineTo(0, 5);
_l1.lineTo(0, 0);
_l1.endFill();
_l1._visible = true;
_l1._x = _root._xmouse;
_l1._y = _root._ymouse;
_root._l1 = _l1;
}
// the function that creates a tinny bit of black square block,
// passes it's name 2 the _root, so it can b easely acsessed
// & attaches it instead of the default cursor