Re: starting again! why fails?
- From: Geoff Cox <geoff.cox@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 18 Sep 2005 15:32:26 GMT
On Sat, 17 Sep 2005 23:51:02 +0100, "Stephen Chalmers"
<ignoring@xxxxxxxxxxx> wrote:
>> function preload_imgs()
>> {
>> if(ig < ig_max)
>> {
>> picture[ig] = new Image();
>> picture[ig].onload = preload_imgs;
>> picture[ig].src = "pic" + ig + ".jpg";
>> ig++;
>> }
>> }
>>
>
>Your code appends only one element to the empty array 'picture'. Change 'if' to 'while'.
>
>> picture[ig].onload = preload_imgs;
>
>What do you consider this line to do?
Stephen,
Apologies for missing your reply - perhaps you could look at the
previous threas "how does this function work" as this code is written
by Stephane and I'm not clear myself what the above line does! Except
that his code does actually bring down all the images!
Cheers
Geoff
.
- Follow-Ups:
- Re: starting again! why fails?
- From: Stephen Chalmers
- Re: starting again! why fails?
- From: Zoe Brown
- Re: starting again! why fails?
- References:
- starting again! why fails?
- From: Geoff Cox
- starting again! why fails?
- Prev by Date: Re: Generating thumbnails of a page
- Next by Date: Re: Firefox: Filter Extended Ascii from Form
- Previous by thread: starting again! why fails?
- Next by thread: Re: starting again! why fails?
- Index(es):
Relevant Pages
|