# HELP with AS moving an object and stopping

**URL:** <https://forum.kirupa.com/t/help-with-as-moving-an-object-and-stopping/115632>\
**Category:** Uncategorized\
**Created:** [July 10, 2004, 5:23am UTC](https://forum.kirupa.com/t/help-with-as-moving-an-object-and-stopping/115632 "2004-07-10T05:23:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![obey1](https://avatars.discourse-cdn.com/v4/letter/o/fbc32d/32.png) [@obey1](https://forum.kirupa.com/u/obey1)\
**Post date:** [July 10, 2004, 5:23am UTC](https://forum.kirupa.com/t/help-with-as-moving-an-object-and-stopping/115632/1 "2004-07-10T05:23:56Z")

</div>

i’m trying to move an object on the main timeline after a button has been released. I have found the following script to make the object move by itself with no button:

```auto

onClipEvent(enterFrame) {
	speed = 1;
	_root.clip_mc._x += speed;
}

```

but i would like that object to move based on the events of a button, then stop at a certain point. then if another button is pressed, move again to another point and stop.

how can i modify this to help me out?
