use a dictionary

On Jan 26, 2008 2:34 PM, Sherif Abdou <[EMAIL PROTECTED]> wrote:

>   you can't do that at least i dont think, you would need to use an object
> with the key as the dynamic so
>  *
>
> var
> * object:Object = *new* Object();
>
> object.r[gridrows] = (gridRows / 5);
>
>
> ----- Original Message ----
> From: jmfillman <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Saturday, January 26, 2008 1:15:55 PM
> Subject: [flexcoders] Re: Dynamic Variable Naming
>
>  Variables can't start with a number, so I need the variable to
> include the variable "gridRows". For example, I need that variable to
> be like this:
>
> var R15ColumnNumber: Number = (gridRows / 5);
>
> where the "15" in the variable name comes from the
> variable "gridRows" in the for loop.
>
> JF
>
> --- In [EMAIL PROTECTED] ups.com <flexcoders%40yahoogroups.com>, Sherif
> Abdou <[EMAIL PROTECTED] ..> wrote:
> >
> > why does it say var "R"
> > it should be var r:String ="R" if u want it like that, what are
> your tring to do
> >
> >
> > ----- Original Message ----
> > From: jmfillman <[EMAIL PROTECTED] ..>
> > To: [EMAIL PROTECTED] ups.com <flexcoders%40yahoogroups.com>
> > Sent: Saturday, January 26, 2008 12:57:55 PM
> > Subject: [flexcoders] Dynamic Variable Naming
> >
> > I am probably overlooking something simple, but I'm trying to
> > dynamically name variables. See the code below, which is an example
> > that illustrates what I need to do.
> >
> > for (var gridRows:int= 15; gridRows < 2895;gridRows) {
> > var "R"+gridRows: Number = (gridRows / 5);
> > gridRows = (gridRows + 20);
> > }
> >
> >
> >
> >
> >
> >
> ____________ _________ _________ _________ _________ _________ _
> ____________ __
> > Never miss a thing. Make Yahoo your home page.
> > http://www.yahoo. com/r/hs <http://www.yahoo.com/r/hs>
> >
>
>
>
> ------------------------------
> Never miss a thing. Make Yahoo your 
> homepage.<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
> 




-- 
j:pn
\\no comment

Reply via email to