flash on 2011-6-15

by 9re
♥0 | Line 22 | Modified 2011-06-15 01:34:14 | MIT License
play

ActionScript3 source code

/**
 * Copyright 9re ( http://wonderfl.net/user/9re )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/wRkX
 */

package {
    import flash.text.TextField;
    import flash.utils.setInterval;
    import flash.geom.ColorTransform;
    import flash.display.BitmapData;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            var bd:BitmapData = new BitmapData(1,1);
            bd.setPixel(0,0,0xff);
            var ctx:ColorTransform = new ColorTransform;
            ctx.blueOffset = -1;
            var tf:TextField = new TextField;
            tf.width = tf.height = 465;
            addChild(tf);
            
            
            setInterval(function ():void {
                bd.colorTransform(bd.rect, ctx);
                tf.text = bd.getPixel(0, 0).toString(16);
            }, 100);

        }
    }
}

Forked