What is your remote object returning??
Send your remote object's result to a function and then set your dataprovider. This will allow you to debug it and find out what is being returned. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of brad.bueche Sent: Thursday, April 02, 2009 6:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Creating RemoteObject in ActionScript as dataProvider for ComboBox I cant find a good example of how to create a remoteObject in ActionScript. All the examples seem to be way more complicated than I need and I cant follow what they are doing. On top of that, they don't cover the parameters that I need. I've also looked through 5 books. ActionScript books dont cover it and flex books do it via mxml! All I need to do is recreate the mxml:RemoteObject in Actionscript. This is a very simple connection via CF. ******************************************************** <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.events.FlexEvent; import mx.controls.ComboBox; public var cbx:ComboBox = new ComboBox(); private function addPanelChild():void { var buttonName:String; cbx.x = 60; cbx.addEventListener(FlexEvent.CREATION_COMPLETE,handleCreationComplete); cbx.labelField = "Label"; addChild(cbx); } private function handleCreationComplete(e:FlexEvent):void{ conn.getData(); } ]]> </mx:Script> <mx:RemoteObject id="conn" destination="ColdFusion" source="cfching.components.comboBox" result="cbx.dataProvider = event.result;"> </mx:RemoteObject> <mx:Button id="btn1" label="test" click="addPanelChild();" /> </mx:Application>