Sunday, 13 April 2008

Create a custom cursor in flash

This flash tutorial will teach you how to create a custom cursor in Macromedia Flash. Custom cursor are useful for games, websites and multimedia applications.


Create a custom cursor in Flash

Step 1


Create a new flash document. Select any colour as your background.

Step 2

Draw your custom cursor on stage. I made a cross hair using the oval tool (O) and line tool (N) and fill the shape red. You can design whatever you wish.
Make sure your cursor is an appropriate size.

Step 3

Take the selection tool (V) and highlight your custom cursor on the stage. Select F8 to convert it to a symbol. Choose an appropriate name and check the movie clip button and click Ok.





Step 4

Select the custom cursor and give it an instance name. eg. cursor_mc.





Step 5

Create a new layer on the time line and call it "actions".

Right click on the 1st frame of the actions layer and select actions.



Step 6

Type the following code the in the actions box:

Mouse.hide();

cursor_mc.onMouseMove = function(){
this._x = _root._xmouse;
this._y = _root._ymouse;
updateAfterEvent();
};


**This small piece of code basically hides the existing cursor and replaces it with your custom cursor.


Step 7

Choose Ctrl + Enter to test movie.



You should now have a custom cursor.

Checkout custom cursor part 2.

5 comments:

Wow said...

I love this guide, Thank you for posting it up. It helped me alot.

Jenny Renigen said...

how can i save it for use in the control panel?

iliketo said...

@ Jenny Renigen

Can you explain what you mean?

Patrick said...

I'm getting Compiler Error messages when I export the movie.

iliketo said...

@Patrick

What does the compile error say?

What next ?

Subscribe to Flash Tutorials

Add to Technorati Favorites

Follow my Twitter