Did you try different resultFormat?
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Giro Sent: Thursday, June 07, 2007 4:50 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: EventResult to Array Dont work, if i make mx.controls.alert.show(dataArrayResult.length) this show 1 Giro. ________________________________ De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] En nombre de candysmate Enviado el: jueves, 07 de junio de 2007 12:26 Para: flexcoders@yahoogroups.com Asunto: [flexcoders] Re: EventResult to Array --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Giro" <[EMAIL PROTECTED]> wrote: > > > > How can I convert an eventResult to an array? > > > > I have this code: > > > > <mx:HTTPService resultFormat="e4x" result="updateTree(event)" > id="listdir_ext" showBusyCursor="true" method="POST" url="read_dir.php" > useProxy="false"> > > <mx:request xmlns=""> > > </mx:request> > > </mx:HTTPService> > > > > Httpservice return: > > > > <dirlist> > > <node label="test" /> > > <node label="test2" /> > > <node label="test3" /> > > </dirlist> > > > > My result handler function is: > > > > private function updateTree(event:ResultEvent):void > > { > > resultat = new Array(event.result.lastResult.dirlist.node.label > as Array); > > > > mx.controls.Alert.show(resultat[0].toString()); > > > > } > > > > > > But if I do this no result show. > > > > Where is the problem? > > > > Thk. > > Giro. > Try something like: import mx.utils.ArrayUtil; [Bindable] public var dataArrayResult:Object; public function dataResult(event:ResultEvent):void { dataArrayResult = ArrayUtil.toArray(event.result); }