This is a discussion on "javascript slideshow, and preloading" within the JavaScript Forum section. This forum, and the thread "javascript slideshow, and preloading are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
javascript slideshow, and preloading
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hi
I am in the process of designing a slideshow with javascript. At the moment I am having problems with the preloading of the images. the slideshow can be viewed here . The preload code is var preloadit=new Array() for (i=0;i<numberslide.length;i++){ preloadit[i]=new Image(i) preloadit[i].src=numberslide[i][0] loader="Loading" } loader="Image ready" And then it prints out the value of the variable "loader" later in the script. But I want to test to see if the image is completely loaded or is in the process of loading. I don't know how to do the preload test. Is there a way of stopping the previous and next buttons from working until the next image is ready to view? Could anyone help me? bye for now Allyson |
|
|
|
#2
|
|||
|
|||
|
Re: javascript slideshow, and preloading
In my opinion there are a number of issues:
You need to create syntactically correct mark-up. Suggest using a method other than Frontpage 5.0. You are trying to load too many images at start up. Your page took far to long to load and I'm on a fast broadband. Most people would get fed up with waiting and leave before it had loaded. You need to trap 'previous' and 'next' clicks when there isn't one so as not to produce 404 errors. To answer your original question, you can disable the buttons and then use JavaScript to enable them once your images have loaded. |
|
#3
|
|||
|
|||
|
Re: javascript slideshow, and preloading
Is there a way that I can add javascript to this function, that tests to see whether an image has fully loaded.
for (i=0;i<numberslide.length;i++) { preloadit(i)=new Image(i) preloadit(i).src=numberslide(i)[0]; } bye for now Allyson |
![]() |
| Tags |
| preloading |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Preloading images, anything i should know? | Zonglars | JavaScript Forum | 8 | Jul 23rd, 2007 12:03 |
| preloading using a swf? | nikising | Flash & Multimedia Forum | 7 | May 23rd, 2007 08:42 |
| podcast preloading | matthewpage | Flash & Multimedia Forum | 3 | Oct 25th, 2006 14:28 |
| Preloading problems in IE | gotlisch | JavaScript Forum | 0 | Jun 2nd, 2006 09:33 |
| Preloading Images | dannc | Flash & Multimedia Forum | 3 | Feb 22nd, 2004 20:21 |