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

flash on 2012-5-11

Get Adobe Flash player
by jokehn9 11 May 2012
    Embed
/**
 * Copyright jokehn9 ( http://wonderfl.net/user/jokehn9 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/6X9r
 */

package {
    import flash.geom.ColorTransform;
    import flash.filters.BlurFilter;
    import flash.geom.Point;
    import flash.geom.Transform;
    import flash.events.Event;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Shape;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public var bd:BitmapData
        public var sh:Shape
        public function FlashTest() {
            var c:ColorTransform;
            // write as3 code here..
            bd = new BitmapData(465,465,true,0x0);
            stage.addChild(new Bitmap(bd))
            
            sh = new Shape()
            sh.graphics.beginFill(0x00ff00)
            sh.graphics.drawRect(0,0,20,20)
            stage.frameRate = 60
            addEventListener("enterFrame", ef);
            function ef(e:Event):void {
                c = new ColorTransform(Math.random(),Math.random(),Math.random(),1,0,0,0,0)
                sh.x = mouseX
                sh.y = mouseY
                bd.draw(sh,sh.transform.matrix, c)
                bd.applyFilter(bd,bd.rect, new Point(0,0),new BlurFilter(30,30,1))
            }

        }
    }
}