Frame 1
loadMovie ("music.swf", "/music");
ifFrameLoaded (30) {
gotoAndStop (4);
}
Frame 2
ifFrameLoaded (4) {
gotoAndStop (4);
}
Frame 3
prevFrame();
play();
Frame 4
stop();
Frame 30
stop();
Symbol 5 MovieClip Frame 30
gotoAndPlay (1);
Symbol 9 MovieClip Frame 99
gotoAndPlay (1);
Symbol 11 MovieClip Frame 225
gotoAndPlay (1);
Symbol 33 Button
on (release) {
tellTarget ("/") {
play();
}
}
Symbol 34 MovieClip Frame 41
stop();
Symbol 56 Button
on (release, keyPress "<Enter>") {
call("..:Restart");
gotoAndStop (1);
}
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 2
play();
Symbol 58 MovieClip Frame 26
gotoAndPlay (2);
Symbol 60 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 79 Button
on (release, keyPress "<Space>") {
if (Running) {
Dropping = "1";
Drop = "0";
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
Symbol 83 Button
on (release, keyPress "j") {
if (Running) {
XDelta = -"1";
YDelta = "0";
MoveMode = "Translate";
call("MovePiece");
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
on (keyPress "<Left>") {
if (Running) {
XDelta = -"1";
YDelta = "0";
MoveMode = "Translate";
call("MovePiece");
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
Symbol 87 Button
on (release, keyPress "l") {
if (Running) {
XDelta = "1";
YDelta = "0";
MoveMode = "Translate";
call("MovePiece");
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
on (keyPress "<Right>") {
if (Running) {
XDelta = "1";
YDelta = "0";
MoveMode = "Translate";
call("MovePiece");
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
Symbol 88 Button
on (release, keyPress "a") {
if (Running) {
MoveMode = "RotateCCW";
call("MovePiece");
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
Symbol 89 Button
on (release, keyPress "d") {
if (Running) {
MoveMode = "RotateCW";
call("MovePiece");
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
on (keyPress "<Up>") {
if (Running) {
MoveMode = "RotateCW";
call("MovePiece");
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
Symbol 90 Button
on (release, keyPress "<Down>") {
if (Running) {
call("PieceFall");
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
Symbol 95 Button
on (release, keyPress "s") {
stopAllSounds();
nextFrame();
}
Symbol 97 Button
on (release, keyPress "s") {
unloadMovie ("/music");
loadMovie ("music.swf", "/music");
gotoAndStop (1);
}
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 2
stop();
Symbol 100 Button
on (release, keyPress "h") {
gotoAndStop (3);
}
Symbol 104 Button
on (release, keyPress "p") {
tellTarget ("/pit") {
gotoAndStop (4);
};
tellTarget ("/music") {
stopAllSounds();
}
}
Symbol 105 Button
on (release, keyPress "p") {
tellTarget ("/pit") {
gotoAndPlay (1);
};
unloadMovie ("/music");
loadMovie ("music.swf", "/music");
}
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Symbol 113 Button
on (release, keyPress "<Enter>") {
if ((/:skiplevel >= "1") and ("10" >= /:skiplevel)) {
tellTarget ("/pit") {
call("Restart");
gotoAndPlay (1);
};
tellTarget ("/pit/GameOverClone") {
gotoAndStop (1);
};
gotoAndStop (1);
} else {
tellTarget ("MoveSound") {
gotoAndPlay ("MoveSound");
};
}
}
Symbol 118 Button
on (release) {
tellTarget ("/pit") {
gotoAndPlay (1);
};
gotoAndStop (1);
}
Symbol 138 Button
on (release) {
getURL ("mailto:redbull@mymailbag.com");
}
Symbol 139 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 2
stop();
Symbol 140 MovieClip Frame 1
if (Inited == "0") {
call("Initialize");
}
if (Running and (Dropping or (MoveDuration < (getTimer() - LastMove)))) {
call("PieceFall");
LastMove = getTimer();
}
Symbol 140 MovieClip Frame 2
if (Inited == "0") {
call("Initialize");
}
if (Running and (Dropping or (MoveDuration < (getTimer() - LastMove)))) {
call("PieceFall");
LastMove = getTimer();
}
gotoAndPlay (1);
Symbol 140 MovieClip Frame 3
duplicateMovieClip ("helpscreen", "helpscreenClone", NumBlocks + "400");
gotoAndStop("helpscreenClone:2");
stop();
Symbol 140 MovieClip Frame 4
stop();
Symbol 140 MovieClip Frame 5
XDelta = "0";
YDelta = "1";
MoveMode = "Translate";
call("MovePiece");
if (Dropping) {
Drop = Drop + "1";
}
if (!Moved) {
i = "1";
while ("4" >= i) {
NumBlocks = NumBlocks + "1";
duplicateMovieClip ("Block" add i, "PitBlock" add NumBlocks, "200" + NumBlocks);
removeMovieClip("Block" add i);
Set((("pit_" add eval ("x_" add i)) add "_") add eval ("y_" add i), NumBlocks);
i = i + "1";
}
call("CreatePiece");
Fell = "0";
Dropping = "0";
} else {
Fell = "1";
}
call("MeltLevels");
Symbol 140 MovieClip Frame 6
score = 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);
Set("x_" add i, eval ("x_" add i) + PieceX);
Set("y_" add i, eval ("y_" add i) + PieceY);
i = i + "1";
}
MoveMode = "Translate";
XDelta = "0";
YDelta = "0";
call("MovePiece");
if (!Moved) {
call("GameOver");
}
Symbol 140 MovieClip Frame 7
i = "1";
Moved = "1";
while (("4" >= i) and Moved) {
x = eval ("x_" add i);
y = eval ("y_" add i);
call(MoveMode);
x = newX;
y = newY;
call("IsOccupied");
if (Occupied) {
Moved = "0";
}
i = i + "1";
}
if (Moved) {
i = "1";
while ("4" >= i) {
x = eval ("x_" add i);
y = eval ("y_" add i);
call(MoveMode);
Set("x_" add i, newX);
Set("y_" add i, newY);
i = i + "1";
}
if (MoveMode eq "Translate") {
PieceX = PieceX + xDelta;
PieceY = PieceY + yDelta;
}
call("UpdatePieceGraphics");
}
Symbol 140 MovieClip Frame 8
i = "1";
while ("4" >= i) {
setProperty("Block" add i, _x , getProperty("RedBlock", _width) * eval ("x_" add i));
setProperty("Block" add i, _y , getProperty("RedBlock", _height) * eval ("y_" add i));
setProperty("Block" add i, _alpha , "100");
i = i + "1";
}
Symbol 140 MovieClip Frame 9
if ((((x < "0") or (x >= PitWidth)) or (y < "0")) or (y >= PitHeight)) {
Occupied = "1";
} else {
Occupied = eval ((("pit_" add x) add "_") add y);
}
Symbol 140 MovieClip Frame 10
if (PieceType == "2") {
newX = x;
newY = y;
} else {
x = x - PieceX;
y = y - PieceY;
newX = y;
newY = -x;
newX = newX + PieceX;
newY = newY + PieceY;
}
Symbol 140 MovieClip Frame 11
if (PieceType == "2") {
newX = x;
newY = y;
} else {
x = x - PieceX;
y = y - PieceY;
newX = -y;
newY = x;
newX = newX + PieceX;
newY = newY + PieceY;
}
Symbol 140 MovieClip Frame 12
newX = x + xDelta;
newY = y + yDelta;
Symbol 140 MovieClip Frame 13
RowComplete = "1";
NumComplete = "0";
while (RowComplete) {
RowComplete = "0";
i = "0";
while ((i < PitHeight) and (!RowComplete)) {
j = "0";
RowComplete = "1";
while ((j < PitWidth) and RowComplete) {
if (eval ((("pit_" add j) add "_") add i) == "0") {
RowComplete = "0";
}
j = j + "1";
}
if (!RowComplete) {
i = i + "1";
}
}
if (RowComplete) {
RowToDelete = i;
j = "0";
while (j < PitWidth) {
removeMovieClip("PitBlock" add eval ((("Pit_" add j) add "_") add i));
j = j + "1";
}
i = RowToDelete;
while ("0" < i) {
j = "0";
while (j < PitWidth) {
Block = eval ((("Pit_" add j) add "_") add (i - "1"));
Set((("Pit_" add j) add "_") add i, Block);
if (Block <> "0") {
setProperty("PitBlock" add Block, _y , getProperty("PitBlock" add Block, _y) + getProperty("RedBlock", _height));
}
j = j + "1";
}
i = i - "1";
}
j = "0";
while (j < PitWidth) {
Set(("Pit_" add j) add "_0", "0");
j = j + "1";
}
NumComplete = NumComplete + "1";
}
}
if ("0" < NumComplete) {
NumLayers = NumComplete;
call("AddScore");
tellTarget ("ExplodeSound") {
gotoAndPlay ("ExplodeSound");
};
}
Symbol 140 MovieClip Frame 14
if (NumLayers == "1") {
TetMultiple = "10";
} else if (NumLayers == "2") {
TetMultiple = "25";
} else if (NumLayers == "3") {
TetMultiple = "75";
} else if (NumLayers == "4") {
TetMultiple = "300";
}
Lines = Lines + NumLayers;
newScore = (((level + "1") * "4") * TetMultiple) + Drop;
score = score + newScore;
if (Lines >= ((level + "1") * "10")) {
level = Level + "1";
if ("150" < MoveDuration) {
MoveDuration = MoveDuration * "0.9";
}
}
Symbol 140 MovieClip Frame 15
Running = "0";
duplicateMovieClip ("GameOver", "GameOverClone", NumBlocks + "300");
gotoAndStop("GameOverClone:Start");
Symbol 140 MovieClip Frame 16
i = "0";
while (i < PitHeight) {
j = "0";
while (j < PitWidth) {
Set((("pit_" add j) add "_") add i, "0");
j = j + "1";
}
i = i + "1";
}
i = "1";
while (NumBlocks >= i) {
removeMovieClip("PitBlock" add i);
i = i + "1";
}
Inited = "0";
Symbol 140 MovieClip Frame 17
NumPieceTypes = "7";
NextPieceType = int(random(NumPieceTypes));
Score = "0";
Lines = "0";
NumBlocks = "0";
PitWidth = "11";
PitHeight = "18";
PieceStartX = int(PitWidth / "2");
PieceStartY = "0";
Inited = "1";
Dropping = "0";
Running = "1";
if ((/:skiplevel >= "1") and ("10" >= /:skiplevel)) {
Level = /:skiplevel;
MoveDuration = "500" - (/:skiplevel * "35");
Set("/:skiplevel", "0");
} else {
Level = "0";
MoveDuration = "500";
}
call("CreatePiece");