private var imageHolder:BitmapData;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, saveImage);
loader.load(new URLRequest("http://www.domain.com/icon.png"));
public function saveImage(event:Event):void {
imageHolder= event.target.content.bitmapData;
}
That should work.
Paul.
On Thu, Jul 30, 2009 at 3:42 PM, timgerr<[email protected]> wrote:
>
>
> Hello all,
> I am in need of a way to store a picture for using in my application. I will
> be using this picture as an avatar so I dont want to have to call it from a
> url every time I need it. I would like to do somting like this:
>
> [Embed(source="http://mydomain/somepics.jpeg")]
> [Bindable]
> public var Logo:Class;
>
> How can I store an image into a class, or how can I reuse an image??
>
> Thanks
> timgerr
>
>