rajesanthu -8 Light Poster

These are the Steps to Follow :
Press (Ctrl+F8) to create a new symbol.
"Create New symbol" window will appear
Name your symbol cursorNew.
Click on movieclip behavior and then press "OK"
Now you would have entered your movieclip symbol
Draw anything you like to replace the existing cursor.
For example I drew an arrow as shown below
Now come back to "Scene 1" which is your main movie
To get back to "Scene 1", click on the "Scene 1" text on top of your timeline window as shown in the figure below
In "Scene 1" of your Main Movie
Drag your cursorNew movieclip symbol from library onto your stage.
If Library window is not open, Press (Ctrl+L).
Name this Symbol "cursornew" in the instance text box of your property window.
Select 1st Frame of your "Layer1". Go to Actionscript panel ( If your actionscript panel is not open, Press "F9")
With Frame1 of your layer 1 still being selected, type the below mentioned script in your action panel.

Mouse.hide()
startDrag(cursornew,true)

thats all .....Press Ctrl+Enter to view customized cursor
Its your friend
Rajeesh.N.Santhu

Dani AI

Generated

The symbol-and-drag trick described by is a quick way to get a custom pointer, but a few practical points are worth adding so the cursor behaves reliably across projects and Flash versions.

For AS3 projects, prefer either a small sprite that follows the mouse via a MouseEvent.MOUSE_MOVE handler (gives full control of hotspot and smoothing) or the Flash Player 10+ system cursor API (register a MouseCursorData and assign it by name). Example (manual follower):

var cursor:MovieClip = new CustomCursor();
cursor.mouseEnabled = false;
cursor.mouseChildren = false;
stage.addChild(cursor);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove, false, 0, true);

function onMove(e:MouseEvent):void {
    cursor.x = stage.mouseX;
    cursor.y = stage.mouseY;
    e.updateAfterEvent();
}

Example (system cursor via Mouse.registerCursor):

var bmp:BitmapData = new BitmapData(32,32,true,0);
bmp.draw(new CustomCursorGraphic());
var data:MouseCursorData = new MouseCursorData();
data.data = new Vector.<BitmapData>(1,true);
data.data[0] = bmp;
data.hotSpot = new Point(0,0);
Mouse.registerCursor("myCur", data);
Mouse.cursor = "myCur";

Troubleshooting and best practices:

  • Set the symbol's registration point (or use the hotSpot property) so the visible tip matches the pointer hotspot.
  • Make the cursor non-interactive (mouseEnabled = false, mouseChildren = false) so it doesn't block clicks.
  • Keep it topmost (add it after other content or call setChildIndex).
  • Use updateAfterEvent() in move handlers for smoother motion; use weak event listeners to avoid memory leaks.
  • Restore the native cursor and remove listeners when the SWF is unloaded or the mouse leaves the stage.
  • On touch devices a cursor is irrelevant; test on desktop browsers/players only.

These suggestions cover common pitfalls (hotspot, z-order, input blocking, and performance) that the basic symbol-drag method doesn’t address.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.