First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Flash Wizard | Website:

Custom cursors are always a nice effect for a site. They add a nice look, and can help the mood you wish to create. But, how hard is it to include one in your own site? Actually, it's surprisingly easy, as you will soon find out.

Now, first thing's first. Design you cursor anywhere on the stage (Flash screen). Once you have finished and are happy with what you have, select the whole thing, and press F8. This makes it into a Movie Clip. The name of the clip doesn't matter, but I named mine Cursor, so it's easy to find in the Library (Ctrl+L). Now, making sure that you are in the main movie, not your Movie Clip, right click on the Instance (copy of the movie that is on your stage) of the Movie Clip, and then go down to panels and click on Instance. This is where you can give it a name that Flash will refer to in the ActionScript portion of this movie.

Leave the Behavior as Movie Clip, but in the blank text field below (Name), type in cursor. You CAN type whatever you want, but if you always use the name cursor for your cursors, you will never run into problems with forgeting what you've named them.

Double click on your new Movie Clip. See that little cross right in the middle? Didn't draw that, did you? That is the mouse's "Hot Spot", and that is where it will stick to the original mouse of the person viewing your clip. It is also where buttons feel your mouse, so if you have a pointy cursor, which I recommend you do (people are used to pointy cursors), move the image you have to that it's tip is right on the cross.

Now, go back to your main movie (Ctrl+E). There should now be a blue box around our cursor. Right click on the first frame in your timeline, and click on actions. In the ActionScript window, click on the plus sign, go to Actions, and then click Start Drag. In the text field that appears, type in the name of the Instance of your Movie Clip (we named ours cursor, remember?). Don't click the box marked "Expression", and don't click "Constrain to Rectangle", but DO click on "Lock Mouse to Center", or your cursor will not move. This action stick your movie onto the mouse.

We could just leave it at that, but then we would be left with an unsightly white default mouse over top of our lovely graphic, and we don't want that.

To get rid of the original mouse (something you may consider doing when you get into complexe animations and things where you don't want the mouse in the way, even without and alternative cursor), all we need to do is add another, much simpler action into Frame 1.

In the ActionScript box, click on the plus sign again, but this time, instead of going to Actions, go to Objects, then to Mouse, and click on Hide. There. Easy. Now just test your movie (Ctrl+Enter), and admire your work!

NOT WORKING? Download my file and check my code.

» Level Basic

Added: 2001-12-11
Rating: 8 Votes: 45
(10 being the highest)
» Author
Howells Daly Enterprises, H.D.E Web Creations division.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.