Hi all, I've had a look at the view3d class and can see that fireMouseEvents is called during the render function. does this mean that if i'm not continually rendering i wont recieve MouseEvent3ds from the view? I hope to intergrate wii mote control into this project soon which makes this problem elementary. any ideas on how massive a task this will be or whether it has been done before? I would be hoping to get mouse event type information based on point and click type actions.
cheers, Corin On Apr 22, 6:00 pm, richardolsson <[email protected]> wrote: > Your assumption is correct! The event is fired during the render() > traversal. > > Are you aware that Away3D does caching for you? This means that the > render() call will do basically nothing if the scene hasn't changed > from the camera point of view since the last time render() was called. > It still does something though (i.e. some traversal, check what's in > cache et c), so it might make sense for you to do what you're trying > to do. > > A common way of handling this type of thing is to flag the > representation/view as "invalid", triggering a render on the next > ENTER_FRAME event, like so: > > function _handleClick_invalidate(ev:MouseEvent3D) : void > { > _invalid = true; > > } > > function _handleEnterFrame_render(ev:Event) : void > { > // only render if flagged as invalid > if (_invalid) > _view.render(); > > } > > Hope this helps! > > Cheers > /R > > On Apr 22, 5:16 pm, corin_w <[email protected]> wrote: > > > Hi, > > > I am rendering on demand. > > I have literally just changed the listener from an enterframe to a > > mousedown > > totally at a loss as to whats happenening. are mouse events generated > > by the renderer? > > > cheers, Corin > > > On Apr 22, 3:54 pm, Fabrice <[email protected]> wrote: > > > > Hi Corin, > > > What about not adding a listener at all, and render on demand? > > > But if the Flash player hangs, then you probably have something in > > > your code, causing endless loop or something... > > > > Fabrice > > > > On Apr 22, 2009, at 2:35 PM, corin_w wrote: > > > > > hi all, > > > > > I want to restrict when render() gets called and so have only been > > > > calling it when something has changed. simple enough. however if i > > > > call render from a mouse event listener flash player hangs. is there > > > > a way around this other than adding an ENTER_FRAME listener to render > > > > it next frame and then removing it again? > > > > > cheers, Corin
