Tutorial for Making a Slot Game in Flash
Making a slot machine in flash can pay off. Making your own slot machine will let you make all sorts of games and build your flash programming skills.
Fundamental to making a slot machine is putting together the basic user interface. Next up is how to design the spinning wheel effect for slot machine icons. After you have done that, you can add on features such as running totals of wins, losses and total cash on hand.
Instructions
-
-
1
Use two different graphic icons for your slot machine: a cherry, and a lemon, Draw or obtain these graphics such that are available in JPG or GIF format.
-
2
Start your Flash program and "click" the "New" option from the "File" menu. "Click" the "Import" option from the "File" menu and "click" the "Import to Stage" option. "Click" the file name of the Lemon graphic from the dialog box that is displayed and then "Click" the "OK" button. Use the "transform tool" to re size the lemon graphic and use the "selection tool" to move the lemon graphic. Repeat this procedure for the cherry graphic.
-
-
3
"Click" the "selection tool" then "click" the lemon graphic icon. "Click" the "Convert to Symbol" option in the "Modify" menu. Type "lemon" in the name text box in the "Convert to Symbol" dialog box that appears. Now type in lemon1 in the "instancename" textbox in the "Properties" text box. Repeat the procedure for the cherry icon but use symbol name of "cherry" and an instance name of "cherry1".
-
4
"Click" the "Components" option in the "Window" menu. "Drag" the object labeled "button" in the "Components" list box to the left hand corner of the stage. "Type" in the "instance name" text box in the "Properties" panel "Spin."
-
1
Tips & Warnings
You will need to use either tweens or ActionScript coding to produce the visual effects needed for a flash slot machine game. One method would be to use timed addChild and removeChild commands. These commands could alternately display the lemon and cherry graphics. With Flash Timer methods you could control the frame rate at which the lemon and cherry graphics are alternated. You will also have to include Flash's random number generator function so that you would get different combinations of cherries and lemons each time the SPIN button was pressed.
Making your slot machine casino ready means you have to determine the odds of winning and losing for the house and the player. A well designed slot machine game requires that you program the game such that the odds of winning and losing are not significantly biased for either the house or the player winning. Not only that, you have to ensure that random results are obtained every time you spin. You don't want a game that spins, for example, two lemons, twenty times in a row.
References
- Photo Credit SLOT MACHINE LIMONE image by DAN from Fotolia.com