"niNjaTaz" <Da********@large.cum> wrote in message
news:e7********************************@4ax.com...
I am trying to learn JS by studying existing codes. I have figured out
(for the most part) how to use buttons to cycle through the images.
Mine do an auto show with manual override.
The problem I'm having is (most importantly) I don't want all of the
images to be preloaded. I'm running a slideshow (actually, I guess
it'd be called a picture viewer) with over 30 somewhat large pictures.
My site has some shows/folders with 100+ pics, I did recently use a
different jpg compression that shrunk the image size 80% for much faster
downloads while still looking good (before zooming anyway!)
On a dialup connection, it takes FOREVER to load.
Check my site for a few slide shows, the latest one preloads each "next"
pic in advance, just one at a time.
Also, if possible, can JS autosize an image
on the fly keeping aspect ratio?
Mine come through as they are, all different sizes. I did write some
code once that loaded a pic, then used the onLoad event to get the width and
height (you have to wait to get a reliable size!), then do some math to
compute the longest axis, divide that into the screen/window size, then
compute a scaling zoom factor that would adjust the pic size while keeping
aspect the same. I didn't like it because the zoom is a bit slow on some
machines, and the image quality suffers if there is too much zoom, but it is
definitely doable.
zin
--
http://www.zintel.com