# Random movieclip problem

**URL:** <https://forum.kirupa.com/t/random-movieclip-problem/178877>\
**Category:** Uncategorized\
**Created:** [February 15, 2006, 12:05am UTC](https://forum.kirupa.com/t/random-movieclip-problem/178877 "2006-02-15T00:05:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tattered](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@Tattered](https://forum.kirupa.com/u/Tattered)\
**Post date:** [February 15, 2006, 12:05am UTC](https://forum.kirupa.com/t/random-movieclip-problem/178877/1 "2006-02-15T00:05:26Z")

</div>

Ok I tried searching and i cant seem to find what im looking for

I have 2 movie clips on stage, and im trying to play a random one, but for some reason my last line of code doesnt work. Can someone please tell me what im doing wrong. 🙂

```
i = Math.round(Math.random()*2);
newTarget = "Target" + i;
trace(newtarget);
newTarget.play();
```
