View Full Version : Resizing Photo Gallery...
lostinbeta
February 20th, 2003, 03:10 AM
Hey Hey,
Does anyone remember this thread way back around Christmas time?
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=11253
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....
VIEW RESIZING GALLERY EXPERIMENT HERE (http://www.lostinbeta.com/images/resizeGallery.html)
Let me know what you think please :)
Note: The images were all on my computer, I got them from some stock images site(s) , but I don't remember where.
pom
February 20th, 2003, 03:18 AM
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 :q:
andr.in
February 20th, 2003, 03:22 AM
maybe he loads the pic before the resizing and makes it visible after the resising!
Cool thing!
lostinbeta
February 20th, 2003, 03:29 AM
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 :q:
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 :)
pom
February 20th, 2003, 03:36 AM
:trout:
Somebody get me my will and an eraser!!
lostinbeta
February 20th, 2003, 03:37 AM
Originally posted by ilyaslamasse
:trout:
Somebody get me my will and an eraser!!
I don't get it ???? mind explaining :q: :) (i know what a will and an eraser are, but I am confused by what you meant)
pom
February 20th, 2003, 03:44 AM
Well, you took the easy and not-at-all practical way. Therefore the will... the eraser... :hangover:
:trout: :trout: :trout:
lostinbeta
February 20th, 2003, 03:50 AM
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:
pom
February 20th, 2003, 03:54 AM
:trout: anyway. :beam:
lostinbeta
February 20th, 2003, 03:55 AM
Fine then... disown me because I am not as good as you :( :( :*(:*(
cries in corner
upuaut
February 20th, 2003, 05:38 AM
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 :) .
pom
February 20th, 2003, 06:05 AM
Originally posted by lostinbeta
Fine then... disown me because I am not as good as you :( :( :*(:*(
cries in corner Na, na, it's OK, don't cry, shhhh...
:trout:
SureShot
February 20th, 2003, 11:35 AM
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!
Alex
February 20th, 2003, 11:40 AM
lost - that looks pretty good.<:} =)
RenaissanceGirl
February 20th, 2003, 12:41 PM
Well I think it's fantastic work Lost!
lostinbeta
February 20th, 2003, 12:51 PM
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! :-\
Ilyas: HAHAHA :trout:
Alex/Ren: Thanks =) :geek:
SureShot
February 20th, 2003, 01:05 PM
Point well taken Lost... I cannot blame you.
Still - great work none the less man!
lostinbeta
February 20th, 2003, 01:54 PM
Thanks SureShot.... :)
upuaut
February 20th, 2003, 10:17 PM
np.. I understand wanting to work things out for yourself. (the files I have are actually mostly POM's work anyway. :) )
if you need anything, let me know.
lostinbeta
February 20th, 2003, 10:25 PM
Originally posted by david
np.. I understand wanting to work things out for yourself. (the files I have are actually mostly POM's work anyway. :) )
if you need anything, let me know.
Will do, thanks for the offer :)
Jubba
February 20th, 2003, 10:26 PM
Hey LiB! Aswesome work man... I think there is a PHP function that lets you get the dimensions of an image. Not sure tho...
lostinbeta
February 20th, 2003, 10:27 PM
Thanks Jubs. Yeah, I believe there is too... hmm, so many options! :!:
Jubba
February 20th, 2003, 10:28 PM
imagesx(im); // returns width
imagesy(im); // returns height
Then just a php script making them variables and load them in with each image...
upuaut
February 21st, 2003, 03:37 AM
is there a php method for getting the file's name?
is there a php method for finding the number of files in a file folder?
lostinbeta
February 21st, 2003, 03:40 AM
Yeah, that would be so rockin' to have PHP list all my .jpg files with height and width all in a text file that can be loaded in.
pom
February 21st, 2003, 03:49 AM
Originally posted by david
is there a php method for getting the file's name?
is there a php method for finding the number of files in a file folder? - Yes :)
- Maybe not an existing function, but it's very easy to implement. PHP really is an amazing tool :crazy:
upuaut
February 21st, 2003, 04:05 AM
I'm going to put this question in the php threads.
upuaut
February 21st, 2003, 04:08 AM
I'm not sure how to figure out that sort of php function. I've put the question forward at this link.
http://www.kirupaforum.com/showthread.php?s=&threadid=15760
lostinbeta
February 21st, 2003, 04:37 AM
Thanks david, I came up with somewhat of a method for getting files, but I keep getting errors when adding the width script. I looked up what Jubba had and I am doing it right! Do I have to CHMOD the files? If so, I can't... Eilsoes server won't let me do it, and my server is PHP retarded, it never wants to work right with it.
upuaut
February 21st, 2003, 05:13 AM
ooch.. you may be right. I'll keep that in mind while I'm searching for solutions.
can you post the php script that you're using here? If not can you email it to me? ( dhaisley@centerspin.com )
lostinbeta
February 21st, 2003, 01:24 PM
Although you already replied to the other thread and know... the code is posted in the other thread :beam:
CyanBlue
February 27th, 2003, 12:17 AM
Hm... Found one strange thing, lostinbeta...
When I click on the button that I have previously view, it does preloading again from 0%... What's up with that???
(Did you use the scrip that h88 and I have provided to get the dimension???)
lostinbeta
February 27th, 2003, 12:19 AM
For testing purposes I used a no cache code to prevent the caching of the images. I didn't want to have to clear my cache every time I wanted to test it, so I just did that, it was easier that way.
No, the version I have up does not use any PHP yet :( Unfortunately my comp is being STUPID and I can't work on much of anything anymore :( I can't even open Flash without it schitzing out a bit.
eyeinfinitude
February 27th, 2003, 01:49 AM
You've already shown me this, but I still think it's great. One of the best photo galleries I've seen. =)
lostinbeta
February 27th, 2003, 01:53 AM
:).... thanks Ilyas. This thread is a bit old, I probably showed you when I started it :) Cyan revived it to ask how it was going with the PHP that was provided to me by Cyan and h88.
Marz
February 27th, 2003, 04:11 AM
Psst Beta... Electron Geek said that.. Not iylas ;)
lostinbeta
February 27th, 2003, 04:14 AM
EG... slap me with a trout. Please. I deserve that one. :( Sorry.
Thanks for pointing that out EG... errmmmm... I mean.. Marz...haha :)
eyeinfinitude
February 27th, 2003, 04:20 AM
It's ok Pom, I forgive you Marlin. =)
lostinbeta
February 27th, 2003, 04:22 AM
:crazy: You never trout slapped me :(
eyeinfinitude
February 27th, 2003, 04:23 AM
Oh oops!! Here ya go!! :trout: :trout: :trout:
lostinbeta
February 27th, 2003, 04:25 AM
Thank You. It was refreshing from my daze :hangover:
Thanks for pointing that out Marz =)
eyeinfinitude
February 27th, 2003, 04:26 AM
Thanks Marz, I missed that too, I thought Lost ignored me and was talking to Pom...hahaha :P
CyanBlue
February 27th, 2003, 06:50 AM
Hm... Cache proof??? How did you do that??? Well... I'll try to think about it while I am sleeping, but I don't know if I can do that... Wild guess... Meta tag???
:cowboy:
pom
February 27th, 2003, 07:53 AM
Well, you deserved that one :trout: :trout:
lostinbeta
February 27th, 2003, 12:45 PM
Cyan: Yep, there are multiple ways to trick the browser, but I like Sens method the best... http://www.kirupaforum.com/showthread.php?s=&threadid=14268&perpage=15&pagenumber=3
Ilyas: I was hoping you wouldn't see too.... alright keep em coming... :trout: <-- to myself
CyanBlue
February 28th, 2003, 09:04 AM
Oh... I see... Adding a random number at the end so that Flash can force the new loading everytime... Samething you do with the PHP file... Thanks... :rambo:
lostinbeta
February 28th, 2003, 12:22 PM
Precisely :)
Marz
February 28th, 2003, 12:51 PM
Did you ever figure out a way that you can resize the bounding boxes by whichever jpg you load or are you still loading the information into arrays prehandedly?!
I'm pretty sure you can find figure out the height and width when you preload a .jpg in.. It would just have to be invisible until you change the bounding boxes then.
lostinbeta
February 28th, 2003, 12:59 PM
Right now it is still all manual since I haven't gotten to update anything in it.
But What I am planning on doing is using the PHP script to get the image name, width, and height dynamically from within a folder and load those variables into Flash.
Marz
February 28th, 2003, 01:25 PM
I was just going to suggest soemthing like that.. That's why I asked you *lmao*..
If you need any help gimme a shout ;)
lostinbeta
February 28th, 2003, 01:26 PM
I most definitely will. Thanks for the offer man :) If anyone can help me on the PHP side I know it is you.
Jubba
February 28th, 2003, 01:38 PM
Still haven't gotten that working yet LiB? It looks great tho. :)
lostinbeta
February 28th, 2003, 01:42 PM
Originally posted by Jubba
Still haven't gotten that working yet LiB? It looks great tho. :)
Yeah (might have stated it earlier in this thread, not sure), my comp blew a ram chip and I was low on RAM to start with, but now I am lower. My comp runs like a giant piece of crap now. I can't overdo it or else it locks up. So therefore I haven't been able to open up flash and work on the script in there, while having dreamweaver opened working on my PHP script, and uploading it all to test it at the same time :-\
Jubba
February 28th, 2003, 01:45 PM
Well damn son... get off that TI-83 graphing calculator and get a real PC! lol, I know money is tight... that sucks tho man... good luck...
lostinbeta
February 28th, 2003, 01:49 PM
I have no problems with my PC, it is great, just Ram and my monitor are the only things I dislike about it. And as you said, moneys tight :-\
And I don't want to hear TI-83 again!!!! My whole senior year of "math" was TI-83 programming!!!!! It drove me nuts, we didn't learn anything! And I was better than my teacher at it and hes been doing it longer than I have (since that class was the first time I have programmed in it). Man did I hate that class. you resurged horrible memories of an insane teacher in a retarded class. :pirate: :P
reverendflash
February 28th, 2003, 01:53 PM
Lost:
I know it's tight, but CompUSA sells RAM real cheap. I just bought 64 megs for my g/f's pos for $20...
just an idea... I know any $ can be too much...
:beam:
Revhttp://www.aulman.com/rev.gif
Marz
February 28th, 2003, 02:06 PM
I have a spare 128 meg ram chip downstairs not doing anything.. ;)
*lmao*... If you wanted it.. I got it for free so I'd send it for free.
All your calculator freaks.. No wodner most people suck at math now.. Try going through a calculus class without a calc.. Yes You heard me..
I went through my entire schooling without owning a calc.. I used one every so often when I didn't feel like thinking but other than that I performed equatiosn with paper and pen and was typically faster than all the button smashers.. Got straight A's in math as well..
Blah.. Punks *lmao*... It was fun programming a bowling game on a kids calcie though *lmao*.. That's the only enjoyment I got out of it.
I'm typically always on aim if you wanna ask me ?'s beta.
lostinbeta
February 28th, 2003, 02:10 PM
Well for 3 years before senior year our teach (I had the same math teacher those 3 years) taught us math WITHOUT using a calc, we werent allowed to use one in the class. But then senior year we got this guy who said "calculator programming is the future and we should all know how to do it or we will fail in life" ... just to give you a taste of his insanity.
And :cool: I will see you on AIM sometime when I need some :q:s answer :) Thanks man, I appreciate it!
Marz
February 28th, 2003, 02:15 PM
That sucks man... I would have called him a fake.. hehe..
Seriously thoug.. That 128 meg chip is doing nothing ;) hehe..
need I make it more obvious..
*HINT HINT HINT* 128 MEG CHIP *HINT HINT HINT*
Marz
February 28th, 2003, 02:17 PM
Ooo... I get a smilie now?!
:cool:
Sweet :-D
Jubba
February 28th, 2003, 02:17 PM
Nah, we don't use Calculators in Calculus. It was highschool math. Trig, Algebra...
lostinbeta
February 28th, 2003, 03:00 PM
Originally posted by playamarz
That sucks man... I would have called him a fake.. hehe..
Seriously thoug.. That 128 meg chip is doing nothing ;) hehe..
need I make it more obvious..
*HINT HINT HINT* 128 MEG CHIP *HINT HINT HINT*
Hmmm... well I did only have 128 to start out with. I might take you up on that offer :) We will discuss that matter on AIM though.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.