Your Ad Here

Custom Cursor


You'll need to create a movieclip that will be your custom cursor. Place the cursor to the stage and add the following code:

onClipEvent(enterFrame){
    _x+=_root._xmouse;
    _y+=_root._ymouse;
}

Test your movie and your MC should follow the mouse around. One problem: the one cursor is still there. Add the following line to the first frame of your movie:

Mouse.hide();

That's it! You now have a have a custom cursor that will look really sweet. You'll want the frame rate of your movie to be at least 24-30 in order to get smooth movement. Mouse around below to see the effect:

Source .fla (Flash 8 format)



Author's URL: FlashSandbox
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

Add comments to "Custom Cursor"

Only registered users can write comment

Reader's comments
comments Lars May 27, 2007 says:
Custom Cursor
Please, correct the code for the cursor:

onClipEvent(enterFrame){
_x+=_root._xmouse;
_y+=_root._ymouse;
}

no pluses needed here, guys! It should go like this:

onClipEvent(enterFrame){
_x=_root._xmouse;
_y=_root._ymouse;
}