[Flashcoders] how to access mcs dinamically

2005-10-28 Thread Jorge Rego
Hi list, I have some MCs named mc1, mc2, mc3 ... I'm trying to access them like this: mc[number].someProperty ... but no luck! How can this be done!? Jorge Rego ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] how to access mcs dinamically

2005-10-28 Thread Roman Blöth
Jorge Rego wrote: Hi list, I have some MCs named mc1, mc2, mc3 ... I'm trying to access them like this: mc[number].someProperty ... but no luck! How can this be done!? just do it like this: [mc_+number].someProperty - when referencing mc's by name you have to put it in square brackets...

Re: [Flashcoders] how to access mcs dinamically

2005-10-28 Thread Ian Thomas
this[mc+number].someProperty (assuming 'this' is the current timeline) On 10/28/05, Jorge Rego [EMAIL PROTECTED] wrote: Hi list, I have some MCs named mc1, mc2, mc3 ... I'm trying to access them like this: mc[number].someProperty ... but no luck! How can this be done!?

Re: [Flashcoders] how to access mcs dinamically

2005-10-28 Thread Kent Humphrey
On 28 Oct 2005, at 11:08, Jorge Rego wrote: Hi list, I have some MCs named mc1, mc2, mc3 ... I'm trying to access them like this: mc[number].someProperty ... but no luck! How can this be done!? I use eval() eval(mc+i).someProperty where i is some number perhaps a more correct way would

Re: [Flashcoders] how to access mcs dinamically

2005-10-28 Thread Cedric Muller
[mc+number].someProperty Cedric Hi list, I have some MCs named mc1, mc2, mc3 ... I'm trying to access them like this: mc[number].someProperty ... but no luck! How can this be done!? Jorge Rego ___ Flashcoders mailing list

Re: [Flashcoders] how to access mcs dinamically

2005-10-28 Thread Kent Humphrey
On 28 Oct 2005, at 11:08, Roman Blöth wrote: [mc_+number].someProperty - when referencing mc's by name you have to put it in square brackets... Cool, you learn something everyday on here : Goodbye eval()... ___ Flashcoders mailing list

Re: [Flashcoders] how to access mcs dinamically

2005-10-28 Thread Jorge Rego
Thanks all! :-) Just curious about this, if i want to access nested MCs normally i do it like this theParentOfYourMCs.mc1.someProperty (with dots in between) but in the descrived situation i must ommit the dot to get it to work, why's that!?? theParentOfYourMCs[ mc + number

Re: [Flashcoders] how to access mcs dinamically

2005-10-28 Thread Mark Winterhalder
but in the descrived situation i must ommit the dot to get it to work, why's that!?? because there are two ways of accessing a property (the parent has a property named mc1 that references a movieclip). one way is to use a dot, the other to use a string (i.e. a variable of type String or a