Skip to content

Instantly share code, notes, and snippets.

@arisetyo
Created January 7, 2013 08:48
Show Gist options
  • Select an option

  • Save arisetyo/4473407 to your computer and use it in GitHub Desktop.

Select an option

Save arisetyo/4473407 to your computer and use it in GitHub Desktop.
get bitmap data from Loader
var bmpData:BitmapData;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,doneImageLoad);
loader.load(new URLRequest("https://graph.facebook.com/"+fbID+"/picture?type=large"));
function doneImageLoad(e:Event=null):void {
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,doneImageLoad);
bmpData = e.target.content.bitmapData;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment