# [web] [Flash] Changing mouse cursor in actionscript

## Recommended Posts

RunnerBri24    122
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 on other sites
SimonForsman    7642
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)