Radom q

_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?