Re: [flexcoders] dynamic variable naming in as3

2008-02-12 Thread yigit
slm deniz ;) you can not create variables referencing from this, but the good news is you dont have to . so instead of using var this["customer" + i]:Loader = new Loader(); just use this["customer" + i] = new Loader(); then you can reach it this["customer1"] e.g. for efficiency, dont forget to case

Re: [flexcoders] dynamic variable naming in as3

2008-02-12 Thread Jhonny Everson
Or to be more careful... for (var i:int=0;i<10;i++){ clips[i] = new Loader(); } On Feb 12, 2008 12:42 PM, Jhonny Everson <[EMAIL PROTECTED]> wrote: > I don't know if you can create properties like you want, by using > this['']. But for what you have said you can just have an array: > > var cl

Re: [flexcoders] dynamic variable naming in as3

2008-02-12 Thread Jhonny Everson
I don't know if you can create properties like you want, by using this['']. But for what you have said you can just have an array: var clips:Array = new Array(); inside the loop: for (var i:int=0;i<10;i++){ clips.push ( new Loader() ); } then you can just use clips[i] wherever you want. --

[flexcoders] dynamic variable naming in as3

2008-02-12 Thread Deniz Davutoglu
Hello folks, I have to create dynamicly couple of movieclips with for loop. in past I could use for (i=0;i<10;i++){ createEmptyMovieClip("movie"+i, getNextHighestDepth) } but when I try to use for (var i:int=0;i<10;i++){ var this["customer" + i]:Loader = new Loader(); url =xml.children()[E

Re: [flexcoders] Dynamic Variable Naming

2008-01-26 Thread Sherif Abdou
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: flexcoders@yahoogroups.com Sent: Saturday, January 26, 2008 12:57:55 PM Subject: [flexcoders] Dyn

[flexcoders] Dynamic Variable Naming

2008-01-26 Thread jmfillman
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 + 2