Outline material and rendering

Software: Away3D 3.x

Toidas, Newbie
Posted: 25 July 2011 09:32 AM   Total Posts: 5

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_onMouseOvere:MouseEvent3D ):void {
   
   deze
.meshes[0].outline.thickness 6;
  
}
  
  
protected function _MODULE_EXCHANGE_onMouseOute: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()...

addEventListenerEvent.ENTER_FRAME_MODULE_EXCHANGE_onEnterFrame );
...
protected function 
_MODULE_EXCHANGE_onEnterFramee:Event ):void {
   view
.render();
  
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X