     //--------------------------------------------------------------------------
 
     //----------------------------------
-	//  target
+    //  target
     //----------------------------------
 
-	[Inspectable(category="General")]
+    [Inspectable(category="General")]
 
-	/**
-	 *  The child to remove from the view.
-	 */
-	public var target:DisplayObject;
+    /**
+     *  The child to remove from the view.
+     */
+    public var target:Object;
 
     //--------------------------------------------------------------------------
     //


import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import mx.core.mx_internal;
import mx.core.UIComponent;

/**

    /**
     *  @inheritDoc
     */
    public function apply(parent:UIComponent):void
    {
        removed = false;
        
        var obj:* = getOverrideContext(target, parent);
        
        if ((obj is DisplayObject) && obj.parent)
        {
            oldParent = obj.parent;
            oldIndex = oldParent.getChildIndex(obj);
            oldParent.removeChild(obj);
            removed = true;
        }
    }

    /**
     *  @inheritDoc
     */
    public function remove(parent:UIComponent):void
    {
        var obj:* = getOverrideContext(target, parent);
        
        if (removed && (obj is DisplayObject))
        {
            oldParent.addChildAt(obj, oldIndex);

            // Make sure any changes made while the child was removed are reflected
            // properly.
            if (obj is UIComponent)
                UIComponent(target).mx_internal::updateCallbacks();

            removed = false;
        }
    }
}

}
