home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Diversos / crossword.swf / scripts / frame_8 / DoAction.as
Encoding:
Text File  |  2007-03-20  |  349 b   |  21 lines

  1. function get_question()
  2. {
  3.    qnum++;
  4.    if(qnum >= qmax)
  5.    {
  6.       qnum = 0;
  7.    }
  8.    return eval("question" + qnum);
  9. }
  10. qmax = 1000;
  11. i = 0;
  12. while(i < qmax)
  13. {
  14.    r = Math.floor(Math.random() * qmax);
  15.    tmp = this["question" + i];
  16.    this["question" + i] = this["question" + r];
  17.    this["question" + r] = tmp;
  18.    i++;
  19. }
  20. qnum = 0;
  21.