Hi i have a problem and this has been a problem for me for a very long time. and every time i feel like im closer to the answer the the path dissapears and i find myself lost in a forest of scary looking JS trees blocking my way out or forward... sigh.
Say for instance you have the following,
you need to create 40 of the following and using a for loop and you do exactly that.
the result is you end up with 40 of them, um 40 instances of it?
No problem right?
well my question is how exactly do you access the properties of the different instances since (im assuming) they're all accessed using;
this.bg
//eg
this.bg.x
//or
this.bg.height
//or even
this.bg.anchor
//etc
i think there is a way to do this its just that i can't figure it out. actually if anyone can give me any info to help with this id be super...um grateful.
Say for instance you have the following,
JavaScript:
JavaScript:
this.bg = new Sprite(ImageManager.loadTitle1("V5"));
this.bg.x = 0;
this.bg.y = 0;
this.bg.width = Graphics.width / 12;
this.bg.height = Graphics.height / 12;
this.addChildAt(this.bg,1);
you need to create 40 of the following and using a for loop and you do exactly that.
the result is you end up with 40 of them, um 40 instances of it?
No problem right?
well my question is how exactly do you access the properties of the different instances since (im assuming) they're all accessed using;
this.bg
//eg
this.bg.x
//or
this.bg.height
//or even
this.bg.anchor
//etc
i think there is a way to do this its just that i can't figure it out. actually if anyone can give me any info to help with this id be super...um grateful.