      */
     private function initAdvancedLayoutFeatures():void
     {
-        var features:AdvancedLayoutFeatures = new AdvancedLayoutFeatures();
-        
-        features.layoutScaleX = scaleX;
-        features.layoutScaleY = scaleY;
-        features.layoutScaleZ = scaleZ;
-        features.layoutRotationX = rotationX;
-        features.layoutRotationY = rotationY;
-        features.layoutRotationZ = rotation;
-        features.layoutX = x;
-        features.layoutY = y;
-        features.layoutZ = z;
-        features.layoutWidth = width;  // for the mirror transform
-        _height = height;  // for backing storage
-        layoutFeatures = features;
+        // Get AdvancedLayoutFeatures if it exists.
+        if (layoutFeaturesClass == null)
+        {
+            var appDomain:ApplicationDomain = ApplicationDomain.currentDomain;
+            
+            if (appDomain.hasDefinition("mx.core::AdvancedLayoutFeatures"))
+                layoutFeaturesClass = Class(appDomain.getDefinition("mx.core::AdvancedLayoutFeatures"));
+            
+            // Get MatrixUtil class if it exists
+            if (MatrixUtilClass == null)
+            {
+                if (appDomain.hasDefinition("mx.utils::MatrixUtil"))
+                    MatrixUtilClass = Class(appDomain.getDefinition("mx.utils::MatrixUtil"));
+            }
+        }
+        
+        if (layoutFeaturesClass != null)
+        {
+            var features:IAssetLayoutFeatures = new layoutFeaturesClass();
+            
+            features.layoutScaleX = scaleX;
+            features.layoutScaleY = scaleY;
+            features.layoutScaleZ = scaleZ;
+            features.layoutRotationX = rotationX;
+            features.layoutRotationY = rotationY;
+            features.layoutRotationZ = rotation;
+            features.layoutX = x;
+            features.layoutY = y;
+            features.layoutZ = z;
+            features.layoutWidth = width;  // for the mirror transform
+            _height = height;  // for backing storage
+            layoutFeatures = features;
+        }
     }
     
     /**

     */
    override public function get height():Number
    {
        // Return bounding box height in mirroring case
        return (layoutFeatures == null) ? super.height :
               MatrixUtil.transformSize(layoutFeatures.layoutWidth, _height, transform.matrix).y;
    }
    
    /**

        _measuredWidth = width;
        _measuredHeight = height;
        
        if (FlexVersionClass == null)
        {
            var appDomain:ApplicationDomain = ApplicationDomain.currentDomain;
            if (appDomain.hasDefinition("mx.core::FlexVersion"))
                FlexVersionClass = Class(appDomain.getDefinition("mx.core::FlexVersion"));
        }
        
        if (FlexVersionClass && FlexVersionClass["compatibilityVersion"] >= FlexVersionClass["VERSION_4_0"])
            this.addEventListener(Event.ADDED, addedHandler);
    }

