Actionscript for creating a jackpot

Hi,
I’m in the process of creating a jackpot game. How do I make it work using actiosncript? Users do not generate the spinning themselves but the system will do it automatically once an sms is sent out. I want to get the pictures spinning randomly.
How to do it?