Quote:
Originally Posted by Adrian
Try this:
Code:
PList_mc.onItemSelect= function(n:XMLNode){
if(n != PList_mc.root)
result_txt.text = n.attributes.title;
else result_txt.text = "";
}
|
Could you please elaborate (I'm new to AS), the above doesn't seem to work for me. Here's how the script for me looks like
_root._visible = true;
// define item select handler
PList_mc.onItemSelect= function(n:XMLNode){
// display title in the result_txt text box on the stage
// result_txt.text = n.attributes.value;
if(n != PList_mc.root)
result_txt.text = n.attributes.title;
else result_txt.text = "";
}
// populate menu
PList_mc.root = PList_mc.data =xo.firstChild;
I am looking to achieve the same, i.e. to clear result_txt field when Back or Root button is clicked. What am I missing?
Thanks in advance.