Size and location

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 :slight_smile:

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

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

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

ok :slight_smile:

Thanks for the replies Ryall and Bezzer :slight_smile: 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 =)