var cubeimage=new Array() for (i=0;i<specifyimage.length;i++){ cubeimage[i]=new Image() cubeimage[i].src="IMAGE/"+ specifyimage[i]; }