|
|
|
|
|
|
|
|
|
|
|
|
Once
the array is declared and setup,
|
|
|
get
the images and assign them to
|
|
|
the
.src field of the array:
|
|
|
|
for (i=0; i<4; i++) {
|
|
|
|
pref [i].src = "new" + i + ".gif";
|
|
|
|
}
|
|
|
|
• |
Notice that the names of the images,
|
|
|
new0.gif, new1.gif, new2.gif, new3.gif
|
|
are “constructed” using the index variable
|
|