Jump to content
  • Advertisement
Sign in to follow this  
RunnerBri24

[web] [Flash] Changing mouse cursor in actionscript

This topic is 4039 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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._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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!