In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

BitmapData quirk

Get Adobe Flash player
by yonatan 02 Feb 2011
    Embed
/**
 * Copyright yonatan ( http://wonderfl.net/user/yonatan )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/blpD
 */

package {
    import flash.display.*;
    import flash.geom.*;

    public class FlashTest extends Sprite {
        private var bmd:BitmapData = new BitmapData(465, 465, true, 0);
        private var bmp:Bitmap = new Bitmap(bmd);
        private var mtx:Matrix = new Matrix;
        
        public function FlashTest() {
            addChild(bmp);
            bmd.fillRect(new Rectangle(0, 0, 200, 200), 0xff123456);
            mtx.scale(1.01, 1.01);
            bmd.draw(bmd, mtx);
        }
    }
}