Gallery preloader problem

Based on Scotty’s awesome gallery demo (thread can be found @

I modified the preloader function to use a customized preloader (play 100 frames) instead of simple width preloader. I can’t get the preloader to work and my brain basically is on the writer’s block and can’t come up any solution idea. The problem lies with var precent:Number… and can’t com up with something to replace “con._width” since this is intended for the width preloader…

preloader function:

function preloadPic() {
	var con = picture.duplicateMovieClip("con"+k, 9984+k);
	preloader._visible = 1;
	con._alpha = 0;
	var temp = _root.createEmptyMovieClip("temp"+k, 99+k);
	temp.onEnterFrame = function() {
		var total = con.getBytesTotal();
		var loaded = con.getBytesLoaded();
		var percent:Number = Math.round(loaded/total*100);
		if (con._width) {
			preloader._visible = 0;
			con.onEnterFrame = fadeIn;
			if (slide) {
				id = setInterval(nextImage, 5000);
			delete this.onEnterFrame;

any suggestion?

Friggin’ Mick