flash on 2011-5-13
/**
* Copyright fakestar0826 ( http://wonderfl.net/user/fakestar0826 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/6NtP
*/
package {
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.system.LoaderContext;
import flash.events.Event;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.net.URLStream;
import flash.display.Sprite;
public class FlashTest extends Sprite {
private var loader:Loader;
public function FlashTest() {
// write as3 code here..
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.load(new URLRequest("http://assets.wonderfl.net/images/related_images/2/28/282c/282c98afd038d3c20858834890d3e73994b8f60bm"), new LoaderContext(true));
loader.addEventListener(Event.COMPLETE, onLoadComplete);
}
private function onLoadComplete(e:Event):void
{
var bmp:Bitmap = loader.content as Bitmap;
var bmpd:BitmapData = bmp.bitmapData;
var pxls:Array = [];
for(var i:uint = 0;i < bmpd.width;i++)
{
}
addChild(bmp);
}
}
}