# How to stop moving object thru AS?

**URL:** <https://forum.kirupa.com/t/how-to-stop-moving-object-thru-as/209908>\
**Category:** Uncategorized\
**Created:** [December 13, 2006, 8:11am UTC](https://forum.kirupa.com/t/how-to-stop-moving-object-thru-as/209908 "2006-12-13T08:11:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom314](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@tom314](https://forum.kirupa.com/u/tom314)\
**Post date:** [December 13, 2006, 8:11am UTC](https://forum.kirupa.com/t/how-to-stop-moving-object-thru-as/209908/1 "2006-12-13T08:11:44Z")

</div>

Hello,

I am making a new site, and was making buttons that looked a little similar like this ([http://www.festivalunion.com/htm/main.htm](http://www.festivalunion.com/htm/main.htm) - buts on the left) and wanted that to do with Actionscript.

I followed a tutorial on Kirupa on moving stuff with actionscript

```auto
onClipEvent(enterFrame) {
	speed = 30;
	this._x -= speed;
}

```

and placed that on the mask, moving over the actual bar

I got what I wanted, but it doesn’t stop.

see preview here: [http://www.publi-joni.be/temp/flash/try13.html](http://www.publi-joni.be/temp/flash/try13.html) - buts under

here’s the fla (studio8)  
[http://www.publi-joni.be/temp/flash/try13.fla](http://www.publi-joni.be/temp/flash/try13.fla)  
(code is in the MC: mc\_bar\_menuprod)

who can help me out ?
