home *** CD-ROM | disk | FTP | other *** search
- function addChips()
- {
- if(chip1ValHis[0] == 1)
- {
- if(insurance == true)
- {
- placeChips(1,0,0,0);
- return undefined;
- }
- placeChips(1,0,0,0);
- }
- if(chip1ValHis[0] == 2)
- {
- if(insurance == true)
- {
- placeChips(1,0,0,0);
- return undefined;
- }
- placeChips(2,0,0,0);
- }
- if(chip1ValHis[0] == 3)
- {
- if(insurance == true)
- {
- placeChips(1,0,0,0);
- return undefined;
- }
- placeChips(3,0,0,0);
- }
- if(chip1ValHis[0] == 4)
- {
- if(insurance == true)
- {
- placeChips(2,0,0,0);
- return undefined;
- }
- placeChips(4,0,0,0);
- }
- if(chip5ValHis[0] == 1)
- {
- if(insurance == true)
- {
- placeChips(2,0,0,0);
- return undefined;
- }
- placeChips(0,1,0,0);
- }
- if(chip5ValHis[0] == 2)
- {
- if(insurance == true)
- {
- placeChips(0,1,0,0);
- return undefined;
- }
- placeChips(0,2,0,0);
- }
- if(chip5ValHis[0] == 3)
- {
- if(insurance == true)
- {
- placeChips(2,1,0,0);
- return undefined;
- }
- placeChips(0,3,0,0);
- }
- if(chip5ValHis[0] == 4)
- {
- if(insurance == true)
- {
- placeChips(0,2,0,0);
- return undefined;
- }
- placeChips(0,4,0,0);
- }
- if(chip25ValHis[0] == 1)
- {
- if(insurance == true)
- {
- placeChips(2,2,0,0);
- return undefined;
- }
- placeChips(0,0,1,0);
- }
- if(chip25ValHis[0] == 2)
- {
- if(insurance == true)
- {
- placeChips(0,0,1,0);
- return undefined;
- }
- placeChips(0,0,2,0);
- }
- if(chip25ValHis[0] == 3)
- {
- if(insurance == true)
- {
- placeChips(2,2,1,0);
- return undefined;
- }
- placeChips(0,0,3,0);
- }
- if(chip25ValHis[0] == 4)
- {
- if(insurance == true)
- {
- placeChips(0,0,2,0);
- return undefined;
- }
- placeChips(0,0,4,0);
- }
- if(chip100ValHis[0] == 1)
- {
- if(insurance == true)
- {
- placeChips(0,0,2,0);
- return undefined;
- }
- placeChips(0,0,0,1);
- }
- if(chip100ValHis[0] == 2)
- {
- if(insurance == true)
- {
- placeChips(0,0,0,1);
- return undefined;
- }
- placeChips(0,0,0,2);
- }
- }
- function placeChips(Loops1, Loops5, Loops25, Loops100)
- {
- loops = 0;
- while(loops < Loops100)
- {
- if(insurance == true)
- {
- ca++;
- _root.chip100_.duplicateMovieClip("chip" + ca,ca);
- xValue = posChipx2[random(7)];
- yvalue = posChipy2[random(6)];
- setProperty("chip" + ca, _X, xValue);
- setProperty("chip" + ca, _Y, yValue);
- }
- else
- {
- c++;
- _root.chip100_.duplicateMovieClip("chip" + c,c);
- xValue = posChipx[random(7)];
- yvalue = posChipy[random(6)];
- setProperty("chip" + c, _X, xValue);
- setProperty("chip" + c, _Y, yValue);
- }
- loops++;
- }
- loops = 0;
- while(loops < Loops25)
- {
- if(insurance == true)
- {
- ca++;
- _root.chip25_.duplicateMovieClip("chip" + ca,ca);
- xValue = posChipx2[random(7)];
- yvalue = posChipy2[random(6)];
- setProperty("chip" + ca, _X, xValue);
- setProperty("chip" + ca, _Y, yValue);
- }
- else
- {
- c++;
- _root.chip25_.duplicateMovieClip("chip" + c,c);
- xValue = posChipx[random(7)];
- yvalue = posChipy[random(6)];
- setProperty("chip" + c, _X, xValue);
- setProperty("chip" + c, _Y, yValue);
- }
- loops++;
- }
- loops = 0;
- while(loops < Loops5)
- {
- if(insurance == true)
- {
- ca++;
- _root.chip5_.duplicateMovieClip("chip" + ca,ca);
- xValue = posChipx2[random(7)];
- yvalue = posChipy2[random(6)];
- setProperty("chip" + ca, _X, xValue);
- setProperty("chip" + ca, _Y, yValue);
- }
- else
- {
- c++;
- _root.chip5_.duplicateMovieClip("chip" + c,c);
- xValue = posChipx[random(7)];
- yvalue = posChipy[random(6)];
- setProperty("chip" + c, _X, xValue);
- setProperty("chip" + c, _Y, yValue);
- }
- loops++;
- }
- loops = 0;
- while(loops < Loops1)
- {
- if(insurance == true)
- {
- ca++;
- _root.chip1_.duplicateMovieClip("chip" + ca,ca);
- xValue = posChipx2[random(7)];
- yvalue = posChipy2[random(6)];
- setProperty("chip" + ca, _X, xValue);
- setProperty("chip" + ca, _Y, yValue);
- }
- else
- {
- c++;
- _root.chip1_.duplicateMovieClip("chip" + c,c);
- xValue = posChipx[random(7)];
- yvalue = posChipy[random(6)];
- setProperty("chip" + c, _X, xValue);
- setProperty("chip" + c, _Y, yValue);
- }
- loops++;
- }
- }
- posChipx2 = ["460","465","470","475","480","485","490"];
- posChipy2 = ["175","180","185","190","195","200"];
- chip1ValHis = new Array();
- chip5ValHis = new Array();
- chip25ValHis = new Array();
- chip100ValHis = new Array();
- chip1Val = 0;
- chip5Val = 0;
- chip25Val = 0;
- chip100Val = 0;
- insuranceSum = 0;
-