                                 smoothing:Boolean = false)
     {
         super(bitmapData, pixelSnapping, smoothing);
+        
+        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
+            this.addEventListener(Event.ADDED, addedHandler);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+    
+    private var mirror:Boolean = false;
+    private var origMatrix:Matrix;
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Properties
+    //
+    //--------------------------------------------------------------------------
+    
+    //----------------------------------
+    //  x
+    //----------------------------------
+    
+    private var _x:Number = 0;
+    
+    /**
+     *  @private
+     *  In the mirroring case, we restore the old transform matrix,
+     *  call the superclass' setter to recalculate the transform matrix,
+     *  and call validateTransformMatrix to de-mirror the matrix.
+     *  This ensures that the right matrix values are used when 
+     *  de-mirroring.
+     */
+    override public function set x(value:Number):void
+    {
+        if (mirror)
+        {
+            transform.matrix = origMatrix;
+            super.x = value;
+            _x = value;
+            validateTransformMatrix();
+        }
+        else
+        {
+            super.x = value;
+        }
+    }
+    
+    /**
+     *  @private
+     */
+    override public function get x():Number
+    {
+        // FIXME(hmuller): by default get x returns transform.matrix.tx rounded to the nearest 20th.
+        // should do the same here, if we're returning _x.
+        return (mirror) ? _x : super.x;
+    }
+    
+    //----------------------------------
+    //  width
+    //----------------------------------
+    
+    /**
+     *  @private
+     */
+    override public function set width(value:Number):void
+    {
+        if (mirror)
+        {
+            transform.matrix = origMatrix;
+            super.width = value;
+            // Store new scaleX/Y since setting width may modify them
+            _scaleX = super.scaleX;
+            _scaleY = super.scaleY;
+            validateTransformMatrix();
+        }
+        else
+        {
+            super.width = value;
+        }
+    }
+    
+    //----------------------------------
+    //  height
+    //----------------------------------
+    
+    /**
+     *  @private
+     *  We must override height as well because setting
+     *  height will force scaleX to be positive in the transform
+     *  matrix.
+     */
+    override public function set height(value:Number):void  
+    {
+        if (mirror)
+        {
+            transform.matrix = origMatrix;
+            super.height = value;
+            // Store new scaleX/Y since setting height may modify them
+            _scaleX = super.scaleX;
+            _scaleY = super.scaleY;
+            validateTransformMatrix();
+        }
+        else
+        {
+            super.height = value;
+        }
+    }
+    
+    //----------------------------------
+    //  scaleX
+    //----------------------------------
+    
+    private var _scaleX:Number;
+    
+    /**
+     *  @private
+     */
+    override public function set scaleX(value:Number):void
+    {
+        if (mirror)
+        {
+            transform.matrix = origMatrix;
+            super.scaleX = value;
+            _scaleX = value;
+            validateTransformMatrix();
+        }
+        else
+        {
+            super.scaleX = value;
+        }
+    }
+    
+    override public function get scaleX():Number
+    {
+        return (mirror) ? _scaleX : super.scaleX;
+    }
+    
+    //----------------------------------
+    //  scaleY
+    //----------------------------------
+    
+    private var _scaleY:Number;
+    
+    /**
+     *  @private
+     */
+    override public function set scaleY(value:Number):void
+    {
+        if (mirror)
+        {
+            transform.matrix = origMatrix;
+            super.scaleY = value;
+            _scaleY = value;
+            validateTransformMatrix();
+        }
+        else
+        {
+            super.scaleY = value;
+        }
+    }
+    
+    override public function get scaleY():Number
+    {
+        return (mirror) ? _scaleY : super.scaleY;
     }
 
     //--------------------------------------------------------------------------

        width = newWidth;
        height = newHeight;
    }
}

}

    //  Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  layoutDirection
    //----------------------------------
    
    private var _layoutDirection:String = LayoutDirection.LTR;
    
    /**
     *  @inheritDoc
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4.1
     */
    public function get layoutDirection():String
    {
        return _layoutDirection;
    }
    
    public function set layoutDirection(value:String):void
    {
        if (value == _layoutDirection)
            return;
        
        _layoutDirection = value;
        invalidateLayoutDirection();
    }

    //----------------------------------
    //  measuredHeight
