# Size and location

**URL:** <https://forum.kirupa.com/t/size-and-location/5228>\
**Category:** Uncategorized\
**Created:** [September 5, 2002, 2:13am UTC](https://forum.kirupa.com/t/size-and-location/5228 "2002-09-05T02:13:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewreporting](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@drewreporting](https://forum.kirupa.com/u/drewreporting)\
**Post date:** [September 5, 2002, 2:13am UTC](https://forum.kirupa.com/t/size-and-location/5228/1 "2002-09-05T02:13:56Z")

</div>

How could you make a movie clip that randomly moves become larger when near the bottom of the page and smaller at the top?

Thanx for your time 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 5, 2002, 2:51am UTC](https://forum.kirupa.com/t/size-and-location/5228/2 "2002-09-05T02:51:04Z")

</div>

yes… there is a tutorial here at kirupa on random movement. Then all you have to add is code to make the \_xscale and \_yscale properties of the MC change in relation to its y position.

Peace

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 5, 2002, 6:10am UTC](https://forum.kirupa.com/t/size-and-location/5228/3 "2002-09-05T06:10:01Z")

</div>

yeah that should be pretty easy

With the scaling u could do this but u might have to change the divideVar depending on the size of the movie

```php
 onClipEvent(load){
divideVar = 10;
}
onClipEvent(enterFrame){
this._xscale = this._yscale = (this._x/divideVar);
}

```

ok 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 5, 2002, 7:14pm UTC](https://forum.kirupa.com/t/size-and-location/5228/4 "2002-09-05T19:14:16Z")

</div>

Thanks for the replies Ryall and Bezzer 🙂 I already tried tweaking the code on the random movement tutorial but I couldn’t get it to work. I modified the code you posted Bezzer from…

onClipEvent(load){  
divideVar = 2;  
}  
onClipEvent(enterFrame){  
this.\_xscale = this.\_yscale = (this.\_x/divideVar);  
}

to

onClipEvent(load){  
divideVar = 2;  
}  
onClipEvent(enterFrame){  
this.\_xscale = this.\_yscale = COLOR=green[/COLOR];  
}

Thanks again  
Drewreporting =)
