Creating
custom cursors in Flash is as easy as writing two lines of code. In
this example, we'll be making a custom cursor to act as a spotlight on
the image underneath it.
1. Create a new Flash file and Import in a photo of your choice. Drag this photo onto Layer 1.
2.
Create a New Layer and create a circle shape for ths spotlight. Fill
with any color you like since we'll be turning this into a Mask.
3. Click on the circle you just made and convert into a Movie Symbol. (Hit the F8 key to bring up the Convert to Symbol Box). Make sure that the registration point is in the center. Name it spotlight_mc.
In the Properties Panel give the movie clip an Instance Name spotlight_mc - just like we named the symbol.
4. Right-click on the layer the spotlight_mc movie clip is and choose Mask.
5. Create a New Layer and name it Actions. Click on the first Frame and hit F9 to bring up the Actions Panel. Type in the ActionScript shown below.
Note that I am using the Script Access mode new in Flash 8. Make sure "Lock mouse to center" is checked.
Test
the movie out! You should see your custom cursor, which is just
basically a mask that is draggable, follow your mouse movements.