@Rukiri That would not work.
Math.random() is a number between 0 and 1. Math.floor of it would always return 0.
The corrected line would be
SceneManager._scene.y += Math.randInt (1, x). No need to floor that, since the function itself has a Math.ceil inside it, so it is always an integer.
However, using this has two issues.
1. The random number generator can screw you over, creating weird shaking animations sometimes
2. It's kind of difficult to make it animate smoothly when you randomize moving from side to side
3. You also need to subtract to return the screen
