Flash AS3 Tutorials Center | Interesting Flash Animation Tutorials | Valuing Flash Animation Tutorials | Flash ActionScript and Animation Home

AS3 Beginner Tutorials | AS3 Basic Lessons | AS3 Valuing Courses | AS3 Components Tutorials | AS3 and PHP Interaction Tutorials
AS3 Practical Tutorials | AS3 Animation Techniques | AS3 Transition Effects Tutorials | AS3 Download Upload Files | AS3 Particle Systems
Communication Between Flash Movies with AS3 | AS3 and JavaScript interaction | AS3 Matrix Transformation | AS3 Physics Simulation Tutorials

Custom Mouse Pointer with Flash ActionScript 3

This Flash ActionScript tutorial shows how to make an interesting custom Mouse Pointer.

Please update flash player to view this Flash ActionScript tutorial!

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.