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
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
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.
--
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
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
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
6 matches
Mail list logo