lzosi

用心,才能做出最好吃的菜!

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

(1)克隆

model.clone()

var clone:Mesh3D = pivot3D.clone() as Mesh3D;
clone.addEventListener( MouseEvent3D.MOUSE_OVER, mouseOverEvent ); //鼠标放在上面
clone.addEventListener( MouseEvent3D.MOUSE_OUT, mouseOutEvent );    //鼠标移开
clone.addEventListener( MouseEvent3D.MOUSE_MOVE, mouseMoveEvent );    //鼠标移动
clone.useHandCursor = true; //显示光标是手
scene.addChild( clone );

private function mouseOverEvent(e:MouseEvent3D):void
{
  e.target.setScale( 1.2, 1.2, 1.2 );  //放大
}

private function mouseOutEvent(e:MouseEvent3D):void
{
  e.target.setScale( 1, 1, 1 );   //正常
}

 

private function mouseMoveEvent(e:MouseEvent3D):void
{
  e.target.rotateZ( 2 );  //按中心点旋转
}

 


CLICK    点击一下
MOUSE_DOWN  一直按下去
MOUSE_MOVE  移动
MOUSE_OUT   移开
MOUSE_OVER  移上去
MOUSE_UP   点击抬起
MOUSE_WHEEL   滚轮

 

 

 

posted on 2012-02-13 11:19  lzosi  阅读(236)  评论(0编辑  收藏  举报