# Kirupa's Photo Gallery with Preloader

**URL:** <https://forum.kirupa.com/t/kirupas-photo-gallery-with-preloader/119103>\
**Category:** Uncategorized\
**Created:** [August 11, 2004, 2:11pm UTC](https://forum.kirupa.com/t/kirupas-photo-gallery-with-preloader/119103 "2004-08-11T14:11:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![as\_clark20](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@as\_clark20](https://forum.kirupa.com/u/as_clark20)\
**Post date:** [August 11, 2004, 2:11pm UTC](https://forum.kirupa.com/t/kirupas-photo-gallery-with-preloader/119103/1 "2004-08-11T14:11:32Z")

</div>

Hi everyone,

I followed Kirupa’s excellent photo gallery tutorial and now I want to expand upon it with a preloader, the only problem being is I’m not sure how to build it into the flash file. Any ideas where I can start?

---

<div class="post-metadata">

**Author:** ![kmax](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@kmax](https://forum.kirupa.com/u/kmax)\
**Post date:** [August 11, 2004, 5:53pm UTC](https://forum.kirupa.com/t/kirupas-photo-gallery-with-preloader/119103/2 "2004-08-11T17:53:38Z")

</div>

So you just want to add a preloader to an existing moive?

Just make a new scene… and put it above your current scene…

Then use the kirupa preloader tutorial to make the preloader…  
pretty easy… I have used it before…

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [August 12, 2004, 6:14am UTC](https://forum.kirupa.com/t/kirupas-photo-gallery-with-preloader/119103/3 "2004-08-12T06:14:44Z")

</div>

Or do you want a preloader for each picture?  
That’s built in, look for the loadMeter prototype in the code;)

scotty(-:

---

<div class="post-metadata">

**Author:** ![as\_clark20](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@as\_clark20](https://forum.kirupa.com/u/as_clark20)\
**Post date:** [August 12, 2004, 8:12am UTC](https://forum.kirupa.com/t/kirupas-photo-gallery-with-preloader/119103/4 "2004-08-12T08:12:53Z")

</div>

I’d like a preloader for each picture if possible. Just so that when you fade the pictures out to go to the next, you get a preloader for the next picture so you’re not waiting ages thinking nothing is happening.

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [August 12, 2004, 10:31am UTC](https://forum.kirupa.com/t/kirupas-photo-gallery-with-preloader/119103/5 "2004-08-12T10:31:27Z")

</div>

This will work for a bar with instancename “loadBar” and a textfield with instancename “loadTf”. Replace the old loadMeter code for

```auto
MovieClip.prototype.loadMeter = function() {
	var l, t, per;
	l = this.photo.getBytesLoaded();
	t = this.photo.getBytesTotal();
	per = Math.round((l/t)*100);
	loadBar._visible = 1;
	if (t>0 && t == l) {
		this.onEnterFrame = fadeIn;
		loadBar._visible = 0;
		loadTf.text ="";
	} else {
		loadBar._xscale = per;
		loadTf.text =per;
	}
};

```

scotty(-:

---

<div class="post-metadata">

**Author:** ![as\_clark20](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@as\_clark20](https://forum.kirupa.com/u/as_clark20)\
**Post date:** [August 12, 2004, 10:51am UTC](https://forum.kirupa.com/t/kirupas-photo-gallery-with-preloader/119103/6 "2004-08-12T10:51:43Z")

</div>

Scotty I’m sure you hear this all the time but you’re the man!! How did you get this good at flash, almost every post I read you’ve got some jewel of fantastic information to provide.

Thanks a lot man!

Ads.

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [August 12, 2004, 10:55am UTC](https://forum.kirupa.com/t/kirupas-photo-gallery-with-preloader/119103/7 "2004-08-12T10:55:36Z")

</div>

LOL, no problem:thumb:

I’ve learned it all here at **Kirupa Highschool** 😉

scotty(-:
