I want to make an object to be highlighted when the mouse is over it. So I create 2 event listeners: MouseEvent3D.MOUSE_OVER and MouseEvent3D.MOUSE_OUT. When the first occurs, I increase the thickness of the outline of the object. When the second occurs, I decrease the thickness back to normal. However, when I test the flash, I don’t see anything happening after I roll the mouse over the object. The code is very simple:
protected function _MODULE_EXCHANGE_onMouseOver( e:MouseEvent3D ):void {
deze.meshes[0].outline.thickness = 6;
}
protected function _MODULE_EXCHANGE_onMouseOut( e:MouseEvent3D ):void {
deze.meshes[0].outline.thickness = 1;
}
I’ve noticed that everything works fine for a few seconds after the movement of the camera stops. But when those few still seconds pass, the image on the screen stops changing. I guess this might have something to do with the way I call view.render()...
addEventListener( Event.ENTER_FRAME, _MODULE_EXCHANGE_onEnterFrame );
...
protected function _MODULE_EXCHANGE_onEnterFrame( e:Event ):void {
view.render();
}