|
-
I'm not afraid
Changing the mouse cursor? (not custom)
I have a couple loaders that pull in bitmaps, once they're loaded and up I have an onmouseClick listener that triggers a navigateToURL. I haven't put them into simpleButtons because it has worked fine, but the mouse cursor stays an arrow. Is there any way I can just change the cursor to a pointer? or do I need to make them buttons?
-
Senior Member
you can try this:
Code:
mc.buttonMode = true;
mc.useHandCursor = true;
-
I'm not afraid
Code:
ReferenceError: Error #1056: Cannot create property buttonMode on flash.display.Loader.
at photoad/::onmouseover()
-
Senior Member
buttonMode is property of Sprite class. You cant use it on bitmaps, must be Sprite or Movie Clip.
-
Flash by name, Flash by nature
What you could do is adding a mask sprite to each of the loaders and use the buttonMode and useHandCursor properties on that. Something like this:
PHP Code:
stop();
var myLoader:Loader = new Loader();
myLoader.load(new URLRequest("myBitmap.png"));
addChild(myLoader);
var myMask:Sprite = new Sprite();
myMask.graphics.beginFill(0xFFFFFF, 0);
myMask.graphics.drawRect(0,0,400,300);
myMask.graphics.endFill();
myMask.buttonMode = true;
myMask.useHandCursor = true;
addChild(myMask);
myLoader.mask = myMask;
-
or you can put the loader inside the Sprite
Code:
myMask.addChild(myLoader)
this way you don't need to draw additional graphics, the bitmap itself will define the button area.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|