Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getPhoto(i:uint, callback:Function):BitmapData
- {
- var BMD:BitmapData = new BitmapData(photos[i].width, photos[i].height);
- var imgReq:URLRequest = new URLRequest(photos[i].source);
- var imgLoader:URLLoader = new URLLoader();
- imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void
- {
- callback((imgLoader.content as Bitmap).bitmapData);
- });
- imgLoader.load(imgReq);
- }
Add Comment
Please, Sign In to add comment