How do you select an exported as3 Prefab2 object with the mouse?

Software: Away3D 4.x

Bill7745, Newbie
Posted: 20 December 2015 01:23 AM   Total Posts: 22

Hi I’m trying to select an object with the mouse that I exported as an AS3 class from Prefab2. It’s a soldier that I’m trying to select:

_soldier = new Soldier();
  _soldier.scale(.10);
  _soldier.x = 0;
  _soldier.y = 25;
  _soldier.z = -100;
 
  _soldier.mouseEnabled = true;
  _soldier.addEventListener(MouseEvent3D.MOUSE_DOWN, _soldierOnMouseDown);
  scene.addChild(_soldier);

but it doesn’t work. Any idea how I could select it with the mouse so I can move it around.

   

Tempy111, Sr. Member
Posted: 20 December 2015 12:35 PM   Total Posts: 133   [ # 1 ]

have you created the _soldierOnMouseDown function?
if yes, have you traced to see if it fires?

   

Bill7745, Newbie
Posted: 20 December 2015 09:28 PM   Total Posts: 22   [ # 2 ]

the administrator is helping me with this question in another forum, thanks though.

http://away3d.com/forum/viewthread/6003/

   

Tempy111, Sr. Member
Posted: 20 December 2015 10:14 PM   Total Posts: 133   [ # 3 ]

Good. He can tell you FAR more then I ever can on the subject. seams to be a great guy too.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X