I am putting together an simple xml read and write swf for online usage and i need to show each “”.xml filename loaded in the bombobox, when you select the name from a drop down combo box i intend in using this xml and populate the fields in my document and have it saved when i click the save button.
right now i just need the function i cannot seem to master
so far i have the xml loaded in the combobox and when i select any of the items from the combobox it will load the right xml file. so far so good. coz it shows up in my traces.
Now when i click the combobox item i want to populate my fields with the data from my xml file
xml :
<?xml version="1.0" encoding="utf-8"?>
<node>
<x>
<title
addressx="content/latest_news/1"
jpgTHUMB="content/folder/01.jpg"
jpgURL="content/folder/01.jpg"
jpgURL1="content/folder/01.jpg"
jpgURL2="content/folder/01.jpg"
jpgURL3="content/folder/01.jpg"
logoURL="content/folder/01.jpg"
URLx="/content/folder/1"
BLANKx="0"
videoURL="content/video/01.flv"
visitURL="http://www.website.com/link/">
<![CDATA[TITLENAME]]>
</title>
<txt><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc porttitor enim vel massa congue nec bibendum elit ultricies. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam pellentesque lectus vitae urna semper vulputate. Nulla rutrum, enim vel interdum porta, dui ligula pretium ante, a sollicitudin enim ligula eget lorem. Praesent sit amet libero a massa fermentum feugiat. Integer id rhoncus magna. Donec at fermentum ipsum. In mattis porttitor condimentum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum quis dignissim est. In magna augue, vehicula posuere pretium id, facilisis at leo. Nam adipiscing justo at est vulputate quis mollis mi bibendum. Mauris sodales urna sed turpis vehicula tempor. Donec sapien velit, fermentum quis tristique at, ullamcorper a dui]]></txt>
</x>
</node>
funtion when completely loaded xml
// what to do with the Completed handler
function handleXMLComplete(evt:Event):void
{
trace(' XML Loaded ');
xml = new XML(evt.target.data);
myDP = new DataProvider();
// here what to do with the code...
}// end funtion handleXMLComplete
Eery NODE in my xml file has a instance of textfield in my stage in my swf, and my attributes in the xml file , example jpgURL
have a movieclip on the stage aswell.
example :mc_jpgURL, mc_jpgURL2, mc_jpgURL3 etc for all attributes in my xml.
does anyone can me help out how to populate my text fields and movieclips on the stage :-/ ?