Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 0.27 KB  |  hits: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. JavaScript.. Image() object as Array?
  2. var imageObj = new Image();
  3.        
  4. var images = [];
  5.        
  6. images.push(new Image());
  7.        
  8. var map = [];
  9.  
  10. for(var x = 0; x<MAP_WIDTH; x++) {
  11.     map[x] = [];
  12.     for(var y = 0; y<MAP_HEIGHT; y++) {
  13.         map[x][y] = new Image();
  14.     }
  15. }