![]() Topic awaiting preservation: Preloading an array with onload= (Page 1 of 1) |
|
---|---|
Neurotic (0) Inmate Newly admitted From: |
![]() I'm having trouble with preloading an array with image objects in it. |
Nervous Wreck (II) Inmate From: London |
![]() You have two body tags - try removing one of them and seeing if it still fails. |
Obsessive-Compulsive (I) Inmate From: |
![]() no, that was just a stupid misstake when copy-pasting. |
Nervous Wreck (II) Inmate From: London |
![]() What was it? The missing () after "new Image"? |
Obsessive-Compulsive (I) Inmate From: |
![]() No, I had to initialize the arrays outside preload(). Otherwise change_image() won't be able to acsess them. It seems like this solution only works for IE. |
Nervous Wreck (II) Inmate From: London |
![]() quote:
code: var pics=new Array("k1.jpg", "k2.jpg", "k3.jpg", "k4.jpg");
code: var pics=['k1.jpg', 'k2.jpg', 'k3.jpg', 'k4.jpg'];
|
Paranoid (IV) Inmate From: USA |
![]() new Array() should be just as valid as []. |
Maniac (V) Mad Scientist From: Somewhere over the rainbow |
![]() The poster has demanded we remove all his contributions, less he takes legal action. |
Nervous Wreck (II) Inmate From: London |
![]() quote:
code: var pics=new Array("k1.jpg", "k2.jpg", "k3.jpg", "k4.jpg");
code: var myArray=new Array(10);
|
Maniac (V) Mad Scientist From: Somewhere over the rainbow |
![]() The poster has demanded we remove all his contributions, less he takes legal action. |