Frame 2
stop();
Frame 3
function SoundSetup() {
_root.soundFxStats = !_root.soundFxStats;
if (_root.soundFxStats) {
_root.bgMusic.UpVolume();
} else {
_root.bgMusic.DownVolume();
}
_root.sndEffect.toggleOnOff();
if (_root.soundFxStats) {
_root.sound_btn.gotoAndStop(1);
} else {
_root.sound_btn.gotoAndStop(2);
}
}
_root.musicClip = _root.createEmptyMovieClip("MusicClip", _root.getNextHighestDepth());
_root.soundClip = _root.createEmptyMovieClip("SoundClip", _root.getNextHighestDepth());
_root.bgMusic = new classes.BGM("Music", "", _root.musicClip);
_root.sndEffect = new classes.SoundFX(["", "Bomb", "Drop", "LineClear", "Rotate"], _root.soundClip);
_root.soundFxStats = true;
_root.bgMusic.playMusic();
_root.keyboard = new classes.Keyboard();
_level0.IDS_play_game = "<p align='center'><font size='18'>Play Game</font></p>";
_level0.IDS_end_game = "<p align='center'><font size='18'>End Game</font></p>";
_level0.IDS_restart_game = "<p align='center'><font size='18'>Restart Game</font></p>";
_level0.IDS_send_score = "<p align='center'><font size='18'>Send Score</font></p>";
Frame 4
_root.sndEffect.playSound("Drop");
Instance of Symbol 177 MovieClip "sound_btn" in Frame 4
onClipEvent (load) {
if (_root.soundFxStats) {
_root.sound_btn.gotoAndStop(1);
} else {
_root.sound_btn.gotoAndStop(2);
}
}
on (release) {
_root.SoundSetup();
}
Frame 10
stop();
Frame 11
function SelectDiff(iDiff) {
_root.sndEffect.playSound("Drop");
_level0.iDiff = iDiff;
_root.DisplayDiff(_level0.iDiff);
}
function DisplayDiff(iDiff) {
var _local2 = 1;
while (_local2 <= 2) {
_root["mcDiff" + _local2].enabled = true;
_root["mcDiff" + _local2].gotoAndStop(1);
_local2++;
}
_root["mcDiff" + iDiff].gotoAndStop(2);
_root["mcDiff" + iDiff].enabled = false;
}
function SelectLevel(iLevel) {
_root.sndEffect.playSound("Drop");
_level0.iLevel = iLevel;
_root.DisplayLevel(_level0.iLevel);
}
function DisplayLevel(iLevel) {
var _local2 = 1;
while (_local2 <= 10) {
_root["mcLevel" + _local2].enabled = true;
_root["mcLevel" + _local2].gotoAndStop(1);
_local2++;
}
_root["mcLevel" + iLevel].gotoAndStop(2);
_root["mcLevel" + iLevel].enabled = false;
}
function SelectSize(iSize) {
_root.sndEffect.playSound("Drop");
_level0.iSize = iSize;
_root.DisplaySize(_level0.iSize);
}
function DisplaySize(iSize) {
var _local2 = 1;
while (_local2 <= 3) {
_root["mcSize" + _local2].enabled = true;
_root["mcSize" + _local2].gotoAndStop(1);
_local2++;
}
_root["mcSize" + iSize].gotoAndStop(2);
_root["mcSize" + iSize].enabled = false;
}
_level0.iLevel = 1;
_level0.iDiff = 1;
_level0.iSize = 1;
var i = 1;
while (i <= 2) {
_root["mcDiff" + i].iID = i;
_root["mcDiff" + i].onRelease = function () {
_root.SelectDiff(this.iID);
};
i++;
}
var i = 1;
while (i <= 3) {
_root["mcSize" + i].iID = i;
_root["mcSize" + i].onRelease = function () {
_root.SelectSize(this.iID);
};
i++;
}
var i = 1;
while (i <= 10) {
_root["mcLevel" + i].iID = i;
_root["mcLevel" + i].onRelease = function () {
_root.SelectLevel(this.iID);
};
i++;
}
_root.DisplayDiff(_level0.iDiff);
_root.DisplayLevel(_level0.iLevel);
_root.DisplaySize(_level0.iSize);
_root.sndEffect.playSound("Drop");
Instance of Symbol 177 MovieClip "sound_btn" in Frame 11
onClipEvent (load) {
if (_root.soundFxStats) {
_root.sound_btn.gotoAndStop(1);
} else {
_root.sound_btn.gotoAndStop(2);
}
}
on (release) {
_root.SoundSetup();
}
Frame 17
stop();
Frame 18
_root.sndEffect.playSound("Drop");
Instance of Symbol 177 MovieClip "sound_btn" in Frame 18
onClipEvent (load) {
if (_root.soundFxStats) {
_root.sound_btn.gotoAndStop(1);
} else {
_root.sound_btn.gotoAndStop(2);
}
}
on (release) {
_root.SoundSetup();
}
Frame 24
stop();
Frame 25
_level0.gLoader.trackPlay();
_global.gTilesLibrary = new classes.TilesLibrary(["Tile0", "Tile1", "Tile2", "Tile3", "Tile4", "Tile5", "Tile6", "Tile7", "Tile8", "Tile9", "Tile10"]);
var i = 1;
while (i <= 3) {
_root["mcPuzzlePanel" + i]._visible = false;
i++;
}
_root["mcPuzzlePanel" + _level0.iSize]._visible = true;
_global.objGame = new classes.Weetrix(_root["mcWorld" + _level0.iSize], _root.mcPrompt);
this.onEnterFrame = function () {
_global.objGame.Main();
};
_root.sndEffect.playSound("Drop");
Instance of Symbol 177 MovieClip "sound_btn" in Frame 25
onClipEvent (load) {
if (_root.soundFxStats) {
_root.sound_btn.gotoAndStop(1);
} else {
_root.sound_btn.gotoAndStop(2);
}
}
on (release) {
_root.SoundSetup();
}
Frame 31
stop();
Frame 32
this.final_score_txt.text = "Score: " + _global.objGame.GetTotalScore();
_root.sndEffect.playSound("Drop");
delete _global.objGame;
Instance of Symbol 177 MovieClip "sound_btn" in Frame 32
onClipEvent (load) {
if (_root.soundFxStats) {
_root.sound_btn.gotoAndStop(1);
} else {
_root.sound_btn.gotoAndStop(2);
}
}
on (release) {
_root.SoundSetup();
}
Frame 38
stop();
Frame 39
stop();
if (_global.menuSelect == 1) {
_level0.gLoader.sendScore(_global.objGame.GetTotalScore());
} else if (_global.menuSelect == 2) {
_root.gotoAndPlay("resetAllFrame");
}
Frame 40
Frame 41
_root.gotoAndPlay("resetAllFrame");
Symbol 44 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 44 MovieClip Frame 2
gotoAndPlay (1);
Symbol 44 MovieClip Frame 3
_root.play();
Symbol 256 MovieClip [__Packages.classes.SoundFX] Frame 0
class classes.SoundFX
{
var soundOn;
function SoundFX (soundPassIn, soundClip) {
soundOn = true;
soundTakeIn = soundPassIn;
var _local2 = 0;
while (_local2 < soundTakeIn.length) {
soundsMC[_local2] = soundClip.createEmptyMovieClip(_local2, _local2);
sounds[_local2] = new Sound(soundsMC[_local2]);
sounds[_local2].attachSound(soundTakeIn[_local2]);
_local2++;
}
}
function toggleOnOff() {
soundOn = !soundOn;
}
function playSound(soundName) {
if (soundOn) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (soundTakeIn[_local2] == soundName) {
sounds[_local2].setVolume(allVolume);
sounds[_local2].start();
}
_local2++;
}
}
}
function playSoundLoop(soundName) {
if (soundOn) {
var i = 0;
while (i < sounds.length) {
if (soundTakeIn[i] == soundName) {
sounds[i].stop();
sounds[i].setVolume(allVolume);
sounds[i].start();
sounds[i].onSoundComplete = function () {
this.sounds[i].setVolume(this.allVolume);
this.start();
};
}
i++;
}
}
}
function stopSoundLoop(soundName) {
if (soundOn) {
var _local2 = 0;
while (_local2 < sounds.length) {
if (soundTakeIn[_local2] == soundName) {
soundsMC[_local2].SoundObject = sounds[_local2];
soundsMC[_local2].onEnterFrame = function () {
this.SoundObject.setVolume(this.SoundObject.getVolume() - 20);
if (this.SoundObject.getVolume() <= 0) {
this.SoundObject.stop();
this.onEnterFrame = undefined;
}
};
}
_local2++;
}
}
}
function SetVolume(percent) {
allVolume = percent;
var _local2 = 0;
while (_local2 < sounds.length) {
sounds[_local2].setVolume(allVolume);
_local2++;
}
}
var soundTakeIn = new Array();
var sounds = new Array();
var allVolume = 100;
var soundsMC = new Array();
}
Symbol 257 MovieClip [__Packages.classes.BGM] Frame 0
class classes.BGM
{
var musicOn, music, ambient, mcMusicClip;
function BGM (musicPassIn, ambientPassIn, musicClip) {
musicOn = true;
music = new Sound(musicClip);
music.attachSound(musicPassIn);
ambient = new Sound(musicClip);
ambient.attachSound(ambientPassIn);
mcMusicClip = musicClip;
}
function toggleOnOff() {
musicOn = !musicOn;
}
function playMusic() {
if (musicOn) {
music.setVolume(allVolume);
music.start();
music.onSoundComplete = function () {
this.start();
};
} else {
music.stop();
}
}
function playAmbient() {
if (musicOn) {
ambient.setVolume(allVolume);
ambient.start();
ambient.onSoundComplete = function () {
this.start();
};
} else {
ambient.stop();
}
}
function playMusicOnce() {
if (musicOn) {
music.setVolume(allVolume);
music.start();
} else {
music.stop();
}
}
function stopMusic() {
music.stop();
}
function stopAmbient() {
ambient.stop();
}
function SetVolume(percent) {
allVolume = percent;
ambient.setVolume(allVolume);
music.setVolume(allVolume);
}
function GetVolume() {
return(allVolume);
}
function UpVolume() {
mcMusicClip.Obj = this;
mcMusicClip.onEnterFrame = function () {
var _local2 = this.Obj.GetVolume() + 5;
if (_local2 >= 100) {
_local2 = 100;
}
this.Obj.SetVolume(_local2);
if (_local2 == 100) {
this.onEnterFrame = undefined;
}
};
}
function DownVolume() {
mcMusicClip.Obj = this;
mcMusicClip.onEnterFrame = function () {
var _local2 = this.Obj.GetVolume() - 5;
if (_local2 <= 0) {
_local2 = 0;
}
this.Obj.SetVolume(_local2);
if (_local2 == 0) {
this.onEnterFrame = undefined;
}
};
}
var allVolume = 100;
}
Symbol 258 MovieClip [__Packages.classes.Keyboard] Frame 0
class classes.Keyboard
{
var cookies, P1Keys, P2Keys;
function Keyboard () {
Setup();
}
function Setup() {
cookies = SharedObject.getLocal("key_config");
if ((cookies.data.P1Keys == undefined) || (cookies.data.P1Keys.down == undefined)) {
Reset();
trace("Keyboard Added");
} else {
P1Keys = cookies.data.P1Keys;
P2Keys = cookies.data.P2Keys;
trace("Keyboard Retrieved");
}
Reset();
}
function Reset() {
P1Keys = new Object();
P1Keys.Up = 87;
P1Keys.Down = 83;
P1Keys.Left = 65;
P1Keys.Right = 68;
P1Keys.Action = 70;
P2Keys = new Object();
P2Keys.Up = 38;
P2Keys.Down = 40;
P2Keys.Left = 37;
P2Keys.Right = 39;
P2Keys.Action = 97;
cookies.data.P1Keys = P1Keys;
cookies.data.P2Keys = P2Keys;
}
}
Symbol 259 MovieClip [__Packages.classes.Weetrix] Frame 0
class classes.Weetrix
{
var mcGameWorld, mcPromptWorld, iGameStatus, nGameTime, objTilesMapping, aPuzzleArray, aLandedArray, nGenerateFace, nGenerateType, nNextType, nKeyPressTime, nDownKeyPressTime, nStartTime, nAddLineTime;
function Weetrix (mworld, mprompt) {
trace("Tetris Constructor Loaded");
InitVars(mworld, mprompt);
DisplayInfo();
Setup();
SetObjects();
DisplayNext();
Generate();
}
function InitVars(mworld, mprompt) {
mcGameWorld = mworld;
mcPromptWorld = mprompt;
iLevel = _level0.iLevel - 1;
iDiff = _level0.iDiff;
iFourLines = 0;
iThreeLines = 0;
iTwoLines = 0;
iOneLine = 0;
iToLevel = 0;
SetToNextLevel();
iScore = 0;
switch (_level0.iSize) {
case 1 :
iTotalRow = 40;
iTotalCol = 10;
nScreenHeight = 300;
nScreenWidth = 100;
break;
case 2 :
iTotalRow = 45;
iTotalCol = 13;
nScreenHeight = 350;
nScreenWidth = 130;
break;
case 3 :
iTotalRow = 50;
iTotalCol = 15;
nScreenHeight = 400;
nScreenWidth = 150;
}
iGameStatus = staticGamePlay;
}
function Main(gtime) {
gtime = getTimer();
UpdateTime(gtime);
if (iGameStatus == staticGamePlay) {
AutoAddLine();
} else if (iGameStatus == staticGameOver) {
DisplayGameOver();
DisplayGameOver();
DisplayGameOver();
DisplayGameOver();
DisplayGameOver();
}
UpdateScreen();
}
function UpdateTime(gtime) {
nGameTime = gtime;
}
function SetObjects() {
objTilesMapping = new classes.TilesMapping(mcGameWorld, nScreenWidth, nScreenHeight, aPuzzleArray, aLandedArray, nGridSizeX, nGridSizeY);
}
function UpdateScreen() {
objTilesMapping.Render(0, 110);
}
function Setup() {
aPuzzleArray = new Array();
aLandedArray = new Array();
var _local3 = 0;
while (_local3 < (iTotalRow + 1)) {
aPuzzleArray[_local3] = new Array();
aLandedArray[_local3] = new Array();
var _local2 = 0;
while (_local2 < iTotalCol) {
aPuzzleArray[_local3][_local2] = 0;
aLandedArray[_local3][_local2] = 0;
_local2++;
}
_local3++;
}
}
function RotateTiles() {
var _local4;
var _local5;
var _local3 = 0;
while (_local3 < (iTotalRow + 1)) {
var _local2 = 0;
while (_local2 < iTotalCol) {
if (aPuzzleArray[_local3][_local2] == staticTileMoveCenter) {
_local4 = _local3;
_local5 = _local2;
}
_local2++;
}
_local3++;
}
var _local6 = nGenerateFace + 1;
if (_local6 >= 4) {
_local6 = 0;
}
if (nGenerateType == staticTypeT) {
RotateTypeT(_local4, _local5, _local6);
} else if (nGenerateType == staticTypeZL) {
} else if (nGenerateType == staticTypeI) {
RotateTypeI(_local4, _local5, _local6);
} else if (nGenerateType == staticTypeZR) {
RotateTypeZR(_local4, _local5, _local6);
} else if (nGenerateType == staticTypeO) {
} else if (nGenerateType == staticTypeLL) {
RotateTypeLL(_local4, _local5, _local6);
} else if (nGenerateType == staticTypeLR) {
RotateTypeLR(_local4, _local5, _local6);
}
}
function CheckPosOk(iRow, iCol, iRowChange, iColChange) {
var _local2 = true;
var _local3 = aPuzzleArray[iRow + iRowChange][iCol + iColChange];
if (((((iCol + iColChange) >= 0) && ((iCol + iColChange) < iTotalCol)) && ((iRow + iRowChange) >= 0)) && ((iRow + iRowChange) < iTotalRow)) {
if ((_local3 == undefined) || (_local3 == staticTileLanded)) {
_local2 = false;
}
} else {
_local2 = false;
}
trace(_local2);
return(_local2);
}
function SetPosOk(iRow, iCol, iRowChange, iColChange) {
aPuzzleArray[iRow + iRowChange][iCol + iColChange] = staticTileMove;
}
function ClearAllTileMove() {
var _local3 = 0;
while (_local3 < (iTotalRow + 1)) {
var _local2 = 0;
while (_local2 < iTotalCol) {
if (aPuzzleArray[_local3][_local2] == staticTileMove) {
aPuzzleArray[_local3][_local2] = staticTileEmpty;
}
_local2++;
}
_local3++;
}
}
function Generate() {
nGenerateType = nNextType;
nGenerateFace = 0;
DisplayNext();
var _local2 = int(iTotalCol / 2);
objTilesMapping.SetCurrentType(nGenerateType);
if (nGenerateType == staticTypeT) {
aPuzzleArray[4][_local2] = staticTileMove;
aPuzzleArray[5][_local2 - 1] = staticTileMove;
aPuzzleArray[5][_local2] = staticTileMoveCenter;
aPuzzleArray[5][_local2 + 1] = staticTileMove;
} else if (nGenerateType == staticTypeZL) {
aPuzzleArray[4][_local2] = staticTileMoveCenter;
} else if (nGenerateType == staticTypeI) {
aPuzzleArray[4][_local2] = staticTileMove;
aPuzzleArray[5][_local2] = staticTileMoveCenter;
aPuzzleArray[6][_local2] = staticTileMove;
aPuzzleArray[7][_local2] = staticTileMove;
} else if (nGenerateType == staticTypeZR) {
aPuzzleArray[4][_local2] = staticTileMoveCenter;
aPuzzleArray[4][_local2 + 1] = staticTileMove;
} else if (nGenerateType == staticTypeO) {
aPuzzleArray[4][_local2] = staticTileMove;
aPuzzleArray[5][_local2] = staticTileMove;
aPuzzleArray[4][_local2 + 1] = staticTileMoveCenter;
aPuzzleArray[5][_local2 + 1] = staticTileMove;
} else if (nGenerateType == staticTypeLL) {
aPuzzleArray[6][_local2] = staticTileMoveCenter;
aPuzzleArray[4][_local2] = staticTileMove;
aPuzzleArray[5][_local2] = staticTileMove;
} else if (nGenerateType == staticTypeLR) {
aPuzzleArray[5][_local2 + 1] = staticTileMoveCenter;
aPuzzleArray[4][_local2 + 1] = staticTileMove;
aPuzzleArray[5][_local2] = staticTileMove;
}
trace("Hey");
}
function Move() {
RotateControl();
if (nKeyPressTime == undefined) {
nKeyPressTime = nGameTime;
}
var _local2 = nGameTime - nKeyPressTime;
if (_local2 > 50) {
if (Key.isDown(40)) {
nDownKeyPressTime = nGameTime;
MoveTiles(staticMoveDown);
} else if (!Key.isDown(40)) {
AutoMove();
}
if (Key.isDown(37)) {
nKeyPressTime = nGameTime;
MoveTiles(staticMoveLeft);
} else if (Key.isDown(39)) {
nKeyPressTime = nGameTime;
MoveTiles(staticMoveRight);
}
}
}
function RotateControl() {
if (Key.isDown(38)) {
bKeyUpReady = true;
} else if (!Key.isDown(38)) {
if (bKeyUpReady) {
RotateTiles();
_root.sndEffect.playSound("Rotate");
bKeyUpReady = false;
}
}
}
function MoveTiles(iMoveDirection) {
if (iMoveDirection == staticMoveLeft) {
var _local7 = true;
var _local4 = 0;
while (_local4 < iTotalCol) {
var _local3 = 0;
while (_local3 < (iTotalRow + 1)) {
if ((aPuzzleArray[_local3][_local4] == staticTileMove) || (aPuzzleArray[_local3][_local4] == staticTileMoveCenter)) {
if ((_local4 - 1) < 0) {
_local7 = false;
trace("Reach Left Limit");
break;
}
if (((aPuzzleArray[_local3][_local4 - 1] == staticTileEmpty) || (aPuzzleArray[_local3][_local4 - 1] == staticTileMove)) || (aPuzzleArray[_local3][_local4 - 1] == staticTileMoveCenter)) {
} else {
_local7 = false;
trace("bCanMove" + _local7);
break;
}
}
_local3++;
}
_local4++;
}
if (_local7) {
var _local3 = 0;
while (_local3 < (iTotalRow + 1)) {
_local4 = 0;
while (_local4 < iTotalCol) {
if (aPuzzleArray[_local3][_local4] == staticTileMove) {
aPuzzleArray[_local3][_local4 - 1] = staticTileShift;
aPuzzleArray[_local3][_local4] = staticTileEmpty;
}
if (aPuzzleArray[_local3][_local4] == staticTileMoveCenter) {
aPuzzleArray[_local3][_local4 - 1] = staticTileShiftCenter;
aPuzzleArray[_local3][_local4] = staticTileEmpty;
}
_local4++;
}
_local3++;
}
}
} else if (iMoveDirection == staticMoveRight) {
var _local7 = true;
var _local4 = 19;
while (_local4 >= 0) {
var _local3 = 0;
while (_local3 < (iTotalRow + 1)) {
if ((aPuzzleArray[_local3][_local4] == staticTileMove) || (aPuzzleArray[_local3][_local4] == staticTileMoveCenter)) {
if ((_local4 + 1) >= iTotalCol) {
_local7 = false;
trace("Reach Right Limit");
break;
}
if (((aPuzzleArray[_local3][_local4 + 1] == staticTileEmpty) || (aPuzzleArray[_local3][_local4 + 1] == staticTileMove)) || (aPuzzleArray[_local3][_local4 + 1] == staticTileMoveCenter)) {
} else {
_local7 = false;
trace("bCanMove" + _local7);
break;
}
}
_local3++;
}
_local4--;
}
if (_local7) {
var _local3 = 0;
while (_local3 < (iTotalRow + 1)) {
_local4 = 19;
while (_local4 >= 0) {
if (aPuzzleArray[_local3][_local4] == staticTileMove) {
aPuzzleArray[_local3][_local4 + 1] = staticTileShift;
aPuzzleArray[_local3][_local4] = staticTileEmpty;
}
if (aPuzzleArray[_local3][_local4] == staticTileMoveCenter) {
aPuzzleArray[_local3][_local4 + 1] = staticTileShiftCenter;
aPuzzleArray[_local3][_local4] = staticTileEmpty;
}
_local4--;
}
_local3++;
}
}
} else if (iMoveDirection == staticMoveDown) {
var _local7 = true;
var _local3 = iTotalRow;
while (_local3 >= 0) {
var _local4 = 0;
while (_local4 < iTotalCol) {
if ((aPuzzleArray[_local3][_local4] == staticTileMove) || (aPuzzleArray[_local3][_local4] == staticTileMoveCenter)) {
if (((aPuzzleArray[_local3 + 1][_local4] == staticTileEmpty) || (aPuzzleArray[_local3 + 1][_local4] == staticTileMove)) || (aPuzzleArray[_local3 + 1][_local4] == staticTileMoveCenter)) {
} else {
_local7 = false;
break;
}
}
_local4++;
}
_local3--;
}
if (_local7) {
_local3 = iTotalRow;
while (_local3 >= 0) {
var _local4 = 0;
while (_local4 < iTotalCol) {
if (aPuzzleArray[_local3][_local4] == staticTileMove) {
aPuzzleArray[_local3 + 1][_local4] = staticTileShift;
aPuzzleArray[_local3][_local4] = staticTileEmpty;
}
if (aPuzzleArray[_local3][_local4] == staticTileMoveCenter) {
aPuzzleArray[_local3 + 1][_local4] = staticTileShiftCenter;
aPuzzleArray[_local3][_local4] = staticTileEmpty;
}
_local4++;
}
_local3--;
}
} else {
_local3 = iTotalRow;
while (_local3 >= 10) {
var _local4 = 0;
while (_local4 < iTotalCol) {
if ((aPuzzleArray[_local3][_local4] == staticTileMove) || (aPuzzleArray[_local3][_local4] == staticTileMoveCenter)) {
aPuzzleArray[_local3][_local4] = staticTileToLand;
}
_local4++;
}
_local3--;
}
}
}
var _local3 = iTotalRow;
while (_local3 >= 0) {
var _local4 = 0;
while (_local4 < iTotalCol) {
if (aPuzzleArray[_local3][_local4] == staticTileShift) {
aPuzzleArray[_local3][_local4] = staticTileMove;
}
if (aPuzzleArray[_local3][_local4] == staticTileShiftCenter) {
aPuzzleArray[_local3][_local4] = staticTileMoveCenter;
}
_local4++;
}
_local3--;
}
var _local6 = false;
_local3 = iTotalRow;
while (_local3 >= 10) {
var _local4 = 0;
while (_local4 < iTotalCol) {
if (aPuzzleArray[_local3][_local4] == staticTileToLand) {
aPuzzleArray[_local3][_local4] = staticTileLanded;
aLandedArray[_local3][_local4] = nGenerateType;
_local6 = true;
if (nGenerateType == staticTypeZL) {
BombArea(_local3, _local4);
BombArea(_local3 - 1, _local4);
BombArea(_local3 - 2, _local4);
BombArea(_local3 + 1, _local4);
BombArea(_local3 + 2, _local4);
BombArea(_local3, _local4 + 1);
BombArea(_local3, _local4 + 2);
BombArea(_local3, _local4 - 1);
BombArea(_local3, _local4 - 2);
BombArea(_local3 + 1, _local4 + 1);
BombArea(_local3 - 1, _local4 + 1);
BombArea(_local3 + 1, _local4 - 1);
BombArea(_local3 - 1, _local4 - 1);
_root.sndEffect.playSound("Bomb");
}
if (nGenerateType == staticTypeZR) {
var _local5 = 0;
while (_local5 < iTotalCol) {
BombArea(_local3, _local5);
_local5++;
}
Collapse(_local3);
_local3++;
}
}
_local4++;
}
_local3--;
}
if (_local6) {
if (nGenerateType == staticTypeZR) {
_root.sndEffect.playSound("Bomb");
}
_root.sndEffect.playSound("Drop");
CheckLineFilled();
Generate();
CheckGameOver();
}
}
function BombArea(iRow, iCol) {
if (aLandedArray[iRow][iCol] != 0) {
aLandedArray[iRow][iCol] = staticTileEmpty;
aPuzzleArray[iRow][iCol] = staticTileEmpty;
iScore++;
ScoreBoard();
}
}
function Collapse(iRow) {
var _local3 = iRow;
while (_local3 >= 10) {
var _local2 = 0;
while (_local2 < iTotalCol) {
aPuzzleArray[_local3][_local2] = aPuzzleArray[_local3 - 1][_local2];
aLandedArray[_local3][_local2] = aLandedArray[_local3 - 1][_local2];
_local2++;
}
_local3--;
}
}
function AutoMove() {
if (nStartTime == undefined) {
nStartTime = nGameTime;
}
var _local3 = nGameTime - nStartTime;
var _local2 = 700 - (iLevel * 70);
if (_local2 <= 0) {
_local2 = 0;
}
if (_local3 > _local2) {
nStartTime = nGameTime;
MoveTiles(staticMoveDown);
}
}
function AutoAddLine() {
if (nAddLineTime == undefined) {
nAddLineTime = nGameTime;
}
var _local3 = nGameTime - nAddLineTime;
var _local2 = 9000 - (iLevel * 30);
if (_local2 <= 0) {
_local2 = 0;
}
if (_local3 > _local2) {
nAddLineTime = nGameTime;
if (CheckCanAddLine()) {
AddLineFilled();
} else {
Move();
}
} else {
Move();
}
}
function RotateTypeT(iRow, iCol, iTempFace) {
switch (iTempFace) {
case 0 :
var _local7 = CheckPosOk(iRow, iCol, 0, 1);
var _local6 = CheckPosOk(iRow, iCol, 1, 0);
var _local5 = CheckPosOk(iRow, iCol, 0, -1);
if ((_local7 && (_local6)) && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, 1);
SetPosOk(iRow, iCol, 1, 0);
SetPosOk(iRow, iCol, 0, -1);
}
break;
case 1 :
_local7 = CheckPosOk(iRow, iCol, -1, 0);
_local6 = CheckPosOk(iRow, iCol, 0, -1);
_local5 = CheckPosOk(iRow, iCol, 1, 0);
if ((_local7 && (_local6)) && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 0, -1);
SetPosOk(iRow, iCol, 1, 0);
}
break;
case 2 :
_local7 = CheckPosOk(iRow, iCol, 0, 1);
_local6 = CheckPosOk(iRow, iCol, -1, 0);
_local5 = CheckPosOk(iRow, iCol, 0, -1);
if ((_local7 && (_local6)) && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, 1);
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 0, -1);
}
break;
case 3 :
_local7 = CheckPosOk(iRow, iCol, -1, 0);
_local6 = CheckPosOk(iRow, iCol, 0, 1);
_local5 = CheckPosOk(iRow, iCol, 1, 0);
if (!((_local7 && (_local6)) && (_local5))) {
break;
}
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 0, 1);
SetPosOk(iRow, iCol, 1, 0);
}
}
function RotateTypeZL(iRow, iCol, iTempFace) {
switch (iTempFace) {
case 0 :
var _local6 = CheckPosOk(iRow, iCol, 0, -1);
var _local5 = CheckPosOk(iRow, iCol, 1, 0);
if (_local6 && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, -1);
SetPosOk(iRow, iCol, 1, 0);
}
break;
case 1 :
_local6 = CheckPosOk(iRow, iCol, -1, 0);
_local5 = CheckPosOk(iRow, iCol, 0, -1);
if (_local6 && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 0, -1);
}
break;
case 2 :
_local6 = CheckPosOk(iRow, iCol, 0, -1);
_local5 = CheckPosOk(iRow, iCol, 1, 0);
if (_local6 && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, -1);
SetPosOk(iRow, iCol, 1, 0);
}
break;
case 3 :
_local6 = CheckPosOk(iRow, iCol, -1, 0);
_local5 = CheckPosOk(iRow, iCol, 0, -1);
if (!(_local6 && (_local5))) {
break;
}
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 0, -1);
}
}
function RotateTypeZR(iRow, iCol, iTempFace) {
switch (iTempFace) {
case 0 :
var _local5 = CheckPosOk(iRow, iCol, 0, 1);
if (_local5) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, 1);
}
break;
case 1 :
_local5 = CheckPosOk(iRow, iCol, -1, 0);
if (_local5) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
}
break;
case 2 :
_local5 = CheckPosOk(iRow, iCol, 0, 1);
if (_local5) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, 1);
}
break;
case 3 :
_local5 = CheckPosOk(iRow, iCol, -1, 0);
if (!_local5) {
break;
}
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
}
}
function RotateTypeLL(iRow, iCol, iTempFace) {
switch (iTempFace) {
case 0 :
var _local6 = CheckPosOk(iRow, iCol, -1, 0);
var _local5 = CheckPosOk(iRow, iCol, 1, 0);
if (_local6 && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 1, 0);
}
break;
case 1 :
_local6 = CheckPosOk(iRow, iCol, 0, -1);
_local5 = CheckPosOk(iRow, iCol, 0, 1);
if (_local6 && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, -1);
SetPosOk(iRow, iCol, 0, 1);
}
break;
case 2 :
_local6 = CheckPosOk(iRow, iCol, -1, 0);
_local5 = CheckPosOk(iRow, iCol, 1, 0);
if (_local6 && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 1, 0);
}
break;
case 3 :
_local6 = CheckPosOk(iRow, iCol, 0, -1);
_local5 = CheckPosOk(iRow, iCol, 0, 1);
if (!(_local6 && (_local5))) {
break;
}
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, -1);
SetPosOk(iRow, iCol, 0, 1);
}
}
function RotateTypeLR(iRow, iCol, iTempFace) {
switch (iTempFace) {
case 0 :
var _local6 = CheckPosOk(iRow, iCol, -1, 0);
var _local5 = CheckPosOk(iRow, iCol, 0, -1);
if (_local6 && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 0, -1);
}
break;
case 1 :
_local6 = CheckPosOk(iRow, iCol, -1, 0);
_local5 = CheckPosOk(iRow, iCol, 0, 1);
if (_local6 && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 0, 1);
}
break;
case 2 :
_local6 = CheckPosOk(iRow, iCol, 1, 0);
_local5 = CheckPosOk(iRow, iCol, 0, 1);
if (_local6 && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 1, 0);
SetPosOk(iRow, iCol, 0, 1);
}
break;
case 3 :
_local6 = CheckPosOk(iRow, iCol, 1, 0);
_local5 = CheckPosOk(iRow, iCol, 0, -1);
if (!(_local6 && (_local5))) {
break;
}
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 1, 0);
SetPosOk(iRow, iCol, 0, -1);
}
}
function RotateTypeI(iRow, iCol, iTempFace) {
switch (iTempFace) {
case 0 :
var _local7 = CheckPosOk(iRow, iCol, -1, 0);
var _local6 = CheckPosOk(iRow, iCol, 1, 0);
var _local5 = CheckPosOk(iRow, iCol, 2, 0);
if ((_local7 && (_local6)) && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 1, 0);
SetPosOk(iRow, iCol, 2, 0);
}
break;
case 1 :
_local7 = CheckPosOk(iRow, iCol, 0, -1);
_local6 = CheckPosOk(iRow, iCol, 0, 1);
_local5 = CheckPosOk(iRow, iCol, 0, 2);
if ((_local7 && (_local6)) && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, -1);
SetPosOk(iRow, iCol, 0, 1);
SetPosOk(iRow, iCol, 0, 2);
}
break;
case 2 :
_local7 = CheckPosOk(iRow, iCol, -1, 0);
_local6 = CheckPosOk(iRow, iCol, 1, 0);
_local5 = CheckPosOk(iRow, iCol, 2, 0);
if ((_local7 && (_local6)) && (_local5)) {
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, -1, 0);
SetPosOk(iRow, iCol, 1, 0);
SetPosOk(iRow, iCol, 2, 0);
}
break;
case 3 :
_local7 = CheckPosOk(iRow, iCol, 0, -1);
_local6 = CheckPosOk(iRow, iCol, 0, 1);
_local5 = CheckPosOk(iRow, iCol, 0, 2);
if (!((_local7 && (_local6)) && (_local5))) {
break;
}
ClearAllTileMove();
nGenerateFace = iTempFace;
SetPosOk(iRow, iCol, 0, -1);
SetPosOk(iRow, iCol, 0, 1);
SetPosOk(iRow, iCol, 0, 2);
}
}
function CheckLineFilled() {
var _local8 = 0;
var _local6 = iTotalRow;
while (_local6 >= 10) {
var _local7 = true;
var _local5 = 0;
while (_local5 < iTotalCol) {
if (aPuzzleArray[_local6][_local5] != staticTileLanded) {
_local7 = false;
}
_local5++;
}
if (_local7) {
_local8++;
var _local4 = _local6;
while (_local4 >= 10) {
var _local3 = 0;
while (_local3 < iTotalCol) {
aPuzzleArray[_local4][_local3] = aPuzzleArray[_local4 - 1][_local3];
aLandedArray[_local4][_local3] = aLandedArray[_local4 - 1][_local3];
_local3++;
}
_local4--;
}
_local6++;
}
_local6--;
}
if (_local8 > 0) {
_root.sndEffect.playSound("LineClear");
iScore = iScore + (((_local8 * _local8) + 1) * (iTotalCol * iDiff));
if (_local8 == 1) {
iOneLine++;
} else if (_local8 == 2) {
iTwoLines++;
} else if (_local8 == 3) {
iThreeLines++;
} else if (_local8 == 4) {
iFourLines++;
}
ScoreBoard();
}
}
function ScoreBoard() {
if (iScore >= iToLevel) {
SetToNextLevel();
}
DisplayInfo();
}
function DisplayNext() {
var _local5 = random(100);
var _local4 = 90;
if (iDiff == 1) {
_local4 = 70;
}
if (_local5 > _local4) {
var _local3 = random(2);
if (_local3 == 0) {
nNextType = staticTypeZL;
} else if (_local3 == 1) {
nNextType = staticTypeZR;
}
} else {
var _local3 = random(5);
if (_local3 == 0) {
nNextType = staticTypeT;
} else if (_local3 == 1) {
nNextType = staticTypeI;
} else if (_local3 == 2) {
nNextType = staticTypeO;
} else if (_local3 == 3) {
nNextType = staticTypeLL;
} else if (_local3 == 4) {
nNextType = staticTypeLR;
}
}
_root.mcNextBlock.gotoAndStop(nNextType);
}
function SetToNextLevel() {
iLevel++;
iToLevel = iToLevel + ((iLevel * 4) * (iTotalCol * iDiff));
}
function DisplayInfo() {
_root.txtLevel.text = "Current Level: " + iLevel;
_root.txtFourLines.text = iFourLines;
_root.txtThreeLines.text = iThreeLines;
_root.txtTwoLines.text = iTwoLines;
_root.txtOneLine.text = iOneLine;
_root.txtToLevel.text = iToLevel - iScore;
_root.txtScore.text = iScore;
}
function AddLineFilled() {
var _local2 = 0;
while (_local2 < (iTotalRow + 1)) {
var _local3 = 0;
while (_local3 < iTotalCol) {
aPuzzleArray[_local2 - 1][_local3] = aPuzzleArray[_local2][_local3];
aLandedArray[_local2 - 1][_local3] = aLandedArray[_local2][_local3];
aPuzzleArray[_local2][_local3] = 0;
aLandedArray[_local2][_local3] = 0;
_local3++;
}
_local2++;
}
var _local5 = 0;
var _local3 = 0;
while (_local3 < iTotalCol) {
var _local4 = random(2);
if (_local4 == 0) {
_local5++;
}
if (_local4 == 1) {
aPuzzleArray[iTotalRow][_local3] = staticTileLanded;
aLandedArray[iTotalRow][_local3] = 10;
}
_local3++;
}
var _local6 = random(iTotalCol);
if (_local5 == 0) {
aLandedArray[iTotalRow][_local6];
}
trace("this.aLandedArray[this.iTotalRow]" + aLandedArray[iTotalRow]);
}
function CheckCanAddLine() {
var _local3 = iTotalRow - (iLevel * 5);
if (_local3 < 15) {
_local3 = 15;
}
var _local4 = true;
var _local2 = 0;
while (_local2 < iTotalCol) {
if (aLandedArray[_local3][_local2] != 0) {
_local4 = false;
break;
}
_local2++;
}
return(_local4);
}
function DisplayGameOver() {
aPuzzleArray[iOverRow][iOverCol] = staticTileLanded;
aLandedArray[iOverRow][iOverCol] = 10;
iOverCol++;
if (iOverCol >= iTotalCol) {
iOverCol = 0;
iOverRow++;
if (iOverRow > iTotalRow) {
trace("Game Over Complete");
iGameStatus = staticGameStop;
_root.gotoAndPlay("gameoverframe");
}
}
}
function CheckGameOver() {
var _local3 = false;
var _local2 = 0;
while (_local2 < iTotalCol) {
if (aLandedArray[10][_local2] != 0) {
_local3 = true;
break;
}
_local2++;
}
if (_local3) {
iGameStatus = staticGameOver;
}
}
function GetTotalScore() {
return(iScore);
}
var nScreenWidth = 100;
var nScreenHeight = 300;
var nGridSizeX = 10;
var nGridSizeY = 10;
var bKeyUpReady = false;
var iLevel = 1;
var iDiff = 1;
var iFourLines = 0;
var iThreeLines = 0;
var iTwoLines = 0;
var iOneLine = 0;
var iToLevel = 0;
var iScore = 0;
var iOverRow = 9;
var iOverCol = 0;
var iTotalRow = 40;
var iTotalCol = 10;
var iMoveStatus = 0;
static var staticMoveLeft = 0;
static var staticMoveRight = 1;
static var staticMoveUp = 2;
static var staticMoveDown = 3;
static var staticTileEmpty = 0;
static var staticTileMove = 1;
static var staticTileMoveCenter = 2;
static var staticTileToLand = 3;
static var staticTileLanded = 5;
static var staticTileShift = 7;
static var staticTileShiftCenter = 8;
static var staticTypeT = 1;
static var staticTypeZL = 2;
static var staticTypeI = 3;
static var staticTypeZR = 4;
static var staticTypeO = 5;
static var staticTypeLL = 6;
static var staticTypeLR = 7;
static var staticGamePlay = 0;
static var staticGameOver = 1;
static var staticGameStop = 2;
}
Symbol 260 MovieClip [__Packages.classes.TilesMapping] Frame 0
class classes.TilesMapping
{
var nScreenWidth, nScreenHeight, aMapArray, aLandedArray, nGridSizeX, nGridSizeY, mcGameWorld, rScreenBoundary, rGridRectangle, rBgkRectangle, pPastePoint, objMapData, nGenerateType;
function TilesMapping (mworld, swidth, sheight, amap, aland, gsizex, gsizey) {
trace("TileMapping Constructor Loaded");
InitVars(mworld, swidth, sheight, amap, aland, gsizex, gsizey);
SetupObjects();
}
function InitVars(mworld, swidth, sheight, amap, aland, gsizex, gsizey) {
nScreenWidth = swidth;
nScreenHeight = sheight;
aMapArray = amap;
aLandedArray = aland;
nGridSizeX = gsizex;
nGridSizeY = gsizey;
mcGameWorld = mworld;
trace("this.aMapArray" + aMapArray);
}
function UpdateMap(amap) {
aMapArray = amap;
}
function SetupObjects() {
rScreenBoundary = new flash.geom.Rectangle(0, 0, nScreenWidth, nScreenHeight);
rGridRectangle = new flash.geom.Rectangle(0, 0, nGridSizeX, nGridSizeY);
rBgkRectangle = new flash.geom.Rectangle(0, 0, nScreenWidth, nScreenHeight);
pPastePoint = new flash.geom.Point(0, 0);
objMapData = new flash.display.BitmapData(nScreenWidth, nScreenHeight, false, 0);
mcGameWorld.attachBitmap(objMapData, 10);
}
function Render(tdistx, tdisty) {
nDistanceTravelX = tdistx;
nDistanceTravelY = tdisty;
objMapData.fillRect(rScreenBoundary, 0);
RenderTiles();
}
function RenderTiles() {
nAnimateCounter++;
if (nAnimateCounter > 10) {
nAnimateCounter = 1;
}
pPastePoint.x = 0;
pPastePoint.y = 0;
var _local9 = Math.floor(nDistanceTravelX / nGridSizeX);
var _local8 = nDistanceTravelX - (_local9 * nGridSizeX);
var _local10 = Math.floor(nDistanceTravelY / nGridSizeY);
var _local11 = nDistanceTravelY - (_local10 * nGridSizeY);
var _local6 = _local9;
var _local7 = _local10;
pPastePoint.y = -_local11;
var _local4 = _local7;
while (_local4 < (_local7 + 40)) {
pPastePoint.x = -_local8;
var _local3 = _local6;
while (_local3 < (_local6 + 20)) {
if ((aMapArray[_local4][_local3] != staticTileEmpty) && (aMapArray[_local4][_local3] != undefined)) {
var _local5 = 0;
if ((aMapArray[_local4][_local3] == staticTileMove) || (aMapArray[_local4][_local3] == staticTileMoveCenter)) {
_local5 = nGenerateType;
if ((nGenerateType == staticTypeZL) || (nGenerateType == staticTypeZR)) {
_local5 = nAnimateCounter;
}
} else if (aMapArray[_local4][_local3] == staticTileLanded) {
_local5 = aLandedArray[_local4][_local3];
}
objMapData.copyPixels(_global.gTilesLibrary.RetrieveTile(_local5), rGridRectangle, pPastePoint);
}
pPastePoint.x = pPastePoint.x + nGridSizeX;
_local3++;
}
pPastePoint.y = pPastePoint.y + nGridSizeY;
_local4++;
}
}
function ClearAll() {
objMapData.dispose();
delete objMapData;
}
function SetCurrentType(gtype) {
nGenerateType = gtype;
trace("TILES this.nGenerateType == " + nGenerateType);
}
var nDistanceTravelX = 0;
var nDistanceTravelY = 0;
var nAnimateCounter = 1;
static var staticTileEmpty = 0;
static var staticTileMove = 1;
static var staticTileMoveCenter = 2;
static var staticTileToLand = 3;
static var staticTileLanded = 5;
static var staticTileShift = 7;
static var staticTileShiftCenter = 8;
static var staticTypeT = 1;
static var staticTypeZL = 2;
static var staticTypeI = 3;
static var staticTypeZR = 4;
static var staticTypeO = 5;
static var staticTypeLL = 6;
static var staticTypeLR = 7;
}
Symbol 261 MovieClip [__Packages.classes.TilesLibrary] Frame 0
class classes.TilesLibrary
{
var aLibraryArray;
function TilesLibrary (bitmaps) {
trace("Setup Tiles Library");
InitVars(bitmaps);
}
function InitVars(bitmaps) {
aLibraryArray = new Array();
var _local2 = 0;
while (_local2 < bitmaps.length) {
aLibraryArray[_local2] = flash.display.BitmapData.loadBitmap(bitmaps[_local2]);
_local2++;
}
}
function AddTile(tileName, arrayPosition) {
aLibraryArray[arrayPosition] = flash.display.BitmapData.loadBitmap(tileName);
}
function RetrieveTile(id) {
return(aLibraryArray[id]);
}
}
Symbol 112 MovieClip Frame 186
stop();
this._parent.play();
Symbol 161 Button
on (release) {
_root.gotoAndPlay("chooseframe");
}
Symbol 163 Button
on (release) {
getURL ("http://www.mrtiki.com/?ref=Wee", "_blank");
}
Symbol 177 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 2
stop();
Symbol 181 MovieClip Frame 1
stop();
Symbol 181 MovieClip Frame 2
stop();
Symbol 182 Button
on (release) {
_root.play();
}
Symbol 242 Button
on (release) {
_root.gotoAndPlay("gameoverframe");
}
Symbol 250 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 2
stop();
Symbol 250 MovieClip Frame 3
stop();
Symbol 250 MovieClip Frame 4
stop();
Symbol 250 MovieClip Frame 5
stop();
Symbol 250 MovieClip Frame 6
stop();
Symbol 250 MovieClip Frame 7
stop();
Symbol 252 Button
on (release) {
_global.menuSelect = 2;
_root.play();
}