Need help making a photo gallery

Hey everyone,

I’ve been using the tutorial found on http://www.kirupa.com/developer/mx/photogallery.htm to help me make my photo gallery. However, although I did everything the same to a T, it still doesn’t work. I’ve spent forever trying to figure out what’s wrong.

I’ve adjusted the script accordingly to how the tutorial explains, and I even tried using different folders. I know it’s working, because the output isn’t returning any error messages. Something makes me feel that it’s reading but the pictures aren’t being displayed.

I don’t know, I was hoping somebody could help me out. I’d appreciate it, thanks.

AJ

What kind of pics are you using?
They should be non-progressive jpeg’s;)

scotty(-:
btw Welcome to kirupa=)

I’m using the same tutorial and I’m having the same issue. Also once I get it working how do you get the photo gallery to start changing images automatically instead of using te buttons to change images?

Have a look for setInterval():wink:

scotty(-:

Thanks Scotty for both fixes. I “thought” I had my jpegs saved as non-progressive. I changed them to basline in Photoshop and it loads now and it plays automatically.

welcome:thumb:

Well, I thought I had it playing automatically. Where does the setInterval need to be? I’m not that good with as.

At the end of your code put this

setInterval(this, "changePhoto", 3000, 1);

the 3000 is the time in msecs:)

scotty(-:

I almost had it. I did not have the changePhoto in the setInterval. Thanks…working.

welcome;)

Hi, scotty!

I got similar problem with as ajaxx’s. i followed the same tutorial and couldn’t make it work.:-/ at some point, the photo actually showed up, but the button didn’t work. and then the button work, but the photo wasn’t in the right place (it always showed up at the bottom of the masked layer).

attached what i got. hope u can help me. thanks a lot!

Thank you so much for this tutorial… it’s a life saver!!!
Well, it works fine for me … but what I want to know is:

I have some humongous images … over 1000*1000 pixles in dimension.
How do we make the code resize each image to fit within the mask ?
Don’t tell me I have to resize every single picture!!!

http://www.kirupa.com/developer/mx/photogallery.htm

@liltea, the photo mc’s registrationpoint should be topleft, you had it in middle left and you’ve scaled it, so the picture gets scaled as well:)
The pictures in your folder had a .jpg.jpg extension and if you use text in your buttons, uncheck the selectable option…
I’ve attached the fixed fla;)

scotty(-:

@axelmurillo, you can scale them after the picture is fully loade, so just before the fadeIn function, but…why load such a big picture?
If resize them before you load them (in eg Photoshop) the loading time will be much less and your audience much more happy;)

scotty(-:

Thanks a lot, scotty!

but, i can’t open the .swf file… it says “unexpected file format” :frowning:

Here it is again:)

scotty(-:

aaah… Thanks a lot!! :smiley:

no problem:thumb:

Oh wow … my audience won’t mind!!! (and we’ll all work so much less!!)
see, i have about 500 images in a bunch of different albums… about 30-50
and i wanna upload them all using this tutorial.
could you please tell me how to scale it after it loads? i don’t know
how to edit actionscript. i know cut and paste!
:rabbit:
i appreciate your help so!!!

thanks

Change the loadMeter prototype in this:

MovieClip.prototype.loadMeter = function() {
	var i, l, t;
	l = this.photo.getBytesLoaded();
	t = this.photo.getBytesTotal();
	if (t>0 && t == l && this.photo._width>0 && this.photo._height>0) {
		//change the "25" to the value you want
		this.photo._xscale = this.photo._yscale=25;
		this.onEnterFrame = fadeIn;
	} else {
		trace(l/t);
	}
};

?

scotty(-: