# \[F8\] How can I target this movieClip that I loaded onto the stage?

**URL:** <https://forum.kirupa.com/t/f8-how-can-i-target-this-movieclip-that-i-loaded-onto-the-stage/206131>\
**Category:** flash\
**Created:** [November 5, 2006, 5:58pm UTC](https://forum.kirupa.com/t/f8-how-can-i-target-this-movieclip-that-i-loaded-onto-the-stage/206131 "2006-11-05T17:58:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![po3](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/po3/32/856_2.png) [@po3](https://forum.kirupa.com/u/po3)\
**Post date:** [November 5, 2006, 5:58pm UTC](https://forum.kirupa.com/t/f8-how-can-i-target-this-movieclip-that-i-loaded-onto-the-stage/206131/1 "2006-11-05T17:58:53Z")

</div>

I’m trying to target a .swf that I loaded into a movie clip (mc\_container) but it seems like I’m missing something. Can you take a look and see where I went wrong?

```auto
mc_container.loadMovie("mc_photoSwap.swf");

//homepage Animation Swap Images
function photoSwapAni(){
    switch(random(3)){
        case 0:
        _root.mc_container.gotoAndPlay("ani_1");
        trace("case 0");
        break;
        case 1:
        _root.mc_container.gotoAndStop(50);
        trace("case 1");
        break;
        case 2:
        _root.mc_container.gotoAndStop(100);
        trace("case 2");
        break;
    }
}
var intervalID:Number = setInterval(photoSwapAni, 2000);

```

Also I see I’m going to have an issue with the random part because it could call the same animation twice or more times in a row. Should I ad some sort of if statement or is there a better way to do this random part of the code?
