Forum Moderators: open
Here's the script to create the comboBox:
var myData:XML = new XML ();
myData.ignoreWhite = true;
myData.load ("myData.xml");
myData.onLoad = function (success:Boolean):Void
{
if (success)
{
var data:XMLNode = this.firstChild;
var children:Array = data.childNodes;
var numItems:Number = children.length;
for (var i:Number = 0; i < numItems; i++)
{
var child:XMLNode = children[i];
var name:String = child.attributes.name;
var URL:String = child.attributes.URL;
comboBox.addItem (name,URL);
}
}
};
I don't want the default value to be designated by the XML file. Any ideas? Thanks!