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

upload image and load it

Get Adobe Flash player
by mash 31 Aug 2009

    Talk

    davev at 17 Oct 2009 01:13
    I don't see where you get the URL for that image from the GUI.

    Tags

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

package {
    import flash.display.*;
    import flash.events.*;
    import flash.net.*;
    import flash.system.LoaderContext;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            var loader :Loader = new Loader;
            loader.load(
                new URLRequest('http://assets.wonderfl.net/images/related_images/8/89/8916/891606b4da8c1b2cc54ebcd5baf2aa2b8ab532b9m'),
                new LoaderContext( true )
            );
 
            loader.contentLoaderInfo.addEventListener( Event.COMPLETE, function(e :Event) :void {            
                var bd :BitmapData = new BitmapData(80,90);
                var bitmap :Bitmap = new Bitmap( bd );
                bd.draw( loader );
                addChild( bitmap );
            });
        }
    }
}