纳金网

标题: 点击一个物体,事件为什么捕捉不到 [打印本页]

作者: 愤怒的小牛    时间: 2013-1-9 16:45
标题: 点击一个物体,事件为什么捕捉不到
public function addPlane() : void{var material : ColorMaterial = new ColorMaterial(0xffffff);var geometry : PlaneGeometry = new PlaneGeometry(500, 500);var mesh : Mesh = new Mesh(geometry, material);mesh.y = -100;material.lightPicker = light;meshlist.push(mesh);view.scene.addChild(mesh);material.addEventListener(MouseEvent3D.MOUSE_DOWN, mouseDown);geometry.addEventListener(MouseEvent3D.MOUSE_DOWN, mouseDown);mesh.addEventListener(MouseEvent3D.MOUSE_DOWN, mouseDown);}private function mouseDown(e : MouseEvent3D) : void{trace("点击");}结果mouseDown方法没有执行,监听加错对象了吗?
作者: 愤怒的水果刀    时间: 2013-2-28 10:40
mouseEnabled
你要启用mesh的这些属性才支持点击
作者: fgdf#dfg    时间: 2013-4-16 17:38
顶!!!!!!!!!!!!!!!!!!




欢迎光临 纳金网 (http://rs.narkii.com/club/) Powered by Discuz! X2.5