You can add the comments as properties of the items in the tree. Use getSelectedItem() to get a reference to the item currently selected in the tree.
For example if your TextArea had an instance name of "myTA", your tree "myTree" and your submit button "myButton" you could set up listeners using something like:
ActionScript Code:
//listener object for tree
var lo:Object = new Object();
lo.change = function(evtObj:Object):Void{
var itm:Object = myTree.getSelectedItem();
if(itm.savedComment != undefined)
myTA.text = itm.savedComment;
else
myTA.text = "";
}
myTree.addEventListener("change",lo);
//listener object for submit button
var lo2:Object = new Object();
lo2.click = function(evtObj:Object):Void{
var itm:Object = myTree.getSelectedItem();
itm.savedComment = myTA.text;
}
myButton.addEventListener("click",lo2);
In this case I set a property named "savedComment" to store the entered comments.
Best of luck,
Ed