Custom Mouse Pointer with Flash ActionScript 3
This Flash ActionScript tutorial shows how to make an interesting custom Mouse Pointer.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 {
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 {
textField_txt.text = "Hello World";
blue_btn.addEventListener(MouseEvent.CLICK, clickButton);
Download Flash Source File:
Remarks:
This Flash ActionScript tutorial shows how to make a custom mouse pointer.