for (a = 0; a < 8; a++) { this["wofitem"+a] = a; } function scan(obj:Object, t:String):Void { if (t == undefined) { var t:String = "+ "; } t = "|\t"+t; for (var a in obj) { trace(t+a+" = "+obj[a]); if (typeof obj[a] == "object" || typeof obj[a] == "array") { // Reiterate this code to continue with the next object. scan(obj[a], t); } } }; scan(this);