I'm running a script which essentially does little more than swap images. The script moves the image over to where it will be displayed before swapping the images. This means that until the time that the thumbnail is completely within the area of the div containing the main image there is some overlap of images.
My problem is that when I run the script in Firefox it is slow and shows image tearing, whereas in Internet Explorer it runs smoothly (one thing Microsoft did better?). Is there anything I should look out for as far as optimization goes when I'm dealing with moving images and such?
You can observe a working example of the script Here. Thank you for any help.
I am using the most updated version of both browsers (1.02 for Firefox? just updated two days ago, and 6 for IE).
Both have been updated two days ago, though they both ran with this difference before updates.
Possibly it is my machines? I have tested it on three different computers with nearly the same results, Firefox runs at the same speed but shows image tearing on the image. (The part that is within the other image moves at a different speed than the part outside the image).
where the images are rather large files as compared to the ones you are looking at.
******************Added 03/30/05 4:39 PM PST**************
I would also like to note that this problem is most likely stemming from the way images are loaded in FX as opposed to IE, as well as the way they are displayed...which makes it much less a Javascript problem than a simple "do I really want to make it do this?" question. However, having worked with Javascript for only about 4-5 months I am sure there are ways of streamlining my code quite a bit.
Also, please forgive the lack of a direct link to my script source earlier, sometimes I forget when I use external files... script source
*******************************************************
Thanks again!
Last edited by acorbelli; 03-30-2005 at 06:40 PM.
Reason: appending notes
I see it now.
The thumbnails are very large images, use small thumbnails, then do the image swap when in position to large images.
The extension '.thm' could also be a source of the problem, use jpg.
At least 98% of internet users' DNA is identical to that of chimpanzees
I see it now.
The thumbnails are very large images, use small thumbnails, then do the image swap when in position to large images.
The extension '.thm' could also be a source of the problem, use jpg.
I'll try to make my php scripts create smaller thumbnails (I turned the resolution on them way down for the script) and see if that helps. As for the .thm, it should display fine since the file itself is a jpeg image just renamed with that extension to mark it as a thumbnail. Which means it shouldn't be a problem....however I'll look into changing it and see how that goes.
Bookmarks