View Full Version : Set cursor to pointer (AS3)

Andrew Johnson
04-03-2008, 04:59 PM
Basically I'm using ActionScript 3 and when the user clicks a preview button it uses a script to load an image from an outside URL and pop it up for them to see and when they click it, it disappears.

I have it all working, however I'd like the cursor to change to the pointer instead of just the default cursor so the user will know it is clickable.

I've used the following method but it won't work for this class type:

item.buttonMode = true;
item.useHandCursor = true;

Basically I have a setup right now like the following so basically I'm looking for something like: Mouse.Cursor = Pointer ... however google is not helping me and I'm not very good at Flash development.

var url:String;
var ldr:Loader = new Loader();


var urlReq:URLRequest = new URLRequest(url);

ldr.x = 70;
ldr.y = 50;


ldr.addEventListener(MouseEvent.MOUSE_OVER,hoverimage); //added this to help solve the problem
ldr.addEventListener(MouseEvent.MOUSE_OUT,leaveimage); //added this to help solve the problem

Thanks in advance