upload image and load it
/**
* 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 );
});
}
}
}