Flash Labs > Lab 7a: Custom cursors

Overview

Use custom cursors/pointers in Flash movies.

Goals

Learn how to use mouse.hide() and have movie clips follow the mouse's location.

Example

There is still a scary woosh sound when the palette opens.

Steps

Optional: Download the working files for this lab

As you may have noticed, Flash automatically changes the arrow cursor to a finger pointer when over a button. This is typically a good thing because it's a built in affordance, but it's not very useful when you're building a prototype and you want control over your pointers. So here's an example of how you can set custom ones...

In an empty keyframe at the start of the scene, type the following action:
mouse.hide();

This will hide the mouse pointer while it's over the Flash movie.

Then, to define the new cursor, create a movie clip instance from a symbol that you want to use. Then right-click on the instance of the movie clip and add the following action:

onClipEvent (load)
{
startDrag ("", true);
}

Learn More

Flashkit's demo
Sitepoint's demo