Tutorial Instructions
1. Create a movie clip
I recommend creating a white square and making it a movie clip...
2. Create 53 frames for the movie clip (one being the top)
I recommend making 12 slides of diamonds, spades, etc. Then add a text to each corner.
3. Make the firt frame stop
Since you do not want the deck to keep playing, insert stop();
4. Name the movie clip
Under instance name, name the movie clip deck1
5. Create a button and add this code
We need a button to run the deck and pick random numbers. Create a button (or turn the deck into a button) and add the following code which will pick a number between 2-53.
on(release){
number1 = Math.round(Math.random()*51+2);
deck1.gotoAndStop(number1);
}
6. Finish it up
That should work. I have the source files set to do two decks, and just copy and paste the decks to do more if you would like. Post any questions or comments to the right...
|
|
Comments
|