Frame 1
function checkProgress() {
if (getBytesTotal() > 40) {
pctLoaded = Math.floor((100 * getBytesLoaded()) / getBytesTotal());
preloader_mc.progressBar_mc.gotoAndStop(pctLoaded);
preloader_mc.progress_txt.text = pctLoaded + "% loaded";
if (pctLoaded == 100) {
clearInterval(checkProgress_itvl);
gotoAndStop ("site");
}
}
}
var pctLoaded;
var checkProgress_itvl = setInterval(checkProgress, 40);
stop();
Frame 40
var site = new Site(this);
stop();
Symbol 6 MovieClip [props] Frame 1
stop();
Symbol 13 MovieClip Frame 1
stop();
Symbol 54 MovieClip [gizmo] Frame 1
stop();
Symbol 61 MovieClip [bathroomBall_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 61 MovieClip [bathroomBall_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 61 MovieClip [bathroomBall_mc] Frame 18
gizmo_mc._visible = false;
Symbol 61 MovieClip [bathroomBall_mc] Frame 20
stop();
Symbol 64 MovieClip [bathroomPot_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 64 MovieClip [bathroomPot_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 64 MovieClip [bathroomPot_mc] Frame 13
gizmo_mc._visible = false;
Symbol 64 MovieClip [bathroomPot_mc] Frame 20
stop();
Symbol 68 MovieClip [blind_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 68 MovieClip [blind_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 68 MovieClip [blind_mc] Frame 18
gizmo_mc._visible = false;
Symbol 68 MovieClip [blind_mc] Frame 20
stop();
Symbol 71 MovieClip [boat_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 71 MovieClip [boat_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 71 MovieClip [boat_mc] Frame 15
gizmo_mc._visible = false;
Symbol 74 MovieClip [ducky_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 74 MovieClip [ducky_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 74 MovieClip [ducky_mc] Frame 15
gizmo_mc._visible = false;
Symbol 77 MovieClip [magazine_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 77 MovieClip [magazine_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 77 MovieClip [magazine_mc] Frame 19
gizmo_mc._visible = false;
Symbol 77 MovieClip [magazine_mc] Frame 20
stop();
Symbol 80 MovieClip [mirror_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 80 MovieClip [mirror_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 80 MovieClip [mirror_mc] Frame 16
gizmo_mc._visible = false;
Symbol 83 MovieClip [plunger_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 83 MovieClip [plunger_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 83 MovieClip [plunger_mc] Frame 19
gizmo_mc._visible = false;
Symbol 83 MovieClip [plunger_mc] Frame 20
stop();
Symbol 87 MovieClip [shark_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 87 MovieClip [shark_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 87 MovieClip [shark_mc] Frame 18
gizmo_mc._visible = false;
Symbol 87 MovieClip [shark_mc] Frame 20
stop();
Symbol 90 MovieClip [showercurtain_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 90 MovieClip [showercurtain_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 90 MovieClip [showercurtain_mc] Frame 19
gizmo_mc._visible = false;
Symbol 90 MovieClip [showercurtain_mc] Frame 20
stop();
Symbol 93 MovieClip [washandje_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 93 MovieClip [washandje_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 93 MovieClip [washandje_mc] Frame 18
gizmo_mc._visible = false;
Symbol 93 MovieClip [washandje_mc] Frame 20
stop();
Symbol 96 MovieClip [wcpaper_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 96 MovieClip [wcpaper_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 96 MovieClip [wcpaper_mc] Frame 19
gizmo_mc._visible = false;
Symbol 96 MovieClip [wcpaper_mc] Frame 25
stop();
Symbol 101 MovieClip [bed] Frame 1
stop();
Symbol 101 MovieClip [bed] Frame 2
gizmo_mc._alpha = 100;
Symbol 101 MovieClip [bed] Frame 16
gizmo_mc._visible = false;
Symbol 114 MovieClip [bedroomPainting1_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 114 MovieClip [bedroomPainting1_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 114 MovieClip [bedroomPainting1_mc] Frame 20
gizmo_mc._visible = false;
Symbol 117 MovieClip [bedroomPainting2_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 117 MovieClip [bedroomPainting2_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 117 MovieClip [bedroomPainting2_mc] Frame 13
gizmo_mc._visible = false;
Symbol 122 MovieClip [book_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 122 MovieClip [book_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 122 MovieClip [book_mc] Frame 19
gizmo_mc._visible = false;
Symbol 122 MovieClip [book_mc] Frame 20
stop();
Symbol 140 MovieClip [closet_mc] Frame 1
gizmo_mc._alpha = 0;
Symbol 140 MovieClip [closet_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 140 MovieClip [closet_mc] Frame 34
gizmo_mc._visible = false;
Symbol 140 MovieClip [closet_mc] Frame 35
stop();
Symbol 143 MovieClip [clothing_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 143 MovieClip [clothing_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 143 MovieClip [clothing_mc] Frame 19
gizmo_mc._visible = false;
Symbol 143 MovieClip [clothing_mc] Frame 20
stop();
Symbol 146 MovieClip [doubledecker_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 146 MovieClip [doubledecker_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 146 MovieClip [doubledecker_mc] Frame 19
gizmo_mc._visible = false;
Symbol 156 MovieClip [drdrawer_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 156 MovieClip [drdrawer_mc] Frame 14
gizmo_mc._alpha = 100;
Symbol 156 MovieClip [drdrawer_mc] Frame 32
gizmo_mc._visible = false;
Symbol 156 MovieClip [drdrawer_mc] Frame 33
stop();
Symbol 163 MovieClip [football_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 163 MovieClip [football_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 163 MovieClip [football_mc] Frame 19
gizmo_mc._visible = false;
Symbol 163 MovieClip [football_mc] Frame 20
stop();
Symbol 168 MovieClip [monster_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 168 MovieClip [monster_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 168 MovieClip [monster_mc] Frame 13
gizmo_mc._visible = false;
Symbol 168 MovieClip [monster_mc] Frame 20
stop();
Symbol 177 MovieClip [pad_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 177 MovieClip [pad_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 177 MovieClip [pad_mc] Frame 22
gizmo_mc._visible = false;
Symbol 177 MovieClip [pad_mc] Frame 23
stop();
Symbol 181 MovieClip [topOfWardrobe] Frame 1
ladder_mc._visible = false;
stop();
Symbol 181 MovieClip [topOfWardrobe] Frame 2
stop();
Symbol 184 MovieClip [ted_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 184 MovieClip [ted_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 184 MovieClip [ted_mc] Frame 24
gizmo_mc._visible = false;
stop();
Symbol 193 MovieClip [ted2_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 193 MovieClip [ted2_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 193 MovieClip [ted2_mc] Frame 20
gizmo_mc._visible = false;
Symbol 207 MovieClip Frame 11
_parent._alpha = _parent._alpha / 3;
stop();
Symbol 208 MovieClip [droplet] Frame 1
stop();
Symbol 215 MovieClip Frame 1
stop();
Symbol 216 MovieClip [WB] Frame 1
stop();
Symbol 219 MovieClip [bear_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 219 MovieClip [bear_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 219 MovieClip [bear_mc] Frame 23
gizmo_mc._visible = false;
Symbol 219 MovieClip [bear_mc] Frame 25
stop();
Symbol 228 MovieClip [hallway_pic] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 228 MovieClip [hallway_pic] Frame 2
gizmo_mc._alpha = 100;
Symbol 228 MovieClip [hallway_pic] Frame 13
gizmo_mc._visible = false;
Symbol 235 MovieClip [hat_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 235 MovieClip [hat_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 235 MovieClip [hat_mc] Frame 13
gizmo_mc._visible = false;
Symbol 235 MovieClip [hat_mc] Frame 20
stop();
Symbol 238 MovieClip [map_mc] Frame 1
stop();
Symbol 238 MovieClip [map_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 238 MovieClip [map_mc] Frame 16
gizmo_mc._visible = false;
Symbol 238 MovieClip [map_mc] Frame 20
stop();
Symbol 242 MovieClip [painting2_mc] Frame 1
var sounds = new Sound(this);
sounds.setVolume(70);
stop();
Symbol 242 MovieClip [painting2_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 242 MovieClip [painting2_mc] Frame 17
gizmo_mc._visible = false;
Symbol 242 MovieClip [painting2_mc] Frame 20
stop();
Symbol 244 MovieClip [painting5_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 244 MovieClip [painting5_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 244 MovieClip [painting5_mc] Frame 17
gizmo_mc._visible = false;
Symbol 249 MovieClip [rugCorner1] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 249 MovieClip [rugCorner1] Frame 2
gizmo_mc._alpha = 100;
Symbol 249 MovieClip [rugCorner1] Frame 26
gizmo_mc._visible = false;
Symbol 256 MovieClip [rugCorner2] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 256 MovieClip [rugCorner2] Frame 2
gizmo_mc._alpha = 100;
Symbol 256 MovieClip [rugCorner2] Frame 25
gizmo_mc._visible = false;
Symbol 259 MovieClip [shirt_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 259 MovieClip [shirt_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 259 MovieClip [shirt_mc] Frame 13
gizmo_mc._visible = false;
Symbol 259 MovieClip [shirt_mc] Frame 20
stop();
Symbol 267 MovieClip [treePic] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 267 MovieClip [treePic] Frame 2
gizmo_mc._alpha = 100;
Symbol 267 MovieClip [treePic] Frame 24
gizmo_mc._visible = false;
stop();
Symbol 269 MovieClip [vac] Frame 1
var sounds = new Sound(this);
sounds.setVolume(100);
gizmo_mc._alpha = 0;
stop();
Symbol 269 MovieClip [vac] Frame 2
gizmo_mc._alpha = 100;
Symbol 269 MovieClip [vac] Frame 14
sounds.setVolume(50);
Symbol 269 MovieClip [vac] Frame 28
gizmo_mc._visible = false;
stop();
Symbol 275 MovieClip [wool] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 275 MovieClip [wool] Frame 2
gizmo_mc._alpha = 100;
Symbol 275 MovieClip [wool] Frame 25
gizmo_mc._visible = false;
stop();
Symbol 279 MovieClip [ball_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 279 MovieClip [ball_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 279 MovieClip [ball_mc] Frame 18
gizmo_mc._visible = false;
Symbol 279 MovieClip [ball_mc] Frame 20
stop();
Symbol 285 MovieClip [door_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 285 MovieClip [door_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 285 MovieClip [door_mc] Frame 19
gizmo_mc._visible = false;
Symbol 285 MovieClip [door_mc] Frame 20
stop();
Symbol 293 MovieClip [drawer_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 293 MovieClip [drawer_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 293 MovieClip [drawer_mc] Frame 19
gizmo_mc._visible = false;
Symbol 293 MovieClip [drawer_mc] Frame 20
stop();
Symbol 296 MovieClip [kan_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 296 MovieClip [kan_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 296 MovieClip [kan_mc] Frame 13
gizmo_mc._visible = false;
Symbol 304 MovieClip [microwave_mc] Frame 1
stop();
Symbol 304 MovieClip [microwave_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 304 MovieClip [microwave_mc] Frame 19
gizmo_mc._visible = false;
Symbol 304 MovieClip [microwave_mc] Frame 20
stop();
Symbol 308 MovieClip [petfood_mc] Frame 1
sounds = new Sound(this);
sounds.setVolume(50);
gizmo_mc._alpha = 0;
stop();
Symbol 308 MovieClip [petfood_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 308 MovieClip [petfood_mc] Frame 19
gizmo_mc._visible = false;
Symbol 308 MovieClip [petfood_mc] Frame 20
stop();
Symbol 311 MovieClip [pic1_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 311 MovieClip [pic1_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 311 MovieClip [pic1_mc] Frame 13
gizmo_mc._visible = false;
Symbol 315 MovieClip [pic2_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 315 MovieClip [pic2_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 315 MovieClip [pic2_mc] Frame 13
gizmo_mc._visible = false;
Symbol 318 MovieClip [pot_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 318 MovieClip [pot_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 318 MovieClip [pot_mc] Frame 13
gizmo_mc._visible = false;
Symbol 321 MovieClip [stol_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 321 MovieClip [stol_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 321 MovieClip [stol_mc] Frame 13
gizmo_mc._visible = false;
Symbol 325 MovieClip [teapot_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 325 MovieClip [teapot_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 325 MovieClip [teapot_mc] Frame 17
gizmo_mc._visible = false;
Symbol 325 MovieClip [teapot_mc] Frame 20
stop();
Symbol 328 MovieClip [towel_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 328 MovieClip [towel_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 328 MovieClip [towel_mc] Frame 19
gizmo_mc._visible = false;
Symbol 331 MovieClip [bongo_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 331 MovieClip [bongo_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 331 MovieClip [bongo_mc] Frame 13
gizmo_mc._visible = false;
Symbol 334 MovieClip [chair_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 334 MovieClip [chair_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 334 MovieClip [chair_mc] Frame 18
gizmo_mc._visible = false;
Symbol 334 MovieClip [chair_mc] Frame 20
stop();
Symbol 339 MovieClip [cup_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 339 MovieClip [cup_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 339 MovieClip [cup_mc] Frame 18
gizmo_mc._visible = false;
Symbol 339 MovieClip [cup_mc] Frame 20
stop();
Symbol 351 MovieClip [keyboard_mc] Frame 1
var sounds = new Sound(this);
sounds.setVolume(50);
gizmo_mc._alpha = 0;
stop();
Symbol 351 MovieClip [keyboard_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 351 MovieClip [keyboard_mc] Frame 18
gizmo_mc._visible = false;
Symbol 351 MovieClip [keyboard_mc] Frame 20
stop();
Symbol 364 MovieClip [loungePainting1_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 364 MovieClip [loungePainting1_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 364 MovieClip [loungePainting1_mc] Frame 13
gizmo_mc._visible = false;
Symbol 368 MovieClip [loungePainting2_mc] Frame 1
var sounds = new Sound(this);
sounds.setVolume(80);
gizmo_mc._alpha = 0;
stop();
Symbol 368 MovieClip [loungePainting2_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 368 MovieClip [loungePainting2_mc] Frame 18
gizmo_mc._visible = false;
Symbol 368 MovieClip [loungePainting2_mc] Frame 20
stop();
Symbol 374 MovieClip [loungePainting3_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 374 MovieClip [loungePainting3_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 374 MovieClip [loungePainting3_mc] Frame 13
gizmo_mc._visible = false;
Symbol 378 MovieClip [loungePainting4_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 378 MovieClip [loungePainting4_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 378 MovieClip [loungePainting4_mc] Frame 13
gizmo_mc._visible = false;
Symbol 382 MovieClip [loungePicture1_mc] Frame 1
var sounds = new Sound(this);
sounds.setVolume(80);
gizmo_mc._alpha = 0;
stop();
Symbol 382 MovieClip [loungePicture1_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 382 MovieClip [loungePicture1_mc] Frame 18
gizmo_mc._visible = false;
Symbol 382 MovieClip [loungePicture1_mc] Frame 20
stop();
Symbol 386 MovieClip [tape1_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 386 MovieClip [tape1_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 386 MovieClip [tape1_mc] Frame 18
gizmo_mc._visible = false;
Symbol 386 MovieClip [tape1_mc] Frame 20
stop();
Symbol 389 MovieClip [tape2_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 389 MovieClip [tape2_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 389 MovieClip [tape2_mc] Frame 16
gizmo_mc._visible = false;
Symbol 389 MovieClip [tape2_mc] Frame 20
stop();
Symbol 393 MovieClip [vase_mc] Frame 1
gizmo_mc._alpha = 0;
stop();
Symbol 393 MovieClip [vase_mc] Frame 2
gizmo_mc._alpha = 100;
Symbol 393 MovieClip [vase_mc] Frame 18
gizmo_mc._visible = false;
Symbol 393 MovieClip [vase_mc] Frame 20
stop();
Symbol 400 MovieClip Frame 1
stop();
Symbol 404 MovieClip Frame 1
stop();
Symbol 484 MovieClip [Dad] Frame 52
gotoAndPlay ("standing");
Symbol 484 MovieClip [Dad] Frame 62
gotoAndPlay ("south");
Symbol 484 MovieClip [Dad] Frame 72
gotoAndPlay ("north");
Symbol 484 MovieClip [Dad] Frame 92
gotoAndPlay ("west");
Symbol 484 MovieClip [Dad] Frame 112
gotoAndPlay ("east");
Symbol 484 MovieClip [Dad] Frame 130
gotoAndPlay ("standing");
Symbol 484 MovieClip [Dad] Frame 151
gotoAndPlay ("standing");
Symbol 484 MovieClip [Dad] Frame 189
gotoAndPlay ("standing");
Symbol 538 MovieClip [Henry] Frame 1
stop();
var sounds = new Sound(this);
sounds.setVolume(10);
Symbol 538 MovieClip [Henry] Frame 52
gotoAndPlay ("standing");
Symbol 538 MovieClip [Henry] Frame 62
gotoAndPlay ("south");
Symbol 538 MovieClip [Henry] Frame 72
gotoAndPlay ("north");
Symbol 538 MovieClip [Henry] Frame 83
gotoAndPlay ("west");
Symbol 538 MovieClip [Henry] Frame 94
gotoAndPlay ("east");
Symbol 538 MovieClip [Henry] Frame 113
gotoAndPlay ("climbing");
Symbol 660 MovieClip [Margaret] Frame 1
stop();
Symbol 660 MovieClip [Margaret] Frame 52
gotoAndPlay ("standing");
Symbol 660 MovieClip [Margaret] Frame 62
gotoAndPlay ("south");
Symbol 660 MovieClip [Margaret] Frame 72
gotoAndPlay ("north");
Symbol 660 MovieClip [Margaret] Frame 94
gotoAndPlay ("west");
Symbol 660 MovieClip [Margaret] Frame 116
gotoAndPlay ("east");
Symbol 660 MovieClip [Margaret] Frame 136
gotoAndPlay ("standing");
Symbol 660 MovieClip [Margaret] Frame 166
stop();
Symbol 720 MovieClip [Mum] Frame 52
gotoAndPlay ("standing");
Symbol 720 MovieClip [Mum] Frame 62
gotoAndPlay ("south");
Symbol 720 MovieClip [Mum] Frame 72
gotoAndPlay ("north");
Symbol 720 MovieClip [Mum] Frame 92
gotoAndPlay ("west");
Symbol 720 MovieClip [Mum] Frame 112
gotoAndPlay ("east");
Symbol 720 MovieClip [Mum] Frame 130
gotoAndPlay ("standing");
Symbol 720 MovieClip [Mum] Frame 166
gotoAndPlay ("standing");
Symbol 720 MovieClip [Mum] Frame 206
gotoAndPlay ("standing");
Symbol 769 MovieClip [Peter] Frame 1
stop();
Symbol 769 MovieClip [Peter] Frame 52
gotoAndPlay ("standing");
Symbol 769 MovieClip [Peter] Frame 62
gotoAndPlay ("south");
Symbol 769 MovieClip [Peter] Frame 72
gotoAndPlay ("north");
Symbol 769 MovieClip [Peter] Frame 94
gotoAndPlay ("west");
Symbol 769 MovieClip [Peter] Frame 116
gotoAndPlay ("east");
Symbol 769 MovieClip [Peter] Frame 147
gotoAndPlay ("standing");
Symbol 769 MovieClip [Peter] Frame 166
gotoAndPlay ("standing");
Symbol 769 MovieClip [Peter] Frame 188
gotoAndPlay ("standing");
Symbol 834 MovieClip [Ralph] Frame 1
stop();
Symbol 834 MovieClip [Ralph] Frame 52
gotoAndPlay ("standing");
Symbol 834 MovieClip [Ralph] Frame 62
gotoAndPlay ("southLoop");
Symbol 834 MovieClip [Ralph] Frame 72
gotoAndPlay ("northLoop");
Symbol 834 MovieClip [Ralph] Frame 93
gotoAndPlay ("west");
Symbol 834 MovieClip [Ralph] Frame 114
gotoAndPlay ("east");
Symbol 834 MovieClip [Ralph] Frame 126
gotoAndPlay ("standing");
Symbol 834 MovieClip [Ralph] Frame 142
Symbol 888 MovieClip Frame 1
stop();
Symbol 888 MovieClip Frame 2
stop();
Symbol 915 MovieClip Frame 3
stop();
Symbol 962 MovieClip Frame 1
stop();
Symbol 962 MovieClip Frame 3
superscorer_btn.onRelease = function () {
getURL ("http://www.citv.co.uk/page.asp?partid=216", "_blank");
};
Symbol 1022 MovieClip [__Packages.Site] Frame 0
class Site
{
var site_mc, game_mc, display_mc, game, leaderBoard_mc, leaderBoard, frame_mc, wellDone_mc, gameOver_mc, instructions_mc, introScreen_mc, displayItems, btnsEnabled, sounds, score, incrAlpha_itvl;
function Site ($host_mc) {
site_mc = $host_mc.site_mc;
game_mc = $host_mc.game_mc;
game_mc._visible = false;
display_mc = $host_mc.display_mc;
display_mc._visible = false;
game = Game.getInstance();
game.init(this, game_mc, display_mc);
leaderBoard_mc = site_mc.leaderBoard_mc;
leaderBoard_mc._visible = false;
leaderBoard = new LeaderBoard(leaderBoard_mc);
frame_mc = $host_mc.frame_mc;
wellDone_mc = site_mc.wellDone_mc;
wellDone_mc._visible = false;
gameOver_mc = site_mc.gameOver_mc;
gameOver_mc._visible = false;
instructions_mc = site_mc.instructions_mc;
instructions_mc._visible = false;
introScreen_mc = site_mc.introScreen_mc;
displayItems = [leaderBoard_mc, wellDone_mc, gameOver_mc, instructions_mc, introScreen_mc];
introScreen_mc.playGame_btn.onPress = mx.utils.Delegate.create(this, playGame);
introScreen_mc.howToPlay_btn.onPress = mx.utils.Delegate.create(this, showInstr);
introScreen_mc.viewLeaderboard_btn.onPress = Proxy.create(this, showLeaderboard, introScreen_mc);
instructions_mc.backToMenu_btn.onPress = Proxy.create(this, backToMain, instructions_mc);
wellDone_mc.playBonusLevel_btn.onPress = mx.utils.Delegate.create(this, playBonusGame);
gameOver_mc.submitScore_btn.onPress = mx.utils.Delegate.create(this, submitScore);
gameOver_mc.seeLeaderboard_btn.onPress = Proxy.create(this, showLeaderboard, gameOver_mc);
gameOver_mc.backToMenu_btn.onPress = Proxy.create(this, backToMain, gameOver_mc);
leaderBoard_mc.backToMenu_btn.onPress = Proxy.create(this, backToMain, leaderBoard_mc);
btnsEnabled = true;
var _local3 = $host_mc.createEmptyMovieClip("sounds_mc", 400);
sounds = Sounds.getInstance();
sounds.init(_local3);
sounds.playSound("intro");
}
function playGame() {
if (btnsEnabled) {
sounds.stopSound("intro");
trace("sounds.playSound=" + sounds.playSound);
sounds.playSound("themeMusic", 15);
game.reset();
display_mc._visible = true;
fade(site_mc, game_mc);
frame_mc._visible = false;
game.go();
}
}
function playBonusGame() {
if (btnsEnabled) {
sounds.fadeSound("themeMusic", 6);
game.initBonusGame();
display_mc._visible = true;
fade(site_mc, game_mc);
frame_mc._visible = false;
game.goBonusGame();
sounds.stopSound("foundAllGizmos");
}
}
function showInstr() {
trace("**showInstr**");
if (btnsEnabled) {
fade(introScreen_mc, instructions_mc);
}
}
function submitScore() {
if (btnsEnabled) {
var _local2 = gameOver_mc.playerName_txt.text;
if (_local2 != "") {
leaderBoard.loadScores(_local2, score);
fade(gameOver_mc, leaderBoard_mc);
}
}
}
function showLeaderboard($from_mc) {
if (btnsEnabled) {
leaderBoard.loadScores();
fade($from_mc, leaderBoard_mc);
}
}
function backToMain($from_mc) {
if (btnsEnabled) {
fade($from_mc, introScreen_mc);
}
}
function showGameOver($reason, $score) {
trace("**showGameOver**");
sounds.stopAll("themeMusic");
score = $score;
gameOver_mc.message_mc.score = score;
for (var _local2 in displayItems) {
displayItems[_local2]._visible = false;
}
trace("$reason=" + $reason);
switch ($reason) {
case "outOfTime" :
sounds.fadeSound("themeMusic", 50);
gameOver_mc.message_mc.gotoAndStop(1);
gameOver_mc._visible = true;
break;
case "hitPeter" :
sounds.fadeSound("themeMusic", 50);
gameOver_mc.message_mc.gotoAndStop(2);
gameOver_mc._visible = true;
break;
case "mainGameCompleted" :
sounds.fadeSound("themeMusic", 6);
wellDone_mc._visible = true;
sounds.playSound("foundAllGizmos");
break;
case "bonusGameCompleted" :
sounds.fadeSound("themeMusic", 50);
gameOver_mc.message_mc.gotoAndStop(3);
gameOver_mc._visible = true;
}
display_mc._visible = false;
frame_mc._visible = true;
fade(game_mc, site_mc, "haltGame");
}
function haltGame() {
game.halt();
}
function fade(old_mc, new_mc, action) {
btnsEnabled = false;
new_mc._alpha = 0;
new_mc._visible = true;
clearInterval(incrAlpha_itvl);
incrAlpha_itvl = setInterval(this, "incrAlpha", 20, old_mc, new_mc, action);
}
function incrAlpha(old_mc, new_mc, action) {
if (old_mc._alpha > 0) {
old_mc._alpha = old_mc._alpha - 25;
} else if (new_mc._alpha < 100) {
new_mc._alpha = new_mc._alpha + 25;
} else {
clearInterval(incrAlpha_itvl);
old_mc._visible = false;
new_mc._alpha = 100;
old_mc._alpha = 100;
btnsEnabled = true;
if (action != undefined) {
this[action]();
}
}
updateAfterEvent();
}
}
Symbol 1023 MovieClip [__Packages.Game] Frame 0
class Game
{
var site, game_mc, sounds, destMarker, locBGs_mc, floor_mc, floor_plygn, nogos_mc, itms_mc, overlays_mc, locs, chars, bnsItms, shadows_mc, bonusChars, henryBonus, timer, score_mc, gizmoDisplay, propDisplay_mc, gizmoLocs, specialGizmos, propLocs, gizmosClctd, tmr, bonusGame, drps, numDrps, WBs, numWBs, crntPropID, crntLocID, score, active, tick_itvl, splatDelay, splatID;
function Game () {
}
static function getInstance() {
if (_instance == null) {
_instance = new Game();
}
return(_instance);
}
function init($site, $game_mc, $display_mc) {
site = $site;
game_mc = $game_mc;
sounds = Sounds.getInstance();
destMarker = new Sprite(0, 500, 0, 0, game_mc.destMarker_mc);
locBGs_mc = game_mc.locBGs_mc;
floor_mc = game_mc.createEmptyMovieClip("floor_mc", 1);
var _local6 = new Vertex(-260, 500, -30);
var _local5 = new Vertex(-260, 500, 1000);
var _local4 = new Vertex(880, 500, 1000);
var _local8 = new Vertex(880, 500, -30);
floor_plygn = new Polygon(floor_mc, 16777215, 0, [_local6, _local5, _local4, _local8]);
floor_plygn.render();
floor_mc.onPress = mx.utils.Delegate.create(this, setHenryDest);
floor_mc.onRelease = (floor_mc.onReleaseOutside = mx.utils.Delegate.create(this, hideDestMarker));
nogos_mc = game_mc.createEmptyMovieClip("nogos_mc", 2);
itms_mc = game_mc.createEmptyMovieClip("itms_mc", 100);
overlays_mc = game_mc.createEmptyMovieClip("overlays_mc", 200);
locs = new Array();
locs[1] = new Location(nogos_mc, itms_mc, 1);
locs[1].addNogo(240, 900, 800, 1000);
locs[1].addInteractable(-260, 820, -100, 1000, itms_mc.attachMovie("bongo_mc", "bongo_mc", 4000), 967);
locs[1].addInteractable(600, 700, 820, 1000, itms_mc.attachMovie("chair_mc", "chair_mc", 4001), 968, true);
locs[1].addInteractable(370, 750, 530, 1000, itms_mc.attachMovie("cup_mc", "cup_mc", itms_mc.getNextHighestDepth()), 970, true);
locs[1].addInteractable(680, 650, 880, 1000, itms_mc.attachMovie("keyboard_mc", "keyboard_mc", itms_mc.getNextHighestDepth()), 971, true);
locs[1].addInteractable(70, 880, 200, 1000, itms_mc.attachMovie("loungePainting1_mc", "loungePainting1_mc", itms_mc.getNextHighestDepth()), 972);
locs[1].addInteractable(-70, 880, 70, 1000, itms_mc.attachMovie("loungePainting2_mc", "loungePainting2_mc", itms_mc.getNextHighestDepth()), 973, true);
locs[1].addInteractable(700, 540, 880, 650, itms_mc.attachMovie("loungePainting3_mc", "loungePainting3_mc", itms_mc.getNextHighestDepth()), 974);
locs[1].addInteractable(-260, 300, -170, 500, itms_mc.attachMovie("loungePainting4_mc", "loungePainting4_mc", itms_mc.getNextHighestDepth()), 975);
locs[1].addInteractable(500, 750, 680, 1000, itms_mc.attachMovie("loungePicture1_mc", "loungePicture1_mc", itms_mc.getNextHighestDepth()), 976, true);
locs[1].addInteractable(750, 520, 880, 620, itms_mc.attachMovie("tape1_mc", "tape1_mc", itms_mc.getNextHighestDepth()), 590, true);
locs[1].addInteractable(800, 320, 880, 438, itms_mc.attachMovie("tape2_mc", "tape2_mc", itms_mc.getNextHighestDepth()), 395, true);
locs[1].addInteractable(790, 444, 880, 530, itms_mc.attachMovie("vase_mc", "vase_mc", itms_mc.getNextHighestDepth()), 476, true);
locs[2] = new Location(nogos_mc, itms_mc, 2);
locs[2].addNogo(-260, 815, 880, 1000);
locs[2].addInteractable(100, 710, 250, 1000, itms_mc.attachMovie("kan_mc", "kan_mc", itms_mc.getNextHighestDepth()), 833, true);
locs[2].addInteractable(450, 80, 510, 135, itms_mc.attachMovie("ball_mc", "ball_mc", itms_mc.getNextHighestDepth()), 830, true);
locs[2].addInteractable(30, 710, 200, 1000, itms_mc.attachMovie("door_mc", "door_mc", itms_mc.getNextHighestDepth()), 831, true);
locs[2].addInteractable(250, 710, 460, 1000, itms_mc.attachMovie("drawer_mc", "drawer_mc", itms_mc.getNextHighestDepth()), 832, true);
locs[2].addInteractable(670, 240, 760, 330, itms_mc.attachMovie("petfood_mc", "petfood_mc", itms_mc.getNextHighestDepth()), 297, true);
locs[2].addInteractable(-260, 660, -160, 1000, itms_mc.attachMovie("pic1_mc", "pic1_mc", itms_mc.getNextHighestDepth()), 832);
locs[2].addInteractable(-180, 710, 0, 1000, itms_mc.attachMovie("microwave_mc", "microwave_mc", itms_mc.getNextHighestDepth()), 933, true);
locs[2].addInteractable(760, 140, 880, 410, itms_mc.attachMovie("pic2_mc", "pic2_mc", itms_mc.getNextHighestDepth()), 834);
locs[2].addInteractable(-260, 210, -150, 400, itms_mc.attachMovie("pot_mc", "pot_mc", itms_mc.getNextHighestDepth()), 835);
locs[2].addInteractable(720, 710, 880, 1000, itms_mc.attachMovie("stol_mc", "stol_mc", itms_mc.getNextHighestDepth()), 836);
locs[2].addInteractable(-260, 710, -160, 1000, itms_mc.attachMovie("teapot_mc", "teapot_mc", itms_mc.getNextHighestDepth()), 837, true);
locs[2].addInteractable(470, 710, 720, 1000, itms_mc.attachMovie("towel_mc", "towel_mc", itms_mc.getNextHighestDepth()), 838);
locs[3] = new Location(nogos_mc, itms_mc, 3);
locs[3].addNogo(-260, 528, 25, 1000);
locs[3].addNogo(668, 160, 880, 310);
locs[3].addNogo(740, 890, 880, 1000);
locs[3].addOverlay(overlays_mc.attachMovie("hallway_lightshade", "hallway_lightshade_mc", 380));
locs[3].addStaticItem(itms_mc.attachMovie("hallway_table", "hallway_table_mc", itms_mc.getNextHighestDepth()), 310);
locs[3].addInteractable(160, 208, 260, 275, itms_mc.attachMovie("rugCorner1", "rugCorner1_mc", itms_mc.getNextHighestDepth()), 180);
locs[3].addInteractable(410, 208, 510, 275, itms_mc.attachMovie("rugCorner2", "rugCorner2_mc", itms_mc.getNextHighestDepth()), 181);
locs[3].addInteractable(770, 700, 880, 870, itms_mc.attachMovie("hallway_pic", "hallway_pic_mc", itms_mc.getNextHighestDepth()), 800);
locs[3].addInteractable(25, 580, 135, 740, itms_mc.attachMovie("bear_mc", "bear_mc", itms_mc.getNextHighestDepth()), 650, true);
locs[3].addInteractable(710, 310, 880, 480, itms_mc.attachMovie("hat_mc", "hat_mc", itms_mc.getNextHighestDepth()), 250, true);
locs[3].addInteractable(520, 60, 660, 200, itms_mc.attachMovie("map_mc", "map_mc", itms_mc.getNextHighestDepth()), 606, true);
locs[3].addInteractable(100, 880, 230, 1000, itms_mc.attachMovie("painting2_mc", "painting2_mc", itms_mc.getNextHighestDepth()), 996, true);
locs[3].addInteractable(550, 880, 700, 1000, itms_mc.attachMovie("painting5_mc", "painting5_mc", itms_mc.getNextHighestDepth()), 804);
locs[3].addInteractable(120, 310, 260, 440, itms_mc.attachMovie("shirt_mc", "shirt_mc", itms_mc.getNextHighestDepth()), 450, true);
locs[3].addInteractable(-260, 420, -128, 528, itms_mc.attachMovie("treePic", "treePic_mc", itms_mc.getNextHighestDepth()), 459, true);
locs[3].addInteractable(25, 820, 110, 1000, itms_mc.attachMovie("vac", "vac_mc", itms_mc.getNextHighestDepth()), 920, true);
locs[3].addInteractable(-20, 70, 80, 130, itms_mc.attachMovie("wool", "wool_mc", itms_mc.getNextHighestDepth()), 110, true);
locs[4] = new Location(nogos_mc, itms_mc, 4);
locs[4].addNogo(470, 870, 880, 1000);
locs[4].addNogo(655, 248, 880, 400);
locs[4].addStaticItem(itms_mc.attachMovie("dressoir", "dressoir_mc", itms_mc.getNextHighestDepth()), 402);
locs[4].addInteractable(330, 900, 470, 1000, itms_mc.attachMovie("topOfWardrobe", "topOfWardrobe_mc", itms_mc.getNextHighestDepth()), 1008, true, 1);
locs[4].addInteractable(470, 730, 660, 1000, itms_mc.attachMovie("closet_mc", "closet_mc", itms_mc.getNextHighestDepth()), 1003, true, 2);
locs[4].addInteractable(585, 240, 880, 400, itms_mc.attachMovie("drdrawer_mc", "drdrawer_mc_mc", itms_mc.getNextHighestDepth()), 398, true, 3);
locs[4].addInteractable(140, 880, 300, 1000, itms_mc.attachMovie("bedroomPainting1_mc", "bedroomPainting1_mc", itms_mc.getNextHighestDepth()), 999, false);
locs[4].addInteractable(-260, 660, -100, 830, itms_mc.attachMovie("book_mc", "book_mc", itms_mc.getNextHighestDepth()), 700, true);
locs[4].addInteractable(450, 220, 590, 350, itms_mc.attachMovie("pad_mc", "pad_mc", itms_mc.getNextHighestDepth()), 304, true);
locs[4].addInteractable(630, 140, 880, 240, itms_mc.attachMovie("doubledecker_mc", "doubledecker_mc", itms_mc.getNextHighestDepth()), 201, false);
locs[4].addInteractable(330, 860, 470, 1000, itms_mc.attachMovie("football_mc", "football_mc", itms_mc.getNextHighestDepth()), 1005, true);
locs[4].addInteractable(585, 250, 880, 390, itms_mc.attachMovie("ted2_mc", "ted2_mc", itms_mc.getNextHighestDepth()), 261, false);
locs[4].addInteractable(630, 290, 880, 620, itms_mc.attachMovie("ted_mc", "ted_mc", itms_mc.getNextHighestDepth()), 262, true);
locs[4].addInteractable(0, 350, 135, 520, itms_mc.attachMovie("clothing_mc", "clothing_mc", itms_mc.getNextHighestDepth()), 554, true);
locs[4].addInteractable(446, 0, 830, 122, itms_mc.attachMovie("bed", "bed_mc", itms_mc.getNextHighestDepth()), -23);
locs[5] = new Location(nogos_mc, itms_mc, 5, 1.3);
locs[5].addNogo(590, 225, 880, 1000);
locs[5].addNogo(-260, 465, -150, 610);
locs[5].addNogo(100, 830, 200, 1000);
locs[5].addStaticItem(itms_mc.attachMovie("bathroom_sink", "bathroom_sink_mc", itms_mc.getNextHighestDepth()), 610);
locs[5].addInteractable(490, 580, 620, 720, itms_mc.attachMovie("bathroomBall_mc", "bathroomBall_mc", itms_mc.getNextHighestDepth()), 680, true);
locs[5].addInteractable(590, 100, 880, 225, itms_mc.attachMovie("boat_mc", "boat_mc", itms_mc.getNextHighestDepth()), 624);
locs[5].addInteractable(-260, 400, -50, 680, itms_mc.attachMovie("blind_mc", "blind_mc", itms_mc.getNextHighestDepth()), 979, true);
locs[5].addInteractable(440, 800, 590, 1000, itms_mc.attachMovie("showercurtain_mc", "showercurtain_mc", itms_mc.getNextHighestDepth()), 981, true);
locs[5].addInteractable(90, 740, 315, 1000, itms_mc.attachMovie("ducky_mc", "ducky_mc", itms_mc.getNextHighestDepth()), 983);
locs[5].addInteractable(-50, 600, 100, 820, itms_mc.attachMovie("magazine_mc", "magazine_mc", itms_mc.getNextHighestDepth()), 985, true);
locs[5].addInteractable(-260, 490, -50, 710, itms_mc.attachMovie("mirror_mc", "mirror_mc", itms_mc.getNextHighestDepth()), 987);
locs[5].addInteractable(-60, 830, 100, 1000, itms_mc.attachMovie("plunger_mc", "plunger_mc", itms_mc.getNextHighestDepth()), 989, true);
locs[5].addInteractable(-260, 310, -70, 500, itms_mc.attachMovie("washandje_mc", "washandje_mc", itms_mc.getNextHighestDepth()), 991, true);
locs[5].addInteractable(-160, 830, 20, 1000, itms_mc.attachMovie("wcpaper_mc", "wcpaper_mc", itms_mc.getNextHighestDepth()), 993, true);
locs[5].addInteractable(490, 620, 620, 820, itms_mc.attachMovie("shark_mc", "shark_mc", itms_mc.getNextHighestDepth()), 995, true);
locs[5].addInteractable(-260, 490, -50, 700, itms_mc.attachMovie("bathroomPot_mc", "bathroomPot_mc", itms_mc.getNextHighestDepth()), 997, true);
locs[6] = new Location(nogos_mc, itms_mc, 6, 1);
locs[3].addDoor(locBGs_mc.door31_mc, 0, 1, 0, 380, 957, 380, 820);
locs[1].addDoor(locBGs_mc.door13_mc, 0, 3, 0, -217, 526, -50, 526);
locs[3].addDoor(locBGs_mc.door32_mc, 1, 2, 0, -217, 380, -40, 360);
locs[2].addDoor(locBGs_mc.door23_mc, 0, 3, 1, 837, 545, 700, 545);
locs[3].addDoor(locBGs_mc.door30_mc, 2, 3, 4, -160, 500, -160, 380);
locs[3].addDoor(null, 3, 3, 4, -60, 480, -45, 310);
locs[3].addDoor(null, 4, 3, 2, -160, 520, -160, 950, 500, -200, 6);
locs[3].addDoor(null, 5, 3, 3, -60, 520, -60, 950, 500, -200);
locs[3].addDoor(null, 6, 4, 0, -160, 950, -160, 520, -200, 500);
locs[3].addDoor(null, 7, 4, 0, -60, 950, -60, 520, -200, 500, 5);
locs[4].addDoor(locBGs_mc.door40_mc, 0, 3, 7, -10, 950, -10, 800);
locs[4].addDoor(locBGs_mc.door45_mc, 1, 5, 0, -217, 370, -100, 370);
locs[5].addDoor(locBGs_mc.door54_mc, 0, 4, 1, 400, 920, 400, 800);
chars = new Array();
chars[0] = new Character(100, 500, 200, 28, 230, 155, itms_mc.attachMovie("Henry", "Henry_mc", 2), 0);
chars[1] = new Character(100, 500, 300, 30, 210, 146, itms_mc.attachMovie("Peter", "Peter_mc", 1), 1);
chars[2] = new Character(100, 500, 400, 40, 300, 250, itms_mc.attachMovie("Mum", "Mum_mc", 400), 2);
chars[3] = new Character(100, 500, 500, 40, 300, 250, itms_mc.attachMovie("Dad", "Dad_mc", 500), 3);
bnsItms = game_mc.createEmptyMovieClip("bnsItms_mc", 750);
shadows_mc = game_mc.createEmptyMovieClip("shadows_mc", 700);
bonusChars = new Array();
bonusChars[0] = new CharacterBns(100, 500, 300, 28, 210, 150, bnsItms.attachMovie("Peter", "Peter_mc", bnsItms.getNextHighestDepth()), 0);
bonusChars[1] = new CharacterBns(300, 500, 200, 24, 288, 210, bnsItms.attachMovie("Margaret", "Margaret_mc", bnsItms.getNextHighestDepth()), 1);
bonusChars[2] = new CharacterBns(500, 500, 200, 32, 235, 190, bnsItms.attachMovie("Ralph", "Ralph_mc", bnsItms.getNextHighestDepth()), 2);
var _local7 = game_mc.createEmptyMovieClip("henryBonus_mc", 800);
henryBonus = new HenryBonus(_local7);
timer = new Timer($display_mc.timer_mc);
score_mc = $display_mc.score_mc;
gizmoDisplay = new GizmoDisplay($display_mc.gizmoDisplay_mc);
propDisplay_mc = $display_mc.propDisplay_mc;
propDisplay_mc.HL_mc.onRollOver = Proxy.create(this, highlightProp, true);
propDisplay_mc.HL_mc.onRollOut = Proxy.create(this, highlightProp, false);
propDisplay_mc.HL_mc.onPress = mx.utils.Delegate.create(this, tryUsingProp);
gizmoLocs = new Array();
var _local2 = 1;
while (_local2 <= 60) {
if (_local2 <= 30) {
gizmoLocs.push(_local2);
} else {
gizmoLocs.push(null);
}
_local2++;
}
specialGizmos = [1, 2, 3];
propLocs = [1, 2, 3, 0, 0];
reset();
}
function reset() {
Env.d = 400;
var _local5;
var _local2;
var _local4;
gizmosClctd = [];
chars[0].set_loc(3, 100, 200, "standing");
chars[1].set_loc(4, 300, 600, "standing");
chars[2].set_loc(2, 300, 600, "standing");
chars[3].set_loc(1, 300, 600, "standing");
for (_local5 in bonusChars) {
bonusChars[_local5].activate(false);
bonusChars[_local5].hideIt();
}
gizmoLocs = ArrayShuffler.shuffle(gizmoLocs);
specialGizmos = ArrayShuffler.shuffle(specialGizmos);
_local2 = 0;
while (_local2 < 3) {
_local4 = gizmoLocs[36 + _local2];
_local5 = 1;
while (_local5 <= 60) {
if (gizmoLocs[_local5] == specialGizmos[_local2]) {
gizmoLocs[36 + _local2] = specialGizmos[_local2];
gizmoLocs[_local5] = _local4;
break;
}
_local5++;
}
_local2++;
}
propLocs = ArrayShuffler.shuffle(propLocs);
var _local3 = new Array();
_local5 = 1;
while (_local5 <= 5) {
_local3 = [];
_local2 = 0;
while (_local2 < 12) {
_local3.push(gizmoLocs[((_local5 - 1) * 12) + _local2]);
_local2++;
}
locs[_local5].reset(_local3);
locs[_local5].setProp(propLocs[_local5 - 1]);
locs[_local5].activate(false);
_local5++;
}
gizmosClctd = [];
setLoc(chars[0].locID);
timer.reset(300);
tmr = 0;
gizmoDisplay.reset();
updateProp(0);
propDisplay_mc._visible = true;
updateScore(null, 0);
floor_mc._visible = true;
bonusGame = false;
henryBonus.set_active(false);
for (_local5 in drps) {
drps[_local5].remove();
}
drps = [];
numDrps = 0;
for (_local5 in WBs) {
WBs[_local5].remove();
}
WBs = [];
numWBs = 0;
}
function updateProp($propID) {
trace("");
trace("**updateProp** " + $propID);
crntPropID = $propID;
propDisplay_mc.props_mc.gotoAndStop($propID + 1);
}
function highlightProp($highlight) {
if (!($highlight && (crntPropID > 0))) {
(propDisplay_mc.HL_mc.gotoAndStop(1));// not popped
} else {
(propDisplay_mc.HL_mc.gotoAndStop(2));// not popped
}
}
function setLoc($locID, $climbing) {
if ($locID != crntLocID) {
for (var _local2 in chars) {
chars[_local2].hideIt();
}
locs[crntLocID].activate(false);
crntLocID = $locID;
locBGs_mc.gotoAndStop(crntLocID);
}
locs[crntLocID].activate(true, $climbing);
}
function forbiddenArea($locID, $x, $z, $pad) {
return(locs[$locID].isForbidden($x, $z, $pad));
}
function charClash($charID, $locID, $x, $z, $pad) {
var _local2;
for (var _local6 in chars) {
_local2 = chars[_local6];
if (_local2.id != $charID) {
if (_local2.locID == $locID) {
if (_local2.hitCheck($x, $z, $pad)) {
return(true);
}
}
}
}
return(false);
}
function tryUsingProp() {
if (chars[0].stationary) {
interact(chars[0].x, chars[0].z, crntPropID);
}
}
function interact($x, $z, $propToUseID) {
trace("$propToUseID=" + $propToUseID);
var _local2 = locs[crntLocID].interact($x, $z, $propToUseID);
if (_local2 != null) {
collectGizmo(_local2);
}
var _local3 = locs[crntLocID].checkForProp($x, $z, crntPropID);
if (_local3 > 0) {
updateProp(_local3);
}
}
function collectGizmo($gizmoID, $immediate) {
gizmosClctd.push($gizmoID);
gizmoDisplay.gizmoCollected($gizmoID, $immediate);
switch ($gizmoID) {
case 1 :
sounds.playSound("gotGoldGizmo");
updateScore(300);
break;
case 2 :
updateScore(250);
break;
case 3 :
updateScore(200);
break;
default :
if (gizmosClctd.length == 1) {
sounds.playSound("gotGizmo1");
} else if (gizmosClctd.length == 29) {
sounds.playSound("oneLeftToFind");
} else if (gizmosClctd.length != 30) {
sounds.playSound("gotGizmo" + getRndInt(1, 25));
}
updateScore(100);
}
if (gizmosClctd.length == 30) {
gameOver("mainGameCompleted");
}
}
function getRebukes() {
var _local2;
for (var _local3 in chars) {
_local2 = chars[_local3];
if (_local2.id != 0) {
if ((_local2.locID == crntLocID) && (!_local2.climbing)) {
if (_local2.canYouSee(chars[0].x, chars[0].z)) {
trace(("$char.id = " + _local2.id) + ": I saw ya");
if (_local2.id == 1) {
if (_local2.locID == 4) {
_local2.rebuke();
}
} else {
_local2.rebuke();
}
}
}
}
}
}
function updateScore($incr, $score) {
if ($score != undefined) {
score = $score;
} else {
score = score + $incr;
}
if (score < 0) {
score = 0;
}
score_mc.score_txt.text = score;
}
function setHenryDest($screenX, $screenY) {
if (active && (!chars[0].climbing)) {
var _local2 = destMarker.setZ(game_mc._ymouse);
var _local3 = destMarker.setX(game_mc._xmouse);
if (!locs[crntLocID].isForbidden(_local3, _local2, 0)) {
var _local4 = locs[crntLocID].legalise(_local3, _local2, chars[0].pad);
_local3 = _local4.x;
_local2 = _local4.z;
destMarker.z = _local2;
destMarker.x = _local3;
destMarker.render(true, locs[crntLocID].scaleFactor);
chars[0].setDest(_local3, _local2);
}
}
}
function HenryClimbLadder($interactable) {
trace("**HenryClimbLadder**");
chars[0].climbLadder($interactable);
}
function moveToExit($charID, $door) {
if (active) {
trace("**moveToExit**");
if ($door == undefined) {
$door = locs[chars[$charID].locID].getDoor();
}
chars[$charID].setDest($door.x, $door.z, $door.id);
}
}
function checkForExit($charID, $locID, $doorID, $x, $z) {
return(locs[$locID].checkForExit($doorID, $x, $z));
}
function getDoor($locID, $doorID) {
return(locs[$locID].getDoor($doorID));
}
function hideDestMarker() {
destMarker.hideIt();
}
function halt() {
active = false;
clearInterval(tick_itvl);
for (var _local2 in chars) {
chars[_local2].activate(false);
}
for (var _local2 in bonusChars) {
bonusChars[_local2].activate(false);
}
}
function go() {
halt();
active = true;
tick_itvl = setInterval(this, "update", 20);
for (var _local2 in chars) {
chars[_local2].activate(true);
}
sounds.playSound("findthosegizmosgogogo");
}
function update() {
if (active) {
tmr++;
if (tmr == 40) {
tmr = 0;
timer.takeSec();
}
}
locs[crntLocID].manageItemDepths();
if (bonusGame) {
if (splatDelay > 0) {
splatDelay--;
}
henryBonus.update();
henryBonus.render();
if (active) {
for (var _local2 in bonusChars) {
$char = bonusChars[_local2];
$char.update();
$char.render();
}
}
for (var _local2 in drps) {
drps[_local2].update();
drps[_local2].render();
}
for (var _local2 in WBs) {
WBs[_local2].update();
WBs[_local2].render();
}
} else {
var $char;
for (var _local2 in chars) {
$char = chars[_local2];
$char.update();
if ($char.locID == crntLocID) {
$char.render(null, locs[$char.locID].scaleFactor);
} else {
$char.hideIt();
}
}
}
updateAfterEvent();
}
function gameOver($reason) {
if (active) {
trace("** gameOver ** " + $reason);
active = false;
switch ($reason) {
case "outOfTime" :
if (bonusGame) {
endBonusGame();
$reason = "bonusGameCompleted";
}
break;
case "hitPeter" :
endBonusGame();
break;
case "mainGameCompleted" :
}
_global.setTimeout(this, "showGameOver", 1000, $reason);
}
}
function notMuchTimeLeft($urgent) {
if (!bonusGame) {
if ($urgent) {
sounds.playSound("notMuchTimeLeftUrgent");
} else {
sounds.playSound("notMuchTimeLeft");
}
}
}
function showGameOver($reason) {
trace("**game: showGameOver **");
site.showGameOver($reason, score);
}
function initBonusGame() {
Env.d = 600;
tmr = 0;
timer.reset(45);
splatID = 1;
splatDelay = 0;
setLoc(6);
henryBonus.set_active(true);
for (var _local2 in chars) {
chars[_local2].activate(false);
}
bonusChars[0].set_loc(6, 0, 200);
bonusChars[1].set_loc(6, 250, 400);
bonusChars[2].set_loc(6, 500, 600);
bonusGame = true;
floor_mc._visible = false;
gizmoDisplay.setVis(false);
propDisplay_mc._visible = false;
}
function goBonusGame() {
halt();
active = true;
tick_itvl = setInterval(this, "update", 20);
for (var _local2 in bonusChars) {
bonusChars[_local2].activate(true);
trace("activate: bonusChars[i].id=" + bonusChars[_local2].id);
}
}
function endBonusGame() {
active = false;
for (var _local2 in bonusChars) {
bonusChars[_local2].activate(false);
}
henryBonus.enableDrencher(false);
}
function charBnsClash($charID, $x, $z, $pad) {
var _local2;
for (var _local5 in bonusChars) {
_local2 = bonusChars[_local5];
if (_local2.id != $charID) {
if (_local2.hitCheck($x, $z, $pad)) {
return(true);
}
}
}
return(false);
}
function addDroplet($x, $y, $z, $vx, $vy, $vz) {
var _local2 = bnsItms.getNextHighestDepth();
var _local4 = bnsItms.attachMovie("droplet", ("droplet" + _local2) + "_mc", _local2);
var _local3 = new Droplet($x, $y, $z, $vx, $vy, $vz, _local4, 0);
drps.push(_local3);
numDrps++;
}
function removeDroplet($drp) {
var _local2 = numDrps - 1;
while (_local2 >= 0) {
if (drps[_local2] == $drp) {
drps[_local2].remove();
drps[_local2] = null;
drps.splice(_local2, 1);
numDrps--;
break;
}
_local2--;
}
}
function addWB($x, $y, $z) {
var _local6;
var _local2;
var _local4;
var _local3;
var _local10;
var _local9;
var _local8;
_local4 = henryBonus.cx - $x;
_local3 = henryBonus.z - $z;
_local6 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
_local6 = _local6 - (8 + (6 * Math.random()));
_local2 = Math.sqrt(_local6);
_local2 = _local6 / (22 + (37 * Math.random()));
_local10 = _local4 / _local2;
_local8 = _local3 / _local2;
_local9 = -_local2;
_local6 = bnsItms.getNextHighestDepth();
var _local5 = bnsItms.attachMovie("WB", ("WB" + _local6) + "_mc", _local6);
_local5.colours_mc.gotoAndStop(getRndInt(1, 5));
var _local7 = new WB($x, $y, $z, _local10, _local9, _local8, _local5, 10);
WBs.push(_local7);
numWBs++;
}
function removeWB($WB) {
var _local2 = numWBs - 1;
while (_local2 >= 0) {
if (WBs[_local2] == $WB) {
WBs[_local2].remove();
WBs[_local2] = null;
WBs.splice(_local2, 1);
numWBs--;
break;
}
_local2--;
}
}
function hitCheck($x, $y, $z, $pad, $vz, $p) {
if ($vz < 0) {
if (henryBonus.hitCheck($x, $y, $z, $pad)) {
sounds.playSound("splat13", 100, 0, true);
updateScore(-50);
$p.y = Math.max(360, $p.y);
henryBonus.faulter();
return(true);
}
} else if ($y > 215) {
for (var _local8 in bonusChars) {
var _local3 = bonusChars[_local8];
if ($y > (500 - _local3.h)) {
if (_local3.hitCheck($x, $z, $pad)) {
if ($y < (500 - _local3.sh)) {
_local3.reactToHeadHit();
} else {
if (splatDelay == 0) {
splatDelay = 2;
sounds.playSound("splat" + splatID, 100, 0.08 + (0.12 * Math.random()), false);
}
henryBonus.celebrateHit();
splatID++;
if (splatID > 12) {
splatID = 1;
}
_local3.reactToHit();
if (_local3.id == 0) {
_global.setTimeout(this, "gameOver", 1000, "hitPeter");
} else {
updateScore(5);
}
return(true);
}
}
}
}
}
return(false);
}
function charCelebrateHit() {
bonusChars[1].celebrateHit();
}
function getBoundaries($x, $y, $z, $r) {
var _local4;
var _local5;
var _local6;
var _local3;
if ($z < 800) {
_local4 = -260;
} else {
_local4 = -380;
}
if ((($z > 800) && ($z < 1200)) && ($y > -100)) {
_local5 = 880;
} else {
_local5 = 1400;
}
if ($z < 1500) {
_local6 = 500;
} else {
_local6 = 400;
}
if ($z < 800) {
if ($x > 840) {
_local3 = 800;
}
} else if ($z < 1500) {
if ((($x > -260) && ($x < -32)) || (($x > 880) && ($x < 920))) {
_local3 = 1500;
} else {
_local3 = 4000;
}
}
return({xMin:_local4, xMax:_local5, yMax:_local6, zMax:_local3});
}
function getRndInt($min, $max) {
return(Math.round(((($max - $min) + 1) * Math.random()) - 0.5) + $min);
}
static var _instance = null;
}
Symbol 1024 MovieClip [__Packages.Vertex] Frame 0
class Vertex
{
var x, y, z, pad;
function Vertex ($x, $y, $z, $pad) {
x = $x;
y = $y;
z = $z;
pad = $pad;
}
function rndrX() {
var _local2 = Env.x0 + (((x - Env.x0) * Env.d) / (Env.d + z));
return(_local2);
}
function rndrY() {
var _local2 = Env.y0 + (((y - Env.y0) * Env.d) / (Env.d + z));
return(_local2);
}
}
Symbol 1025 MovieClip [__Packages.Env] Frame 0
class Env
{
function Env () {
}
static var x0 = Stage.width / 2;
static var y0 = 155;
static var d = 400;
static var g = 2;
}
Symbol 1026 MovieClip [__Packages.Sprite] Frame 0
class Sprite extends Vertex
{
var mc, rndrX, rndrY, z, y, x, zPrev, pad;
function Sprite ($x, $y, $z, $pad, $mc) {
super($x, $y, $z, $pad);
mc = $mc;
mc._visible = false;
}
function render($destMarker, $scaleFactor, keepOnTop) {
mc._x = rndrX();
mc._y = rndrY();
var _local2 = (100 * Env.d) / (Env.d + z);
if ($scaleFactor != undefined) {
_local2 = _local2 * $scaleFactor;
}
mc._xscale = 2 * _local2;
if ($destMarker) {
mc._yscale = ((_local2 * 1.8) * (y - Env.y0)) / (z + Env.d);
mc._rotation = (Math.atan((x - Env.x0) / (z + Env.d)) * 20) / Math.PI;
} else {
mc._yscale = 2 * _local2;
if (!keepOnTop) {
if (z != zPrev) {
mc.swapDepths(-z);
zPrev = z;
}
}
}
mc._visible = true;
}
function hideIt() {
mc._visible = false;
}
function setX(scrnX) {
x = (((scrnX - Env.x0) * (Env.d + z)) / Env.d) + Env.x0;
return(x);
}
function setY(scrnY) {
y = (((scrnY - Env.y0) * (Env.d + z)) / Env.d) + Env.y0;
return(y);
}
function setZ(scrnY) {
z = (((y - Env.y0) * Env.d) / (scrnY - Env.y0)) - Env.d;
return(z);
}
function hitCheck($x, $z, $pad) {
var _local3 = x - $x;
var _local4 = pad + $pad;
if (Math.abs(_local3) < _local4) {
var _local2 = z - $z;
if (Math.abs(_local2) < _local4) {
var _local5 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (_local5 < _local4) {
return(true);
}
}
}
return(false);
}
}
Symbol 1027 MovieClip [__Packages.Polygon] Frame 0
class Polygon
{
var host, clr, lnClr, alph, v, n;
function Polygon (host_mc, c, a, vertices, lc) {
init(host_mc, c, a, vertices, lc);
}
function init(host_mc, c, a, vertices, lc) {
host = host_mc;
clr = c;
lnClr = lc;
alph = a;
if ((vertices != undefined) && (vertices != null)) {
setVertices(vertices);
}
}
function setVertices(vertices) {
v = vertices;
n = v.length;
}
function render(dx, dy, dz) {
if (dx == undefined) {
dz = 0;
dy = dz;
dx = dy;
}
host.moveTo(v[n - 1].rndrX(dx, dz), v[n - 1].rndrY(dy, dz));
host.beginFill(clr, alph);
if (lnClr != undefined) {
host.lineStyle(1, lnClr);
} else {
host.lineStyle();
}
var _local2 = 0;
while (_local2 < n) {
host.lineTo(v[_local2].rndrX(dx, dz), v[_local2].rndrY(dy, dz));
_local2++;
}
host.lineTo(v[0].rndrX(dx, dz), v[0].rndrY(dy, dz));
host.endFill();
}
}
Symbol 1028 MovieClip [__Packages.Timer] Frame 0
class Timer
{
var game, sounds, timer_mc, secs, m, s, stpd;
function Timer ($timer_mc) {
game = Game.getInstance();
sounds = Sounds.getInstance();
timer_mc = $timer_mc;
}
function reset(numSecs) {
secs = numSecs;
m = Math.floor(secs / 60);
s = secs - (m * 60);
timer_mc.mins_txt.text = m;
timer_mc.secs_txt.text = get_s(s);
stpd = false;
}
function get_s(numS) {
var _local1;
if (numS < 10) {
_local1 = "0" + numS;
} else {
_local1 = "" + numS;
}
return(_local1);
}
function takeSec() {
if (!stpd) {
secs--;
s--;
if (s == -1) {
if (takeMin()) {
s = 59;
} else {
s = 0;
game.gameOver("outOfTime");
}
}
timer_mc.secs_txt.text = get_s(s);
}
if (secs == 45) {
game.notMuchTimeLeft();
} else if (secs == 15) {
game.notMuchTimeLeft(true);
}
}
function takeMin() {
m--;
if (m < 0) {
return(false);
}
timer_mc.mins_txt.text = "" + m;
return(true);
}
function getTimebonus(maxT) {
var _local2 = 2 * secs;
return(_local2);
}
function setVis(vis) {
timer_mc._visible = vis;
}
}
Symbol 1029 MovieClip [__Packages.Sounds] Frame 0
class Sounds
{
var host, sounds;
function Sounds () {
}
static function getInstance() {
if (_instance == null) {
_instance = new Sounds();
}
return(_instance);
}
function init(host_mc) {
host = host_mc;
sounds = new Array();
addSound("themeMusic", "henrylongtheme_48_22.mp3", 50, false, true);
addSound("ting", "chimes1.mp3", 30, true);
addSound("pring", "chimes5.mp3", 60, true);
addSound("squirt", "watering_plants.mp3", 100, true);
addSound("crash1", "whack2.mp3", 40, true);
addSound("thud", "thud.wav", 100, true);
addSound("splat1", "wet_splat.WAV", 100, true);
addSound("splat2", "wet_splat.WAV", 100, true);
addSound("splat3", "wet_splat.WAV", 100, true);
addSound("splat4", "wet_splat.WAV", 100, true);
addSound("splat5", "wet_splat.WAV", 100, true);
addSound("splat6", "wet_splat.WAV", 100, true);
addSound("splat7", "wet_splat.WAV", 100, true);
addSound("splat8", "wet_splat.WAV", 100, true);
addSound("splat9", "wet_splat.WAV", 100, true);
addSound("splat10", "wet_splat.WAV", 100, true);
addSound("splat11", "wet_splat.WAV", 100, true);
addSound("splat12", "wet_splat.WAV", 100, true);
addSound("splat13", "wet_splat.WAV", 100, true);
addSound("rebuke_3_1", "dad_angryhenry.mp3", 100, true);
addSound("rebuke_3_2", "dad_henry6.mp3", 100, true);
addSound("rebuke_3_3", "dad_henryExcl.mp3", 100, true);
addSound("rebuke_3_4", "dad_henry_3.mp3", 100, true);
addSound("rebuke_2_1", "mum_angryhenry.mp3", 100, true);
addSound("rebuke_2_2", "mum_oh.mp3", 100, true);
addSound("rebuke_2_3", "mum_stopithenry.mp3", 100, true);
addSound("rebuke_2_4", "mum_thatsenoughhenry.mp3", 100, true);
addSound("rebuke_1_1", "peter_urghhenryimtelling.mp3", 100, true);
addSound("rebuke_1_2", "peter_dad.mp3", 100, true);
addSound("rebuke_1_3", "peter_mummmm.mp3", 100, true);
addSound("peterShoutForMum", "peter_mummmmm2.mp3", 100, true);
addSound("hit_1_1", "margaret_screech.mp3", 100, true);
addSound("hit_1_2", "margaret_henry.mp3", 100, true);
addSound("hit_1_3", "margaret_youllpayforthishenry.mp3", 100, true);
addSound("hit_1_4", "margaret_thatsnotverynice.mp3", 100, true);
addSound("hit_1_5", "margaret_reaction.mp3", 100, true);
addSound("celebrateHit_1_1", "margaret_evillaugh.mp3", 100, true);
addSound("celebrateHit_1_2", "margaret_laugh.mp3", 100, true);
addSound("celebrateHit_1_3", "margaret_evillaugh2.mp3", 100, true);
addSound("hit_2_1", "ralph_wellgetyouforthis.mp3", 100, true);
addSound("hit_2_2", "ralph_heyyy.mp3", 100, true);
addSound("hit_2_3", "ralph_heyyy.mp3", 100, true);
addSound("goad_2_1", "ralph_itspaybacktimehenry.mp3", 100, true);
addSound("goad_2_2", "ralph_nowitsyourturnhenry.mp3", 100, true);
addSound("headHit_2_1", "ralph_nicetryhenry.mp3", 100, true);
addSound("headHit_2_2", "ralph_erer.mp3", 100, true);
addSound("henryHit1", "henry_oof.mp3", 100, true);
addSound("henryHit2", "henry_oof.mp3", 100, true);
addSound("henryHit3", "henry_oh2.mp3", 100, true);
addSound("henryCelebrateHit1", "henry_hoho.mp3", 100, true);
addSound("henryCelebrateHit2", "henry_laugh2.mp3", 100, true);
addSound("henryCelebrateHit3", "henry_nerner.mp3", 100, true);
addSound("henryCelebrateHit4", "henry_yesss3.mp3", 100, true);
addSound("henryCelebrateHit5", "henry_yesss4.mp3", 100, true);
addSound("henryCelebrateHit6", "henry_gotcha.mp3", 100, true);
addSound("oneLeftToFind", "oneLeftToFind.wav", 100, true);
addSound("notMuchTimeLeft", "henry_notmuchtimeleft.mp3", 100, true);
addSound("notMuchTimeLeftUrgent", "notMuchTimeUrgent.wav", 100, true);
addSound("findthosegizmosgogogo", "findthosegizmosgogogo.wav", 100, true);
addSound("intro", "intro.wav", 100, true);
addSound("gotGizmo1", "gotOne.wav", 100, true);
addSound("gotGizmo2", "gotOne2.wav", 100, true);
addSound("gotGizmo3", "fantastic.wav", 100, true);
addSound("gotGizmo4", "fantastic2.wav", 100, true);
addSound("gotGizmo5", "wahey.wav", 100, true);
addSound("gotGizmo6", "fantastic2.wav", 100, true);
addSound("gotGizmo7", "fantastic2.wav", 100, true);
addSound("nothingThere1", "nonothingtk2.wav", 100, true);
addSound("nothingThere2", "henrynogizmothere.wav", 100, true);
addSound("nothingThere3", "henrynogizmotheretk2.wav", 100, true);
addSound("gotGoldGizmo", "gotGoldGizmo.wav", 100, true);
addSound("oneLeft", "findthosegizmosgogogo.wav", 100, true);
addSound("foundAllGizmos", "foundAllGizmostk2.wav", 100, true);
sounds.intro.onSoundComplete = Proxy.create(this, startMusic);
sounds.foundAllGizmos.onSoundComplete = Proxy.create(this, turnUpMusic);
}
function addSound($soundName, $soundFile, $vol, $internal, $loopIt) {
var _local4 = host.createEmptyMovieClip($soundName + "_mc", host.getNextHighestDepth());
sounds[$soundName] = new Sound2(_local4, $loopIt);
if ($internal) {
sounds[$soundName].attachSound($soundFile);
if ($soundName == "intro") {
sounds[$soundName].onSoundComplete = Proxy.create(this, startMusic);
}
} else {
sounds[$soundName].loadSound($soundFile, true);
sounds[$soundName].setVolume($vol);
sounds[$soundName].stop();
}
if ($vol == undefined) {
$vol = 100;
}
sounds[$soundName].setVolume($vol);
}
function startMusic() {
playSound("themeMusic", 50);
}
function turnUpMusic() {
fadeSound("themeMusic", 50);
}
function soundCompleted($soundName) {
sounds[$soundName].isPlaying = false;
}
function playSound($soundName, $vol, $s, $restart) {
sounds[$soundName].start($s, $vol, $restart);
}
function fadeSound($soundName, $vol) {
sounds[$soundName].fade($vol);
}
function stopSound($soundName) {
sounds[$soundName].stop();
}
function setVol($soundName, $vol) {
sounds[$soundName].setVolume($vol);
}
function stopAll($exception) {
for (var _local3 in sounds) {
if (sounds[_local3] != sounds[$exception]) {
sounds[_local3].stop();
}
}
}
static var _instance = null;
}
Symbol 1030 MovieClip [__Packages.Proxy] Frame 0
class Proxy
{
function Proxy () {
}
static function create(oTarget, fFunction) {
var aParameters = new Array();
var _local2 = 2;
while (_local2 < arguments.length) {
aParameters[_local2 - 2] = arguments[_local2];
_local2++;
}
var _local4 = function () {
var _local2 = arguments.concat(aParameters);
fFunction.apply(oTarget, _local2);
};
return(_local4);
}
}
Symbol 1031 MovieClip [__Packages.Sound2] Frame 0
class Sound2 extends Sound
{
var loopIt, onSoundComplete, isPlaying, fade_itvl, setVolume, vol, getVolume;
function Sound2 ($sound_mc, $loopIt) {
super($sound_mc);
loopIt = $loopIt;
onSoundComplete = Proxy.create(this, soundComplete);
}
function soundComplete() {
isPlaying = false;
if (loopIt) {
start(0, null, true);
}
}
function start($s, $vol, $restart) {
if ((!isPlaying) || ($restart)) {
clearInterval(fade_itvl);
stop();
if (($vol != undefined) && ($vol != null)) {
setVolume($vol);
vol = $vol;
}
isPlaying = true;
super.start($s);
} else if (isPlaying) {
setVolume($vol);
}
}
function stop() {
isPlaying = false;
super.stop();
}
function fade($vol) {
vol = getVolume();
clearInterval(fade_itvl);
if ($vol > vol) {
fade_itvl = setInterval(this, "fadeInner", 40, $vol);
} else if ($vol < vol) {
fade_itvl = setInterval(this, "fadOuter", 40, $vol);
}
}
function fadeInner($vol) {
if (vol < $vol) {
vol = vol + 2;
setVolume(vol);
} else {
clearInterval(fade_itvl);
setVolume($vol);
vol = $vol;
}
}
function fadOuter($vol) {
if (vol > $vol) {
vol = vol - 2;
setVolume(vol);
} else {
clearInterval(fade_itvl);
setVolume($vol);
vol = $vol;
if ($vol == 0) {
stop();
}
}
}
}
Symbol 1032 MovieClip [__Packages.GizmoDisplay] Frame 0
class GizmoDisplay
{
var gizmoDisplay_mc, gizmos;
function GizmoDisplay ($gizmoDisplay_mc) {
gizmoDisplay_mc = $gizmoDisplay_mc;
gizmos = new Array();
var _local2 = 1;
while (_local2 <= 30) {
var _local3 = gizmoDisplay_mc.attachMovie("gizmo", ("gizmo" + _local2) + "_mc", _local2);
_local3._x = _local2 * 20;
_local3._y = 31;
_local3.gotoAndStop(_local2);
gizmos[_local2] = new Gizmo(_local3, _local2);
_local2++;
}
}
function reset() {
for (var _local2 in gizmos) {
gizmos[_local2].collected(false);
}
setVis(true);
}
function gizmoCollected($gizmoID, $immediate) {
gizmos[$gizmoID].collected(true, $immediate);
}
function setVis($vis) {
gizmoDisplay_mc._visible = $vis;
}
}
Symbol 1033 MovieClip [__Packages.Gizmo] Frame 0
class Gizmo
{
var gizmo_mc, id, sounds, isCollected, delay_itvl, decrScale_itvl;
function Gizmo ($gizmo_mc, $id) {
gizmo_mc = $gizmo_mc;
gizmo_mc._xscale = (gizmo_mc._yscale = 80);
id = $id;
gizmo_mc.onRollOver = mx.utils.Delegate.create(this, enlarge);
gizmo_mc.onRollOut = mx.utils.Delegate.create(this, shrink);
sounds = Sounds.getInstance();
}
function enlarge() {
gizmo_mc.swapDepths(500);
gizmo_mc._xscale = (gizmo_mc._yscale = 200);
if (!isCollected) {
gizmo_mc._alpha = 55;
}
}
function shrink() {
clearInterval(delay_itvl);
clearInterval(decrScale_itvl);
decrScale_itvl = setInterval(this, "decrScale", 20);
if (!isCollected) {
gizmo_mc._alpha = 20;
}
}
function decrScale() {
if (isCollected) {
var _local2 = 90;
} else {
var _local2 = 80;
}
if (gizmo_mc._xscale > _local2) {
gizmo_mc._xscale = (gizmo_mc._yscale = gizmo_mc._yscale - 20);
} else {
clearInterval(decrScale_itvl);
gizmo_mc._xscale = (gizmo_mc._yscale = _local2);
}
}
function collected($collected, $immediate) {
if ($collected) {
if ($immediate) {
showCollected();
} else {
clearInterval(delay_itvl);
delay_itvl = setInterval(this, "showCollected", 650);
}
} else {
gizmo_mc._alpha = 25;
}
isCollected = $collected;
}
function showCollected() {
clearInterval(delay_itvl);
if (id < 4) {
sounds.playSound("pring", 60, 0, true);
} else {
sounds.playSound("ting", 30, 0, true);
}
gizmo_mc._alpha = 100;
enlarge();
delay_itvl = setInterval(this, "shrink", 1500);
}
}
Symbol 1034 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1035 MovieClip [__Packages.HenryBonus] Frame 0
class HenryBonus
{
var game, sounds, henry_mc, body_mc, arm_mc, hand_mc, x, y, z, cx, pad, toDgr, v1, v2, drencher, faulterX, faulterY, n, nMax, active, squirting, drp_x, drp_y, drp_z, drp_vx, drp_vy, drp_vz, drencherActive, celebrating;
function HenryBonus ($henry_mc) {
game = Game.getInstance();
sounds = Sounds.getInstance();
henry_mc = $henry_mc;
body_mc = $henry_mc.attachMovie("henryBack", "body_mc", 8);
var _local4 = $henry_mc.createEmptyMovieClip("drencher_mc", 6);
arm_mc = $henry_mc.attachMovie("henryArm", "arm_mc", 4);
hand_mc = $henry_mc.attachMovie("henryHand", "hand_mc", 2);
set_active(false);
x = 310;
y = 420;
z = -100;
cx = x - 40;
pad = 45;
toDgr = 57.2957795130823;
v1 = new Vertex2(0, 0, 0);
v2 = new Vertex2(0, 0, 40);
drencher = new Drencher(_local4, v2.x, v2.y - 20, v2.z - 12);
var _local2 = new Object();
_local2.onMouseDown = Proxy.create(this, squirt, true);
_local2.onMouseUp = Proxy.create(this, squirt, false);
_local2.onMouseMove = Proxy.create(this, aim);
Mouse.addListener(_local2);
}
function init() {
body_mc._y = (arm_mc._y = v1.rndrY(y, z));
faulterX = (faulterY = 0);
n = 0;
nMax = 35;
}
function update() {
if (active) {
if (Key.isDown(37)) {
x = x - 6;
aim();
}
if (Key.isDown(39)) {
x = x + 6;
aim();
}
if (x < 105) {
x = 105;
} else if (x > 610) {
x = 610;
}
if ((faulterX != 0) || (faulterY != 0)) {
aim();
}
cx = x - 40;
if (squirting) {
n++;
if (n < nMax) {
game.addDroplet(drp_x, drp_y, drp_z, drp_vx, drp_vy, drp_vz);
} else {
sounds.stopSound("squirt");
}
if (n > (nMax + 2)) {
n = 0;
nMax = 12;
sounds.playSound("squirt");
}
}
}
}
function render() {
body_mc._x = (arm_mc._x = v1.rndrX(x, z));
hand_mc._x = v2.rndrX(x, z);
hand_mc._y = v2.rndrY(y, z);
var _local3 = hand_mc._x - body_mc._x;
var _local2 = hand_mc._y - body_mc._y;
var _local5 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
arm_mc._yscale = _local5 * 2.2;
arm_mc._rotation = toDgr * Math.atan2(_local3, -_local2);
var _local4 = (200 * Env.d) / (Env.d + v1.z);
hand_mc._xscale = (hand_mc._yscale = _local4);
drencher.render(x, y, z);
}
function aim() {
if (active) {
var _local9 = 310 - x;
var _local3 = (-(((henry_mc._xmouse + faulterX) - 310) - (0.2 * _local9))) * 0.003;
var _local4 = ((henry_mc._ymouse + faulterY) - 320) * 0.0035;
if ((faulterX != 0) || (faulterY != 0)) {
faulterX = faulterX * 0.8;
faulterY = faulterY * 0.8;
if ((Math.abs(faulterX) < 1) && (Math.abs(faulterX) < 1)) {
faulterX = (faulterY = 0);
}
}
var _local5 = Math.sin(_local3);
var _local7 = Math.cos(_local3);
var _local6 = Math.sin(_local4);
var _local8 = Math.cos(_local4);
v2.rotate(_local6, _local8, _local5, _local7);
drp_vx = (v2.x1 - v1.x1) * 1.5;
drp_vy = (v2.y1 - v1.y1) * 1.5;
drp_vz = (v2.z1 - v1.z1) * 1.5;
drencher.orientate(_local6, _local8, _local5, _local7);
var _local2 = drencher.getNozzle();
drp_x = _local2.x1 + x;
drp_y = _local2.y1 + y;
drp_z = _local2.z1 + z;
}
}
function faulter() {
faulterX = 24 - (12 * Math.random());
faulterY = 24 - (12 * Math.random());
}
function squirt($tf) {
if (drencherActive) {
squirting = $tf;
if (!$tf) {
n = 0;
nMax = 35;
sounds.stopSound("squirt");
} else {
sounds.playSound("squirt");
}
}
}
function hitCheck($x, $y, $z, $pad) {
if ($y > 200) {
var _local2 = cx - $x;
var _local3 = pad + $pad;
if (Math.abs(_local2) < _local3) {
var _local5 = z - $z;
if ($z < z) {
reactToHit();
return(true);
}
}
return(false);
}
}
function celebrateHit() {
if (!celebrating) {
celebrating = true;
sounds.playSound("henryCelebrateHit" + game.getRndInt(1, 6));
_global.setTimeout(this, "endCelebration", 3000);
}
}
function endCelebration() {
celebrating = false;
}
function reactToHit() {
stopAllHenrySounds();
sounds.playSound("henryHit" + game.getRndInt(1, 6));
game.charCelebrateHit();
}
function stopAllHenrySounds() {
sounds.stopSound("henryHit1");
sounds.stopSound("henryHit2");
sounds.stopSound("henryHit3");
sounds.stopSound("henryCelebrateHit1");
sounds.stopSound("henryCelebrateHit2");
sounds.stopSound("henryCelebrateHit3");
sounds.stopSound("henryCelebrateHit4");
sounds.stopSound("henryCelebrateHit5");
sounds.stopSound("henryCelebrateHit6");
}
function enableDrencher($tf) {
drencherActive = $tf;
squirting = false;
}
function set_active($active) {
active = $active;
enableDrencher($active);
henry_mc._visible = $active;
if ($active) {
init();
henry_mc._visible = true;
aim();
}
}
}
Symbol 1036 MovieClip [__Packages.Vertex2] Frame 0
class Vertex2
{
var x, x1, y, y1, z, z1, pad;
function Vertex2 ($x, $y, $z, $pad) {
x = (x1 = $x);
y = (y1 = $y);
z = (z1 = $z);
pad = $pad;
}
function rndrX($dx, $dz) {
if ($dx == undefined) {
$dx = 0;
}
var _local2 = Env.x0 + ((((x1 + $dx) - Env.x0) * Env.d) / ((Env.d + z1) + $dz));
return(_local2);
}
function rndrY($dy, $dz) {
var _local2 = Env.y0 + ((((y1 + $dy) - Env.y0) * Env.d) / ((Env.d + z1) + $dz));
return(_local2);
}
function rotate(sinA, cosA, sinB, cosB) {
y1 = (y * cosA) + (z * sinA);
var _local2 = ((-y) * sinA) + (z * cosA);
x1 = (x * cosB) - (_local2 * sinB);
z1 = (x * sinB) + (_local2 * cosB);
}
}
Symbol 1037 MovieClip [__Packages.Drencher] Frame 0
class Drencher
{
var main_mc, upper_mc, mid_mc, lower_mc, topTank_mc, v, c, p, nozzle, v2, c2, pntDown;
function Drencher ($drencher_mc, x, y, z) {
main_mc = $drencher_mc.createEmptyMovieClip("main_mc", 1);
upper_mc = main_mc.createEmptyMovieClip("main_mc", 30);
mid_mc = main_mc.createEmptyMovieClip("main_mc", 20);
lower_mc = main_mc.createEmptyMovieClip("main_mc", 10);
topTank_mc = $drencher_mc.createEmptyMovieClip("topTank_mc", 2);
var _local12 = 14540032 /* 0xDDDD00 */;
var _local10 = 22015;
var _local15 = 56576;
var _local13 = 56576;
var _local14 = 13311;
var _local19 = 14505216 /* 0xDD5500 */;
var _local7 = 12;
var _local6 = 10;
var _local5 = 80;
var _local16 = 93;
var _local8 = 4;
var _local9 = 5;
var _local11 = 11;
var _local18 = 12;
var _local17 = 22;
v = new Array();
c = new Array();
v[0] = new Vertex2(x - _local7, y + _local6, z);
v[1] = new Vertex2(x - _local7, y - _local6, z);
v[2] = new Vertex2(x + _local7, y - _local6, z);
v[3] = new Vertex2(x + _local7, y + _local6, z);
c[0] = new Vertex2((x - _local7) - _local8, y, z - (_local8 / 2));
c[1] = new Vertex2(x, (y - _local6) - _local8, z - (_local8 / 2));
c[2] = new Vertex2((x + _local7) + _local8, y, z - (_local8 / 2));
c[3] = new Vertex2(x, (y + _local6) + _local8, z - (_local8 / 2));
v[4] = new Vertex2(x - _local7, y + _local6, z + _local5);
v[5] = new Vertex2(x - _local7, y - _local6, z + _local5);
v[6] = new Vertex2(x + _local7, y - _local6, z + _local5);
v[7] = new Vertex2(x + _local7, y + _local6, z + _local5);
c[4] = new Vertex2((x - _local7) - _local8, y, (z + _local5) + _local8);
c[5] = new Vertex2(x, (y - _local6) - _local8, (z + _local5) + _local8);
c[6] = new Vertex2((x + _local7) + _local8, y, (z + _local5) + _local8);
c[7] = new Vertex2(x, (y + _local6) + _local8, (z + _local5) + _local8);
c[8] = new Vertex2((x - _local7) - _local9, (y + _local6) + _local9, z + (_local5 / 2));
c[9] = new Vertex2((x - _local7) - _local9, (y - _local6) - _local9, z + (_local5 / 2));
c[10] = new Vertex2((x + _local7) + _local9, (y - _local6) - _local9, z + (_local5 / 2));
c[11] = new Vertex2((x + _local7) + _local9, (y + _local6) + _local9, z + (_local5 / 2));
c[12] = new Vertex2((x - _local7) - _local11, y, z + (_local5 / 2));
c[13] = new Vertex2(x, (y - _local6) - _local11, z + (_local5 / 2));
c[14] = new Vertex2((x + _local7) + _local11, y, z + (_local5 / 2));
c[15] = new Vertex2(x, (y + _local6) + _local11, z + (_local5 / 2));
c[16] = new Vertex2(x, y, z - _local18);
c[17] = new Vertex2(x, y, (z + _local5) + _local17);
v[8] = new Vertex2(x, y, z + _local5);
v[9] = new Vertex2(x, y, z + _local16);
v[10] = new Vertex2(x, y - 2, (z + _local16) - 40);
p = new Array();
p.push(new PolygonCrv(mid_mc, _local15, 100, [v[0], v[2]], [c[16]]));
p.push(new PolygonCrv(mid_mc, _local15, 100, [v[1], v[3]], [c[16]]));
p.push(new PolygonCrv(mid_mc, _local15, 100, [v[0], v[1], v[2], v[3]], [c[0], c[1], c[2], c[3]], 1118481));
p.push(new PolygonCrv(upper_mc, _local12, 100, [v[1], v[6]], [c[13]]));
p.push(new PolygonCrv(upper_mc, _local12, 100, [v[2], v[5]], [c[13]]));
p.push(new PolygonCrv(upper_mc, _local12, 100, [v[1], v[5], v[6], v[2]], [c[9], c[5], c[10], c[1]], 1118481));
p.push(new PolygonCrv(mid_mc, _local10, 100, [v[2], v[7]], [c[14]]));
p.push(new PolygonCrv(mid_mc, _local10, 100, [v[3], v[6]], [c[14]]));
p.push(new PolygonCrv(mid_mc, _local10, 100, [v[3], v[2], v[6], v[7]], [c[2], c[10], c[6], c[11]], 1118481));
p.push(new PolygonCrv(mid_mc, _local10, 100, [v[0], v[1], v[5], v[4]], [c[0], c[9], c[4], c[8]]));
p.push(new PolygonCrv(mid_mc, _local10, 100, [v[0], v[5]], [c[12]]));
p.push(new PolygonCrv(mid_mc, _local10, 100, [v[1], v[4]], [c[12]]));
p.push(new PolygonCrv(lower_mc, _local14, 100, [v[0], v[4], v[7], v[3]], [c[8], c[7], c[11], c[3]]));
p.push(new PolygonCrv(lower_mc, _local14, 100, [v[0], v[7]], [c[15]]));
p.push(new PolygonCrv(lower_mc, _local14, 100, [v[3], v[4]], [c[15]]));
p.push(new PolygonCrv(mid_mc, _local13, 100, [v[4], v[5], v[6], v[7]], [c[4], c[5], c[6], c[7]]));
p.push(new PolygonCrv(mid_mc, _local13, 100, [v[4], v[6]], [c[17]]));
p.push(new PolygonCrv(mid_mc, _local13, 100, [v[5], v[7]], [c[17]], 1118481));
nozzle = new Pin(mid_mc, _local19, v[8], v[9]);
_local12 = 65518;
_local10 = 61132;
_local15 = 16742144 /* 0xFF7700 */;
_local13 = 16742144 /* 0xFF7700 */;
_local14 = 56746;
y = y - 24;
z = z + 8;
_local7 = 8;
_local6 = 6;
_local5 = 45;
_local8 = 3;
_local9 = 4;
_local11 = 7;
_local18 = 10;
_local17 = 10;
v2 = new Array();
c2 = new Array();
v2[0] = new Vertex2(x - _local7, y + _local6, z);
v2[1] = new Vertex2(x - _local7, y - _local6, z);
v2[2] = new Vertex2(x + _local7, y - _local6, z);
v2[3] = new Vertex2(x + _local7, y + _local6, z);
c2[0] = new Vertex2((x - _local7) - _local8, y, z - (_local8 / 2));
c2[1] = new Vertex2(x, (y - _local6) - _local8, z - (_local8 / 2));
c2[2] = new Vertex2((x + _local7) + _local8, y, z - (_local8 / 2));
c2[3] = new Vertex2(x, (y + _local6) + _local8, z - (_local8 / 2));
v2[4] = new Vertex2(x - _local7, y + _local6, z + _local5);
v2[5] = new Vertex2(x - _local7, y - _local6, z + _local5);
v2[6] = new Vertex2(x + _local7, y - _local6, z + _local5);
v2[7] = new Vertex2(x + _local7, y + _local6, z + _local5);
c2[4] = new Vertex2((x - _local7) - _local8, y, (z + _local5) + _local8);
c2[5] = new Vertex2(x, (y - _local6) - _local8, (z + _local5) + _local8);
c2[6] = new Vertex2((x + _local7) + _local8, y, (z + _local5) + _local8);
c2[7] = new Vertex2(x, (y + _local6) + _local8, (z + _local5) + _local8);
c2[8] = new Vertex2((x - _local7) - _local9, (y + _local6) + _local9, z + (_local5 / 2));
c2[9] = new Vertex2((x - _local7) - _local9, (y - _local6) - _local9, z + (_local5 / 2));
c2[10] = new Vertex2((x + _local7) + _local9, (y - _local6) - _local9, z + (_local5 / 2));
c2[11] = new Vertex2((x + _local7) + _local9, (y + _local6) + _local9, z + (_local5 / 2));
c2[12] = new Vertex2((x - _local7) - _local11, y, z + (_local5 / 2));
c2[13] = new Vertex2(x, (y - _local6) - _local11, z + (_local5 / 2));
c2[14] = new Vertex2((x + _local7) + _local11, y, z + (_local5 / 2));
c2[15] = new Vertex2(x, (y + _local6) + _local11, z + (_local5 / 2));
c2[16] = new Vertex2(x, y, z - _local18);
c2[17] = new Vertex2(x, y, (z + _local5) + _local17);
v2[8] = new Vertex2(x, y, z + _local5);
v2[9] = new Vertex2(x, y, z + _local16);
v2[10] = new Vertex2(x, y - 2, (z + _local16) - 40);
p.push(new PolygonCrv(topTank_mc, _local15, 100, [v2[0], v2[2]], [c2[16]]));
p.push(new PolygonCrv(topTank_mc, _local15, 100, [v2[1], v2[3]], [c2[16]]));
p.push(new PolygonCrv(topTank_mc, _local15, 100, [v2[0], v2[1], v2[2], v2[3]], [c2[0], c2[1], c2[2], c2[3]], 1118481));
p.push(new PolygonCrv(topTank_mc, _local12, 100, [v2[1], v2[6]], [c2[13]]));
p.push(new PolygonCrv(topTank_mc, _local12, 100, [v2[2], v2[5]], [c2[13]]));
p.push(new PolygonCrv(topTank_mc, _local12, 100, [v2[1], v2[5], v2[6], v2[2]], [c2[9], c2[5], c2[10], c2[1]], 1118481));
p.push(new PolygonCrv(topTank_mc, _local10, 100, [v2[2], v2[7]], [c2[14]]));
p.push(new PolygonCrv(topTank_mc, _local10, 100, [v2[3], v2[6]], [c2[14]]));
p.push(new PolygonCrv(topTank_mc, _local10, 100, [v2[3], v2[2], v2[6], v2[7]], [c2[2], c2[10], c2[6], c2[11]], 1118481));
p.push(new PolygonCrv(topTank_mc, _local10, 100, [v2[0], v2[1], v2[5], v2[4]], [c2[0], c2[9], c2[4], c2[8]]));
p.push(new PolygonCrv(topTank_mc, _local10, 100, [v2[0], v2[5]], [c2[12]]));
p.push(new PolygonCrv(topTank_mc, _local10, 100, [v2[1], v2[4]], [c2[12]]));
p.push(new PolygonCrv(topTank_mc, _local14, 100, [v2[0], v2[4], v2[7], v2[3]], [c2[8], c2[7], c2[11], c2[3]]));
p.push(new PolygonCrv(topTank_mc, _local14, 100, [v2[0], v2[7]], [c2[15]]));
p.push(new PolygonCrv(topTank_mc, _local14, 100, [v2[3], v2[4]], [c2[15]]));
p.push(new PolygonCrv(topTank_mc, _local13, 100, [v2[4], v2[5], v2[6], v2[7]], [c2[4], c2[5], c2[6], c2[7]]));
p.push(new PolygonCrv(topTank_mc, _local13, 100, [v2[4], v2[6]], [c2[17]]));
p.push(new PolygonCrv(topTank_mc, _local13, 100, [v2[5], v2[7]], [c2[17]], 1118481));
}
function orientate(sinA, cosA, sinB, cosB) {
var _local7 = 0.4 + (0.2 * Math.abs(sinB));
if (sinA > _local7) {
if (!pntDown) {
topTank_mc.swapDepths(1);
upper_mc.swapDepths(10);
lower_mc.swapDepths(30);
}
pntDown = true;
} else {
if (pntDown) {
topTank_mc.swapDepths(2);
upper_mc.swapDepths(30);
lower_mc.swapDepths(10);
}
pntDown = false;
}
for (var _local6 in v) {
v[_local6].rotate(sinA, cosA, sinB, cosB);
}
for (var _local6 in c) {
c[_local6].rotate(sinA, cosA, sinB, cosB);
}
for (var _local6 in v2) {
v2[_local6].rotate(sinA, cosA, sinB, cosB);
}
for (var _local6 in c2) {
c2[_local6].rotate(sinA, cosA, sinB, cosB);
}
}
function render($dx, $dy, $dz) {
upper_mc.clear();
mid_mc.clear();
lower_mc.clear();
topTank_mc.clear();
nozzle.render($dx, $dy, $dz);
for (var _local5 in p) {
p[_local5].render($dx, $dy, $dz);
}
}
function getNozzle() {
return(v[10]);
}
}
Symbol 1038 MovieClip [__Packages.Pin] Frame 0
class Pin
{
var host, clr, v1, v2;
function Pin (host_mc, c, vtx1, vtx2) {
host = host_mc;
clr = c;
if (vtx1 != undefined) {
setVertices(vtx1, vtx2);
}
}
function setVertices(vtx1, vtx2) {
v1 = vtx1;
v2 = vtx2;
}
function render(dx, dy, dz) {
host.moveTo(v1.rndrX(dx, dz), v1.rndrY(dy, dz));
host.lineStyle(12, clr);
host.lineTo(v2.rndrX(dx, dz), v2.rndrY(dy, dz));
}
}
Symbol 1039 MovieClip [__Packages.PolygonCrv] Frame 0
class PolygonCrv
{
var host, clr, lnClr, alph, v, c, n;
function PolygonCrv (host_mc, c, a, vertices, ctrls, lc) {
init(host_mc, c, a, vertices, ctrls, lc);
}
function init(host_mc, c, a, vertices, ctrls, lc) {
host = host_mc;
clr = c;
lnClr = lc;
alph = a;
if ((vertices != undefined) && (vertices != null)) {
setVertices(vertices, ctrls);
}
}
function setVertices(vertices, ctrls) {
v = vertices;
c = ctrls;
n = v.length;
}
function render(dx, dy, dz) {
if (dx == undefined) {
dz = 0;
dy = dz;
dx = dy;
}
host.moveTo(v[0].rndrX(dx, dz), v[0].rndrY(dy, dz));
host.beginFill(clr, alph);
if (lnClr != undefined) {
host.lineStyle(1, lnClr);
} else {
host.lineStyle();
}
var _local2 = n - 1;
while (_local2 >= 0) {
if (c[_local2] == undefined) {
host.lineTo(v[_local2].rndrX(dx, dz), v[_local2].rndrY(dy, dz));
} else {
host.curveTo(c[_local2].rndrX(dx, dz), c[_local2].rndrY(dy, dz), v[_local2].rndrX(dx, dz), v[_local2].rndrY(dy, dz));
}
_local2--;
}
host.endFill();
}
}
Symbol 1040 MovieClip [__Packages.Location] Frame 0
class Location
{
var id, game, nogos, interactables, overlays, staticItems, itms_mc, nogos_mc, prop, xMax, xMin, zMax, zMin, scaleFactor, doors, numDoors, localGizmos;
function Location ($itms_mc, $nogos_mc, $id, $scaleFactor, $xMax, $xMin, $zMax, $zMin) {
id = $id;
game = Game.getInstance();
nogos = new Array();
interactables = new Array();
overlays = new Array();
staticItems = new Array();
itms_mc = $itms_mc;
nogos_mc = $nogos_mc;
var _local2 = game.floor_mc.getNextHighestDepth();
var _local3 = game.floor_mc.createEmptyMovieClip(("activeArea" + _local2) + "_mc", _local2);
_local2 = itms_mc.getNextHighestDepth();
var _local4 = itms_mc.attachMovie("props", ("props" + id) + "_mc", itms_mc.getNextHighestDepth());
prop = new Prop(_local3, 300, 500, _local4);
xMax = 880;
xMin = -260;
zMax = 1000;
zMin = 0;
scaleFactor = (($scaleFactor == undefined) ? 1 : ($scaleFactor));
doors = new Array();
numDoors = 0;
}
function setProp($propID) {
prop.setProp($propID);
if ($propID > 0) {
var _local2 = getViablePropLoc();
prop.setPos(_local2.x, _local2.z);
}
}
function getViablePropLoc() {
return({x:300, z:450});
}
function reset($localGizmos) {
localGizmos = $localGizmos;
trace((("locid: " + id) + " localGizmos=") + localGizmos);
var _local2 = 0;
while (_local2 < 12) {
trace("localGizmos[i]=" + localGizmos[_local2]);
interactables[_local2].setGizmo(localGizmos[_local2]);
_local2++;
}
trace("");
}
function activate($active, $onStairs) {
for (var _local3 in overlays) {
overlays[_local3]._visible = $active;
}
for (var _local3 in staticItems) {
staticItems[_local3].setVis($active);
}
for (var _local3 in interactables) {
interactables[_local3].setVis($active);
}
prop.setVis($active);
if ($onStairs) {
$active = false;
}
for (var _local3 in nogos) {
nogos[_local3].setVis($active);
}
for (var _local3 in doors) {
doors[_local3].setVis($active);
}
}
function addDoor($clickable_mc, $doorID, $destLocID, $destDoorID, $x, $z, $xWalkTo, $zWalkTo, $y, $yWalkTo, $exitDoorID) {
doors[$doorID] = new Door(game.floor_mc, $clickable_mc, $doorID, id, $destLocID, $destDoorID, $x, $z, $xWalkTo, $zWalkTo, $y, $yWalkTo, $exitDoorID);
numDoors++;
}
function getDoor($doorID) {
if ($doorID == undefined) {
$doorID = game.getRndInt(0, Math.min(numDoors - 1, 2));
}
return(doors[$doorID]);
}
function checkForExit($doorID, $x, $z) {
trace((((("**checkForExit** $doorID=" + $doorID) + ", $x=") + $x) + ", $z=") + $z);
if (doors[$doorID].isInRange($x, $z, 0)) {
return(doors[$doorID].getDest());
}
return(null);
}
function checkForProp($x, $z, $crntPropID) {
if (prop.id != 0) {
if (prop.isInRange($x, $z)) {
return(prop.getProp($crntPropID));
}
} else {
return(0);
}
}
function addNogo($xMin, $zMin, $xMax, $zMax) {
var _local3 = nogos_mc.getNextHighestDepth();
var _local4 = nogos_mc.createEmptyMovieClip(("nogo" + _local3) + "_mc", _local3);
var _local2 = new AreaRect(_local4, $xMin, $zMin, $xMax, $zMax, true);
_local2.render();
nogos.push(_local2);
}
function isForbidden($x, $z, $r) {
for (var _local5 in nogos) {
if (nogos[_local5].isInRange($x, $z, $r)) {
return(true);
}
}
if ($x > (xMax - $r)) {
return(true);
}
if ($x < (xMin + $r)) {
return(true);
}
if ($z > (zMax - $r)) {
return(true);
}
if ($z < (zMin + $r)) {
return(true);
}
return(false);
}
function legalise($x, $z, $r) {
$r = $r + 15;
if ($x > (xMax - $r)) {
$x = xMax - $r;
}
if ($x < (xMin + $r)) {
$x = xMin + $r;
}
if ($z > (zMax - $r)) {
$z = zMax - $r;
}
if ($z < (zMin + $r)) {
$z = zMin + $r;
}
for (var _local5 in nogos) {
if (nogos[_local5].isInRange($x, $z, $r)) {
nogos[_local5].legalise($x, $z, $r);
return({x:nogos[_local5].legalise($x, $z, $r).x, z:nogos[_local5].legalise($x, $z, $r).z});
}
}
return({x:$x, z:$z});
}
function addOverlay($overlay_mc) {
overlays.push($overlay_mc);
}
function addStaticItem($item_mc, $z) {
staticItems.push(new StaticItem($item_mc, $z));
}
function manageItemDepths() {
for (var _local2 in staticItems) {
staticItems[_local2].manageDepth();
}
for (var _local2 in interactables) {
interactables[_local2].manageDepth();
}
prop.manageDepth();
}
function addInteractable($xMin, $zMin, $xMax, $zMax, $itm_mc, $z, $playOnceOnly, $propRequiredID) {
var _local2 = game.floor_mc.getNextHighestDepth();
var _local3 = game.floor_mc.createEmptyMovieClip(("activeArea" + _local2) + "_mc", _local2);
var _local4 = new Interactable(_local3, $xMin, $zMin, $xMax, $zMax, $itm_mc, $z, $playOnceOnly, $propRequiredID);
interactables.push(_local4);
}
function interact($x, $z, $crntPropID) {
for (var _local6 in interactables) {
var _local2 = interactables[_local6];
if (_local2.isInRange($x, $z, $crntPropID)) {
game.getRebukes();
if ($crntPropID != 1) {
return(_local2.getGizmo());
}
}
}
return(null);
}
}
Symbol 1041 MovieClip [__Packages.AreaRect] Frame 0
class AreaRect extends Polygon
{
var xMin, zMin, xMax, zMax, rect_mc;
function AreaRect ($rect_mc, $xMin, $zMin, $xMax, $zMax, $blockClicks) {
super($rect_mc, 0, 0, [new Vertex($xMin, 500, $zMin), new Vertex($xMax, 500, $zMin), new Vertex($xMax, 500, $zMax), new Vertex($xMin, 500, $zMax)]);
xMin = $xMin;
zMin = $zMin;
xMax = $xMax;
zMax = $zMax;
rect_mc = $rect_mc;
if ($blockClicks) {
rect_mc.onPress = (rect_mc.onRelease = function () {
});
}
}
function setVis($vis) {
rect_mc._visible = $vis;
}
function isInRange($x, $z, $r) {
if ($x > (xMin - $r)) {
if ($x < (xMax + $r)) {
if ($z > (zMin - $r)) {
if ($z < (zMax + $r)) {
return(true);
}
}
}
}
return(false);
}
function legalise($x, $z, $r) {
if (($x > (xMin - $r)) && ($x < xMin)) {
$x = xMin - $r;
}
if (($x < (xMax + $r)) && ($x > xMax)) {
$x = xMax + $r;
}
if (($z > (zMin - $r)) && ($z < zMin)) {
$z = zMin - $r;
}
if (($z < (zMax + $r)) && ($z > zMax)) {
$z = zMax + $r;
}
return({x:$x, z:$z});
}
}
Symbol 1042 MovieClip [__Packages.Prop] Frame 0
class Prop extends AreaRect
{
var x, z, rx, rz, props_mc, v, id, xMin, xMax, zMin, zMax;
function Prop ($host_mc, $x, $z, $props_mc) {
super($host_mc, $x - 40, $z - 50, $x + 40, $z + 50);
x = $x;
z = $z;
rx = (rz = 10);
props_mc = $props_mc;
setProp(0);
v = new Vertex($x, 500, $z, 0);
}
function glow($glow) {
var _local2 = ($glow ? 2 : 1);
props_mc.prop_mc.gotoAndStop(_local2);
}
function setProp($propID) {
id = $propID;
props_mc.gotoAndStop($propID + 1);
switch (id) {
case 1 :
rx = 80;
rz = 180;
break;
case 2 :
rx = 40;
rz = 70;
break;
case 3 :
rx = 40;
rz = 70;
}
}
function setPos($x, $z) {
x = $x;
z = $z;
xMin = x - rx;
xMax = x + rx;
zMin = z - rz;
zMax = z + rz;
trace((("xMin=" + xMin) + ", xMax=") + xMax);
render();
}
function render() {
super.render();
v.x = x;
v.z = z;
props_mc._x = v.rndrX();
props_mc._y = v.rndrY();
var _local3 = (100 * Env.d) / (Env.d + z);
props_mc._xscale = (props_mc._yscale = 2 * _local3);
}
function getProp($crntPropID) {
trace("$crntPropID=" + $crntPropID);
var _local2 = id;
setProp($crntPropID);
return(_local2);
}
function isInRange($x, $z) {
return(super.isInRange($x, $z, 0));
}
function manageDepth() {
props_mc.swapDepths(-z);
}
function setVis($vis) {
super.setVis($vis);
props_mc._visible = $vis;
}
}
Symbol 1043 MovieClip [__Packages.Door] Frame 0
class Door extends AreaRect
{
var game, clickable_mc, id, locID, destLocID, destDoorID, exitDoorID, x, y, z, xWalkTo, yWalkTo, zWalkTo;
function Door ($host_mc, $clickable_mc, $id, $locID, $destLocID, $destDoorID, $x, $z, $xWalkTo, $zWalkTo, $y, $yWalkTo, $exitDoorID) {
super($host_mc, $x - 60, $z - 60, $x + 60, $z + 60);
game = Game.getInstance();
clickable_mc = $clickable_mc;
id = $id;
locID = $locID;
destLocID = $destLocID;
destDoorID = $destDoorID;
exitDoorID = $exitDoorID;
x = $x;
y = $y;
z = $z;
xWalkTo = $xWalkTo;
yWalkTo = $yWalkTo;
zWalkTo = $zWalkTo;
clickable_mc._alpha = 0;
clickable_mc.onPress = mx.utils.Delegate.create(this, exit);
}
function getDest() {
return({destLocID:destLocID, destDoorID:destDoorID});
}
function exit() {
game.moveToExit(0, this);
}
function setVis($vis) {
clickable_mc._visible = $vis;
}
}
Symbol 1044 MovieClip [__Packages.StaticItem] Frame 0
class StaticItem
{
var item_mc, z;
function StaticItem ($item_mc, $z) {
item_mc = $item_mc;
z = $z;
}
function setVis($vis) {
manageDepth();
item_mc._visible = $vis;
}
function manageDepth() {
item_mc.swapDepths(-z);
}
}
Symbol 1045 MovieClip [__Packages.Interactable] Frame 0
class Interactable extends AreaRect
{
var mc, z, gizmoID, propRequiredID, playOnceOnly, game, sounds;
function Interactable ($host_mc, $xMin, $zMin, $xMax, $zMax, $mc, $z, $playOnceOnly, $propRequiredID) {
super($host_mc, $xMin, $zMin, $xMax, $zMax);
mc = $mc;
z = $z;
gizmoID = null;
propRequiredID = $propRequiredID;
playOnceOnly = $playOnceOnly;
game = Game.getInstance();
sounds = Sounds.getInstance();
}
function setGizmo($gizmoID) {
gizmoID = $gizmoID;
if (gizmoID == null) {
mc.gizmo_mc._visible = false;
} else {
mc.gizmo_mc.gotoAndStop($gizmoID);
mc.gizmo_mc._visible = true;
}
mc.gotoAndStop(1);
}
function getGizmo($hideIt) {
if ($hideIt) {
mc.gizmo_mc._visible = false;
}
var _local2 = gizmoID;
gizmoID = null;
return(_local2);
}
function isInRange($x, $z, $propUsedID) {
if (super.isInRange($x, $z, 0)) {
trace("propRequiredID=" + propRequiredID);
if (propRequiredID == $propUsedID) {
if (propRequiredID != undefined) {
game.updateProp(0);
if ($propUsedID == 1) {
game.HenryClimbLadder(this);
}
}
trace("");
trace("mc=" + mc);
trace("mc._currentframe: " + mc._currentframe);
trace("playOnceOnly: " + playOnceOnly);
trace("");
if ((mc._currentframe == 1) || (!playOnceOnly)) {
mc.play();
if (gizmoID == null) {
sounds.playSound("nothingThere" + game.getRndInt(1, 12));
}
return(true);
}
}
}
return(false);
}
function manageDepth() {
mc.swapDepths(-z);
}
function setVis($vis) {
super.setVis($vis);
mc._visible = $vis;
}
}
Symbol 1046 MovieClip [__Packages.Character] Frame 0
class Character extends Sprite
{
var id, h, sh, game, sounds, move_itvl, halt_itvl, xIncr, zIncr, mc, locID, x, z, climbing, y, pad, rebuking, exitID, xTarg, yTarg, zTarg, yIncr, dir, stationary, onLadder, interactable;
function Character ($x, $y, $z, $pad, $h, $sh, $mc, $id) {
super($x, $y, $z, $pad, $mc);
id = $id;
h = $h;
sh = $sh;
game = Game.getInstance();
sounds = Sounds.getInstance();
}
function activate($active) {
if ($active) {
if (id != 0) {
readyToMove();
}
} else {
clearInterval(move_itvl);
clearInterval(halt_itvl);
xIncr = (zIncr = 0);
mc.gotoAndStop("standing");
}
}
function set_loc($locID, $x, $z, $dir) {
locID = $locID;
x = $x;
z = $z;
orientate($dir);
}
function setDepth($d) {
mc.swapDepths($d);
}
function enterLoc($locID, $doorID) {
var _local8 = game.getDoor($locID, $doorID);
var _local3 = _local8.x;
var _local2 = _local8.z;
var _local5 = _local8.xWalkTo;
var _local4 = _local8.zWalkTo;
var _local11 = _local8.exitDoorID;
climbing = ((_local11 == undefined) ? false : true);
if (id == 0) {
game.setLoc($locID, climbing);
}
if (climbing) {
y = _local8.y;
var _local10 = _local8.yWalkTo;
trace("y=" + y);
trace("$yDest=" + _local10);
} else {
y = 500;
}
if (game.charClash(id, locID, _local3, _local2, pad)) {
var _local7 = (_local8.xWalkTo - _local3) / 20;
var _local6 = (_local8.zWalkTo - _local2) / 20;
while (game.charClash(id, locID, _local3, _local2, pad)) {
_local3 = _local3 + _local7;
_local5 = _local5 + _local7;
_local2 = _local2 + _local6;
_local4 = _local4 + _local6;
}
}
if ((id == 0) || (!game.charClash(id, $locID, _local3, _local2, pad))) {
locID = $locID;
if (game.charClash(id, locID, _local3, _local2, pad)) {
var _local7 = (_local8.xWalkTo - _local3) / 20;
var _local6 = (_local8.zWalkTo - _local2) / 20;
while (game.charClash(id, locID, _local3, _local2, pad)) {
_local3 = _local3 + _local7;
_local5 = _local5 + _local7;
_local2 = _local2 + _local6;
_local4 = _local4 + _local6;
}
}
x = _local3;
z = _local2;
setDest(_local5, _local4, _local11, _local10);
} else {
readyToMove();
}
}
function readyToMove() {
var _local2 = 180 + (4000 * Math.random());
if (rebuking) {
_local2 = _local2 + 1200;
}
if (Math.random() < 0.5) {
clearInterval(move_itvl);
move_itvl = setInterval(this, "moveToExit", _local2);
} else {
var _local3 = ((Math.PI*2) * Math.random()) - Math.PI;
var _local4 = 2 + (2 * Math.random());
clearInterval(move_itvl);
move_itvl = setInterval(this, "go", _local2, _local3, _local4);
}
}
function moveToExit() {
clearInterval(move_itvl);
game.moveToExit(id);
}
function go($r, $speed) {
clearInterval(move_itvl);
exitID = null;
xIncr = $speed * Math.cos($r);
zIncr = $speed * Math.sin($r);
trace((("xIncr=" + xIncr) + ", zIncr=") + zIncr);
orientate();
clearInterval(halt_itvl);
halt_itvl = setInterval(this, "halt", 500 + (5000 * Math.random()));
}
function halt() {
clearInterval(halt_itvl);
arrived();
}
function setDest($x, $z, $exitID, $y) {
clearInterval(move_itvl);
xTarg = $x;
yTarg = $y;
zTarg = $z;
exitID = $exitID;
var _local3 = xTarg - x;
var _local5 = yTarg - y;
var _local2 = zTarg - z;
var _local6 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local4 = Math.sqrt(_local6) * 2;
xIncr = _local3 / _local4;
yIncr = _local5 / _local4;
zIncr = _local2 / _local4;
orientate();
}
function orientate($dir) {
if ($dir == undefined) {
var _local2 = Math.PI;
var _local3 = Math.atan2(zIncr, xIncr);
if (Math.abs(_local3) > (_local2 * 0.75)) {
dir = "west";
} else if (_local3 > (_local2 * 0.25)) {
dir = "north";
} else if (_local3 > ((-_local2) * 0.25)) {
dir = "east";
} else {
dir = "south";
}
} else {
dir = $dir;
}
mc.gotoAndPlay(dir);
}
function update() {
if ((Math.abs(xIncr) > 0) || (Math.abs(zIncr) > 0)) {
stationary = false;
rebuking = false;
var _local3;
var _local2;
if ((Math.abs(x - xTarg) < Math.abs(xIncr)) || (Math.abs(z - zTarg) < Math.abs(zIncr))) {
_local3 = xTarg;
_local2 = zTarg;
xIncr = (zIncr = 0);
} else {
_local3 = x + xIncr;
_local2 = z + zIncr;
if (climbing) {
y = y + yIncr;
if (onLadder) {
if (y <= 180) {
descendLadder();
} else if (y >= 500) {
y = 500;
onLadder = (climbing = false);
arrived();
}
}
}
}
var _local5 = (climbing ? false : (game.forbiddenArea(locID, _local3, _local2, pad)));
var _local4 = (climbing ? false : (game.charClash(id, locID, _local3, _local2, pad)));
if ((_local5 || ((xIncr == 0) && (zIncr == 0))) || (_local4)) {
arrived();
} else {
x = _local3;
z = _local2;
}
} else {
if (!rebuking) {
mc.gotoAndStop(dir);
}
stationary = true;
}
}
function arrived() {
xIncr = (zIncr = 0);
xTarg = (zTarg = null);
if (onLadder) {
y = 500;
onLadder = false;
climbing = false;
}
if (rebuking) {
readyToMove();
} else {
mc.gotoAndStop(dir);
if (exitID != null) {
var _local2 = game.checkForExit(id, locID, exitID, x, z);
if (_local2 != null) {
enterLoc(_local2.destLocID, _local2.destDoorID);
} else if (id != 0) {
readyToMove();
}
} else if (id != 0) {
readyToMove();
}
if (id == 0) {
game.interact(x, z);
}
}
}
function climbLadder($interactable) {
interactable = $interactable;
climbing = (onLadder = true);
x = 400;
z = 930;
xTarg = 400;
zTarg = 1000;
zIncr = 0.5;
yIncr = -5;
dir = "north";
mc.gotoAndPlay("climbing");
}
function descendLadder() {
game.collectGizmo(interactable.getGizmo(true), true);
xTarg = 400;
zTarg = 920;
zIncr = -0.5;
yIncr = 5;
}
function canYouSee($x, $z) {
switch (dir) {
case "north" :
if ($z > z) {
return(true);
}
break;
case "south" :
if ($z < z) {
return(true);
}
break;
case "east" :
if ($x > x) {
return(true);
}
break;
case "west" :
if ($x >= x) {
break;
}
return(true);
}
return(false);
}
function rebuke() {
if (!rebuking) {
sounds.playSound((("rebuke_" + id) + "_") + game.getRndInt(1, 4));
mc.gotoAndPlay("react" + game.getRndInt(1, 3));
rebuking = true;
xIncr = (zIncr = 0);
xTarg = (zTarg = null);
arrived();
game.updateScore(-25);
}
}
}
Symbol 1047 MovieClip [__Packages.CharacterBns] Frame 0
class CharacterBns extends Sprite
{
var id, h, sh, offset, launchFrame, game, sounds, delay_itvl, xIncr, zIncr, mc, locID, x, z, reacting, throwing, launched, y, xTarg, zTarg, dir, stationary, pad, hitReacting, headHitReacting, goading;
function CharacterBns ($x, $y, $z, $pad, $h, $sh, $mc, $id) {
super($x, $y, $z, $pad, $mc);
id = $id;
h = $h;
sh = $sh;
switch (id) {
case 1 :
offset = 30;
launchFrame = 122;
break;
case 2 :
offset = -30;
launchFrame = 120;
}
game = Game.getInstance();
sounds = Sounds.getInstance();
}
function activate($active) {
if ($active) {
readyToMove(1500 + (1500 * Math.random()));
} else {
clearInterval(delay_itvl);
xIncr = (zIncr = 0);
mc.gotoAndStop("standing");
}
}
function set_loc($locID, $x, $z, $dir) {
locID = $locID;
x = $x;
z = $z;
orientate($dir);
}
function setDepth($d) {
mc.swapDepths($d);
}
function readyToMove($delay) {
clearInterval(delay_itvl);
var _local2 = 0.5;
if ($delay == undefined) {
$delay = 100 + (2000 * Math.random());
} else {
_local2 = 0;
}
if ((Math.random() < _local2) && (id != 0)) {
delay_itvl = setInterval(this, "throwWB", $delay);
goad();
} else {
var _local5 = -210 + (1000 * Math.random());
var _local4 = 320 + (1100 * Math.random());
delay_itvl = setInterval(this, "setDest", $delay, _local5, _local4);
}
}
function throwWB() {
clearInterval(delay_itvl);
reacting = false;
throwing = true;
launched = false;
mc.gotoAndPlay("throw");
}
function launchWB() {
if (throwing) {
launched = true;
game.addWB(x + offset, y - sh, z);
}
}
function setDest($x, $z) {
clearInterval(delay_itvl);
reacting = false;
throwing = false;
xTarg = $x;
zTarg = $z;
var _local3 = xTarg - x;
var _local2 = zTarg - z;
var _local5 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local4 = Math.sqrt(_local5) * 2;
if (id == 0) {
_local4 = _local4 * 3;
}
xIncr = _local3 / _local4;
zIncr = _local2 / _local4;
orientate();
}
function orientate($dir) {
if ($dir == undefined) {
var _local2 = Math.PI;
var _local3 = Math.atan2(zIncr, xIncr);
if (Math.abs(_local3) > (_local2 * 0.75)) {
dir = "west";
} else if (_local3 > (_local2 * 0.25)) {
dir = "north";
} else if (_local3 > ((-_local2) * 0.25)) {
dir = "east";
} else {
dir = "south";
}
} else {
dir = $dir;
}
mc.gotoAndPlay(dir);
}
function update() {
if (throwing && (mc._currentframe > launchFrame)) {
if (!launched) {
launchWB();
}
readyToMove();
} else if ((Math.abs(xIncr) > 0) || (Math.abs(zIncr) > 0)) {
stationary = false;
mc.play();
var _local3;
var _local2;
if ((Math.abs(x - xTarg) < Math.abs(xIncr)) || (Math.abs(z - zTarg) < Math.abs(zIncr))) {
_local3 = xTarg;
_local2 = zTarg;
xIncr = (zIncr = 0);
} else {
_local3 = x + xIncr;
_local2 = z + zIncr;
}
var _local4 = game.charBnsClash(id, _local3, _local2, pad);
if (((xIncr == 0) && (zIncr == 0)) || (_local4)) {
arrived(_local4);
} else {
x = _local3;
z = _local2;
}
} else {
dir = "standing";
stationary = true;
}
}
function arrived($charClash) {
xIncr = (zIncr = 0);
xTarg = (zTarg = null);
mc.gotoAndStop("standing");
var _local2;
if ($charClash) {
_local2 = 100;
}
readyToMove(_local2);
}
function reactToHit() {
if (!reacting) {
reacting = true;
throwing = false;
if ((dir == "east") || (dir == "west")) {
xIncr = xIncr * 1.6;
zIncr = zIncr * 1.6;
} else {
xIncr = (zIncr = 0);
if (id == 0) {
mc.stop();
mc.gotoAndPlay("hit");
sounds.playSound("peterShoutForMum");
clearInterval(delay_itvl);
} else {
stopAllCelebrations();
stopAllHitReactions();
stopAllGoads();
vocalReaction();
mc.gotoAndPlay("hit");
readyToMove(700);
}
}
}
}
function vocalReaction() {
if (!hitReacting) {
hitReacting = true;
sounds.playSound((("hit_" + id) + "_") + game.getRndInt(1, 6), getVolume());
_global.setTimeout(this, "finishAction", 4000, "hitReacting");
}
}
function reactToHeadHit() {
if ((!reacting) && (!headHitReacting)) {
headHitReacting = true;
sounds.playSound((("headHit_" + id) + "_") + game.getRndInt(1, 4), getVolume());
_global.setTimeout(this, "finishAction", 3000, "headHitReacting");
}
}
function getVolume() {
return(120 - (z / 30));
}
function stopAllCelebrations() {
sounds.stopSound(("celebrateHit_" + id) + "_1");
sounds.stopSound(("celebrateHit_" + id) + "_2");
sounds.stopSound(("celebrateHit_" + id) + "_3");
}
function stopAllHitReactions() {
sounds.stopSound(("hit_" + id) + "_1");
sounds.stopSound(("hit_" + id) + "_2");
sounds.stopSound(("hit_" + id) + "_3");
sounds.stopSound(("hit_" + id) + "_4");
sounds.stopSound(("headHit_" + id) + "_1");
sounds.stopSound(("headHit_" + id) + "_2");
}
function celebrateHit() {
stopAllCelebrations();
stopAllHitReactions();
sounds.playSound((("celebrateHit_" + id) + "_") + game.getRndInt(1, 6), getVolume(), 0, true);
}
function stopAllGoads() {
sounds.stopSound(("goad_" + id) + "_1");
sounds.stopSound(("goad_" + id) + "_2");
}
function goad() {
if (!goading) {
goading = true;
stopAllGoads();
sounds.playSound((("goad_" + id) + "_") + game.getRndInt(1, 4), getVolume(), 0, true);
_global.setTimeout(this, "finishAction", 8000, "goading");
}
}
function finishAction($action) {
this[$action] = false;
}
}
Symbol 1048 MovieClip [__Packages.ArrayShuffler] Frame 0
class ArrayShuffler
{
function ArrayShuffler () {
}
static function shuffle(rndArray) {
var _local5 = rndArray.length;
var _local1 = 0;
while (_local1 < _local5) {
var _local3 = Math.floor(Math.random() * _local5);
var _local4 = rndArray[_local1];
rndArray[_local1] = rndArray[_local3];
rndArray[_local3] = _local4;
_local1++;
}
return(rndArray);
}
}
Symbol 1049 MovieClip [__Packages.Particle] Frame 0
class Particle extends Vertex
{
var xPrev, x, yPrev, y, zPrev, z, fx, fy, fz, mass, drag, game, col, active, vx, vy, vz, pad;
function Particle ($x, $y, $z, $pad) {
super($x, $y, $z, $pad);
xPrev = x;
yPrev = y;
zPrev = z;
fx = (fy = (fz = 0));
mass = 0.5;
drag = 0.994;
game = Game.getInstance();
col = null;
set_active(true);
}
function setPos($x, $y, $z) {
x = (xPrev = $x);
y = (yPrev = $y);
z = (zPrev = $z);
}
function setV($vx, $vy, $vz) {
xPrev = x - $vx;
yPrev = y - $vy;
zPrev = z - $vz;
}
function update() {
if (active) {
var _local2 = game.getBoundaries(x, y, z);
vx = x - xPrev;
vy = y - yPrev;
vz = z - zPrev;
xPrev = x;
yPrev = y;
zPrev = z;
vx = vx + fx;
vy = vy + fy;
vz = vz + fz;
vy = vy + Env.g;
vx = vx * drag;
vy = vy * drag;
vz = vz * drag;
x = x + vx;
y = y + vy;
z = z + vz;
if (game.hitCheck(x, y, z, pad, vz, this)) {
set_active(false, 6);
} else if (z > _local2.zMax) {
zPrev = z;
z = _local2.zMax - 2;
set_active(false, 5);
} else if (x > (_local2.xMax - pad)) {
xPrev = x;
x = _local2.xMax;
set_active(false, 2);
} else if (x < (_local2.xMin + pad)) {
xPrev = x;
x = _local2.xMin;
set_active(false, 3);
} else if (y > (_local2.yMax - pad)) {
yPrev = y;
y = _local2.yMax;
set_active(false, 4);
}
}
}
function set_active($active, $col) {
active = $active;
col = $col;
}
}
Symbol 1050 MovieClip [__Packages.SpriteFree] Frame 0
class SpriteFree extends Particle
{
var setV, mc, cldd, col, rndrX, rndrY, z, game, set_active;
function SpriteFree ($x, $y, $z, $vx, $vy, $vz, $mc, $pad) {
super($x, $y, $z, $pad);
setV($vx, $vy, $vz);
mc = $mc;
mc._visible = false;
}
function render() {
if (!cldd) {
if (col != null) {
cldd = true;
if (col == 6) {
mc._x = rndrX();
mc._y = rndrY();
mc._alpha = 100;
mc._rotation = 360 * Math.random();
}
mc.gotoAndStop(col);
} else {
mc._visible = true;
mc._x = rndrX();
mc._y = rndrY();
if (z > 250) {
mc.swapDepths(-z);
}
mc._alpha = 100 - (0.05 * z);
scaleIt();
}
} else {
mc._alpha = mc._alpha - 1.5;
if (mc._alpha < 2) {
game.removeDroplet(this);
}
}
}
function scaleIt() {
var _local2 = (150 * Env.d) / (Env.d + z);
mc._xscale = (mc._yscale = _local2);
}
function remove() {
mc.swapDepths(1);
mc.removeMovieClip();
set_active(false);
}
}
Symbol 1051 MovieClip [__Packages.Droplet] Frame 0
class Droplet extends SpriteFree
{
var toDgr;
function Droplet ($x, $y, $z, $vx, $vy, $vz, $mc, $pad) {
super($x, $y, $z, $vx, $vy, $vz, $mc, $pad);
toDgr = 57.2957795130823;
render();
}
function render() {
super.render();
}
}
Symbol 1052 MovieClip [__Packages.WB] Frame 0
class WB extends SpriteFree
{
var drag, mc, r_incr, cldd, z, game;
function WB ($x, $y, $z, $vx, $vy, $vz, $mc, $pad) {
super($x, $y, $z, $vx, $vy, $vz, $mc, $pad);
drag = 0.999;
mc.colours_mc._rotation = 360 * Math.random();
r_incr = (14 * Math.random()) - 7;
}
function update() {
super.update();
}
function render() {
super.render();
if (!cldd) {
mc.colours_mc._rotation = mc.colours_mc._rotation + r_incr;
mc._alpha = 100 - (0.03 * z);
}
if (mc._alpha < 2) {
game.removeWB(this);
}
}
}
Symbol 1053 MovieClip [__Packages.LeaderBoard] Frame 0
class LeaderBoard
{
var leaderBoard_mc, LBtable_mc, loadingMsg_mc, XMLobj, fromRank, numEntries, topScores;
function LeaderBoard ($leaderBoard_mc) {
leaderBoard_mc = $leaderBoard_mc;
LBtable_mc = $leaderBoard_mc.LBtable_mc;
loadingMsg_mc = $leaderBoard_mc.loadingMsg_mc;
XMLobj = new XML();
XMLobj.ignoreWhite = true;
XMLobj.onLoad = mx.utils.Delegate.create(this, scoresReceived);
LBtable_mc.scrollPrevious_btn.onPress = mx.utils.Delegate.create(this, prev10);
LBtable_mc.scrollNext_btn.onPress = mx.utils.Delegate.create(this, next10);
}
function prev10() {
if (fromRank > 1) {
fromRank = fromRank - 10;
displayScores();
}
}
function next10() {
if ((fromRank + 9) < numEntries) {
fromRank = fromRank + 10;
displayScores();
}
}
function displayLoadingMsg() {
LBtable_mc._visible = false;
loadingMsg_mc._visible = true;
}
function loadScores($playerName, $score) {
displayLoadingMsg();
var _local2 = new LoadVars();
if (($playerName != undefined) && ($score != undefined)) {
_local2.score = $score + "";
_local2.playerName = $playerName;
}
_local2.sendAndLoad("getScores.php", XMLobj, "POST");
}
function scoresReceived() {
topScores = [];
var _local5 = XMLobj.firstChild;
trace("XMLobj=" + XMLobj);
for (var _local7 in _local5.childNodes) {
var _local2 = _local5.childNodes[_local7];
var _local3 = _local2.attributes.rank;
topScores[_local3] = new Object();
for (var _local6 in _local2.childNodes) {
var _local4 = _local2.childNodes[_local6].firstChild.nodeValue;
topScores[_local3][_local2.childNodes[_local6].nodeName] = _local2.childNodes[_local6].firstChild.nodeValue;
}
}
numEntries = topScores.length - 1;
trace("numEntries=" + numEntries);
fromRank = 1;
displayScores();
}
function trimIt(str) {
while (((str.charCodeAt(0) == 9) || (str.charCodeAt(0) == 10)) || (str.charCodeAt(0) == 13)) {
str = str.substring(1, str.length);
}
while (((str.charCodeAt(str.length - 1) == 9) || (str.charCodeAt(str.length - 1) == 10)) || (str.charCodeAt(str.length - 1) == 13)) {
str = str.substring(0, str.length - 1);
}
return(str);
}
function displayScores() {
var _local2 = 0;
while (_local2 < 10) {
var _local3 = LBtable_mc[("entry" + (_local2 + 1)) + "_mc"];
_local3.rank_txt.text = fromRank + _local2;
if (topScores[fromRank + _local2] != undefined) {
_local3.name_txt.text = topScores[fromRank + _local2].playerName;
_local3.score_txt.text = topScores[fromRank + _local2].score;
_local3.date_txt.text = topScores[fromRank + _local2].date;
} else {
_local3.name_txt.text = (_local3.score_txt.text = (_local3.date_txt.text = "---"));
}
_local2++;
}
loadingMsg_mc._visible = false;
LBtable_mc._visible = true;
}
}