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
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...
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!?
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
[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
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
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
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
8 matches
Mail list logo