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





      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Reply via email to