# Preloader for thumbnails

**URL:** <https://forum.kirupa.com/t/preloader-for-thumbnails/265392>\
**Category:** Uncategorized\
**Created:** [July 8, 2008, 2:04pm UTC](https://forum.kirupa.com/t/preloader-for-thumbnails/265392 "2008-07-08T14:04:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vineet](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@vineet](https://forum.kirupa.com/u/vineet)\
**Post date:** [July 8, 2008, 2:04pm UTC](https://forum.kirupa.com/t/preloader-for-thumbnails/265392/1 "2008-07-08T14:04:22Z")

</div>

hi everyone

i have three thumbnails on the stage and onclick the big pic will load in the big grey area.

i have percentage preloader before the big pic loads.

now i want to have the same percentage preloader for thumbs. means i have made three movieclips as thumbs and m loading the small pics as thumbs inside the movieclips.

i know how to create preloader and load complete website but that script doesnt work with this concept.

i want to know how can i create individual percentage preloader for the small thumbs that shows how much each small pic has loaded.

at present i have just inserted the text showing loading but i need a percentage preloader.

the actionscript i m using is below :

pText.\_visible = false;  
my\_mc = new MovieClipLoader();  
preload = new Object();  
my\_mc.addListener(preload);  
preload.onLoadStart = function(targetMC) {  
pText.\_visible = true;  
};  
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {  
pText.text = "% "+Math.round((lBytes/tBytes)\*100);  
};  
preload.onLoadComplete = function(targetMC) {  
pText.\_visible = false;  
};

thumb1.holdr.loadMovie(“pic1\_thumb.jpg”);  
thumb2.holdr.loadMovie(“pic2\_thumb.jpg”);  
thumb3.holdr.loadMovie(“pic3\_thumb.jpg”);  
thumb1.btn.onPress = function() {  
my\_mc.loadClip(“pic1.jpg”, “container.sub”);  
};  
thumb2.btn.onPress = function() {  
my\_mc.loadClip(“pic2.jpg”, “container.sub”);  
};  
thumb3.btn.onPress = function() {  
my\_mc.loadClip(“pic3.jpg”, “container.sub”);  
};

---

<div class="post-metadata">

**Author:** ![jorawar](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@jorawar](https://forum.kirupa.com/u/jorawar)\
**Post date:** [July 8, 2008, 3:10pm UTC](https://forum.kirupa.com/t/preloader-for-thumbnails/265392/2 "2008-07-08T15:10:01Z")

</div>

Hi,

find the attached file…  
now its working fine . .

---

<div class="post-metadata">

**Author:** ![vineet](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@vineet](https://forum.kirupa.com/u/vineet)\
**Post date:** [July 9, 2008, 4:29am UTC](https://forum.kirupa.com/t/preloader-for-thumbnails/265392/3 "2008-07-09T04:29:55Z")

</div>

[QUOTE=jorawar;2355234]Hi,

find the attached file…  
now its working fine . .[/QUOTE]  
hi jorawar

u didnt get my problem. i didnt wanted to load the pics in the container. that function was already functioning fine in my file.  
what i needed was a individual preloader for the movieclips containing thumbnails. means all three movieclips that load the small thumbnails inside them should show a percentage preloader before the small thumbnail pic loads in that small movieclip. at present they show a “loading” text and i want a preloader instead of that loading text.

vineet
