I am trying get dynamic data into my charts usingmx:HTTPService to get a
JSON. I have used the flex 3 help andcombed the forums to get this far
but i am now stuck.here is my code quote: import mx.collections.ArrayCollection; import
mx.rpc.events.ResultEvent; import com.adobe.serialization.json.JSON;
import mx.controls.Alert; import mx.utils.ObjectUtil; [Bindable] private
var expensesAC:ArrayCollection = newArrayCollection( [ { time: "1-24
19:00", cal: 2000, tva: 1500 }, { time: "1-24 20:00", cal: 1000, tva:
200 } ]); private function onJSONLoad(event:ResultEvent):void{
Alert.show("onJSONLoad called!"); var myData:String =
String(event.result.DATA); Alert.show("data worked"); //
Alert.show(myData); // myText.text = myData; // var ary:Array =
(JSON.decode(myData) as Array); // var dp:ArrayCollection = new
ArrayCollection(ary.data); // linechart.dataProvider = dp; } private
function failed():void{ Alert.show("Fail!!"); }
So when i run this i get the Alert
"onJSONLoad called!" butnot the "data worked". when i run the service in
my browser with firebug i get aresponse that looks like
soquote:{"CALIFORNIA" : {demand : [ 40, 41,42,43, ect
],baseline : [ 40, 41,42,43, ect ],numReadings : [ 40, 41,42,43, ect ]},"ERCOT" ...