# Radom q

**URL:** <https://forum.kirupa.com/t/radom-q/113558>\
**Category:** Uncategorized\
**Created:** [June 19, 2004, 5:05am UTC](https://forum.kirupa.com/t/radom-q/113558 "2004-06-19T05:05:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Weazol](https://avatars.discourse-cdn.com/v4/letter/w/f17d59/32.png) [@Weazol](https://forum.kirupa.com/u/Weazol)\
**Post date:** [June 19, 2004, 5:05am UTC](https://forum.kirupa.com/t/radom-q/113558/1 "2004-06-19T05:05:00Z")

</div>

\_global.speed=10  
block.onEnterFrame = function(){  
if (block.\_x \> 640){  
\_global.speed=random(40)  
block.\_x = -50  
}  
block.\_x = block.\_x + speed  
}

that makes the block move to the right and start over at random speeds…

how would i make a block on the opposite side move to the left?
