      */
     public function set depth(value:Number):void
     {
-        if(value == depth)
+        if (value == depth)
             return;
 
         allocateLayoutFeatures();
         layoutFeatures.depth = value;  
-        if(_parent != null && _parent is UIComponent)
-            (_parent as UIComponent).invalidateLayering();
+        if (_parent is UIComponent)
+            UIComponent(_parent).invalidateLayering();
         invalidateProperties();
     }
 
     //----------------------------------
     //  x
     //----------------------------------  
+
     [Bindable("propertyChange")]
     [Inspectable(category="General")]
     


        if (newX != currentX || newY != currentY)
        {
            if(layoutFeatures != null)
            {
                layoutFeatures.layoutX = newX;
                layoutFeatures.layoutY = newY;           

            _colorTransform != null ||
            _effectiveAlpha != 1);
    
        if (layoutFeatures != null && layoutFeatures.postLayoutTransformOffsets != null)
        {
            var o:TransformOffsets = layoutFeatures.postLayoutTransformOffsets;
            result = result || (o.scaleX != 1 || o.scaleY != 1 || o.scaleZ != 1 ||
