Adobe Acrobat Reader Adobe Flash Player hometutorialsIllustrator tutorialsphotoshop tutorialsInDesign TutorialsAcrobat tutorialsDreamweaver tutorialsflash tutorials

Creating a custom cursor in Flash 8

(beginner )

This tutorial will walk you through one of the simpler ways to create a custom cursor for your flash animations.

Step 1: Draw a shape for the cursor

Start by drawing the small object you wish to use as your custom cursor. This tutorial uses a very simple drawing of a magic wand - feel free to draw something else if you prefer.

set line optionsCreate the line - use the line tool to create a short vertical line set the stroke colour to dark blue and the line width to 4 px. Tip: if you depress the Shift key while drawing you will constrain your line to a perfectly vertical, horizontal or 45 degree angle.

create starCreate the star - use the polystar tool - click on the options button to choose a star click and drag to draw out the star. I chose to select and delete the blue outline of the star and leave just the fill.

rotate wandGroup and rotate - drag the star into position at the top of the want and then with the selection tool (black arrow) draw a marquee around the whole drawing to select both want and star and choose Modify > Group. Then with the group still selected choose the free transform tool, set the options to rotate and then rotate the grouped object slightly by placing your cursor slightly above the one of the corner handles and dragging down and slightly to the right.

 

convert to symbolStep 2: Covert to symbol

myWandSelect all and choose Modify > Convert to Symbol or F8 to change the wand from a drawing object to a symbol. Choose movieclip and name the symbol wand.

 

Step 3: Add the actionscript

instance nameSelect the symbol and in the Property Inspector give it an instance name of myWand.

With the myWand symbol still selected choose Window > Actions or F9 to open the actions panel.

 

Then enter the following in the code window.

enter the actionscript

onClipEvent (enterFrame) {

The first line of code says when the movie enters this frame do whatever is between the opening { and closing } brackets.

Mouse.hide();

This line of code hides the regular cursor

setProperty ("_root.myWand", _x, _root._xmouse);
setProperty ("_root.myWand", _y, _root._ymouse);

These two lines of code attach the symbol so it will follow the user's mouse

}

This bracket closes the onClipEvent() function

Choose Ctrl + Enter (win) or Cmd + Return (mac) to test your movie

 

 

 

© TrainStation - an Adobe Authorized Training Provider
all rights reserved
Author - Leslie R. Williams

 

Illustrator tutorials | Photoshop tutorials | InDesign Tutorials | Acrobat Tutorials | Dreamweaver Tutorials | Flash Tutorials
Home | About | Training | Calendar | Register | Tutorials | Freelance | Contact | F. A. Q | Become an ACE