Frame 2
derBytesTotal = _root.getBytesTotal();
Frame 4
derPercentLoaded = (_root.getBytesLoaded() / derBytesTotal) * 100;
loadedPercent.gotoAndStop(Math.round(derPercentLoaded));
if (derPercentLoaded >= 100) {
gotoAndPlay (9);
} else {
gotoAndPlay (3);
}
Frame 18
function isSoundOn() {
trace("is");
if (globalSound.getVolume() == 100) {
return(1);
}
return(0);
}
function turnSoundOn() {
globalSound.setVolume(100);
}
function turnSoundOff() {
globalSound.setVolume(0);
}
globalSound = new Sound(_root);
Frame 29
popups.gotoAndPlay("instructions");
Frame 31
stop();
Frame 43
stageWidth = 400;
stageHeight = 500;
gameOn = 1;
resetGame = 0;
pigletVert = "middle";
pigletHorz = "middle";
scoreLocal = 0;
scoreAlive = 0.07;
scoreHoney = 30;
pigletHurt = 0;
beeHits = 0;
beeHitsMax = 3;
dropsCollected = 0;
dropsPerJar = 13;
createHoneyDropChance = 0.01;
createBeeChance = 0.02;
createBeeWait = 0;
createBeeWaitMin = 50;
createBeeWaitMax = 150;
createBeeWaitCurrent = createBeeWaitMax;
createBeeWaitDecrement = 7;
createBeeWaitDeviate = 30;
createBeeWaitCounter = 0;
beehives = new Array(beehiveOne, beehiveTwo, beehiveThree);
pigletAnimating = 0;
dupeCounter = 0;
pigletBodyHit = pigletStiltsOuter.pigletStilts.piglet.pigletCollisionBox;
pigletBucketHit = pigletStiltsOuter.pigletStilts.piglet.jarCollisionBox;
Instance of Symbol 137 MovieClip "beehiveOne" in Frame 43
onClipEvent (load) {
beehiveHorz = "left";
}
Instance of Symbol 137 MovieClip "beehiveTwo" in Frame 43
onClipEvent (load) {
beehiveHorz = "middle";
}
Instance of Symbol 137 MovieClip "beehiveThree" in Frame 43
onClipEvent (load) {
beehiveHorz = "right";
}
Instance of Symbol 61 MovieClip in Frame 43
onClipEvent (keyDown) {
var lastKey = Key.getCode();
if (lastKey == 38) {
_parent.upArrowPressed();
} else if (lastKey == 39) {
_parent.rightArrowPressed();
} else if (lastKey == 40) {
_parent.downArrowPressed();
} else if (lastKey == 37) {
_parent.leftArrowPressed();
}
}
Frame 44
function upArrowPressed() {
if ((pigletAnimating == 0) and (gameOn == 1)) {
if (pigletVert eq "bottom") {
pigletVert = "middle";
pigletStiltsOuter.pigletStilts.gotoAndPlay("bottomToMiddle");
} else if (pigletVert eq "middle") {
pigletVert = "top";
pigletStiltsOuter.pigletStilts.gotoAndPlay("middleToTop");
}
}
}
function downArrowPressed() {
if ((pigletAnimating == 0) and (gameOn == 1)) {
if (pigletVert eq "top") {
pigletVert = "middle";
pigletStiltsOuter.pigletStilts.gotoAndPlay("topToMiddle");
} else if (pigletVert eq "middle") {
pigletVert = "bottom";
pigletStiltsOuter.pigletStilts.gotoAndPlay("middleToBottom");
}
}
}
function rightArrowPressed() {
if ((pigletAnimating == 0) and (gameOn == 1)) {
if (pigletHorz eq "left") {
pigletHorz = "middle";
pigletStiltsOuter.gotoAndPlay("leftToMiddle");
} else if (pigletHorz eq "middle") {
pigletHorz = "right";
pigletStiltsOuter.gotoAndPlay("middleToRight");
}
}
}
function leftArrowPressed() {
if ((pigletAnimating == 0) and (gameOn == 1)) {
if (pigletHorz eq "right") {
pigletHorz = "middle";
pigletStiltsOuter.gotoAndPlay("rightToMiddle");
} else if (pigletHorz eq "middle") {
pigletHorz = "left";
pigletStiltsOuter.gotoAndPlay("middleToLeft");
}
}
}
function getCreateBeeWait() {
createBeeWaitCounter = 0;
createBeeWaitCurrent = createBeeWaitCurrent - createBeeWaitDecrement;
if (createBeeWaitCurrent < createBeeWaitMin) {
createBeeWaitCurrent = createBeeWaitMin;
}
createBeeWait = (createBeeWaitCurrent + Math.round(Math.random() * createBeeWaitDeviate)) - (createBeeWaitDeviate / 2);
}
function createBee() {
var newBeeName = ("bee" add dupeCounter);
duplicateMovieClip ("masterBee", newBeeName, dupeCounter + 100);
dupeCounter++;
}
function caughtDrop() {
dropsCollected++;
var dropsThisJar = (dropsCollected % dropsPerJar);
var dropsThisJarPercent = ((dropsThisJar / dropsPerJar) * 100);
trace((((("dropsCollected=" add dropsCollected) add " thisJarPercent=") add Math.round(dropsThisJarPercent)) add " jarsCollected=") add Math.floor(dropsCollected / dropsPerJar));
if (dropsThisJar == 0) {
interface.jarCounter.gotoAndStop(Math.floor(dropsCollected / dropsPerJar) + 1);
}
interface.jarProgress.gotoAndStop(Math.round(dropsThisJarPercent) + 1);
scoreLocal = scoreLocal + scoreHoney;
soundMovie.gotoAndPlay("catchDrop");
}
function hitBee() {
if (pigletHurt == 0) {
beeHits++;
pigletHurt = 1;
interface.beeCounter.gotoAndStop(beeHits + 1);
if (beeHits >= beeHitsMax) {
gameOn = 0;
pigletStiltsOuter.pigletStilts.gotoAndPlay(pigletVert add "fall");
} else {
soundMovie.gotoAndPlay("ooh");
pigletStiltsOuter.pigletStilts.piglet.acFlicker.doFlicker();
}
}
}
function gameOver() {
popups.gotoAndPlay("gameOver");
}
Frame 45
getCreateBeeWait();
Frame 47
if (gameOn == 1) {
scoreLocal = scoreLocal + scoreAlive;
interface.scoreOutput = Math.round(scoreLocal);
if (createBeeWaitCounter >= createBeeWait) {
getCreateBeeWait();
createBee();
} else {
createBeeWaitCounter++;
}
}
if (resetGame == 1) {
gotoAndPlay (41);
} else {
gotoAndPlay (46);
}
Symbol 24 Button
on (release) {
getURL ("http://www.pigletsbigmovie.com", "_blank");
}
Symbol 27 Button
on (release) {
getURL ("javascript:top.window.close();", "_self");
}
Symbol 39 Button
on (release) {
play();
}
Symbol 44 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 14
stop();
Symbol 44 MovieClip Frame 23
_parent.gotoAndPlay("reset");
gotoAndPlay (1);
Symbol 44 MovieClip Frame 30
jarsLocalNum = _parent.interface.jarCounter._currentframe - 1;
if (jarsLocalNum == 1) {
jarsLocal = "1 jar";
} else {
jarsLocal = jarsLocalNum add " jars";
}
trace(jarsLocal);
Symbol 44 MovieClip Frame 44
stop();
Symbol 44 MovieClip Frame 54
_parent.resetGame = 1;
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 19
gotoAndStop (1);
Symbol 95 MovieClip Frame 1
jarCollisionBox._visible = 0;
pigletCollisionBox._visible = 0;
stop();
Instance of Symbol 61 MovieClip "acFlicker" in Symbol 95 MovieClip Frame 1
onClipEvent (load) {
function doFlicker() {
trace("doFlicker");
if (0 >= flickerCountdown) {
flickerCountdown = flickerCountdownSet;
}
trace(flickerCountdown);
_parent.stars._visible = 1;
}
this._visible = 0;
flickerAlpha = 65;
flickerCountdown = 0;
flickerCountdownSet = 60;
_parent.stars._visible = 0;
}
onClipEvent (enterFrame) {
if (0 < flickerCountdown) {
flickerCountdown--;
if ((0 >= flickerCountdown) and (_parent.stars._visible == 1)) {
_parent.stars._visible = 0;
_parent._parent._parent._parent.pigletHurt = 0;
}
}
}
Symbol 95 MovieClip Frame 24
gotoAndStop (1);
Symbol 95 MovieClip Frame 43
gotoAndStop (1);
Symbol 95 MovieClip Frame 53
_parent._parent._parent.soundMovie.gotoAndPlay("whistleUp");
Symbol 95 MovieClip Frame 64
gotoAndStop (1);
Symbol 95 MovieClip Frame 74
_parent._parent._parent.soundMovie.gotoAndPlay("whistleDown");
Symbol 95 MovieClip Frame 83
gotoAndStop (1);
Symbol 95 MovieClip Frame 102
gotoAndStop (1);
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 5
Set("../../:pigletAnimating", 1);
tellTarget ("piglet") {
gotoAndPlay ("jumpUp");
};
Symbol 110 MovieClip Frame 20
Set("../../:pigletAnimating", 0);
stop();
Symbol 110 MovieClip Frame 25
Set("../../:pigletAnimating", 1);
tellTarget ("piglet") {
gotoAndPlay ("jumpDown");
};
Symbol 110 MovieClip Frame 39
Set("../../:pigletAnimating", 0);
stop();
Symbol 110 MovieClip Frame 45
Set("../../:pigletAnimating", 1);
tellTarget ("piglet") {
gotoAndPlay ("jumpDown");
};
Symbol 110 MovieClip Frame 59
Set("../../:pigletAnimating", 0);
stop();
Symbol 110 MovieClip Frame 65
Set("../../:pigletAnimating", 1);
tellTarget ("piglet") {
gotoAndPlay ("jumpUp");
};
Symbol 110 MovieClip Frame 80
Set("../../:pigletAnimating", 0);
stop();
Symbol 110 MovieClip Frame 90
_parent._parent.soundMovie.gotoAndPlay("pigletHit");
play();
Symbol 110 MovieClip Frame 104
_parent._parent.soundMovie.gotoAndPlay("pigletLand");
Symbol 110 MovieClip Frame 115
_parent._parent.gameOver();
stop();
Symbol 110 MovieClip Frame 120
_parent._parent.soundMovie.gotoAndPlay("pigletHit");
play();
Symbol 110 MovieClip Frame 133
_parent._parent.soundMovie.gotoAndPlay("pigletLand");
Symbol 110 MovieClip Frame 145
_parent._parent.gameOver();
stop();
Symbol 110 MovieClip Frame 150
_parent._parent.soundMovie.gotoAndPlay("pigletHit");
play();
Symbol 110 MovieClip Frame 160
_parent._parent.soundMovie.gotoAndPlay("pigletLand");
Symbol 110 MovieClip Frame 175
_parent._parent.gameOver();
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 5
Set("../:pigletAnimating", 1);
tellTarget ("pigletStilts/piglet") {
gotoAndPlay ("jumpRight");
};
tellTarget ("pigletStilts/stilts") {
gotoAndPlay ("jumpRight");
};
Symbol 111 MovieClip Frame 8
_parent.soundMovie.gotoAndPlay("spring");
Symbol 111 MovieClip Frame 18
Set("../:pigletAnimating", 0);
stop();
Symbol 111 MovieClip Frame 25
Set("../:pigletAnimating", 1);
tellTarget ("pigletStilts/piglet") {
gotoAndPlay ("jumpLeft");
};
tellTarget ("pigletStilts/stilts") {
gotoAndPlay ("jumpLeft");
};
Symbol 111 MovieClip Frame 29
_parent.soundMovie.gotoAndPlay("spring");
Symbol 111 MovieClip Frame 38
Set("../:pigletAnimating", 0);
stop();
Symbol 111 MovieClip Frame 45
Set("../:pigletAnimating", 1);
tellTarget ("pigletStilts/piglet") {
gotoAndPlay ("jumpLeft");
};
tellTarget ("pigletStilts/stilts") {
gotoAndPlay ("jumpLeft");
};
Symbol 111 MovieClip Frame 49
_parent.soundMovie.gotoAndPlay("spring");
Symbol 111 MovieClip Frame 58
Set("../:pigletAnimating", 0);
stop();
Symbol 111 MovieClip Frame 65
Set("../:pigletAnimating", 1);
tellTarget ("pigletStilts/piglet") {
gotoAndPlay ("jumpRight");
};
tellTarget ("pigletStilts/stilts") {
gotoAndPlay ("jumpRight");
};
Symbol 111 MovieClip Frame 68
_parent.soundMovie.gotoAndPlay("spring");
Symbol 111 MovieClip Frame 78
Set("../:pigletAnimating", 0);
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 1
stop();
Symbol 118 Button
on (release) {
_parent._parent.turnSoundOff();
gotoAndStop (10);
}
Symbol 120 Button
on (release) {
_parent._parent.turnSoundOn();
gotoAndStop (5);
}
Symbol 121 MovieClip Frame 1
if (_parent._parent.isSoundOn() == 1) {
gotoAndPlay (5);
} else {
gotoAndPlay (10);
}
Symbol 121 MovieClip Frame 5
stop();
Symbol 121 MovieClip Frame 10
stop();
Symbol 122 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 1
stop();
Instance of Symbol 61 MovieClip in Symbol 131 MovieClip Frame 1
onClipEvent (load) {
pokeWaitMin = 150;
pokeWaitMax = 400;
pokeWait = pokeWaitMin + Math.round(Math.random() * (pokeWaitMax - pokeWaitMin));
pokeWaitCounter = 0;
charLabels = new Array("poohLeft", "tiggerLeft", "poohRight", "tiggerRight");
}
onClipEvent (enterFrame) {
pokeWaitCounter++;
if ((pokeWaitCounter >= pokeWait) and (_parent._parent.gameOn == 1)) {
var charInd = Math.floor(Math.random() * charLabels.length);
trace((((("l=" add charLabels.length) add " cI=") add charInd) add " going to ") add charLabels[charInd]);
_parent.gotoAndPlay(charLabels[charInd]);
}
}
Symbol 131 MovieClip Frame 108
gotoAndStop (1);
Symbol 131 MovieClip Frame 158
gotoAndStop (1);
Symbol 131 MovieClip Frame 255
gotoAndStop (1);
Symbol 132 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 1
dropCutoff = 420;
fallingSpeedCurrent = 0;
fallingSpeedAccelPercent = 0.5;
fallingSpeedMax = 5;
Symbol 134 MovieClip Frame 2
stop();
Symbol 134 MovieClip Frame 5
fallingSpeedCurrent = fallingSpeedCurrent + (fallingSpeedAccelPercent * (fallingSpeedMax - fallingSpeedCurrent));
newY = this._y + fallingSpeedCurrent;
if (dropCutoff < newY) {
_parent["puddle" add dropHorz].nextFrame();
_parent.soundMovie.gotoAndPlay("splat");
removeMovieClip("");
} else {
this._y = this._y + fallingSpeedCurrent;
}
if (this.hitTest(_parent.pigletBucketHit)) {
_parent.caughtDrop();
removeMovieClip("");
}
if (_parent.gameOn == 0) {
removeMovieClip("");
}
gotoAndPlay (4);
Symbol 135 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 5
stop();
Symbol 136 MovieClip Frame 1
beeSpeed = 5;
beeYMin = 70;
beeYMax = 450;
beeStopX = 0;
edgeBuffer = 30;
if (this._name eq "masterBee") {
stop();
}
Symbol 136 MovieClip Frame 2
if (Math.random() < 0.5) {
beeFlyingRight = 1;
beeStopX = ../:stageWidth + edgeBuffer;
this._x = -edgeBuffer;
beeDirection.gotoAndStop("right");
} else {
beeFlyingRight = -1;
beeStopX = -edgeBuffer;
this._x = ../:stageWidth + edgeBuffer;
beeDirection.gotoAndStop("left");
}
this._y = beeYMin + (Math.random() * (beeYMax - beeYMin));
Symbol 136 MovieClip Frame 4
this._x = this._x + (beeFlyingRight * beeSpeed);
if (beeFlyingRight == 1) {
if (beeStopX < this._x) {
removeMovieClip("");
}
} else if (this._x < beeStopX) {
removeMovieClip("");
}
if (this.hitTest(_parent.pigletBodyHit)) {
_parent.hitBee();
}
gotoAndPlay (3);
Symbol 137 MovieClip Frame 1
this._visible = 0;
dropScaleCurrent = 1;
dropScaleIncrease = 3;
dropScaleFinal = 100;
newDropName = "";
dropCreateWait = 0;
dropCreateWaitMin = 40;
dropCreateWaitMax = 150;
dropCreateWaitCounter = 0;
Symbol 137 MovieClip Frame 2
function getNewDropCreateWait() {
dropCreateWaitCounter = 0;
dropCreateWait = dropCreateWaitMin + Math.round(Math.random() * (dropCreateWaitMax - dropCreateWaitMin));
}
function makeHoneyDrop() {
if (newDropName eq "") {
dropScaleCurrent = 1;
newDropName = "drop" add ../:dupeCounter;
duplicateMovieClip ("../masterDrop", newDropName, ../:dupeCounter + 100);
setProperty("../" add newDropName, _x , this._x);
setProperty("../" add newDropName, _y , this._y);
setProperty("../" add newDropName, _xscale , dropScaleCurrent);
setProperty("../" add newDropName, _yscale , dropScaleCurrent);
_parent[newDropName].dropHorz = beehiveHorz;
../:dupeCounter++;
}
}
Symbol 137 MovieClip Frame 3
getNewDropCreateWait();
dropCreateWaitCounter = Math.round(Math.random() * dropCreateWait);
Symbol 137 MovieClip Frame 5
if ((newDropName == "") and (_parent.gameOn == 1)) {
dropCreateWaitCounter++;
if (dropCreateWaitCounter >= dropCreateWait) {
getNewDropCreateWait();
makeHoneyDrop();
}
}
if (newDropName ne "") {
dropScaleCurrent = dropScaleCurrent + dropScaleIncrease;
if (dropScaleCurrent >= dropScaleFinal) {
setProperty("../" add newDropName, _xscale , dropScaleMax);
setProperty("../" add newDropName, _yscale , dropScaleMax);
tellTarget ("../" add newDropName) {
gotoAndPlay ("run_loop");
};
newDropName = "";
} else {
setProperty("../" add newDropName, _xscale , dropScaleCurrent);
setProperty("../" add newDropName, _yscale , dropScaleCurrent);
}
}
gotoAndPlay (4);
Symbol 147 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 9
gotoAndStop (1);
Symbol 147 MovieClip Frame 16
gotoAndStop (1);
Symbol 147 MovieClip Frame 26
gotoAndStop (1);
Symbol 147 MovieClip Frame 36
gotoAndStop (1);
Symbol 147 MovieClip Frame 46
gotoAndStop (1);
Symbol 147 MovieClip Frame 56
gotoAndStop (1);
Symbol 147 MovieClip Frame 66
gotoAndStop (1);
Symbol 147 MovieClip Frame 76
gotoAndStop (1);