PDA

View Full Version : problem with image thumbnail script



flz
01-01-2005, 07:32 PM
hy!
first post, first problem :)
complete java beginner
i'm having problems with a script which i found here: http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

which, by the way, is a great one!
i've got it working, but on my website i have some pieces of flash running and if i drag the window with the image that pops up, it gets somehow behind the flash elements... is there any way around this?

and... second
i didn't test it online, (i don't have a server yet)
but if the image i load with the script above is somewhere around 100k, how can i preload it in a visible way (loadbar, like in flash)?

thank you in advance!

purpledog
01-01-2005, 08:56 PM
Jsut a hint, why not load the image as a flash file and then you can add the preloader.

flz
01-01-2005, 10:10 PM
purple, thanks... but no thanks
for a number of reasons

1. i'm learning java now :D
2. loading dynamic unequal images in flash (drawin' them borders and so on) is heavy artilery, as this site is a photography one
3. i really like this script, and the way it looks and the possibilities of customization, so i intend to use it in one way or another (just need a little help :confused: )
and so on

thanks for the tip

purpledog
01-01-2005, 10:27 PM
Hey Flz:
i guess i was unclear. You are talking about javascript right? not java? I actually use this script, just not with flash. What I thought you could do is use the script to load the .swf file as the image file. that way you could have a pre-loader and still use and customize the script. putting a preloader on a plain image is pretty simple in Flash. But I understand if that's not where you want to go. I don't know of any way to add a preloader to a regular image. Hope someone else can help. Best of luck
P

mwinter
01-01-2005, 10:38 PM
complete java beginnerJava and Javascript are completely different and unrelated languages. Don't confuse one for the other.


if i drag the window with the image that pops up, it gets somehow behind the flash elements... is there any way around this?No. In addition to many of the standard UI widgets like select elements, Flash animations are displayed in a completely separate window (that is, an operating system window) which the user agent has no real control over.


how can i preload [a large image] in a visible way (loadbar, like in flash)?You can't, at least not reliably. You could perform some trickery like producing a very small animated GIF that shows a repeating animation and when the load event fires on the large image, you could hide the GIF. The problem here is the load event isn't standard on img elements so your code may never execute.

Mike

[edit: typo]

flz
01-02-2005, 07:06 PM
purpledog, you're right... never thought about that
it might work, just that i have to do flash for hundreds of images
unless... i load images dynamicaly, but then i have to somehow send variables from javascript (thanks mwinter :) ) to flash and i don't know how...
but still i can use it for small projects. thank you, opened my mind


mwinter, your answer just killed all of my confusions...
even if i'am not familiar with all the terms you mentioned, i think i got it right.
i can't thank you enough!
ohhh, but i can!!
thank you very very very very muuuuch!!!!! :)

flz
01-04-2005, 07:09 PM
allright... maybe i'm getin' too insistent, but i'll try :)

as i said i'm workin on a photoghraphy site and using the thumbnail viewer i found on this site
question:
i use small captions (descriptions) for each photography present there.
how can i add the text bellow the image in the window that the script displays?

if that's not to much, i can't wait for a hint

ptvGuy
02-12-2005, 12:02 PM
No. In addition to many of the standard UI widgets like select elements, Flash animations are displayed in a completely separate window (that is, an operating system window) which the user agent has no real control over.

Well, there is one control over that window that's helped me to be able to open drop-down menus (and do other things) over the top of Flash animations on my pages:


<param name="WMode" value="Transparent">

Placing that among the other parameters on the web page where it loads the Flash document will set the window background to transparent. (That's how I can create flash animations that don't look like flash animations.) This will only cause visible changes to Flash documents that depend on a color attribute rather than an image for their background. If your flash document depends on having a certain color in the background, then just create a rectangle that color and place it in the background. You won't be able to tell the difference. Anyway, drop-down menus and SELECT elements will then open "over" the Flash document.