Sign in to follow this  
RunnerBri24

[web] [Flash] Changing mouse cursor in actionscript

Recommended Posts

First off, I do know how to change the mouse cursor into a movieclip that I have created. But, I am creating a point and click game such as the Escape the Room type games. My cursor starts out as an arrow point up, and when the user moves to the right side of the screen I want the cursor to change to an arrow pointing right. Anyone know how to do this?

Share this post


Link to post
Share on other sites
One easy way could be to let the movieclip have 4 images and a function to change which one is visible.


function setImage(img:Number) {
for (var i=0;i<4;i++) {
image[i]._visible=false;
}
image[img]._visible=true;
}


Then you simply need to call

coolMouseCursorMovieClipThingy.setImage(0);
(or 1,2,3 depending on direction)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this