Flash - Prize Draw

After the design of the web page and the site's mascot, I have made several other jobs for this site. One of them is this Flash 'wheel of fortune' for the prize draw section.
I have included a demo here. Press 'Play' to try your luck or 'Win' if you want to cheat.



If you can't see the 'Play' button, please refresh this page to try again.


No Flash

It works as follows: After the user has correctly answered the question of the day, the web page (PHP) gives him a random number between 1 and 100 and send it to the Flash animation using JavaScript. When the Flash file receives the number, the wheel spins two times before slow down to stop in the given number.

If the random number is 100 (the winning number), a 'you win' animation is displayed, else a 'you lose' animation is displayed. In both cases Flash sends a command to javascript to display the appropriate text in the web page.

The purpose of this demo, is not only to play the animation itself, but to show the JavaScript-Flash-JavaScript communication between the web page and the Flash file with different browsers (IE, Firefox, Chrome, etc.)

For this demo, I have removed the quiz part and just placed a 'Play' button, which generates a random number between 1 and 100 and send it to flash. I added a 'Play Again' button in the animation so you can reset the game and play as many times as you want!
I also added a 'Win' button (below the 'Play' button) that sends '100' to Flash so you can cheat ;)


Visit The Pink-Pound.co.uk

Images published under permission of Pink-Pound.co.uk.