Submit Your Article
Home Articles News Tutorials Videos Add An Article
Topics: Design Photoshop Programming PHP CSS Java Database Web Development Javascript Ajax
– Close + Open

Find Out More About DevWebPro!

Sign up for the newsletter


» Terms & Conditions

Welcome to the New DevWebPro!

DevWebPro Includes:
  Hundreds Of Tutorials   Developer News
  Unique Gadget Videos   Tons of Topics to Discuss
  Expert Advice   We Will Publish Your Articles

Customize Your Cursor in 3 Easy Steps

By: Kirin Knapp
Thursday, May 28th, 2009
Text: Decrease Font Size Increase Font Size | Print Print Article | Share: Delicious Digg StumbleUpon Post to Twitter Post to Facebook

This tutorial will show you how to customize your cursor in three easy steps using Flash.

We are assuming you’ve already got your ad/animation/webpage ready to go, and now you want to customize your cursor to match. You can have some fun with this, making it a fancy arrow, a cross-hair, a little face, a pencil, a torn off hand, whatever you want – you can even make it animated.

Step 1: Make Your Cursor

I have made something resembling a bull’s-eye. Also, I am making it a little transparent using the Alpha settings in the Color Mixer. This way, when you slide your cursor over your animation, you can see through it to the background.

Here’s the cursor’s design:

You want to convert this shape to a symbol (F8 or Insert>Convert to Symbol), give it a behavior of Movie Clip, and name it something like “newcursor”.

Step 2: Giving Your newcursor an Instance

When you converted your new symbol into a movie clip, it saved it in your Library. If this is not open, open it now (F11, CTRL+L or Window>Library).

Go back to your blank stage and drag your new movie clip from the Library, onto the stage. You can resize your symbol now if you want to, but it’s not necessary.

Now, down in the Properties window (Window>Properties), change the Instance Name to “newcursor”. **When giving a symbol an instance name, it does not have to be the same name of the symbol itself, we are just happen to be using the same name.

Step 3: Make Your Cursor Live!

Open your Actions window (Window>Actions). Create a new layer at the top of your timeline and name it “actions”. Click on the first frame of this new layer.

Copy this ActionScript and paste it into your actions window (making sure you have that first frame of the new layer selected):

startDrag(“newcursor”, true);
Mouse.hide();

By looking at this code, it’s doing pretty much exactly what it says. It’s hiding the old cursor, and dragging the new cursor with the instance name of “newcursor”. Now you know why we gave it an instance name, since not all symbols need one. When we named it, we essentially gave it a name for the ActionScript code to look for. This code is only applied to the symbol with the instance name “newcursor”.

Save and publish! We’re done!

Topics: , ,

About the Author:
Kirin Knapp is a graphic designer for the iEntry Network, publishing company of FlashNewz. A flash animator and illustrator, she is the creator of her home site, Inkdu.com.

Leave a Comment

DevWebPro is an iEntry Network ® publication - © 1998-2010 All Rights Reserved