Random frame

Hello everybody.
I have a little problem. I would like to create a completely randomly dancing robot, but i don’t know how to program it to jump randomly on the timeline.

What i mean is something like that:

Math.random “blablabla”
If random chosen number is 1 GotoAndPlay(5)
If random chosen number is 2 GotoAndPlay(12)
If random chosen number is 3 GotoAndPlay(24)
and so on…

Hope you understand what i mean. :slight_smile:
thanks.