Hi
I’m doing a gallery, and I have managed to load thumbs perfectly. I have a function that should load a bigger version of the picture on placeholder, but theres something wrong with that function(or something), it just loads all the pictures on a pile to placeholder, even if I don’t press any thumbnail. If you know whats wrong, please tell me. You can see the script here:
This script is in frame 1 of thumbMC, the whole build goes like: main -> textMC -> picsMC -> thumbMC
for (i=1; i<=10; i++) {
this.createEmptyMovieClip("pic"+i,i);
this["pic"+i].loadMovie("thumb/thumb"+i+".jpg");
x_skip = 65;
y_skip = 75;
n_per_row = 8;
this["pic"+i]._x = ((i-1)%n_per_row)*x_skip;
this["pic"+i]._y = int((i-1)/n_per_row)*y_skip;
this["pic"+i].OnPress = this._parent.openPic(i); // Points to openPic() function which is in picsMC, to open the bigger version of the picture.
}
This script is in frame 1 of picsMC
(I have made a placeholderMC into picsMC)
function openPic(picId) {
placeholder.loadMovie("pics/pic"+picId+".jpg");
}
You can see those same codes in here (more clearly) http://epatti.pastebin.com (two most recent posts, top ones)
Thanks