First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Flash Wizard | Website: http://howellsdaly.netfirms.com

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!

Comments

  • 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: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
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: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.