shuffling loop: simple limit to _x property motion, with a random movement

onClipEvent (enterFrame) {
// add a random amount to the property
_x = _x + random(21);
// if the instance goes off stage right,
// then move it to the left side of stage

if(_x > 300){
_x = 0;
}
}