# Actionscript movement

**URL:** <https://forum.kirupa.com/t/actionscript-movement/66143>\
**Category:** Uncategorized\
**Created:** [October 3, 2004, 4:50am UTC](https://forum.kirupa.com/t/actionscript-movement/66143 "2004-10-03T04:50:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![flash07](https://avatars.discourse-cdn.com/v4/letter/f/47e85d/32.png) [@flash07](https://forum.kirupa.com/u/flash07)\
**Post date:** [October 3, 2004, 4:50am UTC](https://forum.kirupa.com/t/actionscript-movement/66143/1 "2004-10-03T04:50:40Z")

</div>

Hello everybody. Here is my problem. In attached file I have square that moves through the entire page. I used an example of the square that was posted on this website as tutorial. I was woundering if anybody knew if I am able to stop this square at certian places with actionscripting. For example x=397 and y=123. Thank you very much for the help.

---

<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:** [October 3, 2004, 8:06am UTC](https://forum.kirupa.com/t/actionscript-movement/66143/2 "2004-10-03T08:06:33Z")

</div>

you can use easing for example:

select ur movieclip open the actions panel and paste this code

onClipEvent (load) {  
speed = 5;  
targetx = 397;  
targety = 123;  
}  
onClipEvent (enterFrame) {  
this.\_x += (targetx-this.\_x)/speed;  
this.\_y += (targety-this.\_y)/speed;  
}

hope that helps  
any other questions just ask 😉  
and welcome to the forums! 🙂
