(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 滚轮