Yes, I have it like this: private function updatedPHPDataResult(event:ResultEvent):void { lblStatus.text = String(event.result); } --Keisha
________________________________ From: Tracy Spratt <tspr...@lariatinc.com> To: flexcoders@yahoogroups.com Sent: Tuesday, March 3, 2009 5:33:05 PM Subject: RE: [flexcoders] Re: Error #1034: Type Coercion failed: cannot convert JSON Data Is your data in event.result? Tracy ________________________________ From:flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of keishalexie Sent: Tuesday, March 03, 2009 5:29 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Re: Error #1034: Type Coercion failed: cannot convert JSON Data Here's where it is trying to decode from the project I have private function getPHPData(event: ResultEvent) :void { var rawArray:Array; var rawData:String = String(event. result); rawArray = JSON.decode( rawData) as Array; dataArray = new ArrayCollection( rawArray) ; } It's like it is just blocked and the information that is in the tables from mysql cannot get processed into my flex data tables properly. --- In flexcod...@yahoogro ups.com, Anggie Bratadinata <anggie.bratadinata @...> wrote: > > Have you decoded the JSON data ? > > Here's a snippet from a project I'm working on: > > public function resultHandler( e:ResultEvent) :void{ > var rawString:String = String(e.result) ; > var json:* = JSON.decode( rawString) ; > var players:Array = json as Array; > _model.leaders = new ArrayCollection( players); > } > > I use the AC as a dataProvider for some list component. > > hth, > -- > Anggie Bratadinata | www.masputih. com | Indonesia > > On Tue, Mar 3, 2009 at 7:58 PM, keishalexie <keishalexie@ ...> wrote: > > > Hi Everyone, > > > > I am fairly new to Flex and am doing a project using Flex 3, the > > as3corelib, and a PHP file that is sending json data. The json data > > is not being displayed in my data table and what is coming through is > > valid (I checked in the JSON Validator). I really am not sure where > > the problem is: the mxml, php, as3corelib, or what? Any suggestions > > and I will post code if need be. > > > > >