Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

loading external images concept

0 views
Skip to first unread message

eRez

unread,
Jan 22, 2006, 8:21:14 AM1/22/06
to
Hi,
i have few flash applications, all of them load external images, and most of
them can have every image appear more than once on the stage.
what i did until recently, is to load every image using the 'loadMovie'
object into a dynamically created MC, scaled it and placed it on the stage,
and load the next image the same way. in case i needed an image again, i
loaded it again counting on that fact the file is in the cache so loading
would be instantly.

what i did recently, after i upgraded to flash 8 and learnt about the
abilities of the bitmpaData object, is to create a temp MC, set its alpha to
0, load (using 'loadMovie') into it the external image, and when its ready
dynamically create a bitmapData object, 'draw' the image of the temp MC into
it, create a MC for the image, attach the bitmapData object to it, scale and
place the MC on the stage, and then load the next image into the temp MC,
till the last image, after which i delete the temp MC. so when i needed to
use an image i already loaded, i just attached its bitmapData object to
another MC.

so, what do u reckon? does it make sense memory-wise and loading-time-wise?

would appreciate the advise of the wise and experts.

eRez
www.3dmuse.com


cubemon

unread,
Jan 22, 2006, 10:37:42 PM1/22/06
to
What are the images? If they are jpegs, you probably aren't gaining
anything, and increasing ram usage. If they are vector, the you might
see some speed increase on reload, but that increase is probably
negligible since the bottleneck is the actual loading, not the
rendering.

2 cents.

0 new messages