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], 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] > 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 >

