[COLOR=black][FONT=Arial]Hello everyone! I’ve been all through these 60 some pages on this subject and didn’t find what totally what I was looking for… of course eye strain might be a problem so if there is a thread to something I ask please tell me. I apologize in advance if I do. This is my first ever thread also.[/FONT][/COLOR]
First it’s a bettere to start with thumb0 if your using xml/arrays etc cause they’re zerobased.
Give your allthumbs mc an instancename ‘allthumbs’ and add in slidingthumbs thumb9, that’s missing.
Then change your code like this (I give only the modified code)
function galleryChoice() {
pArray = new Array();
tArray = new Array();
iArray = new Array();
my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(loaded) {
if (loaded) {
gallery = this.firstChild;
curLength = gallery.childNodes.length;
for (var i = 0; i<gallery.childNodes.length; i++) {
pArray.push(gallery.childNodes*.attributes.source);
tArray.push(gallery.childNodes*.attributes.thumb);
iArray.push(gallery.childNodes*.attributes.title);
}
}
delay = setInterval(makeButtons, 50);
};
my_xml.load("gallery.xml");
}
function makeButtons() {
tnNr = 1;
clearInterval(delay);
loadButtons();
}
function loadButtons() {
var tbox = allthumbs.slidingthumbs["thumb"+tnNr];
tbox.loadMovie(tArray[tnNr-1]);
temp = this.createEmptyMovieClip("tmp"+tnNr, 999);
temp.onEnterFrame = function() {
bt = tbox.getBytesTotal();
bl = tbox.getBytesLoaded();
if (bt == bl && bt>4) {
trace(tnNr);
nextButton();
delete this.onEnterFrame;
}
};
}
function nextButton() {
if (tnNr<tArray.length) {
tnNr++;
loadButtons();
} else {
activateButtons();
}
}
function activateButtons() {
mainButtons();
for (var i = 1; i<=pArray.length; i++) {
var but = allthumbs.slidingthumbs["thumb"+i];
but.id = i;
but.onRelease = function() {
container.loadPic(pArray[this.id], iArray[this.id]);
disButtons2(this.id);
};
}
container.loadPic(pArray[0], iArray[0]);
disButtons2(0);
}
Thanks for the insanely fast reply! Here’s the updated .fla http://marazita.com/funstuff/main_2.fla The thumbs are off a little bit instead of replacing the thumb’s mc’s… does the registration on the mc’s need to be changed? Also some of the thumbs didn’t load which was odd. And the resize doesn’t work at all… I’m sure this is my fault somehow though. Thank you so much Scotty you’re an invaluable asset to the forums!
First: you have 44 thumbs on stage (thumb0 - thumb43) and 47 nodes in the xml, this way the activateButtons function is never called… change the xml (see attached)
Plus, since you started with thumb0, there were a few errors in the AS:
in the makeButtons;
function makeButtons() {
//changed 1 to 0
tnNr = 0;
clearInterval(delay);
loadButtons();
}
and in the nextButton:
function nextButton() {
//changed to tArray.length-1
if (tnNr<tArray.length-1) {
tnNr++;
loadButtons();
} else {
activateButtons();
}
}
Thanks a heap Scotty. Well on the way to my ideal photogallery. I attached the working files so far. (took out my background image from the .fla so I could upload it) I changed the AS as you told me and it didn’t work… so I just renamed the first one thumb1 and kept the old AS (I know you said it’s best to name it thumb0… but it works now… don’t hit me!! :trout: )
I was wondering if I could make a preloader for the thumbs that’s actually a preloader for the larger image? I was thinking along the lines of making a movieclip and giving it an instance name and having it sit in the library and is called when loading the larger pics on the thumbs. I was thinking along the lines of perhaps a mask (same size as the thumbs that fades in from the bottom… like the thumb is slowly fading in from the bottom up. Is this possible or does it all have to be in actionscript? Any direction would be greatly appreciated. I’m going to link your site (I think it’s your’s… the one in your pro) on mine when I’m done updating it because you’re awesome!
Also one other pondering thought. I was thinking of a rounded edge 50% transperant box in the middle for the border/pic holder. Is it possible to make a mask on the resize box so it has rounded edges or any other shape?
I figured out how to mask the resize image. It was fairly easy. I just added a second border mc and gave in an instance name of border2 then added extra AS for it. Check it out! (it sort of warps a little when it’s stretched different then it’s original shape unfortunetly though)
I would still love to hear what you have to say about the loaders though.
Here’s a file with a preloader
I’ve made some changes to the AS.
For the border mc, there’s a way you can do it but you have to split them in pieces, so the corners keep the same rounding. Check the shadow resize here: http://www.kirupa.com/forum/showthread.php?t=87388
I came across your preloader going through past threads but thanks again. What I was wondering about preloading that was similiar to stringy’s thumbs: [U]http://www.fmx6.com/teststuff/resize/artgallery_new2new.swf[/U]
It has a subdued thumb then when the full pic is loaded the thumb is selectable and is bright. The thumbs are so small I don’t think that they even need a preloader since they show up so fast. I attached an example of what I was invisioning as a preloder for the thumbs that meant the full image is loaded. It’s only animated but I was thinking of making the mc’s 100 frames long like a preloader. What do you think?
That’s exactly what I was envisioning! Is there a way to make the Transparent thumb preloader represent the large images (pic1, pic2, etc.) loading though? That way you don’t need the preloader in the image resize box at all. Wow! This is going to look so awesome when it’s done. Will be nice to share something this great with everyone too.
On the mask_update.fla you added a preloader to the thumbs that was transparent. But this was a preloader for the thumb images. And then you had a preloder in the resize box for the large images.
In stringy’s the thumbs have a thumb preloader that actually represents the large images. You’ll notice on the link how the thumb is subdued while the large image is loading then once it’s loaded it’s bright. That way there is only one preloader.
I was wondering if the transparent thumb preload you made could represent the large image loading that way you don’t need the center preloader for the large image it will already be loaded.
That’s very close to what I had envisioned! But can it start loading the Large images at the beginning? So everything is loaded at one time. The thumbs are so small I don’t think they need a preloader. Just have one thumb come in at a time and then the trans preloader is loading the large image. Then the next thumb then the preload for the next large image, etc.
Exactly! It’s… so… beautiful… tear. There are two small bugs though. The first is that they mask doesn’t work anymore, and a weird white box comes out of nowhere (probably related to the same problem). And the other problem is that it loads a bunch of images at the same time (like 30) which kills the processing. If it could go one image at a time. First thumb then the preloader then the second thumb after the first large image is loaded, etc. that would fix it.