home *** CD-ROM | disk | FTP | other *** search
- score += Drop;
- Drop = "0";
- PieceType = NextPieceType;
- Color = NextPieceType;
- NextPieceType = int(random(NumPieceTypes));
- gotoAndStop("NextPieceIndicator:" add (NextPieceType + "1"));
- if(PieceType == "0")
- {
- x_1 = "0";
- y_1 = "0";
- x_2 = - "1";
- y_2 = "0";
- x_3 = "0";
- y_3 = - "1";
- x_4 = "0";
- y_4 = - "2";
- PieceY = PieceStartY + "2";
- }
- else if(PieceType == "1")
- {
- x_1 = "0";
- y_1 = "0";
- x_2 = - "1";
- y_2 = "0";
- x_3 = "1";
- y_3 = "0";
- x_4 = "0";
- y_4 = - "1";
- PieceY = PieceStartY + "1";
- }
- else if(PieceType == "2")
- {
- x_1 = "0";
- y_1 = "0";
- x_2 = "1";
- y_2 = "0";
- x_3 = "0";
- y_3 = "1";
- x_4 = "1";
- y_4 = "1";
- PieceY = PieceStartY;
- }
- else if(PieceType == "3")
- {
- x_1 = "0";
- y_1 = - "1";
- x_2 = "0";
- y_2 = "0";
- x_3 = "0";
- y_3 = "1";
- x_4 = "0";
- y_4 = "2";
- PieceY = PieceStartY + "1";
- }
- else if(PieceType == "4")
- {
- x_1 = "0";
- y_1 = "0";
- x_2 = - "1";
- y_2 = "0";
- x_3 = - "1";
- y_3 = "1";
- x_4 = "0";
- y_4 = - "1";
- PieceY = PieceStartY + "1";
- }
- else if(PieceType == "5")
- {
- x_1 = "0";
- y_1 = "0";
- x_2 = "1";
- y_2 = "0";
- x_3 = "0";
- y_3 = - "1";
- x_4 = "0";
- y_4 = - "2";
- PieceY = PieceStartY + "2";
- }
- else if(PieceType == "6")
- {
- x_1 = "0";
- y_1 = "0";
- x_2 = "1";
- y_2 = "0";
- x_3 = "1";
- y_3 = "1";
- x_4 = "0";
- y_4 = - "1";
- PieceY = PieceStartY + "1";
- }
- if(Color == "0")
- {
- BlockName = "GreyBlock";
- }
- else if(Color == "1")
- {
- BlockName = "YellowBlock";
- }
- else if(Color == "2")
- {
- BlockName = "BlueBlock";
- }
- else if(Color == "3")
- {
- BlockName = "RedBlock";
- }
- else if(Color == "4")
- {
- BlockName = "CyanBlock";
- }
- else if(Color == "5")
- {
- BlockName = "MagentaBlock";
- }
- else if(Color == "6")
- {
- BlockName = "GreenBlock";
- }
- i = "1";
- PieceX = PieceStartX;
- while("4" >= i)
- {
- duplicateMovieClip(BlockName,"Block" add i,"100" + i + 16384);
- set("x_" add i,eval("x_" add i) + PieceX);
- set("y_" add i,eval("y_" add i) + PieceY);
- i += "1";
- }
- MoveMode = "Translate";
- XDelta = "0";
- YDelta = "0";
- call("MovePiece");
- if(!Moved)
- {
- call("GameOver");
- }
-