useHandCursor in Away3d 4?

Software: Away3D 4.x

Mr Margaret Scratcher, Sr. Member
Posted: 28 July 2011 12:01 AM   Total Posts: 344

Is this feature not yet implemented?

   

Somokon, Member
Posted: 28 July 2011 05:29 PM   Total Posts: 75   [ # 1 ]

I haven’t used useHandCursor before, but I looked at the docs and it simply changes the mouse cursor to a hand when the mouse is over the object, correct?

If you need this you can implement it yourself quite easily by adding Mouse3D.MOUSE_OVER and Mouse3D.MOUSE_OUT listeners on your object, and changing the cursor with the AS3 Mouse class (eg. Mouse.cursor = “hand”).

   

Mr Margaret Scratcher, Sr. Member
Posted: 02 August 2011 05:27 PM   Total Posts: 344   [ # 2 ]

Yep that’s the one - PERFECT!

   

steros, Newbie
Posted: 20 November 2011 09:40 AM   Total Posts: 19   [ # 3 ]

Hey guys I seem to have a problem with the supposed solution raspberry

When I hover the mesh it still doesn’t change my cursor… Visibly. I think I’ve done exactly what you’ve said but maybe someone here can find my mistake. Here is the code:

private function mouse_over(e:MouseEvent3D):void {
 Mouse
.cursor "hand";
 
trace(Mouse.cursor);
 
e.target.removeEventListener(MouseEvent3D.MOUSE_OVERmouse_over);
 
e.target.addEventListener(MouseEvent3D.MOUSE_OUTmouse_out);
private function mouse_out(e:MouseEvent3D):void {
 Mouse
.cursor "auto";
 
trace(Mouse.cursor);
 
e.target.addEventListener(MouseEvent3D.MOUSE_OVERmouse_over);
 
e.target.removeEventListener(MouseEvent3D.MOUSE_OUTmouse_out);

When I run this code it does traces back ‘hand’ when I hoverIn and ‘auto’ when I hoverOut. The only problem is that my cursor does NOT change visibly. The next few lines a are executed in advance of course.

myMesh.mouseDetails true;
myMesh.mouseEnabled true;
myMesh.addEventListener(MouseEvent3D.MOUSE_OVERmouse_over); 


So the valeu of Mouse.cursor changes but on my screen there is no change. Can anyone help me to find a solution?
Any suggestions are appreciated!
Thanks in advance smile


Stefan

 

   

Kaztorama, Newbie
Posted: 07 July 2013 07:39 PM   Total Posts: 1   [ # 4 ]

I was having just the same problem and I just realized I forgot a little something:

import flash.ui.*; 

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X