coool, thanks all!
On Thu, Mar 19, 2009 at 1:42 PM, Kenneth Kawamoto <[email protected] > wrote: > Shorter: > > for each(var item:XML in myXML.book.title){ > arr.push(item.toString()); > } > > Kenneth Kawamoto > http://www.materiaprima.co.uk/ > > ACE Flash wrote: > >> I was using this script, is there any short way to push them into an >> array? >> >> Thank you. >> >> var myXML:XML = >> <order> >> <book> >> >> <title>Dictionary 1</title> >> </book> >> <book> >> <title>Dictionary 2</title> >> >> </book> >> </order>; >> >> var arr:Array = new Array(); >> var childLength:uint = myXML.children().length(); >> >> >> for ( var k:uint = 0 ; k < childLength ; k++ ) >> { >> arr.push( myXML.children()[k].title.toString() ); >> >> trace( myXML.children()[k].title.toString() ) >> } >> > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

