Yep - load the image with a loader, then dump it to a BitmapData object. Create 100 Bitmap objects that reference the single BitmapData object. From the docs:
A Bitmap object can share its BitmapData reference among several Bitmap objects, independent of translation or rotation properties. Because you can create multiple Bitmap objects that reference the same BitmapData object, multiple display objects can use the same complex BitmapData object without incurring the memory overhead of a BitmapData object for each display object instance. HTH, Ryan From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of flexaustin Sent: Thursday, February 12, 2009 9:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Loader URLRequest and reuse Or maybe their is a different way to achieve the same end result by importing the image via a loader and creating a bitmapdata copy of it? TIA --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "flexaustin" <flexaus...@...> wrote: > > Have a stumper question. Is there a way in a AS project to load an > image (my.jpg) via a Loader/ URLRequest then store this returned > my.jpg in a var and use it several times, say I wanted to create 100 > of my.jpg? > > And if so will it save on memory? > > Or if I create 100 Loader objects and each one load in a jpg from a > URL will this use the same amount of memory as the above way? > > Right now I am doing the second way and its killing my memory and I > didn't know if their is a way to bring an image and use it as if it > was an object in a Flash CS library. > > Again even if I achieved it the first way would it save me any memory? > This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.