# Making random movement on only X axis

**URL:** https://forum.kirupa.com/t/making-random-movement-on-only-x-axis/8624
**Category:** Uncategorized
**Created:** [November 25, 2002, 1:14pm UTC](https://forum.kirupa.com/t/making-random-movement-on-only-x-axis/8624 "2002-11-25T13:14:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)
#### Post date: [November 25, 2002, 1:14pm UTC](https://forum.kirupa.com/t/making-random-movement-on-only-x-axis/8624/1 "2002-11-25T13:14:58Z")

</div>

well i’ve read the random movement tutorial but now i only want things to move randomly horizontelly; on the x axis. I’m pretty sure this is possible since most things are with flash 🙂  
so would anyone know what AS would be used? i’ve treid the one here:  
[http://www.kirupa.com/developer/mx/random\_motionMX.asp](http://www.kirupa.com/developer/mx/random_motionMX.asp)  
and deleting stuff that i think is not relevant. But i keep getting more and more erros each time i try to fix something…so anyone know what the AS would be? thx

---

<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: [November 25, 2002, 1:34pm UTC](https://forum.kirupa.com/t/making-random-movement-on-only-x-axis/8624/2 "2002-11-25T13:34:06Z")

</div>

Well, if you delete everything that has something to do with \_y, you should be able to make it work. Basically, instead of the last 2 lines

```auto
	this._x = this.x;
	this._y = this.y;

```

just put

```auto
	this._x = this.x;

```

pom :cowboy:
