hi - am new to flash8/actionscript so please bear with me
i want to add a combobox that gets its data from xml file
produced in asp.
so my xml output is
and i have added a combo called makecombo to a frame
and have added this script to the frame
but my combo is still unpopulated
any ideas welcome
many thanks M
i want to add a combobox that gets its data from xml file
produced in asp.
so my xml output is
Code:
<?xml version="1.0" encoding="utf-8" ?>
- <data>
<make id="11" make="Citroen" makecount="1" />
<make id="13" make="Chevrolet" makecount="37" />
<make id="18" make="Ford" makecount="3" />
<make id="20" make="Hyundai" makecount="34" />
<make id="28" make="Land Rover" makecount="2" />
</data>
and i have added a combo called makecombo to a frame
and have added this script to the frame
Code:
var myData:XML = new XML ();
myData.ignoreWhite = true;
myData.load ("[URL unfurl="true"]http://localhost/sewardgroup/combo.asp");[/URL]
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 id:String = child.attributes.id;
var make:String = child.attributes.make;
var makecount:String = child.attributes.makecount;
makecombo.addItem (id, make, makecount);
}
}
else
{
trace ("Error loading data");
}
};
but my combo is still unpopulated
any ideas welcome
many thanks M