home *** CD-ROM | disk | FTP | other *** search
- function randomizeBlocks()
- {
- x = 1;
- while(100 >= x)
- {
- set("/:drawBlock" + x,"");
- x++;
- }
- total = cardMax;
- set("/:count",0);
- a = new Array(total);
- i = 1;
- while(total >= i)
- {
- R = random(total);
- if(a[R] != null)
- {
- R = random(total);
- if(a[R] != null)
- {
- R = random(total);
- if(a[R] != null)
- {
- R = 0;
- while(total >= R)
- {
- if(a[R] == null)
- {
- break;
- }
- R++;
- }
- }
- }
- }
- a[R] = i;
- i++;
- }
- x = 0;
- while(total - 1 >= x)
- {
- x += 1;
- set("/:block" add x,a[x - 1]);
- }
- }
- function setBlocks()
- {
- x = 1;
- while(10 >= x)
- {
- count += 1;
- set("_root.cB" + x + ".rValue",eval("/:block" + count));
- eval("_root.cB" + x).gotoAndStop(eval("/:block" + count));
- count += 1;
- set("_root.pB" + x + ".rValue",eval("/:block" + count));
- eval("_root.pB" + x).gotoAndStop(eval("/:block" + count));
- x++;
- }
- }
- function setChanceBlocks()
- {
- x = 1;
- while(cardMax - 20 >= x)
- {
- count += 1;
- set("/:drawBlock" + x,eval("/:block" + count));
- x++;
- }
- }
-