Hi guys. I need some urgent help. I am creating 18 planes with movieClip material, addChild to Displayobject3D and assigning them addEventListener(InteractiveScene3DEvent.OBJECT_PR ESS, function). After this event i want to remove to all the events given to all the planes in DisplayObject3D and add new event listener to the one that is clicked to close it. here is my script.
PHP Code:
for(var i:uint=0; i<numberOfVertices; i++)
{
var material:MovieMaterial = new MovieMaterial(btnsArray[i], true, true);
material.doubleSided = true;
material.smooth = true;
material.precise = true;
material.interactive = true;
btnsArray[i].buttonMode = true;
btnsArray[i].addEventListener(MouseEvent.MOUSE_OVER, over);
btnsArray[i].addEventListener(MouseEvent.MOUSE_OUT, out);
plane = new Plane(material, 600, 600);
plane.id = i;
plane.x = sphere1.geometry.vertices[i].x;
plane.y = sphere1.geometry.vertices[i].y;
plane.z = sphere1.geometry.vertices[i].z;
plane.scaleX = plane.scaleY = 0.08;
plane.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, openService, false, 0, true);
pivotDO3D.addChild(plane);
addEventListener(Event.ENTER_FRAME, loopServices);
}
How can i Remove events to disable all planes. activate only one to return it back and reactivate all the planes.