# Random Movement in Flash MX question

**URL:** https://forum.kirupa.com/t/random-movement-in-flash-mx-question/250770
**Category:** flash
**Created:** [February 1, 2008, 7:57am UTC](https://forum.kirupa.com/t/random-movement-in-flash-mx-question/250770 "2008-02-01T07:57:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tidus97](https://avatars.discourse-cdn.com/v4/letter/t/cc9497/32.png) [@Tidus97](https://forum.kirupa.com/u/Tidus97)
#### Post date: [February 1, 2008, 7:57am UTC](https://forum.kirupa.com/t/random-movement-in-flash-mx-question/250770/1 "2008-02-01T07:57:51Z")

</div>

hello, i wish to use the randommx flash on my website, but i would like to know who to make the randomly moving object face the direction it is moving; it only needs to face left and right when its moving in the corresponding direction (not up+down+left+right ; not 360 degrees)

how can i do this? i will be using the same cone objects as the one in the tutorial, except that i will replace the sprite with my own.

added:

this is the tutorial:  
[http://www.kirupa.com/developer/mx/random\_motionMX.htm](http://www.kirupa.com/developer/mx/random_motionMX.htm)
