Hi Jerome,

Unfortunately I cannot share an example right now, as the project is still in 
progress, but here is the basic idea:

1. Create a new scene and add several objects
2. Do not make the 3D scene as large as the stage, and do not make it render 
every frame
3. Add a mouse over event listener to each of your 3D objects

You will notice that the roll over events will only fire once you roll over the 
entire 3D scene. However, if your mouse moves from one 3D object to another 
(like if they are adjacent to each other), it will not fire the second event.

The reason this happens is because there is a mouse over event tied to the 
entire view object. When that happens, it figures out which object is under the 
mouse and it fires the event. However, no further events fire unless you mouse 
out and mouse over the view object again.

When you run runder, it adds a second layer of event dispatching, where every 
time it renders it checks to see which object is under the mouse. As this 
changes, it fires the extra set of events. These are the events I was missing.

So if you render every frame it works fine, or if you explicitly call the 
fireEvent method like I did it also works.

My suggestion was that it may be nice to add a new method or simplify the 
methods so that it is easier to make the view update its mouse events without 
causing it to redraw. Redrawing can be expensive performance-wise, so that is 
why I ran into this issue. It did not occur in my previous projects because I 
rendered on every frame. In this project I only render when I have camera 
movement, and otherwise do not continue to render the scene.


On Sat, 02 Jan 2010 14:39:17 -0800, elguapoloco 
<[email protected]> wrote:

Hi,

Could you post a link or an example of what you are talking about?
Depending on the setup there are many ways of adding mouse events so
that might help figuring out the best!

Cheers,

Jerome.

Reply via email to