It is of an experiment I was working on of a resizing photo gallery. Well I stopped working on it after I posted it, then I got back into it around the beginning of February. I could not for the life of me get a preloader for dynamically loaded jpgs! Ilyas provided me with help in this area last night. I was using almost similar code, but I now see what I was doing wrong (which I will not say…lol).
Ok, well I spent today working on this experiment some more, and this is what I came up with…
*Originally posted by ilyaslamasse *
**That’s pretty cool, but I don’t understand how you get the resize to work since you’re loading the image AFTER the resize **
I resize according to the width and height of the image, I input those dimensions into my prototype code on my buttons. Then once the image fades out, it resizes to that size and then loads the new image and fades it in.
I am possibly going to try and figure out how to do this without manually setting the width and height, but for now, I kinda like how it is
Well its like 20-30 minutes of work today starting from scratch, of course its easy so far.
I am still going to try and get the width and height dynamically, but if it turns out that I am driving myself crazy over it and I can’t figure it out, I am not going to be all upset about it because it still works now :trout:
I would suggest, as a next step, that you have the demensions in an external txt file which is accessed when the swf first loads. I’ve got an example of a picture viewer somewhere around here that takes the names of the jpg’s and the quanitity and feeds that into the viewer in such a manner. I’d be happy to pass it on to you as I’m very intrigued by the look and feel of the resizing that you’re doing.
Nice work btw and I really love the pics you chose to test it .
Fantastic work Shane - I would like to see the code on that in a tutorial if you get a chance - that would be great for a portfolio gallary I am working on!
david: LOL, I was actually thinking that exact thing. I was thinking if I couldn’t get it to resize correctly inside the file automatically I would then save the dimensions to a .txt file and load them in. But I will figure that out on my own, but if I need your help, I will come a running
SureShot: Considering how many question we get on sbeeners photo gallery tutorial, I don’t think I will be making this a tutorial. Considering this effect is pretty much like sbeeners tutorial (all my own code though), but it has more with the resizing and positioning and such, so the amount of questions will drive me nuts! :-\