Author Topic: Mesh3D.removeEventListener problem  (Read 111 times)

daiwei wei   «   on: April 17, 2012, 06:20:54 AM »
Hi, all:
    The change of Pivot3D.removeEventListener method in Flare3d_2047 caused a problem. Below is the sample code (_mesh is a Mesh3D object in scene):
I call addEventListener of _mesh twice to add two listener function.
    _mesh.addEventListener(Pivot3D.EXIT_DRAW_EVENT, function1, false, 0, true);
    _mesh.addEventListener(Pivot3D.EXIT_DRAW_EVENT, function2, false, 0, true);
After _mesh is rendered, it will dispatch Pivot3D.EXIT_DRAW_EVENT event then and function1 and function1 will all be called. And then I call 
    _mesh.removeEventListener(Pivot3D.EXIT_DRAW_EVENT,  function1);
to remove listener function1, the _eventFlags attribute of _mesh will change to 0 and Pivot3D.EXIT_DRAW_EVENT will not be dispatched any more. This will cause problem because I hope function2 still be called after _mesh is rendered. The problem appears in version 2047 and 2048.

Ivan Vodopiviz   «   Reply #1 on: April 17, 2012, 11:59:39 AM »
Hi,

Thanks for the report, we'll look into it.