Re: starting again! why fails?



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

.



Relevant Pages

  • Re: CountIF
    ... my apologies for missing the significance of your line: ... Rgds ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Firing a DataGrids Edit event when a row is clicked
    ... > Apologies for asking this, but it's late and I'm clearly missing something ... Sorry for the wasted bandwidth. ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Small Business Server 2000
    ... >> It isn't missing - I just took a poor photo. ... Apologies. ... Prev by Date: ...
    (uk.adverts.computer)
  • Re: Compact connected Hausdorff
    ... > of U are also open in X (a relatively open subset of an open set is ... > What am I missing? ... Prev by Date: ...
    (sci.math)
  • Re: Me.Undo Follow UP
    ... Thanks for the response. ... Unfortunately this example is a subform and thus ... missing the On Current EP (my apologies for not not including this bit of ...
    (microsoft.public.access.formscoding)