Yes, a for..in loop will return the properties as strings, you'll want to use a regular for loop (for (var i:int=0; i < someArray.length; i++) if you want the int access.
Matt -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of dhirshbe Sent: Friday, February 24, 2006 2:14 PM To: [email protected] Subject: [flexcoders] Re: Flexbuilder 2B1: coercion error at package declaration, JSON Thanks, it was somewhere else in the file. I wasn't aware that arrays still had string indices. The error was: for(var i:int in someArray) --- In [email protected], "Matt Chotin" <[EMAIL PROTECTED]> wrote: > > I think there must be another problem in your file and the compiler just > can't line it up correctly. Can you break the file down further and see > what happens? I'm assuming you did this in an AS file and not MXML? > > As for JSON I don't think anyone has tried it yet. > > Matt > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of dhirshbe > Sent: Thursday, February 23, 2006 3:25 PM > To: [email protected] > Subject: [flexcoders] Flexbuilder 2B1: coercion error at package > declaration, JSON > > When I try to compile with -strict, I get the error: > Implicit coercion of a value of type 'String' to an unrelated type 'int' > > > The line it refers to reads "package packagename {" > > Any ideas? > > Also: > Is there a convenient way to create objects from JSON in AS3? > > > > > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

