Greetings,
My first Flash game is in progress so please prepare to laugh, guffaw and/or thank any diety you wish that your skills are not as bad as mine!
I am making a Rock-Paper-Scissors game because I actually saw an R-P-S tournement on TV. Man, those people take it seriously!
Anyway, I am probably going about a lot of things the wrong way, but what I need help on is how to display an MC based on the output of a random (1 to 3) variable created for the PC side (the Opponent) of the game with:
var PCPlayer = this.values = new Array(1, 2, 3);
trace(PCPlayer[Math.floor(Math.random() * this.values.length)]);
All is well here and I actually get a random number (insert applause here).
So, what I want to do with that random number is to display the rock_mc if the var=1, the paper_mc if it’s 2 and scissors_mc if the var=3.
If I can get that nailed down, then after a 3,2,1 GO; the Player will press Left, Down or Right to generate their selection - I have NOT got to that part yet where it will then compare using a Case statement. I know I’ll have to add listeners and such and believe that, if I can get the problem above solved, I may be able to finish the rest…(insert doubt here).
I hope this makes sense. The FLA is available - about 500k: http://www.reddenweb.com/flash/rps.zip
Thanks in advance for any advice.
Rustyd