It seemed to have taken that but now it's still not pulling the data in as I would expect it.
The getItemAt(x) in reading looks like it would pull in the whole record at 'x'. However, it won't let me refer to the record as getItemAt(0).strEMail since it doesn't know strEMail exists in that collection. In structures (in C++/Coldfusion/etc...) I had to define the variable names within the structure. However, in AS3 I just defined the variable: [Bindable] public var acUser:ArrayCollection = new ArrayCollection(); How do I access the strEMail from the array collection (or at least tell the Flex compiler that the variable really does exist). Thanks sj ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Witham Sent: Friday, July 18, 2008 12:02 AM To: flexcoders@yahoogroups.com Subject: {Disarmed} Re: [flexcoders] Variable Typecasting Have you tried strEMail = String(GlobalVars.instance.acUser.getItemAt(0)); Do not have my machine in front of me to test but pretty sure you can cast something that way. I know that's the way I do it to cast MovieClip names. Regards, Peter On 7/17/08, Scott <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: I'm trying to pull a variable from an arrayCollection which I know is type String. Here's the code: public var strEMail:String; ... Private function ... { strEMail = GlobalVars.instance.acUser.getItemAt(0); } That above line of course throws an error because it's not sure that the variable at (0) is actually a string even though I know it is. In C++ I would just tell it using a typecast that it is a string. How can I copy that element into a variable? Thanks! -- Peter Witham http://www.evolutiondata.com <http://www.evolutiondata.com> Internet and Multimedia developer Certified Flash Designer. -- This message has been scanned for viruses and dangerous content by MailScanner <http://www.mailscanner.info/> , and is believed to be clean.