Home | Contact Us | Store

Custom Mouse Pointer with Flash ActionScript 3

This Flash ActionScript tutorial shows how to make an interesting custom Mouse Pointer.
Your flash player version is too old to see this video file!

Flash Tutorial Content:

Many Flash Movies use an interesting custom Mouse Pointer. This is very easy to do with Flash ActionScript 3. This tutorial shows you how to do it.

The complete Flash Movie is shown as above, you may try how it works before you start this tutorial.

Flash ActionScript Codes:

// You don't want people to see the original Mouse Pointer.
Mouse.hide();

 

function useNewMousePointer(motion:MouseEvent):void {

// Set the custom Mouse Pointer follow the motion of original Mouse Pointer.
mouse_mc.x = mouseX;
mouse_mc.y = mouseY;

// mouseEnabled is true by default in AS 3
// If true, mouse_mc will capture mouse events and
// prevent it from reaching the button beneath it.
// Therefore we need to set the mouseEnabled to false.
mouse_mc.mouseEnabled = false;

}


stage.addEventListener(MouseEvent.MOUSE_MOVE, useNewMousePointer);

 

// function to response to clickButton
function clickButton(evt:Event):void {

// Add Content to Text Field
textField_txt.text = "Hello World";

}
blue_btn.addEventListener(MouseEvent.CLICK, clickButton);

Download Flash Source File:

Flash Source File mouse-3.fla

Remarks:

This Flash ActionScript tutorial shows how to make a custom mouse pointer.

Mouse Control Flash ActionScript Tutorial