I want to set an object to null when it’s being clicked and I’m trying to implement this code:
public function onClick(evt:MouseEvent):void{
var thisPatient = evt.target;
thisPatient = null;
}
However, the element is still on the stage.
But it’s bad practive to allow children to remove itself. More right solution is dispathing event because parent must decide remove or not remove child.