Away3D 4.0 MouseEvent3D not firing in Flex spark application

Software: Away3D 4.x

shanepdesigns, Newbie
Posted: 14 December 2011 03:40 AM   Total Posts: 4

I can’t get MouseEvent3D events to fire in flex (spark). I have tried this with the flex 4.5 and 4.6 sdk.  I have set the properties that enable click events, I have created a custom skin for the application to remove the background that normally covers the Stage3D layer. Just to test a theory I have even set the whole application.visible=false so the only layer should be the stage3d and I can see my whole 3D scene, but no mouse events. 

I have created an extensive app that has my whole gui done in flex that sits on top of multiple 3D scenes. It would be a lot of work to redo it in pure as3.

Should MouseEvent3D events work in flex? Has anyone got them to work in flex or am I the only person trying?

Thanks,

-Shane

   

Jin, Newbie
Posted: 26 December 2011 05:15 PM   Total Posts: 3   [ # 1 ]

Same problem here.

Is there a temporary solution for this?

   

LIO, Newbie
Posted: 14 February 2012 11:32 PM   Total Posts: 4   [ # 2 ]

public function CameraControlerGame(v:View3D , s:Stage,d:Elevation)
  {
  _view = v
  _camera = _view.camera
  _camera.lens =_lens
  _camera.lens.near = 0.1

  _terrianElevation = d;
 


  _cameraControler = new HoverController(_camera , _cameraTarget,0,30,30,20,89)

  _cameraControler.steps = 2;
  _stage = s


  _terrianElevation.addEventListener(MouseEvent3D.MOUSE_OVER, onMouse3dClick)

  _stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseButtonDown )
  _stage.addEventListener(MouseEvent.MOUSE_UP, onMouseButtonUp )

  _stage.addEventListener(MouseEvent.MOUSE_WHEEL , onMouseScroll)


  _stage.addEventListener(KeyboardEvent.KEY_DOWN , onKDown)
  _stage.addEventListener(KeyboardEvent.KEY_UP , onKUp)



  }
  public function onMouse3dClick(e:MouseEvent3D):void
  {
  trace(e.target.x)
  }


Hi MouseEvent3D doesn’t work here. What is wrong with it. I tried everything but it doesn’t trigger the event at all. I’m trying to get the coordinates of an Elevation when mouse click.Thanks in advance smile . Chears

   

LIO, Newbie
Posted: 16 February 2012 05:31 PM   Total Posts: 4   [ # 3 ]

_terrianElevation.addEventListener(MouseEvent3D.MOUSE_MOVE, onMouse3dClick)
  _terrianElevation.mouseEnabled = true;
  _terrianElevation.mouseDetails = true;
  }
  public function onMouse3dClick(event:MouseEvent3D):void
  {
 
 
  trace(event.localX +”  X, “+ event.localY+”  Y, “+event.localZ+”  Z, “)
 
 
  }

Just press: _terrianElevation.mouseEnabled = true;  - for the event
  _terrianElevation.mouseDetails = true; - for details like tthe point of the click;

   

rich, Newbie
Posted: 03 April 2012 02:01 AM   Total Posts: 17   [ # 4 ]

I’m having the same issue…I even add a Cube and do the following without any success:

this.mouseEnabled = true;
  this.mouseChildren=true;
  _view3D.forceMouseMove = true;
  _view3D.mouseEnabled = true;
  _view3D.mouseChildren = true;
  mesh.mouseEnabled = true;
  mesh.mouseChildren = true;
  _view3D.scene.addChild( mesh );
  mesh.addEventListener(MouseEvent3D.MOUSE_MOVE,cubeMove);
  mesh.addEventListener(MouseEvent3D.CLICK,cubeClick);
  mesh.addEventListener(MouseEvent3D.MOUSE_OVER,cubeOver);
  mesh.addEventListener(“mouseDown”,cubeMouseDown);
  mesh.addEventListener(“mouseOver”,cubeMouseOver);

Any thoughts or any more word on this?

Thanks in advance.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X