Reputation: 21
I would addchild to a movieclip who is in a movieclip who is in another movieclip.
I try:
this.profil.bonome0.bonome.addChild(conteneurImage);
and it doesn't work but this does:
this.profil.bonome0.addChild(conteneurImage);
how could I access to the third movieclip (bonome)?
Upvotes: 2
Views: 1201
Reputation: 39476
Your syntax is perfectly fine and your code should work, assuming the following:
profil
exists in the current context.bonome0
exists within profil
.bonome
exists within bonome0
.Point 3 is where you seem to be having trouble, so check to be sure that you have a MovieClip nested inside bonome0
with the instance name bonome
.
To debug, you can trace each of the MovieClips until you hit undefined
, which will mean you don't have a MovieClip nested with the instance name you're trying to access it by. e.g.
trace(
profil,
profil.bonome0,
profil.bonome0.bonome
);
Upvotes: 1