Accessibility

TechNote (Archived)

How to create a custom cursor

A custom cursor can be created in Flash by hiding the user's mouse pointer and replacing it with a dragging movie clip. When the cursor leaves the area of the Flash movie, it returns to the original default cursor.

To hide the standard cursor, you use thehidemethod of the predefined Mouse object. To use a movie clip as the custom cursor, you use thestartDragaction. The steps below explain this process.

To create a custom cursor, do the following:

1 Create a movie clip to use as your custom cursor. Make sure one instance of the movie clip is present on the stage.
2 Select the Movie clip instance on the stage.
3 Choose Window> Actions to open the Object Actions panel.
4

In the Toolbox list, select Objects, then select Mouse, and double-clickhide.

The Script window should look like the image below.

5

In the Toolbox list, select Actions; then double-clickstartDrag. Select the Lock Mouse to Center box.

Note:In this example, leaving the Target blank will function correctly. The Target can also be specified by entering "this" into the Target field, and selecting the "Expression" checkbox in the Parameters pane.

6

Choose Control > Test Movie to use the custom cursor.



AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_14688

Products Affected:

flash