STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228155
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5122

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/83498508?noj=FRM83498508-20DC" width="1" height="1"></div>

hoops and yoyo coffee run.swf

This is the info page for
Flash #254438

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 31 { } movieClip 44 { } movieClip 120 chilliBear { frame 1 { stop(); } frame 2 { stop(); } frame 10 { stop(); } frame 11 { stop(); } frame 12 { stop(); } frame 13 { stop(); } frame 32 { this.gotoAndPlay('walk1'); } frame 47 { this.gotoAndPlay('walk2'); } frame 62 { this.gotoAndPlay('walk3'); } frame 77 { this.gotoAndPlay('walk4'); } } movieClip 127 { } movieClip 128 { } movieClip 131 { } movieClip 132 birthdayCake { frame 1 { stop(); } frame 2 { stop(); this.bActivated = false; } frame 5 { this.bActivated = true; play(); } frame 65 { if (_root.bGameOver == false) { _root.iTrapTimeout = setTimeout(_root.activateTrap, 3000); } gotoAndStop('off'); } } movieClip 135 { frame 1 { stop(); } frame 5 { stop(); } } movieClip 191 { } movieClip 196 { } movieClip 198 { } movieClip 201 { } movieClip 205 mcYoyoAnim { frame 1 { stop(); } frame 10 { stop(); } frame 11 { stop(); } frame 12 { stop(); } frame 13 { stop(); } frame 32 { this.gotoAndPlay('walk1'); } frame 47 { this.gotoAndPlay('walk2'); } frame 62 { this.gotoAndPlay('walk3'); } frame 77 { this.gotoAndPlay('walk4'); } frame 88 { this.gotoAndPlay('rollychair'); } frame 107 { this.gotoAndPlay('paper1'); } frame 122 { this.gotoAndPlay('paper2'); } frame 137 { this.gotoAndPlay('paper3'); } frame 152 { this.gotoAndPlay('paper4'); } frame 155 { stop(); } frame 156 { stop(); } frame 157 { stop(); } frame 158 { stop(); } } movieClip 268 mcHoopsAnim { frame 1 { stop(); } frame 10 { stop(); } frame 11 { stop(); } frame 12 { stop(); } frame 13 { stop(); } frame 32 { this.gotoAndPlay('walk1'); } frame 47 { this.gotoAndPlay('walk2'); } frame 62 { this.gotoAndPlay('walk3'); } frame 77 { this.gotoAndPlay('walk4'); } frame 88 { this.gotoAndPlay('rollychair'); } frame 107 { this.gotoAndPlay('paper1'); } frame 122 { this.gotoAndPlay('paper2'); } frame 137 { this.gotoAndPlay('paper3'); } frame 152 { this.gotoAndPlay('paper4'); } frame 155 { stop(); } frame 156 { stop(); } frame 157 { stop(); } frame 158 { stop(); } } movieClip 318 marshy { frame 1 { stop(); } frame 2 { stop(); } frame 10 { stop(); } frame 11 { stop(); } frame 12 { stop(); } frame 13 { stop(); } frame 32 { this.gotoAndPlay('walk1'); } frame 47 { this.gotoAndPlay('walk2'); } frame 62 { this.gotoAndPlay('walk3'); } frame 77 { this.gotoAndPlay('walk4'); } } movieClip 320 piddlesBox { } movieClip 322 chilliBearBox { } movieClip 328 mcYoyoCharacter { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 330 mcHoopsCharacter { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 333 sprinkleDonut { frame 1 { stop(); } frame 2 { stop(); } } movieClip 336 coffeeBeans { frame 1 { stop(); } frame 2 { stop(); } } movieClip 343 balloonDecoy { frame 1 { stop(); } frame 2 { stop(); } frame 6 { stop(); } frame 16 { stop(); } frame 21 { stop(); } frame 31 { stop(); } } movieClip 346 paperShield { frame 1 { stop(); } frame 2 { stop(); } } movieClip 349 { frame 1 { stop(); } frame 5 { play(); } frame 15 { gotoAndPlay('on'); } } movieClip 353 { frame 1 { stop(); } frame 5 { play(); } frame 8 { gotoAndPlay('on'); } } movieClip 354 telephone { frame 1 { stop(); } frame 2 { stop(); mcPhoneReceiver.gotoAndStop('off'); mcPhone.gotoAndStop('off'); _root.stopSound('Traps'); this.bActivated = false; } frame 10 { mcPhoneReceiver.gotoAndPlay('on'); mcPhone.gotoAndPlay('on'); this.bActivated = true; _root.startSound('Traps', 'sndTelephone', 15, 1); play(); } frame 70 { if (_root.bGameOver == false) { _root.iTrapTimeout = setTimeout(_root.activateTrap, 3000); } gotoAndStop('off'); } frame 75 { stop(); mcPhoneReceiver.gotoAndStop('off'); mcPhone.gotoAndStop('litUp'); _root.stopSound('Traps'); } } movieClip 361 { frame 1 { play(); } frame 36 { gotoAndPlay('loop'); } } movieClip 388 radio { frame 1 { stop(); } frame 2 { stop(); _root.stopSound('Traps'); this.bActivated = false; } frame 5 { play(); this.bActivated = true; } frame 65 { if (_root.bGameOver == false) { _root.iTrapTimeout = setTimeout(_root.activateTrap, 3000); } gotoAndStop('off'); } frame 69 { _root.stopSound('Traps'); _root.startSound('Traps', 'sndRadioIntro', 100, 1); _root.queueSound('Traps', 'sndRadioLoop', 100, 10); play(); } frame 70 { play(); } frame 101 { gotoAndPlay('loop'); } } movieClip 391 plant { frame 1 { stop(); } frame 2 { stop(); } } // unknown tag 88 length 244 movieClip 400 cubicle { frame 1 { stop(); } frame 2 { stop(); } } movieClip 403 coatRack { frame 1 { stop(); } frame 2 { stop(); } } movieClip 432 piddles { frame 1 { stop(); } frame 2 { stop(); } frame 10 { stop(); } frame 11 { stop(); } frame 12 { stop(); } frame 13 { stop(); } frame 28 { this.gotoAndPlay('walk1'); } frame 43 { this.gotoAndPlay('walk2'); } frame 58 { this.gotoAndPlay('walk3'); } frame 73 { this.gotoAndPlay('walk4'); } } movieClip 438 marshyBox { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 440 coffeePotObject { } movieClip 446 treatTable { frame 1 { stop(); } frame 2 { stop(); } frame 3 { play(); } frame 11 { stop(); } frame 21 { stop(); } } movieClip 448 eraser { } // unknown tag 88 length 161 movieClip 458 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } frame 6 { stop(); } } movieClip 460 mcGameTag { frame 1 { stop(); } frame 2 { stop(); } } movieClip 463 donut { frame 1 { stop(); } frame 2 { stop(); } } movieClip 467 mcTile { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 470 rollyChair { frame 1 { stop(); } frame 2 { stop(); } } frame 1 { function proceed() { _root.mcHallmarkLogo.onEnterFrame = function () { if (getTimer() > _root.startTime + 2000) { this._alpha -= 10; if (this._alpha <= 0) { this._alpha = 0; this.onEnterFrame = null; _root.gotoAndPlay('init'); } } }; } function loadObjectXML() { var oXML = new XML(); oXML.ignoreWhite = true; oXML.onLoad = function (success) { if (success) { parseObjectXML(oXML); } }; oXML.load('objects.xml'); } function parseObjectXML(oXML) { var v2 = 0; do { var v1 = new Object(); v1.id = oXML.firstChild.childNodes[v2].attributes.id; v1.name = oXML.firstChild.childNodes[v2].attributes.name; v1.type = oXML.firstChild.childNodes[v2].attributes.type; v1.pickup = oXML.firstChild.childNodes[v2].attributes.pickup; v1.description = oXML.firstChild.childNodes[v2].attributes.description; v1.pointValue = oXML.firstChild.childNodes[v2].attributes.pointValue; v1.sound = oXML.firstChild.childNodes[v2].attributes.sound; objectArray.push(v1); ++v2; } while (oXML.firstChild.childNodes[v2]); gotoAndStop('splash'); } function buildWorld(maxX, maxZ) { oWorld = new Object(); oWorld.maxX = maxX; oWorld.maxZ = maxZ; oWorld.cellWidth = 50; oWorld.width = maxX * oWorld.cellWidth; oWorld.length = -maxZ * oWorld.cellWidth; oWorld.mcPath = this.floor; var v2 = mcGame.mcGrid; v2.depth = 1000; buildFloor(v2); } function buildFloor(path) { path.tile._visible = false; oWorld.tiles = []; var v11 = 0; var v3 = 1; while (v3 <= maxX) { var v2 = 1; while (v2 <= maxZ) { if (v3 == 1) { oWorld.tiles[v2] = []; } var v5 = 'tile' + v3 + '_' + v2; path.attachMovie('mcTile', v5, 10000); var v6 = path[v5]; v6.myOccupant = undefined; v6.bHasCharacter = false; v6.name = 'tile' + v3 + '_' + v2; v6.useHandCursor = false; v6.bCanPlaceItem = true; v6.iRow = v3; v6.iCol = v2; v6.proximityTiles = []; v6.proximityTiles[0] = v3 - 1 + '_' + v2; v6.proximityTiles[1] = v3 + '_' + (v2 + 1); v6.proximityTiles[2] = v3 + 1 + '_' + v2; v6.proximityTiles[3] = v3 + '_' + (v2 - 1); if (sGameMode == 'create') { v6.onRollOver = function () { if (this.bCanPlaceItem == true && bTestGame == false) { this.gotoAndStop('on'); } }; v6.onReleaseOutside = function () { if (this.bCanPlaceItem == true && bTestGame == false) { this.gotoAndStop('off'); } }; v6.onRollOut = function () { if (this.bCanPlaceItem == true && bTestGame == false) { this.gotoAndStop('off'); } }; } else { v6._visible = false; } var v12 = (v2 - 1) * oWorld.cellWidth; var v10 = -(v3 - 1) * oWorld.cellWidth; v6.x = v12; v6.z = v10; var v7 = iso.mapToScreen(v12, v11, v10); v6._x = v7[0]; v6._y = v7[1]; var v4 = 0; v4 = Math.floor((v6._y - mcGame.mcGrid.mcMarker._y) * 1000 + (v6._x - mcGame.mcGrid.mcMarker._x)); oWorld.tiles[v2][v3] = {'x': v2, 'y': v11, 'z': v3, 'depth': v4, 'clip': v6}; v6.depth = v4; v6.swapDepths(v4); ++v2; } ++v3; } if (sGameMode == 'create') { mcGame.mcGrid.tile20_6.bCanPlaceItem = false; mcGame.mcGrid.tile20_6.gotoAndStop('unavailable'); mcGame.mcGrid.tile1_6.bCanPlaceItem = false; mcGame.mcGrid.tile1_6.gotoAndStop('unavailable'); } mcGame.mcGrid._x = iGridMaxX; mcGame.mcGrid._y = iGridMinY; iGridStartX = mcGame.mcGrid._x; iGridStartY = mcGame.mcGrid._y; iGridEndX = mcGame.mcGrid._x; iGridEndY = mcGame.mcGrid._y; } function testGame() { bTestGame = true; btnShield.useHandCursor = false; btnShield._visible = true; btnReset._visible = false; btnCancel._visible = true; resetGrid(); mcGame.mcArrowRight._visible = false; mcGame.mcArrowLeft._visible = false; mcGame.mcArrowUp._visible = false; mcGame.mcArrowDown._visible = false; prepareGame(getLocalData('gameBuild', ''), iNumSeconds, mcMusicSelector.iCurrentPos, mcDaySelector.iCurrentPos); mcChooseCharacter.gotoAndPlay('characters'); } function cancelTest() { clearTimeout(iTrapTimeout); mcCutScenes.gotoAndStop('off'); mcGame.mcGrid.mcCharacter.removeMovieClip(); mcGame.mcGrid.mcEnemyAnimMarshy.removeMovieClip(); mcGame.mcGrid.mcEnemyAnimBear.removeMovieClip(); mcGame.mcGrid.mcEnemyAnimPiddles.removeMovieClip(); mcGame.mcGrid.mcCharacterAnim.removeMovieClip(); mcGame.mcGrid.mcCoffeePot.removeMovieClip(); btnShield._visible = false; btnReset._visible = true; btnCancel._visible = false; mcChooseCharacter.gotoAndStop('off'); mcSavePanel.gotoAndStop('off'); mcGame.mcArrowRight._visible = true; mcGame.mcArrowLeft._visible = true; mcGame.mcArrowUp._visible = true; mcGame.mcArrowDown._visible = true; mcTimerBar.onEnterFrame = null; mcTimerBar._visible = false; stopSound('Music'); stopSound('SoundFX'); stopSound('Character'); stopSound('Enemy'); stopSound('Traps'); resetGrid(); populateGrid(getLocalData('gameBuild', '')); bTestGame = false; } function prepareGame(sGridContents, iDuration, iMusic, iDayOfWeek) { Key.removeListener(oKeyListener); bEnemyPause = false; bPauseGame = false; bGameOver = false; bIsPlaying = false; bHasPaperShield = false; bOnRollyChair = false; bInvisible = false; stopSound('Music'); stopSound('SoundFX'); stopSound('Character'); stopSound('Enemy'); stopSound('Traps'); trapsInGame = []; clearTimeout(iTrapTimeout); mcCutScenes.gotoAndStop('off'); iNumSeconds = iDuration; sMusic = musicArray[iMusic]; sDayOfWeek = dayArray[iDayOfWeek]; iTotalDonuts = 0; mcGame.mcGrid.mcCharacter.removeMovieClip(); mcGame.mcGrid.mcEnemyAnimMarshy.removeMovieClip(); mcGame.mcGrid.mcEnemyAnimBear.removeMovieClip(); mcGame.mcGrid.mcEnemyAnimPiddles.removeMovieClip(); mcGame.mcGrid.mcCharacterAnim.removeMovieClip(); mcGame.mcGrid.mcCoffeePot.removeMovieClip(); iObjectCounter = 0; var v6 = sGridContents.split('|'); var v4 = new Array(); i = 0; while (i < v6.length) { v4 = v6[i].split(','); j = 0; while (j < v4.length) { var v1 = mcGame.mcGrid['tile' + (i + 1) + '_' + (j + 1)]; v1.myOccupant = undefined; v1.bCanMove = true; v1.sObject = null; v1.objectName = null; v1.xPosition = j + 1; v1.zPosition = i + 1; if (v4[j] != 0) { if (v4[j] == '16') { ++iTotalDonuts; } var v3 = lookupObjectByID(v4[j]); var v5 = lookupObjectIndex(v3); if (objectArray[v5].pickup == 'false' && objectArray[v5].type != 'enemy' && objectArray[v5].type != 'obstacle') { v1.bCanMove = false; } v1._visible = false; v1.bHasTrap = false; v1.sObject = 'object_' + iObjectCounter; v1.objectName = v3; v1.iObjectID = v4[j]; if (v4[j] > 0) { mcGame.mcGrid.attachMovie(v3, 'object_' + iObjectCounter, v1.depth + 10001); var v2 = mcGame.mcGrid['object_' + iObjectCounter]; v2.gotoAndStop('off'); v2.bActive = true; v2._x = v1._x; v2._y = v1._y; v2.type = v3; v2.depth = v1.depth + 1; v2.swapDepths(v2.depth); if (objectArray[v5].type == 'trap') { trapsInGame.push(v2); v1.bHasTrap = true; } if (v3 != 'cubicle') { v2.tiles = i + 1 + '_' + (j + 1); } else { v2.tiles = i + 1 + '_' + (j + 1) + ',' + (i + '_' + (j + 1)) + ',' + (i + '_' + (j + 2)) + ',' + (i + 1 + '_' + (j + 2)); } ++iObjectCounter; } } ++j; } ++i; } } function doRegisterOccupant(oTile, oItem) { oTile.myOccupant = oItem; } function doUnRegisterOccupant(oTile) { oTile.myOccupant = undefined; } function attachObject(sObject) { if (_root.currentObject != undefined) { _root.currentObject.removeMovieClip(); } bObjectSelected = true; attachMovie(sObject, 'currentObject', _root.getNextHighestDepth()); var oObject = _root.currentObject; oObject.sObject = sObject; oObject.id = lookupObjectByName(sObject); oObject._x = _xmouse; oObject._y = _ymouse; oObject.onEnterFrame = function () { oObject._x = _xmouse; oObject._y = _ymouse; }; } function clearObject(sObject) { _root.currentObject.onEnterFrame = null; _root.currentObject.removeMovieClip(); bObjectSelected = false; _root[sObject + 'BG'].gotoAndStop('off'); sCurrentObject = ''; } function dropObject() { var v2 = _root.currentObject; v2.name = 'object_' + iObjectCounter; if (v2.hitTest(mcGame.mcGrid)) { checkHit(v2); } } function checkHit(oObject) { var v2 = new MovieClip(); i = 1; while (i <= maxX) { j = 1; while (j <= maxZ) { v2 = mcGame.mcGrid['tile' + i + '_' + j]; if (v2.hitTest(_xmouse, _ymouse, true) && !mcGame.mcArrowUp.hitTest(_xmouse, _ymouse, true) && !mcGame.mcArrowRight.hitTest(_xmouse, _ymouse, true) && !mcGame.mcArrowDown.hitTest(_xmouse, _ymouse, true) && !mcGame.mcArrowLeft.hitTest(_xmouse, _ymouse, true)) { var v3 = new Array(); if (oObject.sObject == 'cubicle') { v3[0] = v2.iRow + '_' + v2.iCol; v3[1] = v2.iRow - 1 + '_' + v2.iCol; v3[2] = v2.iRow - 1 + '_' + (v2.iCol + 1); v3[3] = v2.iRow + '_' + (v2.iCol + 1); } else { v3[0] = v2.iRow + '_' + v2.iCol; } var v6 = true; k = 0; while (k < v3.length) { if (mcGame.mcGrid['tile' + v3[k]].bCanPlaceItem == false || mcGame.mcGrid['tile' + v3[k]] == undefined) { v6 = false; break; } ++k; } if (v6 == true) { mcGame.mcGrid['tile' + v3[0]].sObject = oObject.name; mcGame.mcGrid['tile' + v3[0]].iObjectID = oObject.id; k = 0; while (k < v3.length) { mcGame.mcGrid['tile' + v3[k]].bCanPlaceItem = false; mcGame.mcGrid['tile' + v3[k]].gotoAndStop('unavailable'); mcGame.mcGrid['tile' + v3[k]]._visible = false; if (k > 0) { mcGame.mcGrid['tile' + v3[k]].sObject = 'cubicleFiller'; mcGame.mcGrid['tile' + v3[k]].iObjectID = -1; } ++k; } saveLocalData('gameBuild', '', generateGridData()); mcGame.mcGrid.attachMovie(oObject.sObject, 'object_' + iObjectCounter, v2.depth + 10001); var v4 = mcGame.mcGrid['object_' + iObjectCounter]; v4.gotoAndStop('off'); v4._x = mcGame.mcGrid['tile' + v3[0]]._x; v4._y = mcGame.mcGrid['tile' + v3[0]]._y; v4.type = oObject.sObject; v4.tiles = v3.toString(); v4.depth = v2.depth + 1; if (sCurrentObject == 'chilliBear') { bChilliBear = true; clearObject('chilliBear'); } else { if (sCurrentObject == 'piddles') { bPiddles = true; clearObject('piddles'); } else { if (sCurrentObject == 'marshy') { bMarshy = true; clearObject('marshy'); } } } v4.onPress = function () { if (sCurrentObject == 'eraser') { var v2 = this.tiles.split(','); i = 0; while (i < v2.length) { mcGame.mcGrid['tile' + v2[i]].sObject = undefined; mcGame.mcGrid['tile' + v2[i]].iObjectID = 0; mcGame.mcGrid['tile' + v2[i]].bCanPlaceItem = true; mcGame.mcGrid['tile' + v2[i]].gotoAndStop('off'); mcGame.mcGrid['tile' + v2[i]]._visible = true; ++i; } if (this.type == 'chilliBear') { bChilliBear = false; } else { if (this.type == 'piddles') { bPiddles = false; } else { if (this.type == 'marshy') { bMarshy = false; } } } this.removeMovieClip(); saveLocalData('gameBuild', '', generateGridData()); } }; ++iObjectCounter; } else { startSound('SoundFX', 'sndNotAllowed', 100, 1); } return undefined; } ++j; } ++i; } } function fillWithDonuts() { var v6 = 1; while (v6 <= maxX) { var i = 1; while (i <= maxZ) { var v3 = mcGame.mcGrid['tile' + v6 + '_' + i]; if (v3.bCanPlaceItem == true) { v3.sObject = 'object_' + iObjectCounter; v3.iObjectID = lookupObjectByName('donut'); v3.bCanPlaceItem = false; v3.gotoAndStop('unavailable'); v3._visible = false; mcGame.mcGrid.attachMovie('donut', 'object_' + iObjectCounter, v3.depth + 10001); var v5 = mcGame.mcGrid['object_' + iObjectCounter]; v5._x = v3._x; v5._y = v3._y; v5.type = 'donut'; v5.tiles = v6 + '_' + i; v5.depth = v3.depth + 1; v5.onPress = function () { var v3 = this.tiles.split(','); i = 0; while (i < v3.length) { mcGame.mcGrid['tile' + v3[i]].sObject = undefined; mcGame.mcGrid['tile' + v3[i]].iObjectID = 0; mcGame.mcGrid['tile' + v3[i]].bCanPlaceItem = true; mcGame.mcGrid['tile' + v3[i]].gotoAndStop('off'); mcGame.mcGrid['tile' + v3[i]]._visible = true; ++i; } _root.attachObject(this.type); this.removeMovieClip(); }; ++iObjectCounter; } ++i; } ++v6; } saveLocalData('gameBuild', '', generateGridData()); } function lookupObjectByName(sObject) { z = 0; while (z < objectArray.length) { if (sObject == objectArray[z].name) { break; } ++z; } return objectArray[z].id; } function lookupObjectByID(iObjectID) { z = 0; while (z < objectArray.length) { if (iObjectID == objectArray[z].id) { break; } ++z; } return objectArray[z].name; } function lookupObjectIndex(sObject) { z = 0; while (z < objectArray.length) { if (sObject == objectArray[z].name) { break; } ++z; } return z; } function resetGrid() { i = 1; while (i <= maxX) { j = 1; while (j <= maxZ) { var v2 = mcGame.mcGrid['tile' + i + '_' + j]; if (v2.sObject != undefined && v2.sObject != 'cubicleFiller') { var v1 = mcGame.mcGrid[v2.sObject].tiles.split(','); k = 0; while (k < v1.length) { mcGame.mcGrid['tile' + v1[k]].sObject = undefined; mcGame.mcGrid['tile' + v1[k]].iObjectID = 0; mcGame.mcGrid['tile' + v1[k]].bCanPlaceItem = true; mcGame.mcGrid['tile' + v1[k]].gotoAndStop('off'); mcGame.mcGrid['tile' + v1[k]]._visible = true; ++k; } } v2._visible = true; ++j; } ++i; } i = 0; while (i <= maxX * maxZ) { mcGame.mcGrid['object_' + i].removeMovieClip(); ++i; } if (sGameMode == 'create' && bTestGame != true) { saveLocalData('gameBuild', '', null); } iObjectCounter = 0; mcGame.mcGrid._x = iGridStartX; mcGame.mcGrid._y = iGridStartY; bChilliBear = false; bPiddles = false; bMarshy = false; } function populateGrid(sGridContents) { iObjectCounter = 0; var v7 = sGridContents.split('|'); var v6 = new Array(); i = 0; while (i < v7.length) { v6 = v7[i].split(','); j = 0; while (j < v6.length) { if (v6[j] != 0) { var v5 = lookupObjectByID(v6[j]); var v2 = mcGame.mcGrid['tile' + (i + 1) + '_' + (j + 1)]; v2.sObject = 'object_' + iObjectCounter; v2.iObjectID = v6[j]; v2.bCanPlaceItem = false; v2.gotoAndStop('unavailable'); v2._visible = false; if (v6[j] > 0) { mcGame.mcGrid.attachMovie(v5, 'object_' + iObjectCounter, v2.depth + 10001); if (v5 == 'chilliBear') { bChilliBear = true; } else { if (v5 == 'piddles') { bPiddles = true; } else { if (v5 == 'marshy') { bMarshy = true; } } } var v4 = mcGame.mcGrid['object_' + iObjectCounter]; v4.gotoAndStop('off'); v4._x = v2._x; v4._y = v2._y; v4.type = v5; v4.depth = v2.depth + 1; if (v5 != 'cubicle') { v4.tiles = i + 1 + '_' + (j + 1); } else { v4.tiles = i + 1 + '_' + (j + 1) + ',' + (i + '_' + (j + 1)) + ',' + (i + '_' + (j + 2)) + ',' + (i + 1 + '_' + (j + 2)); } v4.onPress = function () { if (sCurrentObject == 'eraser') { var v2 = this.tiles.split(','); a = 0; while (a < v2.length) { mcGame.mcGrid['tile' + v2[a]].sObject = undefined; mcGame.mcGrid['tile' + v2[a]].iObjectID = 0; mcGame.mcGrid['tile' + v2[a]].bCanPlaceItem = true; mcGame.mcGrid['tile' + v2[a]].gotoAndStop('off'); mcGame.mcGrid['tile' + v2[a]]._visible = true; ++a; } if (this.type == 'chilliBear') { bChilliBear = false; } else { if (this.type == 'piddles') { bPiddles = false; } else { if (this.type == 'marshy') { bMarshy = false; } } } this.removeMovieClip(); saveLocalData('gameBuild', '', generateGridData()); } }; ++iObjectCounter; } } ++j; } ++i; } } function loadGalleryXML(sSearchText) { var oXML = new XML(); oXML.ignoreWhite = true; oXML.onLoad = function (success) { if (success) { parseGalleryXML(oXML); } }; oXML.load('http://games.hoopsandyoyo.com/gameCreator/scripts/loadGames.ashx?searchfor=' + sSearchText + '&count=240&ts=' + getTimer()); } function parseGalleryXML(oXML) { gameArray = []; var v2 = 0; do { var v1 = new Object(); v1.id = oXML.firstChild.childNodes[v2].attributes.id; v1.dateUploaded = oXML.firstChild.childNodes[v2].attributes.dateUploaded; v1.emailAddress = oXML.firstChild.childNodes[v2].attributes.emailAddress; v1.name = oXML.firstChild.childNodes[v2].attributes.title; v1.shortName = clipText(oXML.firstChild.childNodes[v2].attributes.title, 12, true); v1.ratingPoints = oXML.firstChild.childNodes[v2].attributes.ratingPoints; v1.timesRated = oXML.firstChild.childNodes[v2].attributes.timesRated; if (v1.timesRated > 0) { v1.averageRating = v1.ratingPoints / v1.timesRated; } else { v1.averageRating = 0; } v1.duration = oXML.firstChild.childNodes[v2].attributes.duration; v1.music = oXML.firstChild.childNodes[v2].attributes.music; v1.dayOfWeek = oXML.firstChild.childNodes[v2].attributes.dayOfWeek; v1.gameXML = oXML.firstChild.childNodes[v2].attributes.gameXML; gameArray.push(v1); ++v2; } while (oXML.firstChild.childNodes[v2]); gotoAndPlay('galleryLoad'); } function destroySpeechBubble() { mcSpeechBubble.removeMovieClip(); } function setupSpeechBubble() { mcSpeechBubble.onEnterFrame = null; mcSpeechBubble._visible = false; mcSpeechBubble.iMode = 0; mcSpeechBubble.iOldMode = 0; mcSpeechBubble.iCounter = 0; mcSpeechBubble.onEnterFrame = function () { if (this.iMode == 1) { if (this.iOldMode == 0) { this.iOldMode = 1; this._visible = true; this._x = -500; this._y = 0; this.iCounter = 0; this.swapDepths(_root.getNextHighestDepth() + 20000); } ++this.iCounter; if (this.iCounter >= 20) { this.iCounter = 20; this._x = _xmouse; this._y = _ymouse; } } else { if (this.iMode == 0) { this._visible = false; this._x = -500; this._y = 0; this.iOldMode = 0; this.iMode = 2; } } }; } function displayGames() { iTagID = 1; while (iTagID <= 8) { _root['mcGameTag_' + iTagID]._alpha = 0; ++iTagID; } if (iCurrentIndex == 0) { btnLess._alpha = 0; btnLess.enabled = false; } else { btnLess._alpha = 100; btnLess.enabled = true; btnLess.onPress = function () { --iCurrentIndex; displayGames(); }; } if (currentGames.length > 0) { i = 0; while (i < currentGames.length) { currentGames[i].removeMovieClip(); ++i; } } var v5 = 160; var v6 = 0; var v8 = iCurrentIndex * iGamesPerPage; var v7 = iCurrentIndex * iGamesPerPage + iGamesPerPage; var iTagID = 1; if (v7 >= gameArray.length) { v7 = gameArray.length; } showGame(v8); _root.iCurrentGameIndex = v8; i = v8; while (i < v7) { var v3 = _root['mcGameTag_' + iTagID]; ++iTagID; v3._alpha = 0; v3.index = i; v3._x = 25; v3._y = v5; v3.fullTitle = gameArray[i].name; v3.title = gameArray[i].shortName; v3.mcRating.gotoAndStop(Math.floor(gameArray[i].averageRating) + 1); v3.averageRating = gameArray[i].averageRating; v3.numberVotes = gameArray[i].timesRated; v3.onRollOver = function () { var v3 = ''; v3 = formatNumber(this.averageRating.toString()) + ' / ' + this.numberVotes; if (this.numberVotes != 1) { v3 += ' Votes'; } else { v3 += ' Vote'; } _root.mcSpeechBubble.txtTitle.text = this.fullTitle + '\n' + v3; resizeBubble(); mcSpeechBubble.iMode = 1; this.gotoAndStop('on'); }; v3.onRollOut = function () { mcSpeechBubble.iMode = 0; this.gotoAndStop('off'); }; v3.onReleaseOutside = function () { mcSpeechBubble.iMode = 0; this.gotoAndStop('off'); }; v3.onDragOut = function () { mcSpeechBubble.iMode = 0; }; v3.onPress = function () { showGame(this.index); _root.iCurrentGameIndex = this.index; }; currentGames.push(v3); v5 = Math.floor(v5 + v3._height + 3); v6 += 50; v3.timeOut = setTimeout(fadeGameTag, v6, v3); ++i; } if (i == gameArray.length) { btnMore._alpha = 0; btnMore.enabled = false; } else { btnMore._alpha = 100; btnMore.enabled = true; btnMore.onPress = function () { ++iCurrentIndex; displayGames(); }; } } function fadeGameTag(oGameTag) { tweenAlpha = new mx.transitions.Tween(oGameTag, '_alpha', Regular.easeNone, 0, 100, 0.1, true); oGameTag.timeOut = 0; } function showGame(iIndex) { mcCountdown.gotoAndStop('init'); mcTimerBar._visible = false; mcTimerBar.onEnterFrame = null; btnPlayGame._visible = true; resetGrid(); if (iIndex == -1) { iIndex = random(gameArray.length); } txtTitle.text = '“' + gameArray[iIndex].name + '”'; iRating = getLocalData(gameArray[iIndex].id, 'rating'); iGameIndex = iIndex; sEncGameID = gameArray[iIndex].id; if (iRating != false) { mcRatingText.gotoAndStop('off'); mcUserRating.gotoAndStop('off'); mcUserRating.mcRatingStars.gotoAndStop(iRating); } else { mcRatingText.gotoAndStop('on'); mcUserRating.gotoAndStop('on'); mcUserRating.mcRatingStars.gotoAndStop(1); } buildWorld(maxX, maxZ); prepareGame(gameArray[iIndex].gameXML, gameArray[iIndex].duration, gameArray[iIndex].music, gameArray[iIndex].dayOfWeek); } function rateGame(iRating) { var v1 = new LoadVars(); var v2 = new LoadVars(); gameArray[iGameIndex].ratingPoints += iRating; ++gameArray[iGameIndex].timesRated; gameArray[iGameIndex].averageRating = Math.floor(gameArray[iGameIndex].ratingPoints / gameArray[iGameIndex].timesRated); v2.onLoad = function (success) { saveLocalData(sEncGameID, 'rating', iRating); mcRatingText.gotoAndStop('off'); mcUserRating.gotoAndStop('off'); mcUserRating.mcRatingStars.gotoAndStop(iRating); }; v1.rating = iRating; v1.encGameID = sEncGameID; v1.sendAndLoad('http://games.hoopsandyoyo.com/gameCreator/scripts/postRating.ashx', v2, 'POST'); } function clipText(sName, iLength, bEllipsis) { var v1 = ''; if (sName.length > iLength) { i = 0; while (i < iLength) { v1 += sName.charAt(i); ++i; } if (bEllipsis == true) { v1 += '...'; } return v1; } v1 = sName; return v1; } function formatNumber(sNumberToFormat) { var v1 = ''; if (sNumberToFormat.length == 1) { v1 = sNumberToFormat + '.0'; return v1; } i = 0; while (i < 3) { v1 += sNumberToFormat.charAt(i); ++i; } return v1; } function resizeBubble() { mcSpeechBubble.txtTitle.autoSize = true; mcSpeechBubble.mcSpeechWhite._height = mcSpeechBubble.txtTitle._height + 7; mcSpeechBubble.mcSpeechBlack._height = mcSpeechBubble.txtTitle._height + 7; mcSpeechBubble.mcSpeechWhite._y = -mcSpeechBubble.mcSpeechPoint._height - mcSpeechBubble.mcSpeechWhite._height; mcSpeechBubble.mcSpeechBlack._y = -mcSpeechBubble.mcSpeechPoint._height - mcSpeechBubble.mcSpeechBlack._height + 7; mcSpeechBubble.txtTitle._y = mcSpeechBubble.mcSpeechWhite._y + 5; } function cleanupStage() { i = 0; while (i < currentGames.length) { currentGames[i].removeMovieClip(); ++i; } } function refreshGames(sSortRequest, oRadioButton) { btnDate.gotoAndStop('off'); btnRating.gotoAndStop('off'); btnVotes.gotoAndStop('off'); cleanupStage(); var v1 = ''; switch (sSortRequest) { case 'DATE': v1 = 'dateUploaded'; break; case 'RATING': v1 = 'averageRating'; break; default: v1 = 'timesRated'; } if (sSortBy == sSortRequest) { if (sSortDirection == 'DESC') { sSortDirection = 'ASC'; } else { sSortDirection = 'DESC'; } } else { sSortBy = sSortRequest; sSortDirection = 'DESC'; } oRadioButton.gotoAndStop('on'); gameArray = sortArray(gameArray, v1, sSortDirection); displayGames(0); } function sortArray(myArray, sSortBy, sSortDirection) { var v2; var v7 = false; var v4 = false; var v6; var v5; while (v7 == false) { i = 0; while (i < myArray.length) { v6 = myArray[i]; v5 = myArray[i + 1]; if (sSortDirection == 'DESC') { if (v6[sSortBy] < v5[sSortBy]) { v2 = myArray[i]; myArray[i] = myArray[i + 1]; myArray[i + 1] = v2; v4 = true; } } else { if (v6[sSortBy] > v5[sSortBy]) { v2 = myArray[i]; myArray[i] = myArray[i + 1]; myArray[i + 1] = v2; v4 = true; } } ++i; } if (v4 == false) { v7 = true; } v4 = false; } return myArray; } function getLocalData(sContent, sDataType) { if (oGameData.data['obj_' + sContent + '_' + sDataType]) { return oGameData.data['obj_' + sContent + '_' + sDataType]; } else { return false; } } function saveLocalData(sContent, sDataType, sData) { oGameData.data['obj_' + sContent + '_' + sDataType] = sData; oGameData.data.flush(); } function clearLocalData() { oGameData.clear(); } function generateGridData() { var v1 = ''; l = 1; while (l <= maxX) { m = 1; while (m <= maxZ) { if (mcGame.mcGrid['tile' + l + '_' + m].iObjectID != undefined && mcGame.mcGrid['tile' + l + '_' + m].iObjectID != 0) { v1 = v1 + mcGame.mcGrid['tile' + l + '_' + m].iObjectID + ','; } else { v1 += '0,'; } ++m; } v1 = clipText(v1, v1.length - 1, false); v1 += '|'; ++l; } v1 = clipText(v1, v1.length - 1, false); return v1; } function initGame(sCharacter) { clearTimeout(iTrapTimeout); sCharacterSelected = sCharacter; mcTimerBar._visible = true; mcTimerBar.mcTimer._xscale = 100; bIsMoving = true; iScore = 0; iDonutCount = 0; _root.arrKeyHistory = new Array(); _root.HeroGridPos = [20, 6]; var v2 = mcGame.mcGrid.tile1_6; v2.bCanMove = false; v2.objectName = 'coffeePot'; mcGame.mcGrid.attachMovie('coffeePotObject', 'mcCoffeePot', v2.depth + 10001); coffeePotObj = mcGame.mcGrid.mcCoffeePot; coffeePotObj._x = v2._x; coffeePotObj._y = v2._y; i = 0; while (i < maxX) { j = 0; while (j < maxZ) { v2 = mcGame.mcGrid['tile' + (i + 1) + '_' + (j + 1)]; switch (v2.objectName) { case 'balloonDecoy': mcGame.mcGrid[v2.sObject].gotoAndStop(sCharacter); break; case 'marshy': me = mcGame.mcGrid[v2.sObject]; me.gameType = 'marshy'; me.x = 250; me.y = 0; me.z = -950; me.iDirection = 3; me.xPosition = j + 1; me.zPosition = i + 1; me.myDepth = v2.depth + 1; me.myMoveCounter = 0; me.myMoveFinished = false; me.moveInterval = int(_root.moveInterval * 2); me._visible = false; me.desiredTile = null; me.frameCounter = 0; me._x = v2._x; me._y = v2._y; mcGame.mcGrid.attachMovie('marshy', 'mcEnemyAnimMarshy', me.myDepth + 1); me.mySprite = mcGame.mcGrid.mcEnemyAnimMarshy; me.mySprite._x = me._x; me.mySprite._y = me._y; me.mySprite.currentAnim = 'idle'; me.mySprite.myDirection = 3; me.mySprite.gotoAndStop('idle3'); me.onEnterFrame = doCharacterMarshy; v2.sObject = undefined; break; case 'chilliBear': me = mcGame.mcGrid[v2.sObject]; me.gameType = 'chilliBear'; me.x = 250; me.y = 0; me.z = -950; me.iDirection = 3; me.xPosition = j + 1; me.zPosition = i + 1; me.myDepth = v2.depth + 1; me.myMoveCounter = 0; me.myMoveFinished = false; me.moveInterval = int(_root.moveInterval * 1.2); me._visible = false; me.desiredTile = null; me.frameCounter = 0; me._x = v2._x; me._y = v2._y; mcGame.mcGrid.attachMovie('chilliBear', 'mcEnemyAnimBear', me.myDepth + 1); me.mySprite = mcGame.mcGrid.mcEnemyAnimBear; me.mySprite._x = me._x; me.mySprite._y = me._y; me.mySprite.currentAnim = 'idle'; me.mySprite.myDirection = 3; me.mySprite.gotoAndStop('idle3'); me.onEnterFrame = doCharacterBear; v2.sObject = undefined; break; case 'piddles': me = mcGame.mcGrid[v2.sObject]; me.gameType = 'piddles'; me.x = 250; me.y = 0; me.z = -950; me.iDirection = 3; me.xPosition = j + 1; me.zPosition = i + 1; me.myDepth = v2.depth + 1; me.myMoveCounter = 0; me.myMoveFinished = false; me.moveInterval = int(_root.moveInterval * 1.2); me._visible = false; me.desiredTile = null; me.frameCounter = 0; me._x = v2._x; me._y = v2._y; mcGame.mcGrid.attachMovie('piddles', 'mcEnemyAnimPiddles', me.myDepth + 1); me.mySprite = mcGame.mcGrid.mcEnemyAnimPiddles; me.mySprite._x = me._x; me.mySprite._y = me._y; me.mySprite.currentAnim = 'idle'; me.mySprite.myDirection = 3; me.mySprite.gotoAndStop('idle3'); me.onEnterFrame = doCharacterPiddles; v2.sObject = undefined; } ++j; } ++i; } v2 = mcGame.mcGrid.tile20_6; mcGame.mcGrid.attachMovie('mc' + sCharacter + 'Character', 'mcCharacter', v2.depth + 1); character = mcGame.mcGrid.mcCharacter; character.gameType = 'hero'; character.x = 250; character.y = 0; character.z = -950; character.iDirection = 1; character.xPosition = 6; character.zPosition = 20; character.myDepth = v2.depth + 1; character.myMoveCounter = 0; character.myMoveFinished = false; character._visible = false; character.myTile = 'tile20_6'; character.desiredTile = null; character.frameCounter = 0; character._x = v2._x; character._y = v2._y; character.desiredTile = findNextTile(character.iDirection, character.xPosition, character.zPosition); mcGame.mcGrid.attachMovie('mc' + sCharacter + 'Anim', 'mcCharacterAnim', character.myDepth + 1); character.mySprite = mcGame.mcGrid.mcCharacterAnim; character.mySprite._x = character._x; character.mySprite._y = character._y; character.mySprite.currentAnim = 'idle'; character.mySprite.myDirection = 1; character.mySprite.gotoAndStop('idle1'); character.onEnterFrame = doCharacterHero; character.postMoveAction = doPostMoveHero; mcTimerBar.mcDonutIndicator.txtDonutCount.text = iTotalDonuts - iDonutCount; if (iTotalDonuts - iDonutCount == 0) { mcTimerBar.gotoAndStop('off'); return true; } mcTimerBar.gotoAndStop('init'); return true; } function doRemoveItem(myArray, myItem) { i = 0; while (i < myArray.length) { if (myArray[i] == myItem) { myArray.splice(i, 1); } ++i; } } function startGame() { clearTimeout(iTrapTimeout); mcGame.mcGrid.cacheAsBitmap; bPauseGame = false; bIsMoving = false; bIsPlaying = true; _root.bKeyRightDown = false; _root.bKeyLeftDown = false; _root.bKeyDownDown = false; _root.bKeyUpDown = false; _root.bKeySpaceDown = false; _root.bKeyRightUp = false; _root.bControlKeyDn = false; _root.arrKeyHistory = new Array(); oKeyListener.onKeyDown = function () { if (Key.isDown(38) && bKeyUpDown == false) { bKeyUpDown = true; arrKeyHistory.unshift(1); } if (Key.isDown(39) && bKeyRightDown == false) { bKeyRightDown = true; arrKeyHistory.unshift(2); } if (Key.isDown(40) && bKeyDownDown == false) { bKeyDownDown = true; arrKeyHistory.unshift(3); } if (Key.isDown(37) && bKeyLeftDown == false) { bKeyLeftDown = true; arrKeyHistory.unshift(4); } if (Key.isDown(32) && bKeySpaceDown == false) { if (sActionItem != null) { _root[sActionItem](); } bKeySpaceDown = true; } }; oKeyListener.onKeyUp = function () { if (!Key.isDown(38)) { bKeyUpDown = false; doRemoveItem(arrKeyHistory, 1); } if (!Key.isDown(39)) { bKeyRightDown = false; doRemoveItem(arrKeyHistory, 2); } if (!Key.isDown(40)) { bKeyDownDown = false; doRemoveItem(arrKeyHistory, 3); } if (!Key.isDown(37)) { bKeyLeftDown = false; doRemoveItem(arrKeyHistory, 4); } if (Key.getCode() == 32) { bKeySpaceDown = false; } }; Key.addListener(oKeyListener); if (trapsInGame.length > 0) { iTrapTimeout = setTimeout(activateTrap, 3000); } doStartTimer(); } function endGame() { _root.stopSound('Traps'); clearTimeout(iTrapTimeout); startSound('Music', sMusic + ' End', 50, 1); bGameOver = true; bIsPlaying = false; bIsMoving = true; Key.removeListener(oKeyListener); mcTimerBar.onEnterFrame = doTimerBonus; startSound('SoundFX', 'sndBonus', 100, 9999); } function findNextTile(iDirection, iCurrX, iCurrZ) { var v2 = 0; var v3 = 0; switch (iDirection) { case 1: v2 = iCurrX; v3 = iCurrZ - 1; break; case 2: v2 = iCurrX + 1; v3 = iCurrZ; break; case 3: v2 = iCurrX; v3 = iCurrZ + 1; break; default: v2 = iCurrX - 1; v3 = iCurrZ; } var v1 = mcGame.mcGrid['tile' + v3 + '_' + v2]; if (v1.objectName != undefined) { var v4 = lookupObjectIndex(v1.objectName); if (objectArray[v4].type == 'helper' && objectArray[v4].pickup == 'false' && mcGame.mcGrid[v1.sObject].bActive == true) { sActionItem = v1.objectName; sActionObject = v1.sObject; oActionLocation = v1; } else { sActionItem = null; sActionObject = null; oActionLocation = null; } return v1; } sActionItem = null; sActionObject = null; oActionLocation = null; return v1; } function findNextEnemyTile(iDirection, iCurrX, iCurrZ) { var v1 = 0; var v2 = 0; switch (iDirection) { case 1: v1 = iCurrX; v2 = iCurrZ - 1; var v5 = mcGame.mcGrid['tile' + v2 + '_' + v1]; return v5; case 2: v1 = iCurrX + 1; v2 = iCurrZ; var v5 = mcGame.mcGrid['tile' + v2 + '_' + v1]; return v5; case 3: v1 = iCurrX; v2 = iCurrZ + 1; var v5 = mcGame.mcGrid['tile' + v2 + '_' + v1]; return v5; } v1 = iCurrX - 1; v2 = iCurrZ; var v5 = mcGame.mcGrid['tile' + v2 + '_' + v1]; return v5; } function adjustScore(iPointValue) { iScore += Number(iPointValue); } function updateGridPosition(myClip) { var v1 = {'x': myClip._x, 'y': myClip._y}; mcGame.mcGrid.localToGlobal(v1); ox = 340 - v1.x; oy = 384 - v1.y; mcGame.mcGrid._x += ox * 0.3; mcGame.mcGrid._y += oy * 0.3; } function pickupItem(oTile) { var v4 = lookupObjectIndex(oTile.objectName); adjustScore(objectArray[v4].pointValue); var v2 = mcGame.mcGrid[oTile.sObject]; this[v2.type](); if (v2.type != 'rollyChair') { v2.removeMovieClip(); } else { oRollyChair = oTile.sObject; v2._visible = false; } oTile.sObject = undefined; oTile.objectName = undefined; } function checkProximity(oTile) { i = 0; while (i < oTile.proximityTiles.length) { oTempTile = mcGame.mcGrid['tile' + oTile.proximityTiles[i]]; if (oTempTile != undefined && bPauseGame == false) { if (oTempTile.myOccupant != undefined && oTempTile.myOccupant.myMoveFinished == true && bInvisible == false) { bPauseGame = true; bEnemyPause = true; bInvisible = true; character.trapDirection = i + 1; muteSound('Music'); _root.sCutScene = ''; if (oTempTile.myOccupant.gameType == 'piddles') { iRandom = random(3) + 1; _root.sCutScene = oTempTile.myOccupant.gameType + iRandom + sCharacterSelected; } else { _root.sCutScene = oTempTile.myOccupant.gameType + sCharacterSelected; } character.mySprite.mcExclamationPoint.gotoAndStop('on'); break; } else { if (oTempTile.bHasTrap == true && bInvisible == false) { if (mcGame.mcGrid[oTempTile.sObject].bActivated == true) { bPauseGame = true; bEnemyPause = true; bInvisible = true; character.trapDirection = i + 1; oActiveTrap = oTempTile.sObject; muteSound('Music'); _root[oTempTile.objectName](); break; } } else { if (oTempTile.objectName == 'coffeePot' && character.desiredTile == oTempTile) { character.iDirection = i + 1; coffeePot(); } } } } ++i; } } function activateTrap() { if (bOnTrap != true && bIsPlaying == true && bPauseGame == false) { var v1 = Math.floor(Math.random() * trapsInGame.length); trapsInGame[v1].gotoAndPlay('on'); } } function birthdayCake() { mcGame.mcGrid[oActiveTrap].gotoAndStop('trap'); mcCutScenes.gotoAndStop('birthdayCake' + sCharacterSelected); bPauseGame = true; bOnTrap = true; } function radio() { mcGame.mcGrid[oActiveTrap].gotoAndStop('trap'); mcCutScenes.gotoAndStop('radio' + sCharacterSelected); bPauseGame = true; bOnTrap = true; } function telephone() { mcGame.mcGrid[oActiveTrap].gotoAndStop('trap'); mcCutScenes.gotoAndStop('telephone' + sCharacterSelected); bPauseGame = true; bOnTrap = true; } function unpauseGame() { clearTimeout(iTrapTimeout); if (oActiveTrap != null) { mcGame.mcGrid[oActiveTrap].gotoAndStop('off'); oActiveTrap = null; } if (bGameOver == false) { iTrapTimeout = setTimeout(activateTrap, 3000); } mcCutScenes.gotoAndStop('off'); bCutScene = false; bOnTrap = false; bPauseGame = false; character.mySprite.mcExclamationPoint.gotoAndStop('off'); } function paperShield() { startSound('SoundFX', 'sndPaperShield', 100, 1); iIndex = lookupObjectIndex('paperShield'); adjustScore(objectArray[iIndex].pointValue); if (bOnRollyChair != true) { characterAnim.gotoAndPlay('paper' + character.iDirection); bHasPaperShield = true; bInvisible = true; clearTimeout(iPaperShieldTimeout); iPaperShieldTimeout = setTimeout(removePaperShield, 5000); } } function removePaperShield() { bHasPaperShield = false; bInvisible = false; } function removeEnemyPause() { bInvisible = false; bEnemyPause = false; } function removeDecoy() { bDecoyActive = false; } function balloonDecoy() { mcGame.mcGrid[sActionObject].play(); mcGame.mcGrid[sActionObject].bActive = false; iIndex = lookupObjectIndex('balloonDecoy'); adjustScore(objectArray[iIndex].pointValue); startSound('SoundFX', 'sndBalloonDecoy', 100, 1); _root.HeroGridPos = [oActionLocation.iCol, oActionLocation.iRow]; iDecoyTimeout = 0; iDecoyTimeout = setTimeout(removeDecoy, 5000); bDecoyActive = true; sActionItem = null; sActionObject = null; } function treatTable() { mcGame.mcGrid[sActionObject].gotoAndPlay('on'); mcGame.mcGrid[sActionObject].bActive = false; iIndex = lookupObjectIndex('treatTable'); adjustScore(objectArray[iIndex].pointValue); startSound('SoundFX', 'sndTreatTable', 100, 1); _root.HeroGridPos = [oActionLocation.iCol, oActionLocation.iRow]; iDecoyTimeout = 0; iDecoyTimeout = setTimeout(removeDecoy, 5000); bDecoyActive = true; sActionItem = null; sActionObject = null; } function rollyChair() { bHasPaperShield = false; changeCharacterSpeed(5); bOnRollyChair = true; iSpeedTimeout = null; iIndex = lookupObjectIndex('rollyChair'); adjustScore(objectArray[iIndex].pointValue); bInvisible = true; } function sprinkleDonut() { trace('sprinkleDonut()'); iIndex = lookupObjectIndex('sprinkleDonut'); adjustScore(objectArray[iIndex].pointValue); if (bSprinkleDonut != true) { bSprinkleDonut = true; stopSound('Music'); startSound('Music', _root.sMusic + ' Fast', 50, 9999); if (bOnRollyChair != true) { changeCharacterSpeed(8); clearTimeout(iSpeedTimeout); iSpeedTimeout = setTimeout(changeCharacterSpeed, 3000, 10); } } } function changeCharacterSpeed(iInterval) { if (bSprinkleDonut == true && iInterval > _root.moveInterval) { bSprinkleDonut = false; stopSound('Music'); startSound('Music', _root.sMusic + ' Loop', 50, 9999); } if (bOnRollyChair != true) { _root.moveInterval = iInterval; } clearTimeout(iSpeedTimeout); } function coffeeBeans() { startSound('SoundFX', 'sndCoffeeBeans', 100, 1); iIndex = lookupObjectIndex('coffeeBeans'); adjustScore(objectArray[iIndex].pointValue); if ((_root.timeLeft + 5000) / 1000 > iNumSeconds) { _root.startTime += iNumSeconds * 1000 - _root.timeLeft; } else { _root.startTime += 5000; } } function donut() { startSound('SoundFX', 'sndDonut', 100, 1); ++iDonutCount; mcTimerBar.mcDonutIndicator.txtDonutCount.text = iTotalDonuts - iDonutCount; if (iTotalDonuts - iDonutCount == 0) { mcTimerBar.gotoAndPlay('hideCount'); } } function coffeePot() { if (iDonutCount == iTotalDonuts && bPauseGame != true) { endGame(); } else { if (_root.bDonutPulse != true) { mcTimerBar.gotoAndPlay('pulse'); } } } function doOutofTime() { arrKeyHistory = []; stopSound('Music'); stopSound('Traps'); clearTimeout(iTrapTimeout); clearTimeout(iSpeedTimeout); bGameOver = true; bIsPlaying = false; bIsMoving = true; Key.removeListener(oKeyListener); if (sGameMode == 'create') { cancelTest(); mcChooseCharacter.gotoAndStop('test_fail'); mcCutScenes.gotoAndStop('off'); } else { mcCountdown.gotoAndStop('gameover'); mcCutScenes.gotoAndStop('gameOver' + sCharacterSelected); } mcTimerBar.onEnterFrame = null; } function doOutofBonus() { mcTimerBar.onEnterFrame = null; if (sGameMode == 'create') { mcChooseCharacter.gotoAndStop('test_pass'); } else { mcCountdown.gotoAndStop('greatjob'); mcCutScenes.gotoAndStop('win' + sCharacterSelected); } } doTimer = function () { if (bTimerPaused) { return undefined; } _root.timeUsed = getTimer() - _root.startTime; _root.secondsUsed = Math.floor(_root.timeUsed / 1000); _root.timeLeft = _root.timeOnClock - _root.timeUsed; _root.timePercent = Math.min(1, _root.timeUsed / _root.timeOnClock); mcTimerBar.mcTimer._xscale = 100 - _root.timePercent * 100; if (_root.timePercent == 1) { _root.doOutofTime(); } }; doStartTimer = function () { _root.startTime = getTimer(); _root.secondsOnClock = iNumSeconds; _root.timeOnClock = _root.secondsOnClock * 1000; _root.timeLeft = _root.timeOnClock; _root.secondsUsed = 0; mcTimerBar.onEnterFrame = null; mcTimerBar.mcTimer._xscale = 100; mcTimerBar.onEnterFrame = doTimer; }; doTimerBonus = function () { _root.timeUsed += 1000; _root.timePercent = Math.min(1, _root.timeUsed / _root.timeOnClock); _root.iScore += 100; mcTimerBar.mcTimer._xscale = 100 - _root.timePercent * 100; if (_root.timePercent == 1) { _root.stopSound('SoundFX'); _root.doOutofBonus(); } }; } frame 1 { function createChannel(sChannelName) { if (iNumChannelsOpen < iNumChannels) { _root.createEmptyMovieClip(sChannelName, _root.getNextHighestDepth()); _root[sChannelName].soundArray = new Array(); _root[sChannelName].oSound = new Sound(_root[sChannelName]); _root[sChannelName].oSound.setVolume(iVolume); _root[sChannelName].iVolume = iVolume; _root[sChannelName].isMute = false; ++iNumChannelsOpen; } } function deleteChannel(sChannelName) { _root[sChannelName].removeMovieClip(); --iNumChannelsOpen; } function startSound(sChannel, sLinkage, iStartVolume, iLoopCount) { trace('startSound(' + sLinkage + ')'); stopSound(sChannel); clearInterval(vFade); if (iStartVolume > 0) { _root[sChannel].iVolume = iStartVolume; if (_root[sChannel].isMute == false) { _root[sChannel].oSound.setVolume(_root[sChannel].iVolume); } else { _root[sChannel].oSound.setVolume(0); } } var v2 = new Object(); v2.linkage = sLinkage; v2.startVolume = iStartVolume; v2.loopCount = iLoopCount; v2.fadeData = iFade; _root[sChannel].soundArray = new Array(); _root[sChannel].soundArray.push(v2); _root[sChannel].oSound.attachSound(sLinkage); _root[sChannel].oSound.start(0, iLoopCount); _root[sChannel].oSound.onSoundComplete = function () { _root[sChannel].soundArray.shift(); if (_root[sChannel].soundArray.length > 0) { startSound(_root[sChannel]._name, _root[sChannel].soundArray[0].linkage, _root[sChannel].soundArray[0].startVolume, _root[sChannel].soundArray[0].loopCount, _root[sChannel].soundArray[0].fadeData); _root[sChannel].soundArray.splice(0, 1); } }; } function stopSound(sChannel) { _root[sChannel].oSound.stop(); } function pauseSound(sChannel) { _root[sChannel].iSoundPos = _root[sChannel].oSound.position; _root[sChannel].oSound.stop(); } function unpauseSound(sChannel, iLoopCount) { _root[sChannel].oSound.start(_root[sChannel].iSoundPos / 1000, iLoopCount); } function queueSound(sChannel, sLinkage, iStartVolume, iLoopCount, iFade) { var v2 = new Object(); v2.linkage = sLinkage; v2.startVolume = iStartVolume; v2.loopCount = iLoopCount; v2.fadeData = iFade; _root[sChannel].soundArray.push(v2); } function adjustVolume(sChannel, iAmount) { if (_root[sChannel].oSound.getVolume() + iAmount > 100) { _root[sChannel].oSound.setVolume(100); } else { if (_root[sChannel].oSound.getVolume() + iAmount < 0) { _root[sChannel].oSound.setVolume(0); } else { _root[sChannel].oSound.setVolume(_root[sChannel].oSound.getVolume() + iAmount); } } } function muteSound(sChannel) { _root[sChannel].isMute = true; _root[sChannel].iVolume = _root[sChannel].oSound.getVolume(); _root[sChannel].oSound.setVolume(0); } function unmuteSound(sChannel) { _root[sChannel].isMute = false; _root[sChannel].oSound.setVolume(_root[sChannel].iVolume); } function isBusy(sChannel) { if (_root[sChannel].soundArray.length == 0) { return true; } else { return false; } } function fadeChannel(sChannel, iDesiredVolume, iSeconds) { iCurrVolume = _root[sChannel].oSound.getVolume(); var v4 = (iDesiredVolume - iCurrVolume) / iSeconds * 30; _root[sChannel].volumeAdjust = v4; _root[sChannel].volumeTarget = iDesiredVolume; _root[sChannel].onEnterFrame = function () { this.iCurrVolume = this.oSound.getVolume(); if (this.iCurrVolume <= this.volumeTarget) { this.onEnterFrame = null; } else { this.oSound.setVolume(this.iCurrVolume + this.volumeAdjust); } }; } var iNumChannels = 8; var iNumChannelsOpen = 0; var iVolume = 50; var iVersion = 1; doCharacterHero = function () { if (_root.bIsPlaying != true) { this.mySprite.currentAnim = String('idle' + this.iDirection); this.mySprite.gotoAndPlay(this.mySprite.currentAnim); return undefined; } movex = 35.5 / _root.moveInterval; movey = 17.5 / _root.moveInterval; if (this.mySprite._x < this._x) { this.mySprite._x = Math.min(this._x, this.mySprite._x + movex); } else { if (this.mySprite._x > this._x) { this.mySprite._x = Math.max(this._x, this.mySprite._x - movex); } } if (this.mySprite._y < this._y) { this.mySprite._y = Math.min(this._y, this.mySprite._y + movey); } else { if (this.mySprite._y > this._y) { this.mySprite._y = Math.max(this._y, this.mySprite._y - movey); } } myDepth = Math.floor((this.mySprite._y - mcGame.mcGrid.mcMarker._y) * 1000 + (this.mySprite._x - mcGame.mcGrid.mcMarker._x)); this.mySprite.swapDepths(myDepth + 2); _root.updateGridPosition(this.mySprite); this.frameCounter = Math.min(0, this.frameCounter + 1); if (this.frameCounter == 0) { if (bPauseGame == true) { this.mySprite.currentAnim = String('idle' + this.trapDirection); this.mySprite.gotoAndStop(this.mySprite.currentAnim); return undefined; } if (_root.bDecoyActive != true) { _root.HeroGridPos = [this.xPosition, this.zPosition]; } this.desiredTile = findNextTile(this.iDirection, this.xPosition, this.zPosition); if (mcGame.mcGrid[this.myTile].sObject != undefined) { _root.pickupItem(mcGame.mcGrid[this.myTile]); } if (_root.arrKeyHistory.length == 0 && bOnRollyChair != true) { if (_root.arrKeyHistory.length == 0) { if (bHasPaperShield) { this.mySprite.currentAnim = String('paperIdle' + this.iDirection); this.mySprite.gotoAndStop(this.mySprite.currentAnim); } else { if (bOnRollyChair == false) { this.mySprite.currentAnim = String('idle' + this.iDirection); this.mySprite.gotoAndStop(this.mySprite.currentAnim); } } } _root.checkProximity(mcGame.mcGrid[this.myTile]); return undefined; } if (bOnRollyChair == true) { if (bIsRolling != true) { if (_root.arrKeyHistory.length > 0) { this.iDirection = _root.arrKeyHistory[0]; this.desiredTile = findNextTile(this.iDirection, this.xPosition, this.zPosition); if (this.desiredTile != undefined && this.desiredTile.bCanMove == true && this.desiredTile.objectName != 'rollyChair') { _root.startSound('SoundFX', 'sndRollyChair', 100, 1); this.mySprite.gotoAndPlay('rollychair'); this.mySprite.play(); bIsRolling = true; } else { this.mySprite.gotoAndStop('rollychair'); return undefined; } } else { this.mySprite.gotoAndStop('rollychair'); return undefined; } } } else { iDirectionToGo = _root.arrKeyHistory[0]; if (iDirectionToGo > 10) { iDirectionToGo -= 10; this.iDirection = iDirectionToGo; arrKeyHistory = []; } else { this.iDirection = _root.arrKeyHistory[0]; } } this.desiredTile = findNextTile(this.iDirection, this.xPosition, this.zPosition); if (this.desiredTile != undefined && this.desiredTile.myOccupant == undefined && this.desiredTile.bCanMove == true && (bOnRollyChair == false || bOnRollyChair == true && bIsRolling == false && this.desiredTile.objectName != 'rollyChair' || bOnRollyChair == true && bIsRolling == true && this.desiredTile.objectName != 'rollyChair')) { _root.doUnRegisterOccupant(mcGame.mcGrid[this.myTile]); this.myTile = this.desiredTile.name; _root.doRegisterOccupant(mcGame.mcGrid[this.myTile], this); _root.checkProximity(mcGame.mcGrid[this.myTile]); if (bHasPaperShield == true) { if (this.mySprite.currentAnim != String('paper' + this.iDirection)) { this.mySprite.currentAnim = String('paper' + this.iDirection); this.mySprite.gotoAndPlay(this.mySprite.currentAnim); } } else { if (bIsRolling == false) { if (this.mySprite.currentAnim != String('walk' + this.iDirection)) { this.mySprite.currentAnim = String('walk' + this.iDirection); this.mySprite.gotoAndPlay(this.mySprite.currentAnim); } } } iGridEndX = this._x - this.desiredTile._x + _root.mcGame.mcGrid._x; iGridEndY = this._y - this.desiredTile._y + _root.mcGame.mcGrid._y; this._x = this.desiredTile._x; this._y = this.desiredTile._y; this.swapDepths(this.desiredTile.depth + 2); this.myDepth = this.desiredTile.depth + 2; this.xPosition = this.desiredTile.xPosition; this.zPosition = this.desiredTile.zPosition; this.frameCounter = -_root.moveInterval; } else { if (this.desiredTile.objectName == 'coffeePot') { _root.coffeePot(); } if (bOnRollyChair == true) { bOnRollyChair = false; bIsRolling = false; bInvisible = false; _root.changeCharacterSpeed(10); switch (this.iDirection) { case 1: this.iDirection = 3; break; case 2: this.iDirection = 4; break; case 3: this.iDirection = 1; break; default: this.iDirection = 2; } _root.arrKeyHistory = []; mcGame.mcGrid[this.myTile].sObject = oRollyChair; mcGame.mcGrid[this.myTile].objectName = 'rollyChair'; mcGame.mcGrid[oRollyChair]._x = mcGame.mcGrid[this.myTile]._x; mcGame.mcGrid[oRollyChair]._y = mcGame.mcGrid[this.myTile]._y; mcGame.mcGrid[oRollyChair]._visible = true; mcGame.mcGrid[oRollyChair].swapDepths(mcGame.mcGrid[this.myTile].depth + 1); this.desiredTile = findNextTile(this.iDirection, this.xPosition, this.zPosition); _root.doUnRegisterOccupant(mcGame.mcGrid[this.myTile]); this.myTile = this.desiredTile.name; _root.doRegisterOccupant(mcGame.mcGrid[this.myTile], this); this.mySprite.currentAnim = String('walk' + this.iDirection); this.mySprite.gotoAndPlay(this.mySprite.currentAnim); this.frameCounter = -_root.moveInterval; iGridEndX = this._x - this.desiredTile._x + _root.mcGame.mcGrid._x; iGridEndY = this._y - this.desiredTile._y + _root.mcGame.mcGrid._y; this._x = this.desiredTile._x; this._y = this.desiredTile._y; this.swapDepths(this.desiredTile.depth + 2); this.myDepth = this.desiredTile.depth + 2; this.xPosition = this.desiredTile.xPosition; this.zPosition = this.desiredTile.zPosition; this.frameCounter = -_root.moveInterval; } else { if (bHasPaperShield == true) { this.mySprite.currentAnim = String('paperIdle' + this.iDirection); this.mySprite.gotoAndStop(this.mySprite.currentAnim); } else { this.mySprite.currentAnim = String('idle' + this.iDirection); this.mySprite.gotoAndStop(this.mySprite.currentAnim); } } } } }; doCharacterPiddles = function () { if (_root.bIsPlaying != true) { this.mySprite.currentAnim = String('idle' + this.iDirection); this.mySprite.gotoAndPlay(this.mySprite.currentAnim); return undefined; } movex = 35.5 / this.moveInterval; movey = 17.5 / this.moveInterval; if (this.mySprite._x < this._x) { this.mySprite._x = Math.min(this._x, this.mySprite._x + movex); } else { if (this.mySprite._x > this._x) { this.mySprite._x = Math.max(this._x, this.mySprite._x - movex); } } if (this.mySprite._y < this._y) { this.mySprite._y = Math.min(this._y, this.mySprite._y + movey); } else { if (this.mySprite._y > this._y) { this.mySprite._y = Math.max(this._y, this.mySprite._y - movey); } } myDepth = Math.floor((this.mySprite._y - mcGame.mcGrid.mcMarker._y) * 1000 + (this.mySprite._x - mcGame.mcGrid.mcMarker._x)); this.mySprite.swapDepths(myDepth + 10002); this.frameCounter = Math.min(0, this.frameCounter + 1); if (this.frameCounter == 0 && this.myMoveFinished == false) { this.myMoveFinished = true; if (bPauseGame != true && bEnemyPause != true) { diffz = _root.HeroGridPos[1] - this.zPosition; diffx = _root.HeroGridPos[0] - this.xPosition; if (diffz < 0) { zdir = 1; } else { if (diffz > 0) { zdir = 3; } } if (diffx < 0) { xdir = 4; } else { if (diffx > 0) { xdir = 2; } } if (Math.abs(diffz) > Math.abs(diffx)) { this.dirlist = [zdir, xdir]; } else { this.dirlist = [xdir, zdir]; } this.dirok = false; this.iDirection = this.dirlist.shift(); this.iTryCount = 0; while (this.dirok == false) { ++this.iTryCount; this.desiredTile = findNextEnemyTile(this.iDirection, this.xPosition, this.zPosition); if (this.desiredTile != undefined && this.desiredTile.myOccupant == undefined && this.desiredTile.bCanMove == true) { this.frameCounter = -this.moveInterval; this.dirok = true; _root.doUnRegisterOccupant(mcGame.mcGrid[this.myTile]); this.myTile = this.desiredTile.name; _root.doRegisterOccupant(mcGame.mcGrid[this.myTile], this); } else { if (this.dirlist.length >= 1) { this.iDirection = this.dirlist.shift(); } else { this.iDirection = random(4) + 1; } } if (this.iTryCount > 12) { this.frameCounter = -1; this.myMoveFinished = false; return undefined; } } } else { if (this._x == this.mySprite._x) { if (bOnTrap != true) { switch (character.trapDirection) { case 1: this.iDirection = 3; break; case 2: this.iDirection = 4; break; case 3: this.iDirection = 1; break; default: this.iDirection = 2; } } this.mySprite.currentAnim = String('idle' + this.iDirection); this.mySprite.gotoAndStop(this.mySprite.currentAnim); if (bCutScene != true && bPauseGame == true && bOnTrap != true) { _root.mcCutScenes.gotoAndPlay(_root.sCutScene); _root.bCutScene = true; } } } } else { if (this.dirok != true) { this.frameCounter = -1; this.myMoveFinished = false; return undefined; } if (this.frameCounter == 0) { this.myMoveFinished = false; if (this.mySprite.currentAnim != String('walk' + this.iDirection)) { this.mySprite.currentAnim = String('walk' + this.iDirection); this.mySprite.gotoAndPlay(this.mySprite.currentAnim); } iGridEndX = this._x - this.desiredTile._x + _root.mcGame.mcGrid._x; iGridEndY = this._y - this.desiredTile._y + _root.mcGame.mcGrid._y; this._x = this.desiredTile._x; this._y = this.desiredTile._y; this.swapDepths(this.desiredTile.depth + 2); this.myDepth = this.desiredTile.depth + 2; this.xPosition = this.desiredTile.xPosition; this.zPosition = this.desiredTile.zPosition; } } }; doCharacterBear = function () { if (_root.bIsPlaying == false) { this.mySprite.currentAnim = String('idle' + this.iDirection); return undefined; } movex = 35.5 / this.moveInterval; movey = 17.5 / this.moveInterval; if (this.mySprite._x < this._x) { this.mySprite._x = Math.min(this._x, this.mySprite._x + movex); } else { if (this.mySprite._x > this._x) { this.mySprite._x = Math.max(this._x, this.mySprite._x - movex); } } if (this.mySprite._y < this._y) { this.mySprite._y = Math.min(this._y, this.mySprite._y + movey); } else { if (this.mySprite._y > this._y) { this.mySprite._y = Math.max(this._y, this.mySprite._y - movey); } } myDepth = Math.floor((this.mySprite._y - mcGame.mcGrid.mcMarker._y) * 1000 + (this.mySprite._x - mcGame.mcGrid.mcMarker._x)); this.mySprite.swapDepths(myDepth + 10002); this.frameCounter = Math.min(0, this.frameCounter + 1); if (this.frameCounter == 0 && this.myMoveFinished == false) { this.myMoveFinished = true; if (bPauseGame != true && bEnemyPause != true) { if (bDecoyActive == true) { diffz = _root.HeroGridPos[1] - this.zPosition; diffx = _root.HeroGridPos[0] - this.xPosition; if (diffz < 0) { zdir = 1; } else { if (diffz > 0) { zdir = 3; } } if (diffx < 0) { xdir = 4; } else { if (diffx > 0) { xdir = 2; } } if (Math.abs(diffz) > Math.abs(diffx)) { this.dirlist = [zdir, xdir]; } else { this.dirlist = [xdir, zdir]; } this.iDirection = this.dirlist.shift(); } else { if (Math.random() < 0.2) { this.iDirection = random(4) + 1; } } this.dirok = false; this.iTryCount = 0; this.giveUp = false; this.anyDirectionArr = [1, 2, 3, 4]; while (this.dirok == false) { ++this.iTryCount; this.desiredTile = findNextEnemyTile(this.iDirection, this.xPosition, this.zPosition); if (this.desiredTile != undefined && this.desiredTile.myOccupant == undefined && this.desiredTile.bCanMove == true) { this.frameCounter = -this.moveInterval; this.dirok = true; _root.doUnRegisterOccupant(mcGame.mcGrid[this.myTile]); this.myTile = this.desiredTile.name; _root.doRegisterOccupant(mcGame.mcGrid[this.myTile], this); } else { if (this.iTryCount < 8) { this.iDirection = random(4) + 1; } else { if (this.anyDirectionArr.length >= 1) { this.iDirection = this.anyDirectionArr.shift(); } else { this.giveUp = true; } } } if (this.giveUp == true) { trace('marshy cant move in dir ' + this.iDirection); this.frameCounter = -1; this.myMoveFinished = false; return undefined; } } } else { if (this._x == this.mySprite._x) { if (bOnTrap != true) { switch (character.trapDirection) { case 1: this.iDirection = 3; break; case 2: this.iDirection = 4; break; case 3: this.iDirection = 1; break; default: this.iDirection = 2; } } this.mySprite.currentAnim = String('idle' + this.iDirection); this.mySprite.gotoAndStop(this.mySprite.currentAnim); if (bCutScene != true && bPauseGame == true && bOnTrap != true) { _root.mcCutScenes.gotoAndPlay(_root.sCutScene); _root.bCutScene = true; } } } } else { if (this.dirok != true) { this.frameCounter = -1; this.myMoveFinished = false; return undefined; } if (this.frameCounter == 0) { this.myMoveFinished = false; if (this.mySprite.currentAnim != String('walk' + this.iDirection)) { this.mySprite.currentAnim = String('walk' + this.iDirection); this.mySprite.gotoAndPlay(this.mySprite.currentAnim); } iGridEndX = this._x - this.desiredTile._x + _root.mcGame.mcGrid._x; iGridEndY = this._y - this.desiredTile._y + _root.mcGame.mcGrid._y; this._x = this.desiredTile._x; this._y = this.desiredTile._y; this.swapDepths(this.desiredTile.depth + 2); this.myDepth = this.desiredTile.depth + 2; this.xPosition = this.desiredTile.xPosition; this.zPosition = this.desiredTile.zPosition; } } }; doCharacterMarshy = function () { if (_root.bIsPlaying == false) { this.mySprite.currentAnim = String('idle' + this.iDirection); return undefined; } movex = 35.5 / this.moveInterval; movey = 17.5 / this.moveInterval; if (this.mySprite._x < this._x) { this.mySprite._x = Math.min(this._x, this.mySprite._x + movex); } else { if (this.mySprite._x > this._x) { this.mySprite._x = Math.max(this._x, this.mySprite._x - movex); } } if (this.mySprite._y < this._y) { this.mySprite._y = Math.min(this._y, this.mySprite._y + movey); } else { if (this.mySprite._y > this._y) { this.mySprite._y = Math.max(this._y, this.mySprite._y - movey); } } myDepth = Math.floor((this.mySprite._y - mcGame.mcGrid.mcMarker._y) * 1000 + (this.mySprite._x - mcGame.mcGrid.mcMarker._x)); this.mySprite.swapDepths(myDepth + 10002); this.frameCounter = Math.min(0, this.frameCounter + 1); if (this.frameCounter == 0 && this.myMoveFinished == false) { this.myMoveFinished = true; if (bPauseGame != true && bEnemyPause != true) { if (bDecoyActive == true) { diffz = _root.HeroGridPos[1] - this.zPosition; diffx = _root.HeroGridPos[0] - this.xPosition; if (diffz < 0) { zdir = 1; } else { if (diffz > 0) { zdir = 3; } } if (diffx < 0) { xdir = 4; } else { if (diffx > 0) { xdir = 2; } } if (Math.abs(diffz) > Math.abs(diffx)) { this.dirlist = [zdir, xdir]; } else { this.dirlist = [xdir, zdir]; } this.iDirection = this.dirlist.shift(); } else { if (Math.random() < 0.2) { this.iDirection = random(4) + 1; } } this.dirok = false; this.iTryCount = 0; this.giveUp = false; this.anyDirectionArr = [1, 2, 3, 4]; while (this.dirok == false) { ++this.iTryCount; this.desiredTile = findNextEnemyTile(this.iDirection, this.xPosition, this.zPosition); if (this.desiredTile != undefined && this.desiredTile.myOccupant == undefined && this.desiredTile.bCanMove == true) { this.frameCounter = -this.moveInterval; this.dirok = true; _root.doUnRegisterOccupant(mcGame.mcGrid[this.myTile]); this.myTile = this.desiredTile.name; _root.doRegisterOccupant(mcGame.mcGrid[this.myTile], this); } else { if (this.iTryCount < 8) { this.iDirection = random(4) + 1; } else { if (this.anyDirectionArr.length >= 1) { this.iDirection = this.anyDirectionArr.shift(); } else { this.giveUp = true; } } } if (this.giveUp == true) { trace('marshy cant move in dir ' + this.iDirection); this.frameCounter = -1; this.myMoveFinished = false; return undefined; } } } else { if (this._x == this.mySprite._x) { if (bOnTrap != true) { switch (character.trapDirection) { case 1: this.iDirection = 3; break; case 2: this.iDirection = 4; break; case 3: this.iDirection = 1; break; default: this.iDirection = 2; } } this.mySprite.currentAnim = String('idle' + this.iDirection); this.mySprite.gotoAndStop(this.mySprite.currentAnim); if (bCutScene != true && bPauseGame == true && bOnTrap != true) { _root.mcCutScenes.gotoAndPlay(_root.sCutScene); _root.bCutScene = true; } } } } else { if (this.dirok != true) { this.frameCounter = -1; this.myMoveFinished = false; return undefined; } if (this.frameCounter == 0) { this.myMoveFinished = false; if (this.mySprite.currentAnim != String('walk' + this.iDirection)) { this.mySprite.currentAnim = String('walk' + this.iDirection); this.mySprite.gotoAndPlay(this.mySprite.currentAnim); } iGridEndX = this._x - this.desiredTile._x + _root.mcGame.mcGrid._x; iGridEndY = this._y - this.desiredTile._y + _root.mcGame.mcGrid._y; this._x = this.desiredTile._x; this._y = this.desiredTile._y; this.swapDepths(this.desiredTile.depth + 2); this.myDepth = this.desiredTile.depth + 2; this.xPosition = this.desiredTile.xPosition; this.zPosition = this.desiredTile.zPosition; } } }; stop(); mcLoadBar.myLoadDisplay = 0; mcLoadBar.onEnterFrame = function () { if (_root.getBytesLoaded() >= _root.getBytesTotal() && this.myLoadDisplay == 100) { _root.proceed(); this.onEnterFrame = null; } else { this.percent = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100; this.myLoadDisplay = Math.min(this.myLoadDisplay + 10, this.percent); this._xscale = this.myLoadDisplay; _root.txtLoading.text = 'LOADING... ' + Math.ceil(this.myLoadDisplay) + '%'; } }; _root.isReady = false; _root.startTime = getTimer(); _root.frameCounter = 0; _root.moveInterval = 10; _root.mcHallmarkLogo._alpha = 0; _root.mcHallmarkLogo.onEnterFrame = function () { this._alpha += 10; if (this._alpha >= 100) { this._alpha = 100; this.onEnterFrame = null; } }; } movieClip 473 { } movieClip 478 { } movieClip 480 { } movieClip 992 __Packages.mx.transitions.OnEnterFrameBeacon { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.transitions) { _global.mx.transitions = new Object(); } if (!_global.mx.transitions.OnEnterFrameBeacon) { var v1 = function () {}; mx.transitions.OnEnterFrameBeacon = v1; var v2 = v1.prototype; v1.init = function () { var v4 = _global.MovieClip; if (!_root.__OnEnterFrameBeacon) { mx.transitions.BroadcasterMX.initialize(v4); var v3 = _root.createEmptyMovieClip('__OnEnterFrameBeacon', 9876); v3.onEnterFrame = function () { _global.MovieClip.broadcastMessage('onEnterFrame'); }; } }; v1.version = '1.1.0.52'; ASSetPropFlags(mx.transitions.OnEnterFrameBeacon.prototype, null, 1); } #endinitclip } movieClip 993 __Packages.mx.transitions.BroadcasterMX { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.transitions) { _global.mx.transitions = new Object(); } if (!_global.mx.transitions.BroadcasterMX) { var v1 = function () {}; mx.transitions.BroadcasterMX = v1; var v2 = v1.prototype; v1.initialize = function (o, dontCreateArray) { if (o.broadcastMessage != undefined) { delete o.broadcastMessage; } o.addListener = mx.transitions.BroadcasterMX.prototype.addListener; o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener; if (!dontCreateArray) { o._listeners = new Array(); } }; v2.addListener = function (o) { this.removeListener(o); if (this.broadcastMessage == undefined) { this.broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage; } return this._listeners.push(o); }; v2.removeListener = function (o) { var v2 = this._listeners; var v3 = v2.length; while (v3--) { if (v2[v3] == o) { v2.splice(v3, 1); if (!v2.length) { this.broadcastMessage = undefined; } return true; } } return false; }; v2.broadcastMessage = function () { var v5 = String(arguments.shift()); var v4 = this._listeners.concat(); var v6 = v4.length; var v3 = 0; while (v3 < v6) { v4[v3][v5].apply(v4[v3], arguments); ++v3; } }; v1.version = '1.1.0.52'; ASSetPropFlags(mx.transitions.BroadcasterMX.prototype, null, 1); } #endinitclip } movieClip 994 __Packages.mx.transitions.Tween { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.transitions) { _global.mx.transitions = new Object(); } if (!_global.mx.transitions.Tween) { var v1 = function (obj, prop, func, begin, finish, duration, useSeconds) { mx.transitions.OnEnterFrameBeacon.init(); if (!arguments.length) { return undefined; } this.obj = obj; this.prop = prop; this.begin = begin; this.__set__position(begin); this.__set__duration(duration); this.useSeconds = useSeconds; if (func) { this.func = func; } this.__set__finish(finish); this._listeners = []; this.addListener(this); this.start(); }; mx.transitions.Tween = v1; var v2 = v1.prototype; v2.__set__time = function (t) { this.prevTime = this._time; if (t > this.__get__duration()) { if (this.looping) { this.rewind(t - this._duration); this.update(); this.broadcastMessage('onMotionLooped', this); } else { if (this.useSeconds) { this._time = this._duration; this.update(); } this.stop(); this.broadcastMessage('onMotionFinished', this); } } else { if (t < 0) { this.rewind(); this.update(); } else { this._time = t; this.update(); } } return this.__get__time(); }; v2.__get__time = function () { return this._time; }; v2.__set__duration = function (d) { this._duration = (d == null || d <= 0) ? _global.Infinity : d; return this.__get__duration(); }; v2.__get__duration = function () { return this._duration; }; v2.__set__FPS = function (fps) { var v2 = this.isPlaying; this.stopEnterFrame(); this._fps = fps; if (v2) { this.startEnterFrame(); } return this.__get__FPS(); }; v2.__get__FPS = function () { return this._fps; }; v2.__set__position = function (p) { this.setPosition(p); return this.__get__position(); }; v2.setPosition = function (p) { this.prevPos = this._pos; this._pos = p; this.obj[this.prop] = this._pos; this.broadcastMessage('onMotionChanged', this, this._pos); updateAfterEvent(); }; v2.__get__position = function () { return this.getPosition(); }; v2.getPosition = function (t) { if (t == undefined) { t = this._time; } return this.func(t, this.begin, this.change, this._duration); }; v2.__set__finish = function (f) { this.change = f - this.begin; return this.__get__finish(); }; v2.__get__finish = function () { return this.begin + this.change; }; v2.continueTo = function (finish, duration) { this.begin = this.position; this.__set__finish(finish); if (duration != undefined) { this.__set__duration(duration); } this.start(); }; v2.yoyo = function () { this.continueTo(this.begin, this.__get__time()); }; v2.startEnterFrame = function () { if (this._fps == undefined) { _global.MovieClip.addListener(this); } else { this._intervalID = setInterval(this, 'onEnterFrame', 1000 / this._fps); } this.isPlaying = true; }; v2.stopEnterFrame = function () { if (this._fps == undefined) { _global.MovieClip.removeListener(this); } else { clearInterval(this._intervalID); } this.isPlaying = false; }; v2.start = function () { this.rewind(); this.startEnterFrame(); this.broadcastMessage('onMotionStarted', this); }; v2.stop = function () { this.stopEnterFrame(); this.broadcastMessage('onMotionStopped', this); }; v2.resume = function () { this.fixTime(); this.startEnterFrame(); this.broadcastMessage('onMotionResumed', this); }; v2.rewind = function (t) { this._time = (t == undefined) ? 0 : t; this.fixTime(); this.update(); }; v2.fforward = function () { this.__set__time(this._duration); this.fixTime(); }; v2.nextFrame = function () { if (this.useSeconds) { this.__set__time((getTimer() - this._startTime) / 1000); } else { this.__set__time(this._time + 1); } }; v2.onEnterFrame = function () { this.nextFrame(); }; v2.prevFrame = function () { if (!this.useSeconds) { this.__set__time(this._time - 1); } }; v2.toString = function () { return '[Tween]'; }; v2.fixTime = function () { if (this.useSeconds) { this._startTime = getTimer() - this._time * 1000; } }; v2.update = function () { this.__set__position(this.getPosition(this._time)); }; v1.version = '1.1.0.52'; v1.__initBeacon = mx.transitions.OnEnterFrameBeacon.init(); v1.__initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true); v2.func = function (t, b, c, d) { return c * t / d + b; }; v2.addProperty('FPS', v2.__get__FPS, v2.__set__FPS); v2.addProperty('duration', v2.__get__duration, v2.__set__duration); v2.addProperty('finish', v2.__get__finish, v2.__set__finish); v2.addProperty('position', v2.__get__position, v2.__set__position); v2.addProperty('time', v2.__get__time, v2.__set__time); ASSetPropFlags(mx.transitions.Tween.prototype, null, 1); } #endinitclip } movieClip 995 __Packages.Isometric { #initclip if (!_global.Isometric) { var v1 = function (x, z) { this.maxx = x; this.maxz = z; this.theta = 30; this.alpha = 45; this.theta *= 0.0174532925199433; this.alpha *= 0.0174532925199433; this.sinTheta = Math.sin(this.theta); this.cosTheta = Math.cos(this.theta); this.sinAlpha = Math.sin(this.alpha); this.cosAlpha = Math.cos(this.alpha); this.leeway = 10; }; _global.Isometric = v1; var v2 = v1.prototype; v2.mapToScreen = function (xpp, ypp, zpp) { var v3 = ypp; var v4 = xpp * this.cosAlpha + zpp * this.sinAlpha; var v2 = zpp * this.cosAlpha - xpp * this.sinAlpha; var v6 = v4; var v5 = v3 * this.cosTheta - v2 * this.sinTheta; return [v6, v5]; }; v2.mapToIsoWorld = function (screenX, screenY) { var v2 = (screenX / this.cosAlpha - screenY / this.sinAlpha * this.sinTheta) * (1 / (this.cosAlpha / this.sinAlpha + this.sinAlpha / this.cosAlpha)); var v3 = (1 / this.cosAlpha) * (screenX - v2 * this.sinAlpha); return [v3, v2]; }; v2.setLeeway = function (value) { this.leeway = value; }; v2.calculateDepth = function (x, y, z) { x = Math.abs(x) * this.leeway; y = Math.abs(y); z = Math.abs(z) * this.leeway; var v2 = this.maxx; var v4 = this.maxz; var v6 = v2 * (v4 - 1) + x; var v5 = v2 * (z - 1) + x + v6 * y; return v5; }; ASSetPropFlags(_global.Isometric.prototype, null, 1); } #endinitclip } frame 5 { stop(); createChannel('Music'); createChannel('SoundFX'); createChannel('Character'); createChannel('Enemy'); createChannel('Traps'); var sGameMode = ''; var maxX = 20; var maxZ = 11; var iso = new Isometric(maxX, maxZ); var iXBuffer = mcTile._width / 2; var iYBuffer = mcTile._height / 2; var iGridMaxX = 904; var iGridMinX = 231; var iGridMaxY = 202; var iGridMinY = -134; var iScore = 0; var iObjectCounter = 0; var oGameData = SharedObject.getLocal('coffeeGame_data'); _root.isMute = false; var sSortBy = 'RATING'; var sSortOrder = 'DESC'; var sSearchText = ''; var objectArray = new Array(); var durationArray = ['1:00', '1:30', '2:00']; var musicArray = ['Insert Coin', 'Glo Stick', 'Beanbag']; var dayArray = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']; var oKeyListener = new Object(); var oMouseListener = new Object(); var bShowCreateInstructions = false; var bShowPlayInstructions = false; loadObjectXML(); gotoAndStop('splash'); } button 486 { on (press) { this._visible = false; } } movieClip 489 { frame 1 { this._visible = false; bShield.enabled = false; bShield.useHandCursor = false; stop(); } } frame 10 { stop(); var bShowHints = true; btnCreate.onRelease = function () { _root.gotoAndPlay('create'); }; btnGallery.onRelease = function () { _root.gotoAndPlay('galleryInit'); }; stopSound('Music'); stopSound('SoundFX'); stopSound('Character'); stopSound('Enemy'); stopSound('Traps'); mcButtonMute.onPress = function () { if (_root.isMute == false) { muteSound('Music'); muteSound('SoundFX'); muteSound('Character'); muteSound('Enemy'); muteSound('Traps'); this.gotoAndStop('off'); _root.isMute = true; } else { unmuteSound('Music'); unmuteSound('SoundFX'); unmuteSound('Character'); unmuteSound('Enemy'); unmuteSound('Traps'); this.gotoAndStop('on'); _root.isMute = false; } }; } movieClip 492 { } movieClip 495 { } movieClip 498 { } movieClip 513 { } // unknown tag 88 length 62 button 521 { on (press) { getURL('http://www.hallmark.com/webapp/wcs/stores/servlet/article|10001| 10051|/HallmarkSite/hoops_yoyohome/Animations/HYY_FUNIMATIONS', '_blank'); } } movieClip 525 { frame 1 { stop(); } frame 2 { stop(); } } frame 15 { stop(); sGameMode = 'create'; if (bShowCreateInstructions == false) { mcInstructions.gotoAndPlay('show'); bShowCreateInstructions = true; } mcGame.mcGrid.setMask(mcGame.mcGameMask); buildWorld(maxX, maxZ); var bChilliBear = false; var bPiddles = false; var bMarshy = false; var bTestGame = false; btnShield._visible = false; btnCancel._visible = false; mcChooseCharacter.gotoAndStop('off'); mcTimerBar._visible = false; var currentGames = []; var trapsInGame = []; var bIsPlaying = false; var iScore = 0; var bCanMove = false; var bIsMoving = false; var bHasPaperShield = false; var bSprinkleDonut = false; var bOnRollyChair = false; var bIsRolling = false; var bInvisible = false; var bPauseGame = false; var character = new MovieClip(); var oDesiredTile = new MovieClip(); var iTotalDonuts = 0; var iDonutCount = 0; var sMusic; var sDayOfWeek; var bGameOver = false; var sActionItem = null; var sActionObject = null; var oActionLocation = null; var bDecoyActive = false; var iSpeedTimeout = 0; var iTrapTimeout = 0; var oActiveTrap = null; var iGridStartX; var iGridStartY; var iGridEndX; var iGridEndY; clearTimeout(iTrapTimeout); var sGameString = getLocalData('gameBuild', ''); if (sGameString != false) { populateGrid(sGameString); } setupSpeechBubble(); var bMouseDown = false; Mouse.removeListener(oMouseListener); oMouseListener.onMouseDown = function () { if (bObjectSelected == true && sCurrentObject != 'eraser') { dropObject(); } }; Mouse.addListener(oMouseListener); var bObjectSelected = true; btnDonut.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'donut'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; donutBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnDonut.onRollOver = function () { mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('donut')].description; resizeBubble(); mcSpeechBubble.iMode = 1; donutBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnDonut.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'donut') { donutBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnSprinkleDonut.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'sprinkleDonut'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; sprinkleDonutBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnSprinkleDonut.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('sprinkleDonut')].description; resizeBubble(); mcSpeechBubble.iMode = 1; sprinkleDonutBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnSprinkleDonut.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'sprinkleDonut') { sprinkleDonutBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnPaperShield.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'paperShield'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; paperShieldBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnPaperShield.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('paperShield')].description; resizeBubble(); mcSpeechBubble.iMode = 1; paperShieldBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnPaperShield.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'paperShield') { paperShieldBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnRollyChair.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'rollyChair'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; rollyChairBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnRollyChair.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('rollyChair')].description; resizeBubble(); mcSpeechBubble.iMode = 1; rollyChairBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnRollyChair.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'rollyChair') { rollyChairBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnBalloonDecoy.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'balloonDecoy'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; balloonDecoyBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnBalloonDecoy.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('balloonDecoy')].description; resizeBubble(); mcSpeechBubble.iMode = 1; balloonDecoyBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnBalloonDecoy.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'balloonDecoy') { balloonDecoyBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnCoffeeBeans.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'coffeeBeans'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; coffeeBeansBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnCoffeeBeans.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('coffeeBeans')].description; resizeBubble(); mcSpeechBubble.iMode = 1; coffeeBeansBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnCoffeeBeans.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'coffeeBeans') { coffeeBeansBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnTreatTable.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'treatTable'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; treatTableBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnTreatTable.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('treatTable')].description; resizeBubble(); mcSpeechBubble.iMode = 1; treatTableBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnTreatTable.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'treatTable') { treatTableBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnChilliBear.onPress = function () { if (bChilliBear != true) { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'chilliBear'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; chillBearBG.gotoAndStop('on'); _root.currentObject._visible = true; } }; btnChilliBear.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('chilliBear')].description; resizeBubble(); mcSpeechBubble.iMode = 1; if (bChilliBear != true) { chilliBearBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } } }; btnChilliBear.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'chilliBear') { chilliBearBG.gotoAndStop('off'); if (_root.currentObject != undefined) { _root.currentObject._visible = true; } } }; btnPiddles.onPress = function () { if (bPiddles != true) { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'piddles'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; piddlesBG.gotoAndStop('on'); _root.currentObject._visible = true; } }; btnPiddles.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('piddles')].description; resizeBubble(); mcSpeechBubble.iMode = 1; if (bPiddles != true) { piddlesBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } } }; btnPiddles.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'piddles') { piddlesBG.gotoAndStop('off'); if (_root.currentObject != undefined) { _root.currentObject._visible = true; } } }; btnMarshy.onPress = function () { if (bMarshy != true) { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'marshy'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; marshyBG.gotoAndStop('on'); _root.currentObject._visible = true; } }; btnMarshy.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('marshy')].description; resizeBubble(); mcSpeechBubble.iMode = 1; if (bMarshy != true) { marshyBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } } }; btnMarshy.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'marshy') { marshyBG.gotoAndStop('off'); if (_root.currentObject != undefined) { _root.currentObject._visible = true; } } }; btnBirthdayCake.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'birthdayCake'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; birthdayCakeBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnBirthdayCake.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('birthdayCake')].description; resizeBubble(); mcSpeechBubble.iMode = 1; birthdayCakeBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnBirthdayCake.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'birthdayCake') { birthdayCakeBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnRadio.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'radio'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; radioBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnRadio.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('radio')].description; resizeBubble(); mcSpeechBubble.iMode = 1; radioBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnRadio.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'radio') { radioBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnTelephone.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'telephone'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; telephoneBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnTelephone.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('telephone')].description; resizeBubble(); mcSpeechBubble.iMode = 1; telephoneBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnTelephone.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'telephone') { telephoneBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnCubicle.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'cubicle'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; cubicleBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnCubicle.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('cubicle')].description; resizeBubble(); mcSpeechBubble.iMode = 1; cubicleBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnCubicle.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'cubicle') { cubicleBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnPlant.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'plant'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; plantBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnPlant.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('plant')].description; resizeBubble(); mcSpeechBubble.iMode = 1; plantBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnPlant.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'plant') { plantBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnCoatRack.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'coatRack'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; coatRackBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnCoatRack.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = objectArray[lookupObjectByName('coatRack')].description; resizeBubble(); mcSpeechBubble.iMode = 1; coatRackBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnCoatRack.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'coatRack') { coatRackBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnEraser.onPress = function () { _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = 'eraser'; attachObject(sCurrentObject); mcSpeechBubble.iMode = 0; eraserBG.gotoAndStop('on'); _root.currentObject._visible = true; }; btnEraser.onRollOver = function () { _root.mcSpeechBubble.txtTitle.text = 'the Eraser allows you to remove specific items from the game board'; resizeBubble(); mcSpeechBubble.iMode = 1; eraserBG.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnEraser.onRollOut = function () { mcSpeechBubble.iMode = 0; if (sCurrentObject != 'eraser') { eraserBG.gotoAndStop('off'); } if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnInstructions.onRelease = function () { mcInstructions.gotoAndPlay('show'); }; btnReset.onRelease = function () { if (_root.currentObject != undefined) { _root.currentObject.removeMovieClip(); _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = ''; } mcResetPanel._visible = true; }; btnReset.onRollOver = function () { if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnReset.onRollOut = function () { if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnReset.onReleaseOutside = function () { if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnCancel.onRelease = function () { cancelTest(); }; btnBack.onRelease = function () { if (_root.currentObject != undefined) { _root.currentObject.removeMovieClip(); _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = ''; } destroySpeechBubble(); gotoAndStop('splash'); }; btnBack.onRollOver = function () { if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnBack.onRollOut = function () { if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnBack.onReleaseOutside = function () { if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnTestGame.onRelease = function () { if (_root.currentObject != undefined) { _root.currentObject.removeMovieClip(); _root[sCurrentObject + 'BG'].gotoAndStop('off'); sCurrentObject = ''; } testGame(); }; btnTestGame.onRollOver = function () { if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; btnTestGame.onRollOut = function () { if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnTestGame.onReleaseOutside = function () { if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; btnPlay.onRollOver = function () { this.gotoAndStop('on'); }; btnPlay.onRollOut = function () { this.gotoAndStop('off'); }; btnPlay.onReleaseOutside = function () { this.gotoAndStop('off'); }; btnPlay.onPress = function () { gotoAndStop('gallery'); }; mcMusicSelector.iCurrentPos = 0; mcMusicSelector.dataArray = musicArray; mcMusicSelector.isPaused = true; iMusic = mcMusicSelector.iCurrentPos; sMusic = musicArray[0].toUpperCase(); btnPreviewPause._visible = false; btnPreviewPlay._visible = true; mcMusicSelector.myAction = function (myPos, myTxt) { stopSound('Music'); btnPreviewPause._visible = false; btnPreviewPlay._visible = true; _root.iMusic = myPos; _root.sMusic = myTxt; }; btnPreviewPlay.onRelease = function () { stopSound('Music'); startSound('Music', sMusic + ' Loop', 100, 10); btnPreviewPause._visible = true; btnPreviewPlay._visible = false; }; btnPreviewPause.onRelease = function () { btnPreviewPause._visible = false; btnPreviewPlay._visible = true; stopSound('Music'); }; mcDurationSelector.iCurrentPos = 0; mcDurationSelector.dataArray = durationArray; iNumSeconds = 60; iDuration = mcDurationSelector.iCurrentPos; sDuration = mcDurationSelector.txtOption.text; mcDurationSelector.myAction = function (myPos, myTxt) { _root.iDuration = myPos; _root.sDuration = myTxt; switch (myPos) { case 1: iNumSeconds = 90; break; case 2: iNumSeconds = 120; break; default: iNumSeconds = 60; } }; } movieClip 528 { } movieClip 536 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 549 { frame 1 { var iCurrentPos = 0; txtOption.text = dataArray[iCurrentPos].toUpperCase(); btnRight.onPress = function () { if (iCurrentPos >= dataArray.length - 1) { iCurrentPos = 0; } else { ++iCurrentPos; } txtOption.text = dataArray[iCurrentPos].toUpperCase(); myAction(iCurrentPos, txtOption.text); }; btnLeft.onPress = function () { if (iCurrentPos > 0) { --iCurrentPos; } else { iCurrentPos = dataArray.length - 1; } txtOption.text = dataArray[iCurrentPos].toUpperCase(); myAction(iCurrentPos, txtOption.text); }; } } movieClip 555 { } movieClip 557 { } // unknown tag 88 length 156 movieClip 587 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 590 { } movieClip 592 { } movieClip 593 { } movieClip 595 { } movieClip 598 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 599 { } movieClip 600 { frame 1 { function moveGridUp() { iTweenAmount = 10; if (mcGrid._y + iTweenAmount > _root.iGridMaxY) { iTweenAmount = _root.iGridMaxY - mcGrid._y; } mcGrid._y += iTweenAmount; } function moveGridDown() { iTweenAmount = -10; if (mcGrid._y + iTweenAmount < _root.iGridMinY) { iTweenAmount = _root.iGridMinY - mcGrid._y; } mcGrid._y += iTweenAmount; } function moveGridLeft() { iTweenAmount = 10; if (mcGrid._x + iTweenAmount > _root.iGridMaxX) { iTweenAmount = _root.iGridMaxX - mcGrid._x; } mcGrid._x += iTweenAmount; } function moveGridRight() { iTweenAmount = -10; if (mcGrid._x + iTweenAmount < _root.iGridMinX) { iTweenAmount = _root.iGridMinX - mcGrid._x; } mcGrid._x += iTweenAmount; } function scaleGridUp() { iScaleAmount = 10; mcGrid._xscale += iScaleAmount; mcGrid._yscale += iScaleAmount; } function scaleGridDown() { iScaleAmount = -10; mcGrid._xscale += iScaleAmount; mcGrid._yscale += iScaleAmount; } } frame 1 { stop(); var bMoveGrid = false; var sDirection = ''; mcArrowUp.onEnterFrame = function () { if (bMoveGrid == true && sDirection == 'up') { moveGridUp(); } }; mcArrowUp.onRollOver = function () { this.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; mcArrowUp.onPress = function () { this.gotoAndStop('on'); bMoveGrid = true; sDirection = 'up'; }; mcArrowUp.onRelease = function () { this.gotoAndStop('over'); bMoveGrid = false; sDirection = ''; }; mcArrowUp.onReleaseOutside = function () { this.gotoAndStop('off'); bMoveGrid = false; sDirection = ''; if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; mcArrowUp.onRollOut = function () { this.gotoAndStop('off'); if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; mcArrowDown.onEnterFrame = function () { if (bMoveGrid == true && sDirection == 'down') { moveGridDown(); } }; mcArrowDown.onRollOver = function () { this.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; mcArrowDown.onPress = function () { this.gotoAndStop('on'); bMoveGrid = true; sDirection = 'down'; }; mcArrowDown.onRelease = function () { this.gotoAndStop('over'); bMoveGrid = false; sDirection = ''; }; mcArrowDown.onReleaseOutside = function () { this.gotoAndStop('off'); bMoveGrid = false; sDirection = ''; if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; mcArrowDown.onRollOut = function () { this.gotoAndStop('off'); if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; mcArrowLeft.onEnterFrame = function () { if (bMoveGrid == true && sDirection == 'left') { moveGridLeft(); } }; mcArrowLeft.onRollOver = function () { this.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; mcArrowLeft.onPress = function () { this.gotoAndStop('on'); bMoveGrid = true; sDirection = 'left'; }; mcArrowLeft.onRelease = function () { this.gotoAndStop('over'); bMoveGrid = false; sDirection = ''; }; mcArrowLeft.onReleaseOutside = function () { this.gotoAndStop('off'); bMoveGrid = false; sDirection = ''; if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; mcArrowLeft.onRollOut = function () { this.gotoAndStop('off'); if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; mcArrowRight.onEnterFrame = function () { if (bMoveGrid == true && sDirection == 'right') { moveGridRight(); } }; mcArrowRight.onRollOver = function () { this.gotoAndStop('over'); if (_root.currentObject != undefined) { _root.currentObject._visible = false; } }; mcArrowRight.onPress = function () { this.gotoAndStop('on'); bMoveGrid = true; sDirection = 'right'; }; mcArrowRight.onRelease = function () { this.gotoAndStop('over'); bMoveGrid = false; sDirection = ''; }; mcArrowRight.onReleaseOutside = function () { this.gotoAndStop('off'); bMoveGrid = false; sDirection = ''; if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; mcArrowRight.onRollOut = function () { this.gotoAndStop('off'); if (_root.currentObject != undefined) { _root.currentObject._visible = true; } }; } } movieClip 616 { } movieClip 641 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 644 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 646 { } movieClip 649 { } movieClip 651 { } movieClip 652 { frame 1 { btnPlay.onRelease = function () { gotoAndPlay('characters'); }; stop(); } frame 5 { btnPlay.onRelease = function () { gotoAndPlay('characters'); }; stop(); } frame 10 { btnPlay.onRelease = function () { _root.mcCutScenes.gotoAndStop('off'); _root.showGame(_root.iGameIndex); gotoAndPlay('characters'); }; stop(); } frame 15 { btnPlay.onRelease = function () { _root.mcCutScenes.gotoAndStop('off'); _root.showGame(_root.iGameIndex); gotoAndPlay('characters'); }; stop(); } frame 20 { btnOK.onRelease = function () { gotoAndStop('off'); }; _root.startSound('SoundFX', 'sndNotAllowed', 100, 1); stop(); } frame 25 { btnPublish.onRelease = function () { gotoAndStop('off'); _root.mcSavePanel.gotoAndStop('on'); _root.mcSavePanel._visible = true; }; stop(); } frame 31 { stop(); } frame 36 { clearTimeout(_root.iTrapTimeout); play(); } frame 45 { mcHoopsID.onRollOver = function () { this.gotoAndStop('over'); }; mcHoopsID.onRollOut = function () { this.gotoAndStop('off'); }; mcHoopsID.onPress = function () { this.gotoAndStop('on'); }; mcHoopsID.onReleaseOutside = function () { this.gotoAndStop('off'); }; mcHoopsID.onRelease = function () { this.gotoAndStop('off'); ok = _root.initGame('Hoops'); gotoAndPlay('countdown'); }; mcYoyoID.onRollOver = function () { this.gotoAndStop('over'); }; mcYoyoID.onRollOut = function () { this.gotoAndStop('off'); }; mcYoyoID.onPress = function () { this.gotoAndStop('on'); }; mcYoyoID.onReleaseOutside = function () { this.gotoAndStop('off'); }; mcYoyoID.onRelease = function () { this.gotoAndStop('off'); ok = _root.initGame('Yoyo'); gotoAndPlay('countdown'); }; stop(); } frame 51 { _root.startSound('Music', _root.sMusic + ' Intro', 50, 1); _root.queueSound('Music', _root.sMusic + ' Loop', 50, 9999, null); } frame 81 { _root.startSound('SoundFX', 'sndCountdown', 100, 1); } frame 111 { _root.startSound('SoundFX', 'sndCountdown', 100, 1); } frame 141 { _root.startSound('SoundFX', 'sndCountdown', 100, 1); } frame 171 { gotoAndStop('off'); _root.startGame(); } } movieClip 655 { } movieClip 660 { } movieClip 661 { frame 1 { stop(); } frame 5 { play(); } frame 25 { stop(); } frame 30 { _root.bDonutPulse = true; play(); } frame 80 { _root.bDonutPulse = false; gotoAndStop('init'); } } movieClip 663 { } movieClip 667 { } movieClip 669 { } movieClip 673 { } movieClip 680 { } movieClip 685 { frame 143 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 691 { } movieClip 692 { frame 134 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 693 { frame 162 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 699 { } movieClip 701 { } movieClip 712 { frame 456 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 714 { } movieClip 741 { frame 165 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 751 { frame 212 { this._parent.gotoAndStop('off'); } } movieClip 752 { frame 223 { this._parent.gotoAndStop('off'); } } movieClip 755 { } movieClip 758 { } movieClip 762 { } movieClip 765 { } movieClip 768 { } movieClip 770 { } movieClip 773 { frame 246 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 774 { } movieClip 777 { frame 203 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 779 { frame 195 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 784 { } movieClip 786 { frame 168 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 789 { } movieClip 791 { } movieClip 794 { } movieClip 795 { } movieClip 799 { } movieClip 800 { frame 143 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 802 { } movieClip 819 { frame 206 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 821 { } movieClip 826 { frame 382 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 829 { } movieClip 836 { frame 134 { _root.iEnemySetTimeout = setTimeout(_root.removeEnemyPause, 3000); _root.unpauseGame(); } } movieClip 849 { frame 253 { this._parent.gotoAndStop('off'); } } movieClip 854 { frame 296 { this._parent.gotoAndStop('off'); } } movieClip 855 { frame 1 { stop(); _root.bCutScene = false; if (_root.isMute == false) { _root.unmuteSound('Music'); } } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } frame 6 { stop(); } frame 7 { stop(); } frame 8 { stop(); } frame 9 { stop(); } frame 10 { stop(); } frame 11 { stop(); } frame 15 { stop(); } frame 16 { stop(); } frame 17 { stop(); } frame 18 { stop(); } frame 19 { stop(); } frame 20 { stop(); } frame 21 { stop(); } frame 22 { stop(); } frame 23 { stop(); } frame 24 { stop(); } } button 858 { on (press) { this._visible = false; } } movieClip 861 { frame 1 { this._visible = false; bShield.enabled = false; bShield.useHandCursor = false; bReset.onRelease = function () { _root.resetGrid(); this._parent._visible = false; }; stop(); } } button 864 { on (release) { this.gotoAndStop('off'); } } button 865 { on (release) { _root.cancelTest(); this.gotoAndStop('off'); } } // unknown tag 88 length 68 button 880 { on (press) { mcSelector_1._visible = true; } } button 881 { on (press) { mcSelector_2._visible = true; } } button 882 { on (press) { mcSelector_3._visible = true; } } button 886 { on (release) { doRandomName(); } } button 888 { on (release) { if (this.gSongName == '' || this.gSongName == undefined || this.gSongName == 'Untitled Song') { _root.mcAlertBox.headerTxt = 'OOPS.'; _root.mcAlertBox.messageTxt = 'PLEASE NAME YOUR GAME.'; _root.mcAlertBox._visible = true; } else { if (this.email == '' || this.email == undefined) { _root.mcAlertBox.headerTxt = 'OOPS.'; _root.mcAlertBox.messageTxt = 'PLEASE ENTER YOUR EMAIL.'; _root.mcAlertBox._visible = true; } else { tArr = this.email.split('@'); tStr1 = tArr[0]; tArr2 = tArr[1].split('.'); tStr2 = tArr2[0]; tStr3 = tArr2[1]; if (tArr.length == 2 && tArr2.length == 2 && tStr1.length >= 1 && tStr2.length >= 1 && tStr3.length >= 1) { _root.gSongName = this.gSongName; _root.gSongCreator = this.email; saveGrid(); } else { _root.mcAlertBox.headerTxt = 'OOPS.'; _root.mcAlertBox.messageTxt = 'PLEASE CHECK YOUR EMAIL.'; _root.mcAlertBox._visible = true; } } } } } button 889 { on (release) { _root.cancelTest(); } } // unknown tag 88 length 63 movieClip 901 { } movieClip 902 { } button 906 { on (press) { this.scrollstep = 28; } on (release, releaseOutside) { this.scrollstep = 0; } } button 907 { on (press) { this.scrollstep = -28; } on (release, releaseOutside) { this.scrollstep = 0; } } button 910 { on (press) { startDrag('', false, 75.5, -142, 75.5, 140); _parent.scrolldrag = 1; } on (release, releaseOutside) { stopDrag(); _parent.scrolldrag = 0; } } movieClip 911 { } movieClip 912 { } button 913 { on (release) { this.gotoAndStop('off'); _root.gotoAndStop('galleryInit'); } } movieClip 915 { frame 1 { function saveGrid() { _root.cancelTest(); var v2 = new LoadVars(); var v3 = new LoadVars(); v3.onLoad = function (success) { _root.resetGrid(); _root.saveLocalData('gameBuild', '', null); gotoAndStop('publishResult'); }; v2.emailAddress = _root.gSongCreator; v2.title = _root.gSongName.toUpperCase(); v2.duration = _root.iNumSeconds; v2.music = _root.iMusic; v2.dayOfWeek = 0; v2.gameXML = _root.generateGridData(); v2.sendAndLoad('http://games.hoopsandyoyo.com/gameCreator/scripts/saveGame.ashx', v3, 'POST'); } } frame 1 { stop(); btnShield.enabled = false; btnShield.useHandCursor = false; } frame 5 { btnShield.enabled = false; btnShield.useHandCursor = false; } frame 10 { function doRandomName() { numWords = random(2) + 1; tName = ''; t1 = Name1Arr[random(Name1Arr.length)]; tName = t1; namePart1 = t1; if (numWords == 2) { t2 = Name2Arr[random(Name2Arr.length)]; tName += ' ' + t2; namePart2 = t2; } else { namePart2 = ' select '; } t3 = Name3Arr[random(Name3Arr.length)]; tName += ' ' + t3; namePart3 = t3; this.gSongName = tName; this.txtGameName.text = '"' + tName + '"'; } stop(); btnShield.enabled = false; btnShield.useHandCursor = false; _root.nameChangePending = false; Name1Arr = new Array('awesome', 'cah-yoooot', 'chillin\'', 'crazy', 'double', 'freaky', 'hyper', 'niiiice', 'mucho', 'makin\'', 'twinkly', 'waaaay', 'humongous', 'spicy', 'super', 'stretchy', 'frrresh', 'go-go', 'seriously', 'smooooth', 'suh-weeet', 'totally', 'mix-it-up', 'whirly', 'red-hot', 'porcelain', 'workday', 'techno', 'recycled', 'cubicle', 'slow-motion', 'pure', 'slippery', 'crafty', 'mocha', 'vanilla', 'caffeinated', 'classic', 'funky', 'show-offy', 'one', 'my', 'cream-and-sugar', 'swirly', 'bubblin\'', 'washed-up', 'frosted', 'positively', 'bright', 'rolling', 'rip-roarin\'', 'random', 'intense', 'outta-this-world', 'color-me-fun', 'hip', 'icy', 'lovey-dovey', 'stompin\'', 'hug-muffin', 'goin\'-my-way', 'sorry-sack-of-meat', 'superstarry', 'flashy', 'whoa', 'flirty', 'big-shot', 'solo', 'don\'t-miss-it', 'born-to-dance'); Name2Arr = new Array('bendy', 'cookin\'', 'dizzy', 'FUNtastic', 'hip-hop', 'jazzy', 'kickin\'', 'extreme', 'hoops-i-fied', 'happy', 'twisted', 'fantastical', 'hot', 'little', 'exploding', 'rockin\'', 'spinnin\'', 'outrageous', 'steppin\'', 'genius', 'sizzling', 'watch-me-now', 'go-time', 'yoyo\'d', 'spinning', 'clean', 'copycat', 'paper-pushin\'', 'trash-talkin\'', 'free', 'flow', 'slapdash', 'tricky', 'sly', 'kitty', 'java', 'shrug', 'unforgettable', 'stage', 'flash', 'dazzlelicious', 'lattelicious', 'plain-jane', 'whirly', 'underwater', 'wild', 'sprinkly', 'sugar-high', 'guaranteed', 'shaky', 'rumblin\'', 'shy', 'twister', 'mind-blowing', 'zig-zaggy', 'earth-shaking', 'chilled', 'brain', 'hottie-hot-hot', 'cuddly', 'push-my-buttons', 'polka-dotty', 'spotlight', 'lightning', 'dizzy', 'marvy', 'jumbly', 'i-was-here', 'natural', 'boogie-fied'); Name3Arr = new Array('boogie-thing', 'noodle', 'mania', 'bop', 'chaos', 'blast', 'donut', 'slidestep', 'goodness', 'flip-flop', 'fancy-dance', 'grooves', 'hotness', 'jelly', 'magicfeet', 'mooooves', 'danceparty', 'jam', 'jivefest', 'shakes', 'wiggles', 'pretzel', 'shuffle', 'stuff', 'marshmallow', 'jiggle', 'mix', 'machine', 'breakdance', 'escape', 'break-away', 'dodge', 'robot', 'catapult', 'jolt', 'joggle', 'act', 'charade', 'flavor', 'perfection', 'masterpiece', 'drama', 'backstroke', 'swim', 'storm', 'sweetness', 'delight', 'landing', 'shakes', 'wobbles', 'blizzard', 'thunder', 'slide', 'recess', 'coffeetime', 'freeze', 'squeeze-machine', 'bear hug', 'sizzler', 'eye-candy', 'whatever', 'whatchamacallit', 'flash', 'bolt', 'heartbreaker', 'fabulosity', 'mega-dance', 'washout', 'art', 'mover-and-shaker'); doInitScroller = function () { this.entry_position_y = 0; i = 0; while (i < this.namesArr.length) { clipname = 'list_entry_' + i; duplicateMovieClip(this.scroll_panel.list_entry, clipname, i); this.scroll_panel[clipname]._x = 0; this.scroll_panel[clipname]._y = this.entry_position_y; this.scroll_panel[clipname].myLabel = this.namesArr[i]; this.scroll_panel[clipname].txtLabel.text = this.namesArr[i]; this.scroll_panel[clipname].myParent = this; this.scroll_panel[clipname].bButton.onRelease = function () { this._parent.myParent._visible = false; _root.mcSavePanel['namePart' + this._parent.myParent.myId] = this._parent.myLabel; _root.mcSavePanel.doChangeNamer(); }; this.entry_position_y += 14; ++i; } this.panel_origin = this.scroll_panel._y; this.panel_height = this.namesArr.length * 14 + 2; this.scrollamount = 330; this.minscrollposition = this.panel_origin; this.maxscrollposition = this.panel_origin - this.panel_height + this.scrollamount; this.maxscrolldist = this.minscrollposition - this.maxscrollposition; this.scrollstep = 0; this.scrolldrag = 0; this.onEnterFrame = doScroller; }; doScroller = function () { if (this.scrollstep != 0) { this.potential_y = this.scroll_panel._y + this.scrollstep; if (this.potential_y >= this.minscrollposition) { this.new_y = this.minscrollposition; } else { if (this.potential_y <= this.maxscrollposition) { this.new_y = this.maxscrollposition; } else { this.new_y = this.potential_y; } } this.scroll_panel._y = this.new_y; this.currentscrolldist = this.minscrollposition - this.new_y; this.newoffset = (this.currentscrolldist / this.maxscrolldist) * 282; this.scrollbar_marker._y = -142 + this.newoffset; } else { if (this.scrolldrag != 0) { this.minscrollposition_bar = -142; this.maxscrollposition_bar = 140; this.maxscrolldist_bar = 282; this.currentscrolldist_bar = Math.abs(this.scrollbar_marker._y - this.minscrollposition_bar); this.newoffset = (this.currentscrolldist_bar / this.maxscrolldist_bar) * this.maxscrolldist; this.scroll_panel._y = this.panel_origin - this.newoffset; } } }; namePart1 = ' select '; mcSelector_1._visible = false; mcSelector_1.myId = 1; mcSelector_1.namesArr = Name1Arr; mcSelector_1.onEnterFrame = doInitScroller; namePart2 = ' select '; mcSelector_2._visible = false; mcSelector_2.myId = 2; mcSelector_2.namesArr = Name2Arr; mcSelector_2.onEnterFrame = doInitScroller; namePart3 = ' select '; mcSelector_3._visible = false; mcSelector_3.myId = 3; mcSelector_3.namesArr = Name3Arr; mcSelector_3.onEnterFrame = doInitScroller; this.gSongName = ''; txtGameName.text = ''; doChangeNamer = function () { tName1 = namePart1; tName2 = namePart2; tName3 = namePart3; if (namePart1 == ' select ' && namePart2 == ' select ' && namePart3 == ' select ') { tName = ''; txtGameName.text = ''; _root.mcAlertBox.headerTxt = 'OOPS.'; _root.mcAlertBox.messageTxt = 'PLEASE SELECT A NAME FOR YOUR SONG.'; _root.mcAlertBox._visible = true; } else { tName = ''; if (namePart1 != ' select ') { tName += tName1; } if (namePart2 != ' select ') { if (tName != '') { tName += ' ' + tName2; } else { tName += tName2; } } if (namePart3 != ' select ') { if (tName != '') { tName += ' ' + tName3; } else { tName += tName3; } } this.gSongName = tName; this.txtGameName.text = '"' + tName + '"'; } }; } instance mcSelector_1 of movieClip 912 { onClipEvent (mouseDown) { if (this._visible == true and (_xmouse <= -83 or _xmouse >= 83)) { this._visible = false; } } } instance mcSelector_2 of movieClip 912 { onClipEvent (mouseDown) { if (this._visible == true and (_xmouse <= -83 or _xmouse >= 83)) { this._visible = false; } } } instance mcSelector_3 of movieClip 912 { onClipEvent (mouseDown) { if (this._visible == true and (_xmouse <= -83 or _xmouse >= 83)) { this._visible = false; } } } frame 11 { stop(); } } // unknown tag 88 length 62 movieClip 928 { frame 1 { stop(); } frame 5 { bShield.enabled = false; bShield.useHandCursor = false; btnOk.onRelease = function () { gotoAndPlay('init'); }; stop(); } } movieClip 930 { } movieClip 932 { } // unknown tag 88 length 179 movieClip 935 { frame 1 { stop(); } } frame 20 { stop(); var gameArray = new Array(); var iCurrentIndex = 0; var iGamesPerPage = 8; var iGameIndex; var sEncGameID = ''; var sSearchText = ''; var sSortBy = 'RATING'; var sSortDirection = 'DESC'; loadGalleryXML(sSearchText); } frame 21 { play(); } frame 22 { stop(); sGameMode = 'play'; if (bShowPlayInstructions == false) { mcInstructions.gotoAndPlay('show'); bShowPlayInstructions = true; } var currentGames = []; var trapsInGame = []; var bIsPlaying = false; var iScore = 0; var bCanMove = false; var bIsMoving = false; var bHasPaperShield = false; var bSprinkleDonut = false; var bOnRollyChair = false; var bIsRolling = false; var bInvisible = false; var bPauseGame = false; var character = new MovieClip(); var oDesiredTile = new MovieClip(); var iTotalDonuts = 0; var iDonutCount = 0; var sMusic; var sDayOfWeek; var bGameOver = false; var sActionItem = null; var sActionObject = null; var oActionLocation = null; var oEnemyTarget = new Object(); var iSpeedTimeout = 0; var iTrapTimeout = 0; var oActiveTrap = null; var iGridStartX; var iGridStartY; var iGridEndX; var iGridEndY; btnInstructions.onRelease = function () { if (_root.bIsPlaying == true) { _root.pauseTime = getTimer(); _root.bTimerPaused = true; _root.bPauseGame = true; } mcInstructions.gotoAndPlay('show'); }; displayGames(iCurrentIndex); if (mcSpeechBubble == undefined) { setupSpeechBubble(); } mcTimerBar._visible = false; btnBack.onRelease = function () { cleanupStage(); stopSound('Music'); stopSound('SoundFX'); stopSound('Character'); stopSound('Enemy'); destroySpeechBubble(); gotoAndStop('splash'); }; btnRandomGame.onRollOver = function () { this.gotoAndStop('on'); }; btnRandomGame.onRollOut = function () { this.gotoAndStop('off'); }; btnRandomGame.onReleaseOutside = function () { this.gotoAndStop('off'); }; btnRandomGame.onPress = function () { showGame(-1); }; btnMakeMyOwn.onRollOver = function () { this.gotoAndStop('on'); }; btnMakeMyOwn.onRollOut = function () { this.gotoAndStop('off'); }; btnMakeMyOwn.onReleaseOutside = function () { this.gotoAndStop('off'); }; btnMakeMyOwn.onPress = function () { gotoAndStop('create'); }; btnSearch.onRelease = function () { if (txtSearch.text != '' && txtSearch.text != undefined) { sSearchText = txtSearch.text; cleanupStage(); loadGalleryXML(sSearchText); } else { sSearchText = ''; } }; btnShowAll.onRelease = function () { sSearchText = ''; cleanupStage(); loadGalleryXML(sSearchText); }; btnRefresh.onRelease = function () { refreshGames(); }; if (bShowHints == false) { mcHelpToggle.gotoAndStop(2); } mcGame.mcGrid.setMask(mcGame.mcGameMask); btnRating.gotoAndStop('on'); btnDate.onRollOver = function () { if (sSortBy != 'DATE') { this.gotoAndStop('over'); } }; btnDate.onRollOut = function () { if (sSortBy != 'DATE') { this.gotoAndStop('off'); } }; btnDate.onReleaseOutside = function () { if (sSortBy != 'DATE') { this.gotoAndStop('off'); } }; btnDate.onRelease = function () { refreshGames('DATE', this); }; btnRating.onRollOver = function () { if (sSortBy != 'RATING') { this.gotoAndStop('over'); } }; btnRating.onRollOut = function () { if (sSortBy != 'RATING') { this.gotoAndStop('off'); } }; btnRating.onReleaseOutside = function () { if (sSortBy != 'RATING') { this.gotoAndStop('off'); } }; btnRating.onRelease = function () { refreshGames('RATING', this); }; btnVotes.onRollOver = function () { if (sSortBy != 'VOTES') { this.gotoAndStop('over'); } }; btnVotes.onRollOut = function () { if (sSortBy != 'VOTES') { this.gotoAndStop('off'); } }; btnVotes.onReleaseOutside = function () { if (sSortBy != 'VOTES') { this.gotoAndStop('off'); } }; btnVotes.onRelease = function () { refreshGames('VOTES', this); }; } movieClip 941 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 967 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 969 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 970 { frame 1 { stop(); } } movieClip 977 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } } movieClip 978 { frame 1 { stop(); btn1.onRollOver = function () { mcRatingStars.gotoAndStop(1); }; btn1.onRollOut = function () { mcRatingStars.gotoAndStop(1); }; btn2.onRollOver = function () { mcRatingStars.gotoAndStop(2); }; btn2.onRollOut = function () { mcRatingStars.gotoAndStop(1); }; btn3.onRollOver = function () { mcRatingStars.gotoAndStop(3); }; btn3.onRollOut = function () { mcRatingStars.gotoAndStop(1); }; btn4.onRollOver = function () { mcRatingStars.gotoAndStop(4); }; btn4.onRollOut = function () { mcRatingStars.gotoAndStop(1); }; btn5.onRollOver = function () { mcRatingStars.gotoAndStop(5); }; btn5.onRollOut = function () { mcRatingStars.gotoAndStop(1); }; btn1.onPress = function () { _root.rateGame(1); }; btn2.onPress = function () { _root.rateGame(2); }; btn3.onPress = function () { _root.rateGame(3); }; btn4.onPress = function () { _root.rateGame(4); }; btn5.onPress = function () { _root.rateGame(5); }; } frame 2 { stop(); } } movieClip 981 { frame 1 { stop(); } frame 2 { stop(); } } movieClip 991 { frame 1 { stop(); } frame 5 { bShield.enabled = false; bShield.useHandCursor = false; btnOk.onRelease = function () { _root.startTime += getTimer() - _root.pauseTime; _root.bTimerPaused = false; _root.bPauseGame = false; gotoAndPlay('init'); }; stop(); } }




http://swfchan.com/51/254438/info.shtml
Created: 19/8 -2023 00:01:33 Last modified: 19/8 -2023 00:01:33 Server time: 20/05 -2024 21:45:58