Custom Mousecursors using ActionScript 3

Custom Mousecursors using ActionScript 3

On various flash websites you see that they make use of custom cursors to navigate instead of using the regular white arrow.

Curious as I am, I figured out how to accomplish this, and noticed that it was not difficult at all!

First create a flash symbol and apply linkage to it by right clicking in the library and then select properties

settings

That’s the most difficult part actually, now this is done you only need to add a couple of codelines into the actions and it’s done.

Explanation: First I create an instance of the MagnifierCursor symbol which I created earlier. Next I hide the default mouse cursor.
When that is done I tell my magnifier object to start drag, which means it will follow the x and y positions of my mouse.

Code:

code

Simple but powerful, think about the possibilities. Creating animated mousecursors and dynamically adjustable mousecursors.

Hope you learned something new

Lode

About the Author

Lode is a Creative-Geek with passion for Graphic design , he is also into the web programming "stuff" like Adobe Flash,air and Flex . Lode loves to learn and loves to share knowledge with others.Follow Lode on http://twitter.com/stealfish