# Randomly Populating Shapes with MovieClips

**URL:** <https://forum.kirupa.com/t/randomly-populating-shapes-with-movieclips/293142>\
**Category:** flash\
**Created:** [July 23, 2009, 6:51pm UTC](https://forum.kirupa.com/t/randomly-populating-shapes-with-movieclips/293142 "2009-07-23T18:51:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpoGames](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@SpoGames](https://forum.kirupa.com/u/SpoGames)\
**Post date:** [July 23, 2009, 6:51pm UTC](https://forum.kirupa.com/t/randomly-populating-shapes-with-movieclips/293142/1 "2009-07-23T18:51:17Z")

</div>

I can place the movieclips randomly on the stage but I am trying to randomly populate shapes with movieclips.

```auto
ball_mc.x = Math.random() * stage.stageWidth;

```

I tried just replacing stage.stageWidth with box\_mc.width but that didnt work. Also, I wanted to create more complicated shapes for their bounding area then just a movieclip’s rectangle.
