Parsing a taxonomy tree in Flash Actionscript 3