3 Replies Latest reply on Dec 19, 2006 11:38 AM by kglad

    Flash Blackjack

    Clone1000
      i posted about this a while ago but i seem to have lost the topic :/ , i thought i would clarify the problem:

      I am making a blackjack game in Flash and I am at the stage of getting the cards to display on screen, I have a way I could do it, but that would involve me writing out 1040 If statements

      The Situation:

      On the screen I want the cards to display on I have 5 holder per player, there are 4 players in all, one Human player and 3 CPU players. the holders are:

      Hold1_usr
      Hold1_cpu1
      Hold1_cpu2
      Hold1_cpu3

      There are 5 of each e.g "Hold2_cpu2 , Hold4_usr"

      I need a way to generate a random number between 1-52 (no jokers in the game) and have it display the card related to that number for example:

      The cards are all stored in an external file /images/<card>

      As the cards are named in a 'code' of sorts:

      JD - Jack of Diamonds
      3H - Three of Hearts
      KS - King of spades

      You get it I hope.

      The CPU cards need to be displayed face down so the file name is "CardBack" all images are .jpg 's.

      I am in desperate need of help in this project as it is due in a short amount of time.

      Your help would be greatly appreciated, if you need any more info about the project plaese post here and i'll get back to you.

      ~Clone biggrin.gif