# Targeting a child movie clip:

**URL:** <https://forum.kirupa.com/t/targeting-a-child-movie-clip/126180>\
**Category:** Uncategorized\
**Created:** [October 21, 2004, 12:42am UTC](https://forum.kirupa.com/t/targeting-a-child-movie-clip/126180 "2004-10-21T00:42:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chockybickyman](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@chockybickyman](https://forum.kirupa.com/u/chockybickyman)\
**Post date:** [October 21, 2004, 12:42am UTC](https://forum.kirupa.com/t/targeting-a-child-movie-clip/126180/1 "2004-10-21T00:42:34Z")

</div>

I have a movie clip on the main timeline called **bg\_graphics,** I want to target a movie clip within that movieclip called \*\*bg1\_mc. \*\*to gotoAndPlay frame 2.

if anyone can help me out with this code that would be great, but wait theres more.

The **bg\_graphics** clip goes to a random frame within that movieclip, there are 3 frames. 1st has **bg1\_mc,** 2nd has **bg2\_mc,** and 3rd has **bg3\_mc.** How could i determine which file to gotoAndPlay frame 2 in **bg\_graphics** when i don’t know exactly which frame its going to be on, let alone target a movie clip within a movie clip.

I used this code to generate the random frame if that is of any use to anyone who is willing to reply.

**function randomBg() {  
//generate random BG based on random frames within the MC  
randFrame = random(3)+1;  
bg\_graphics.gotoAndStop(randFrame);  
}**

Can anyone help??? that would be great.
