1 Reply Latest reply on Nov 15, 2007 2:51 AM by crazyjoemilan

    Difficulty with random bingo card generator

      Hi! I'm trying to generate a random bingo card in Flash using ActionScript. The psudeo-code is pretty sound, I think, but I can't even get the first number onto the card. I'm trying a random number variant with output to a dynamic text field. No success. (Simply no output at all when I run the code...) Thanks!

      Here's the code...

      // bingoCard.fla
      // Jessica S. Hope
      // November 6, 2007
      // Generate a dynamic ("random") bingo card


      // choose an integer between 1 and 15 for column B
      function init (){
      number = Math.ceil(Math.random() * 15);
      // output to bRow1
      bRow1 = number;
      } // end init
      // choose an integer between 1 and 15 for column B
      //is it a repeat? if yes, choose again; if no, print output
      // choose five integers between 15 and 30 for column I
      // choose five integers between 31 and 45 for column N
      // choose five integers between 46 and 60 for column G
      // choose five integers between 61 and 75 for column O