# Help with jpg preload code

**URL:** <https://forum.kirupa.com/t/help-with-jpg-preload-code/75605>\
**Category:** Uncategorized\
**Created:** [January 10, 2005, 6:19pm UTC](https://forum.kirupa.com/t/help-with-jpg-preload-code/75605 "2005-01-10T18:19:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nytewlkr](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@nytewlkr](https://forum.kirupa.com/u/nytewlkr)\
**Post date:** [January 10, 2005, 6:19pm UTC](https://forum.kirupa.com/t/help-with-jpg-preload-code/75605/1 "2005-01-10T18:19:01Z")

</div>

I current have about 20 thumbnails, that when I click them they load external jpgs on the stage.(for a porfolio section) I currently have this working. I am wondering how to go about setting up a preloader for each jpg. I currently have a preloader that is in the first scene of this flash document, if possible I would like to reuse the one that I already have? any ideas?

Currently my code for each thumnail is:

holder\_mc.\_width = 410;  
holder\_mc.\_height = 308;  
holder\_mc.loadMovie(“pics/pic01.jpg”);

thumbnail01.onRelease=function(){  
holder\_mc.\_width = 410;  
holder\_mc.\_height = 308;  
holder\_mc.\_alpha = 100;  
holder\_mc.loadMovie(“pics/pic01.jpg”);  
}  
thumbnail02.onRelease=function(){  
holder\_mc.\_width = 410;  
holder\_mc.\_height = 308;  
holder\_mc.\_alpha = 100;  
holder\_mc.loadMovie(“pics/pic02.jpg”);  
}  
thumbnail03.onRelease=function(){  
holder\_mc.\_width = 410;  
holder\_mc.\_height = 308;  
holder\_mc.\_alpha = 100;  
holder\_mc.loadMovie(“pics/pic03.jpg”);  
}  
thumbnail04.onRelease=function(){  
holder\_mc.\_width = 410;  
holder\_mc.\_height = 308;  
holder\_mc.\_alpha = 100;  
holder\_mc.loadMovie(“pics/pic04.jpg”);  
}

where thumbnail and pic are actually names.

[actual](http://www.jfiore.com/work.zip) file
