Array problem?


var map = new Array();
var tm = new Array();
//map[0].push("1");
function onLoad() {
	var b;
	b = 0;
	while (b<32) {
		tm.push("0");
		b++;
	}
	b = 0;
	while (b<32) {
		map.push(tm);
		b++;
	}
	var d = Math.floor(Math.random()*32)+1;
	var e = Math.floor(Math.random()*32)+1;
	map[1][1] = 1;
	var c;
	c = 0;
	while (c<map.length) {
	trace(map[c]);
	c++;
	}
	//trace(Math.floor(Math.random()*32)+1)
}
function onEnterFrame() {
}

If I use this code, I see in the output 1 as the value for the 2nd number of all the items, instead of just one.

Is there something I’m doing wrong?