Kirupa's Photo Gallery with Preloader

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?

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…

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

scotty(-:

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.

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

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(-:

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.

LOL, no problem:thumb:

I’ve learned it all here at Kirupa Highschool:wink:

scotty(-: