Maybe you should try adding trace statements to show each time the mouse handler is added? That way you can try and track to make sure that the handler is active.

This might not be related, but it's possible that it could help to add an extra removeEventListener call before your addEventListener call, just in case there are multiple handlers being generated. I don't know if it would act weird if it had two handlers


On Sat, 12 Dec 2009 23:24:26 -0800, Anthony <[email protected]> wrote:

Hi there,

I have a problem with the MouseDown Event on a Mesh create via a
Elevation height Map.

I've create the mesh fine and I can fly around over the landscape with
out any problem.

I add the event to the mesh and it works fine for about 4 clicks.
returning the x , y , z's of the mouse position.
But after that, It just seems to stop working. I thought that it might
be the garbage collection deleting the link maybe,
But I can't seem to put my finger on it.

I tried refing the object more directly.
eg.
(this.)       (class holding) (_view = view3d)....
TheParent.Eng._view.drawPrimitiveStore.view.scene.children
[0].addOnMouseDown(TerrainIsClickedOn);

but the same thing still seems to happen.

I have designed the mouse to look around only with the ctrl is pressed
down.

When ctrl is down it removes the event,
when ctrl is up it add's the event back on.

Have you ever come across this problem?

Thanks


Reply via email to