import mx.core.UIComponent;
private function hideAndRemoveFromLayout(event:Event):void
{
(event.target as UIComponent).visible = false;
(event.target as UIComponent).includeInLayout = false;
}