Hello,

 

Appreciated the response to my post.  When I implement new function:

 

Instead of using Math.random() in the randomize function, you would set 

the ID to the row / column position:

 

 public function generate(numTiles:int):void {

            var numRows:int = 

getNumRows();

      for (var i:int = 0; i < numRows; i++) {

        for (var j:int = 0; j < getNumCols(); j++) {

          setTile(j, i, (i * numRows) + j);

        }

      }

    }

 

I get: "Cannot access a property or method of a null object reference.".  A
trace shows it halts at "j" being 5 (numCols in TileMap) and does not get to
12 (numRows in TileMap).

 

FB2 Debug takes me to" thisTile.position = 0" which works when using
Math.randomize?

 

Any help would be really be great.

 

Thanks,

Terry

 

 

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to