any examples for making mouse interactions work?

Software: Away3D 4.x

clunetta, Newbie
Posted: 26 April 2012 09:28 PM   Total Posts: 9

Hello all

I’ve downloaded from Adobe site the recommended “GettingStartedWithAway3D” featured at the tutorials section of the site.

As an experiment, I’ve been trying to add MouseEvent3D actions to the object in the demo, but none fires;

I add the line
_loader.addEventListener(MouseEvent3D.MOUSE_OVER, handleMouseOver);

after the object is loaded, but it won’t respond to the interaction.
Any ideas?

   

Avatar
Matse, Sr. Member
Posted: 26 April 2012 10:26 PM   Total Posts: 149   [ # 1 ]

Hi,
You need to explicitely enable mouse detection on your mesh (I didn’t test but I guess it will work with a container too) :

mesh.mouseEnabled true

default value is false, because mouse detection on meshes comes at a price. See mesh.mouseHitMethod too, it defines wether the detection is done on a bounding box (faster) or the exact mesh (slower).

Also if you haven’t already you might want to download the beta examples, there is one dedicated to mouse detection https://github.com/away3d/away3d-examples-fp11

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X