..dimenticavo.. per chiarezza.. il ciclo for è preceduto da:

var dp:Array = new Array();
var nodes:Array = this.firstChild.childNodes;