# Limit the space in the stage

**URL:** <https://forum.kirupa.com/t/limit-the-space-in-the-stage/274100>\
**Category:** Uncategorized\
**Created:** [October 24, 2008, 7:43pm UTC](https://forum.kirupa.com/t/limit-the-space-in-the-stage/274100 "2008-10-24T19:43:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![biztaty](https://avatars.discourse-cdn.com/v4/letter/b/ecccb3/32.png) [@biztaty](https://forum.kirupa.com/u/biztaty)\
**Post date:** [October 24, 2008, 7:43pm UTC](https://forum.kirupa.com/t/limit-the-space-in-the-stage/274100/1 "2008-10-24T19:43:41Z")

</div>

Hi everyone,

I have created a square movie clip and I tween it randomly using the caurina class within the available space in the stage,

how can I limit the space in the stage?

for example if my stage is 1000x1000 but I want my square only to tween randomly within 500x500px?

here is my code:

```auto

import caurina.transitions.*;

function trigger_mc()
{
    Tweener.addTween(cube_mc, {x:Math.random()*stage.stageWidth,
                           y:Math.random()*stage.stageHeight, y:300, time:1,
                           rotation:Math.random()*300, onComplete:trigger_mc,
                           transition:"easeOutBounce"});
}

trigger_mc();

```

thanks
