The Adobe Flash program is normally used to create interactive Web pages, but its programming features also make it useful for making online and offline video games. You can easily make a set of working dice to integrate into a gambling game by making a set of six dice images invisible and then randomly determining which one will pop up on the screen.
- Skill level:
Other People Are Reading
Things you need
- Adobe Flash Professional Photoshop or other graphics program
Use a graphics program such as Adobe Photoshop or Jasc Paint Shop Pro to create the graphics for your dice. Make six different images, each with a different number or series of dots to represent a number on the top.
Make a seventh rectangular or square image to use as the button that will be clicked to roll the dice. You may want to label it something like "Roll Dice" or "Click Me."
Open the Adobe Flash program and start a new project.
Upload the rolling button and turn it into a symbol using the "symbol conversion" option in the tools menu.
Create a new dynamic text box that has the same dimensions as each of your dice images.
Upload the dice images and then use the Flash program to make each of them a separate movie file. Place all of them on top of the dynamic text box.
Use the "Math" function to create a routine that will randomly determine a number between one and six to simulate rolling the dice.
Set the "Visible" attribute of each of the dice to "false" at default so that will not be shown, and then write a new function so that the randomly rolled number will turn that dice image's Visible attribute to "true."
Attach the functions to the rolling button so that it will randomly show one of the six dice each time you click it.
Tips and warnings
- You could easily simulate polyhedral dice with 12 or 20 sides by making additional dice images and changing the randomly determined number.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for