This is an AS3 version. If you are using Flex, you an use the Bindable ArrayCollection with a ComboBox. In Flash CS you can change it to an Array
netconnection.call("getVideoNames",new Responder(videoNamesHandler));
[Bindable]
privat var recordedStreamsDP = new ArrayCollection();
private function videoNamesHandler(results:Object):void
{
for( var item:String in results )
{
var obj:ObjectProxy = new ObjectProxy(); // In Flex use ObjectProxy to populate Bindable ArrayCollection.
obj.label = results[item];
obj.value = item;
recordedStreamsDP.addItemAt(obj,0);
}
}
This should work in Flash AS3 or AS2:
var result:Object = new Object();
result.onResult = function(results:Object)
{
for( var item:String in results )
{
trace(results[item]);
trace(item);
}
}
netconnection.call("getVideoNames", result);
Richard