you would just use the value in that particular node as the value of the VAR in the getURL method.
example:
or wherever the node really is.Code:button1.onPress = function() { getURL(xmlDocument.childNode[0].firstChild.nodeValue); }
heres a quick example: (although Im not sure HOW your link is going to be set up..here I just used a textField to not only DISPLAY the value of the NODE.but use that value AS the URL to go to:
example:
Code:var myXML:XML = new XML("<Details><Username>(ip) R o l i e (ip) ~ (#)</Username><PSM>http://www.nike.com</PSM><Status>Online</Status></Details>"); trace("WHOLE XML: "+myXML); ///// trace(newline); //// //username node trace("Full User Node: "+myXML.firstChild.childNodes[0]); trace("User Node Name: "+myXML.firstChild.childNodes[0].nodeName); trace("User Value: "+myXML.firstChild.childNodes[0].firstChild.nodeValue); ///// trace(newline); //// //psm node trace("Full PSM Node: "+myXML.firstChild.childNodes[1]); trace("PSM Node Name: "+myXML.firstChild.childNodes[1].nodeName); trace("PSM Value: "+myXML.firstChild.childNodes[1].firstChild.nodeValue); linkField_txt.text = myXML.firstChild.childNodes[1].firstChild.nodeValue; var myformat:TextFormat = new TextFormat(); myformat.url = myXML.firstChild.childNodes[1].firstChild.nodeValue; linkField_txt.setTextFormat(myformat);




Reply With Quote