Images loading in photogallery tutorial problem :(

Well, I’ve followed this tutorial:

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

And when I play it:

http://frampa.messiahsoft.net/photogallery.html

It does that. It doesn’t load it into the rectangle that I created. o.O I followed everything correctly and I’ve been trying to fix it but can’t.

In advance, thanks! :slight_smile:

Check the registration point of the movieclip that your images load into. The registration point should be in the upper left corner instead of the middle.

em, lol i’m nuts. i’m new to flash mx so what is the registration point? the circle that shows up in the middle? because if it is, i just tried that and it didn’t work.

The registration point is the little circle that has a black cross in it. It should be in the upper left corner.

If it still doesn’t work then post your file so I can see what’s going on.

em post the whole thing? here’s my main code:

//Code written by sbeener (suprabeener)
/*
i wrote this code, but you can use and abuse it however you like.
the methods are defined in the order which they occur to make it
easier to understand.
*/
// variables ------------------------------------------
// put the path to your pics here, include the slashes (ie. “pics/”)
// leave it blank if they’re in the same directory
this.pathToPics = “http://frampa.messiahsoft.net/cam/”;
// fill this array with your pics
this.pArray = [“sky1.JPG”];
this.fadeSpeed = 20;
this.pIndex = 0;
// MovieClip methods ----------------------------------
// d=direction; should 1 or -1 but can be any number
//loads an image automatically when you run animation
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {
// make sure pIndex falls within pArray.length
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
// specify the movieclip to load images into
var p = _root.photo;
//------------------------------------------
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
// Actions -----------------------------------------
// these aren’t necessary, just an example implementation
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);

the arrow codes don’t matter. they’re right so yeah and they work.

I’m talking about posting your FLA file, not the code.

oh sorry…

it’s not uploading to my FTP.

Zip up your FLA file and attach it to your post. When you post, look at the bottom, there is a drop down menu for you to attach the file.

There is something wrong with my winzip program so I uploaded it to freewebs.com

http://freewebs.com/brokendd/photogallery.fla

When I said to move the registration point to the upper left corner I guess you misunderstood me and moved the entire movieclip which is wrong.

To move the registration point, you need to go inside the movieclip and move the contents till the registration is in the upperleft corner.

Here is your file.

I thought that was what I did.

Sorry to be a bother. >.<

And thanks, very much. :slight_smile:

no problem. =)

gosh i must be retarded or something. lol. i can’t get the pictures to show up now. [sighs and bangs head on the table]

post one of your image files, let me see if i can get it to load with the file i have here.

watch me post the wrong thing again. lol @ my tiredness.

http://frampa.messiahsoft.net/cam/sky1.JPG

Ok I went through your file and found code pasted everywhere. I guess you accidently clicked on symbols and applied the code to them.

I cleaned up your file and tested it and it works. Also had to rescale your image for it to fit because it’s huge.

Here’s your file.

Omgoodness! Gosh! Geeze! Thank you SO much! You are the coolest person in the world!! THANK YOU!