You are welcome. Be careful though, if you are using the array access notation, the compiler won't be able to catch any mistakes you might make.
For instance, this["series11"].yField = 'male'; will compile without errors, even if you don't have a series11 property, but you will receive a run-time error when the code is executed. Tibor. www.tiborballai.com --- In [email protected], "AJC2357" <ajc2...@...> wrote: > > Thanks so much, Tibor. > > This structure - this["series"+i] - was what I needed! > > --- In [email protected], "Tibor" <ballai.tibi@> wrote: > > > > Hi Alex, > > > > You can use a for loop. > > > > for (var i:uint=1; i<=10; i++){ > > this["series"+i].yField = 'male'; > > } > > > > Hope this helps, > > > > Tibor. > > > > www.tiborballai.com > > > > --- In [email protected], "AJC2357" <ajc2357@> wrote: > > > > > > Hi all, > > > > > > If I have a function like this..... > > > > > > private function changeSeries(): void { > > > series1.yField = 'male'; > > > series2.yField = 'male'; > > > series3.yField = 'male'; > > > series4.yField = 'male'; > > > series5.yField = 'male'; > > > series6.yField = 'male'; > > > series7.yField = 'male'; > > > series8.yField = 'male'; > > > series9.yField = 'male'; > > > series10.yField = 'male'; > > > } > > > > > > Is there an easy way to simplify it? Something like.... > > > > > > private function changeSeries(): void { > > > "something to indicate i equaling zero through ten" > > > series[i] = 'male'; > > > } > > > > > > Any code help would be much appreciated! > > > > > > Alex > > > > > >

