How to Make Working Dice in Flash

Written by ehow contributor
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Make Working Dice in Flash
Make Working Dice in Flash (Adobe)

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:
Moderate

Other People Are Reading

Things you need

  • Adobe Flash Professional Photoshop or other graphics program

Show MoreHide

Instructions

  1. 1

    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.

  2. 2

    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."

  3. 3

    Open the Adobe Flash program and start a new project.

  4. 4

    Upload the rolling button and turn it into a symbol using the "symbol conversion" option in the tools menu.

  5. 5

    Create a new dynamic text box that has the same dimensions as each of your dice images.

  6. 6

    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.

  7. 7

    Use the "Math" function to create a routine that will randomly determine a number between one and six to simulate rolling the dice.

  8. 8

    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."

  9. 9

    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.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.