PDA

View Full Version : [AS3] Locate MC Children



SecretAgentRege
January 16th, 2007, 02:09 PM
Okay. I have an MC that has three frames, in which each frame has a different MC on the timeline.

When I am on frame one, I can target the child and modify it. However, when I am on frames two or three, I cannot locate the child MC eventhough it exists (numChildren comes back as 1);

Frame 1:

MC.currentFrame = 1
MC.numChildren = 1
MC.getChildAt(0) = [object MoviClip]

Frame 2:

MC.currentFrame = 2
MC.numChildren = 1
MC.getChildAt(0) = null //(also getChildAt(1), etc.)

Frame 3:

MC.currentFrame = 3
MC.numChildren = 1
MC.getChildAt(0) = null //(also getChildAt(1) & 2, etc.)

How the heck do I target the MC on frames 2 and 3. Note that this occurs if I place them on the same layer or all on seperate frames of the same layer.

Help appreciated! Thanks.

skatehead
January 16th, 2007, 08:37 PM
sounds like a similar problem to what im having,
are you tracing getChildAt(0) just after (on the same frame) you gotoAndStop() to frames 2 and 3, because thats the problem i'm having

http://www.kirupa.com/forum/showthread.php?t=247040

jjcorreia
January 16th, 2007, 09:50 PM
http://www.kirupa.com/forum/showpost.php?p=2044416&postcount=5