ActionScript3:Custom Mouse Pointers

Introduction
Use a custom graphic as a mouse pointer using ActionScript 3

Create the Graphic
Using graphic software such as Adobe Photoshop, Corel Draw or PaintShop Pro, create a graphic to be used in place of the standard mouse pointer. Photoshop has a great range of shapes, including one resembling a barrel crosshair sight. Create with a transparent background, save as a png and import to the stage of your Actionscript 3 movie.

Convert to a movieClip, tick the Export For Actionscript checkbox and give it a class name of   Give the movieClip an instance name of   and then delete from the stage. The movieClip will still reside in the Library and will be called via ActionScript.

Inserting the ActionScript
Open the Actions panel on frame One of your actions layer and insert the following code:

To change the mouse pointer back to normal as it passes over a button for example, use an eventListener on the button for a  and use the   function. Use  as the mouse leaves the button.