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 it back.
(this['customer2'] as Loader).bla bla...


Deniz Davutoglu wrote On 02/12/2008 11:00 AM:
>
> 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()[EMAIL PROTECTED]();
> customer[i].x=xml.children()[EMAIL PROTECTED]()
> customer[i].y=xml.children()[EMAIL PROTECTED]()
> var urlReq:URLRequest = new URLRequest(url);
> customer[i].load(urlReq);
> addChild(customer[i]);
> }
>
> it cast
> 1084: Syntax error: expecting identifier before leftbracket.
> error
>
> how can I solve this
>
>  

Reply via email to