# How to random move with easing?

**URL:** https://forum.kirupa.com/t/how-to-random-move-with-easing/160637
**Category:** Uncategorized
**Created:** [August 27, 2005, 11:43pm UTC](https://forum.kirupa.com/t/how-to-random-move-with-easing/160637 "2005-08-27T23:43:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![phoket](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@phoket](https://forum.kirupa.com/u/phoket)
#### Post date: [August 27, 2005, 11:43pm UTC](https://forum.kirupa.com/t/how-to-random-move-with-easing/160637/1 "2005-08-27T23:43:46Z")

</div>

ok. here is what im trying to do.

i want to make a bunch of objects move to random positions on the screen with easing when i click a button. im pretty stumped on this. if been foolin around for awile. and i don’t think it should be to hard. but im new to this stuff so im not having much sucess. this is what i have…

on (release){  
speed = 5;  
endX = 300;  
endY = 500;  
t = 1  
if ( t \> 0) {  
move\_mc.\_x += (endX-\_x)/speed;  
move\_mc.\_y += (endY-\_y)/speed;  
}  
}

now i might be waaay off base… probally am for sure. i figure for the random locations i can just use a random \* a constant. but then the problem of getting more than one object to move without a move for each object. this moves the object to the location but it does it instantly. i think its something with the loop… i dunno im a total noob to this so that piece of code iwll probally make someone who knows how to do this laugh alot. but nonetheless help please. 🙂
