PDA

View Full Version : Preload external image to library?



dejanp
February 7th, 2007, 10:36 AM
Is there any way to preload external image to library or any place other then current stage? Because I want to preload it first and then display it on some other stage. Does this makes sense?

duncanhall
February 7th, 2007, 11:03 AM
Just load it as you would normally, but don't display it. Then when you want to show it, the image will already be in the cache.

See here for an example:

http://www.kirupa.com/forum/showthread.php?t=246135

creatify
February 7th, 2007, 01:21 PM
You can preload your image to one stage, then you can create BitmapData, draw that clip to the bitmap, then attach that bitmap to any other movieclip.

search some threads here for BitmapData - you should find some examples.

duncanhall
February 7th, 2007, 01:27 PM
I'm not disagreeing that would work, but does it not seem like massive overkill when the first suggestion will work?

creatify
February 8th, 2007, 10:51 PM
nope - its not massive overkill at all - if you load that image onto the _root, but need to then have that image within a movieclip on _root, there's no other way to get it there besides reloading it or drawing the img to a bitmap data object.