# How to preload dynamically loaded images

**URL:** <https://forum.kirupa.com/t/how-to-preload-dynamically-loaded-images/9088>\
**Category:** Uncategorized\
**Created:** [December 4, 2002, 5:25pm UTC](https://forum.kirupa.com/t/how-to-preload-dynamically-loaded-images/9088 "2002-12-04T17:25:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghostz](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@ghostz](https://forum.kirupa.com/u/ghostz)\
**Post date:** [December 4, 2002, 5:25pm UTC](https://forum.kirupa.com/t/how-to-preload-dynamically-loaded-images/9088/1 "2002-12-04T17:25:30Z")

</div>

i’m working on a photo gallery with flash mx… the problem is i’m using quite a lot of photos… and they have to be updated from time to time…

I got help from this website… on the tutorial on how to dynamically load images into the gallery… this way… i can change the images whenever i want… I’ve combined this tutorial with the infinite menu tutorial …so i have a scrollingbar(the buttons itself are dynamically loaded images) as buttons for dynamically loaded images…

the problem is… these pictures are not loaded during preloading… hence… images in the scrolling bar are shown empty initially… and pop up one by one later…

the more efficient way would be for all the images to preload first before the gallery starts… i’ve been searching through the internet for such tutorials…found some really close one… but i don’t quite understand them… i’m still new to flash… in fact… this is my first flash website… and i have little understanding of actionscript…

i hope u can help me with this

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 11, 2003, 12:31am UTC](https://forum.kirupa.com/t/how-to-preload-dynamically-loaded-images/9088/2 "2003-05-11T00:31:31Z")

</div>

i have the same question my friend and yet still no answer. If I find one I’ll let you know,

:pope:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 11, 2003, 8:18am UTC](https://forum.kirupa.com/t/how-to-preload-dynamically-loaded-images/9088/3 "2003-05-11T08:18:28Z")

</div>

i found a slideshow component at  
[http://www.flashcomponents.net/component.cfm?nav=2&id=275](http://www.flashcomponents.net/component.cfm?nav=2&id=275)

the slideshow preloads dynamically loaded images…  
and it shows a preloader for each images…  
it is not exactly what we want… but it’s close to it…  
with a little bit of modification, i’m sure it’s possible…

but i’m not very familiar with actionscript…  
maybe u or your friend can help with the code…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 11, 2003, 4:27pm UTC](https://forum.kirupa.com/t/how-to-preload-dynamically-loaded-images/9088/4 "2003-05-11T16:27:47Z")

</div>

Here ya go…

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=15472](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=15472)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 12, 2003, 3:58am UTC](https://forum.kirupa.com/t/how-to-preload-dynamically-loaded-images/9088/5 "2003-05-12T03:58:35Z")

</div>

Thank You lostinbeta!! Man- I was about to pull my hair out.  
I noticed in that thread you talked about non-cache code and was wondering how you tell it to be cachable or non-cachable? Anyway thanks again for the code snippet!!!

:pope:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 12, 2003, 4:13am UTC](https://forum.kirupa.com/t/how-to-preload-dynamically-loaded-images/9088/6 "2003-05-12T04:13:29Z")

</div>

No-Cache Prototype:

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=14268&perpage=15&pagenumber=3](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=14268&perpage=15&pagenumber=3)

First post on that page… its excellent!
