# Random rotation

**URL:** <https://forum.kirupa.com/t/random-rotation/211704>\
**Category:** Uncategorized\
**Created:** [January 4, 2007, 10:58am UTC](https://forum.kirupa.com/t/random-rotation/211704 "2007-01-04T10:58:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![igloo](https://avatars.discourse-cdn.com/v4/letter/i/d6d6ee/32.png) [@igloo](https://forum.kirupa.com/u/igloo)\
**Post date:** [January 4, 2007, 10:58am UTC](https://forum.kirupa.com/t/random-rotation/211704/1 "2007-01-04T10:58:51Z")

</div>

Hi forum

Im using the code from this tutorial

[http://www.kirupa.com/developer/actionscript/random\_motion.htm](http://www.kirupa.com/developer/actionscript/random_motion.htm)

and im trying to use it for a butterfly, ive got it moving ranomly on the page and I have got it rotating in one direction using the code below . I want it to change the direction that it rotates in a kind of random way

onClipEvent(enterFrame) {  
this.\_rotation -=6;

}

if there is any one who can help that would be great :ch:
