, Jr. Member
almost right, its just you referenced it wrong…
for example:
MeshBox.x = 20; // if you can manipulate the object like this then you simply remove it the same way, check its location…
“
m_DynamicMeshMap = new Mesh(plane, texMaterial);
[strong]dynamicObject[x][y] = m_DynamicMeshMap;[/strong] //Add to array
m_Scene.addChild(m_dynamicViewLayer.addChild(m_DynamicMeshMap));//this method is weird
}
public function deleteDynamicObject(x:uint, y:uint):void
{
m_Scene.dynamicViewLayer.removeChild(m_DynamicMeshMap);//you wouldnt need the [x][y] i dont think flash cares where it is when you reference that object.
}
try along them lines , see if you can manipulate the object properties, either position, or “visible = false , or what have you Im thinking its a reference issue
If its in an array try remove child at index of eg: removeChild(myArray[1]);