# Constraining movement of movie clip?

**URL:** <https://forum.kirupa.com/t/constraining-movement-of-movie-clip/46432>\
**Category:** Uncategorized\
**Created:** [March 24, 2004, 3:59pm UTC](https://forum.kirupa.com/t/constraining-movement-of-movie-clip/46432 "2004-03-24T15:59:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stockdill](https://avatars.discourse-cdn.com/v4/letter/s/5daacb/32.png) [@stockdill](https://forum.kirupa.com/u/stockdill)\
**Post date:** [March 24, 2004, 3:59pm UTC](https://forum.kirupa.com/t/constraining-movement-of-movie-clip/46432/1 "2004-03-24T15:59:59Z")

</div>

Hi I am making a movie - in which each time it loads a moviclip appears in a different place. I am using the code

onClipevent(load) {  
this.\_x = Math.random() \*???;  
this.\_y = Math.random() \*???;

Where the questions are I don;t know what figures to put in,

I have covered the area I want it to only appear in and it reads as  
w 386.0 x150.2  
H 303.3 y 91.0

But i don;t know how to make these numbers fit in the above code, i would be really greateful if anyone could help,  
lesley
