Mesh with a child mesh can`t add MouseEventListener,WHY?

Software: Away3D 4.x

datouaizi, Member
Posted: 14 December 2011 08:56 AM   Total Posts: 98

//FURNITURE CLASS EXTENDS MESH
  public class Furniture extends Mesh
    {
private var furniture:Mesh;
private var plane:Plane ;
private var _loader3D:Loader3D;
private var _name:String ;
private var _position:Vector3D ;
 
public function Furniture(loader3D:Loader3D , name:String):void
{
  this._loader3D =loader3D ;
  this._name = name ;
  furniture = Mesh(_loader3D.getChildByName(_name).clone());
  this.addChild(furniture);
 
  trace(furniture.maxX - furniture.minX)
  }
      }
}

//
///////////////////////////////////////
furniture = new Furniture(loader3D,furnitureName);
furniture.mouseEnabled = true ;
furniture.mouseDetails = true ;
furniture.addEventListener(MouseEvent3D.MOUSE_DOWN,furniture_down);

function furniture_down doesn`t` work~~!!what should i do

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X