by Yuki Kimura
With actionscript, you can hide a mouse cursor, in addition, you can replace the
cursor with your favourite images.
Here is the code for hiding a mouse cursor.
Mouse.hide();To replace the cursor with your image, name the image
(here, the image is named as "cursor"),
and then write the follwoing actionscript.
onLoad = function () {
Mouse.hide();
cursor.swapDepths(1000);
}onEnterFrame = function () {
cursor._x = _xmouse;
cursor._y = _ymouse;
}With the Mouse.hide method, the mouse will disappear as I explained before.
Then, the cursor.swapDepths(1000); method allows you to make the image
appear on the stage as well as swap the position of it.
Here, it means that the image will be shown on the top of the stage on "1000" layers.
At last,
cursor._x = _xmouse;
cursor._y = _ymouse;These codes mean the cursor._x follows the position of x coordinate of mouse, and
cursor._y for the same.
Actionscript for mouse hiding (1)
20 Jan 2010 | by Administrator








