How do I target an "unnamed" child movieclip inside a "named" parent movieclip?
I'm starting a new post about this to minimize hijacking the original post where I posed the subject question. (https://community.adobe.com/t5/animate-discussions/identify-an-instance-by-the-name/m-p/9319295)
My question/problem:
I have a series of "named" movieclips that each contain the same "unnamed" movieclip (on the second frame of the parent MC). I want to play the inner movieclip when a button (targeting the parent MC) is clicked.
@JoãoCésar17023019 posted this reply:
You could do something like this:
function playInnerMC(e)
{
e.currentTarget.gotoAndStop(1);
e.currentTarget.children[0].gotoAndPlay(1);
}
this.parentMC.on("click", playInnerMC);
I think this is pointing me in the right direction, however I am getting an error in the console...
Uncaught TypeError: root[root.pageInstance][root.narrationMovieInstance].children[0].gotoAndPlay is not a function
root is a reference to "this" on my main timeline (var root = this;)
Could the error be occuring because the parent MC (narrationMovieIntance) contains a text layer "above" the movieclip I want to play?
Since the text is not a movieclip is this causing the "gotoAndPlay" error?
