javascript slideshow, and preloading

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 9th, 2006, 07:59
New Member
Join Date: Nov 2006
Location: New Zealand
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question javascript slideshow, and preloading

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
Reply With Quote

  #2 (permalink)  
Old Nov 9th, 2006, 14:55
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
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.
Reply With Quote
  #3 (permalink)  
Old Nov 10th, 2006, 02:18
New Member
Join Date: Nov 2006
Location: New Zealand
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
Reply

Tags
preloading

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 19:21


All times are GMT. The time now is 10:31.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43