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

forked from: test

Get Adobe Flash player
by jokehn9 14 Sep 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/vDY5
 */

// forked from codeonwort's test
package {
    import flash.geom.ColorTransform;
    import flash.geom.Matrix;
    
    import flash.display.Bitmap
    import flash.display.BitmapData
    import flash.display.Sprite
    import flash.events.Event
    
    import flash.net.URLRequest
    import flash.display.Loader
    import flash.system.LoaderContext
    
    public class FlashTest extends Sprite {

        public function FlashTest() {
            // write as3 code here..
            //Wonderfl.disable_capture()
            stage ? init() : addEventListener("addedToStage", init)
        }
        
        private function init(e:Event=null):void {
            removeEventListener("addedToStage", arguments.callee)
            var L:Loader = new Loader
            L.load(new URLRequest("http://tv03.search.naver.net/nhnsvc?size=120x150&quality=9&q=http://sstatic.naver.net/people/90/201007281827221911.jpg"),  new LoaderContext(true))
            L.contentLoaderInfo.addEventListener("complete", load_complete)
        }
        
        private function load_complete(e:Event):void {
            var src:BitmapData = new BitmapData(465, 465, false)
            src.draw(e.target.content)
            
            //zoom blur
            var i:int;
            var k:int;
            var u:uint = 0;
            for(i=0;i<465;i++) {
                for(k=0;k<465;k++) {
                    u = src.getPixel(i,k);
                    u = u & 0x3366ff;
                    src.setPixel(i,k,u);
                }

            }

            addChild(new Bitmap(src))
        }

    }
    
}