# Caching makes the world go round

**URL:** <https://forum.kirupa.com/t/caching-makes-the-world-go-round/158834>\
**Category:** flash\
**Created:** [August 12, 2005, 6:42am UTC](https://forum.kirupa.com/t/caching-makes-the-world-go-round/158834 "2005-08-12T06:42:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grenrock](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@grenrock](https://forum.kirupa.com/u/grenrock)\
**Post date:** [August 12, 2005, 6:42am UTC](https://forum.kirupa.com/t/caching-makes-the-world-go-round/158834/1 "2005-08-12T06:42:23Z")

</div>

I’m writing up a flash website that does all kinds of craziness based on an XML file, and I have a small issue with loading external images. For one panel, (Only one panel is visible at a time, and when a new one is selected the old one gets remove()d to save CPU) I need to load about twenty images - approximately 200-300 kB - and that’s murder to wait for. Therefore, I want to make sure I only have to do it once; I want all necessary downloading to occur in the preloader stage and for the resources to just hang around and wait to be called.

Ok… but here’s the thing: the only API method I know of that allows me to say “this movieclip must show this image now” is MovieClip.loadMovie(), and it’s not as if I can load a movie, immediately remove it but keep a pointer, and then pass the pointer back to a MovieClip later.

Does loadMovie automatically cache downloaded resources, or is that maybe something the browser does? Am I forced to hide panels via panel.\_visible = false if I don’t want redundant downloading? Am I wrong when I claim that movie clips can’t exist without being a descendant of \_root (i.e. I can’t just hold it in a variable)?

thanks in advance!
