Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * ...
  3.  * @author S******************
  4.  */
  5.  
  6.  
  7. import flash.display.Sprite;
  8. import flash.Lib;
  9.  
  10. class Main extends Sprite
  11. {
  12.     static function main() {
  13.         Lib.current.addChild(new Main());
  14.     }  
  15.        
  16.     public function new()
  17.     {
  18.         super();
  19.        
  20.         arrayHandler();
  21.        
  22.  
  23.     }
  24.     public function arrayHandler() {
  25.        
  26.         var array:Array<Array<Map>>;
  27.         array = new Array<Array<Map>>();
  28.        
  29.         for (i in 0...10) {
  30.             for (j in 0...10) {
  31.                 array[i].push(new Map(20*j, i*20));
  32.             }
  33.            
  34.         }
  35.         for (i in 0...10) {
  36.             for (j in 0...10) {
  37.                 Lib.current.addChild(array[i][j]);
  38.             }
  39.            
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement