Frame 1
this.onEnterFrame = function () {
if (_framesloaded >= _totalframes) {
gotoAndPlay (2);
} else {
gotoAndPlay (1);
}
};
Frame 2
function DeleteParticle(nr) {
removeMovieClip(Particles[nr]);
Particles[nr] = null;
}
function DeleteAllParticles() {
i = 0;
while (i < Particles.length) {
if (Particles[i] != null) {
DeleteParticle(i);
}
i++;
}
}
function ParticleSystem_Update(ingame) {
if (ingame) {
EmitterSpawnIntervalCounter = EmitterSpawnIntervalCounter + 1;
if (EmitterSpawnIntervalCounter > ((EmitterSpawnInterval + EmitterSpawnIntervalFluct) - _global.dropSpawnRate)) {
EmitterSpawnIntervalCounter = 0;
EmitterSpawnIntervalFluct = ((Math.random() * 10) - 5) - _global.dropSpawnRate;
ParticleSystem_SpawnRandomTypeParticle();
}
}
i = 0;
while (i < Particles.length) {
if (Particles[i] != null) {
if (mouth.hitTest(Particles[i]) and ingame) {
NicoleEat(i, ParticleDirection[i].d);
} else {
ParticleDirection[i].b = ParticleDirection[i].b + Gravity;
Particles[i]._x = Particles[i]._x + ParticleDirection[i].a;
Particles[i]._y = Particles[i]._y + ParticleDirection[i].b;
Particles[i]._rotation = Particles[i]._rotation + ParticleDirection[i].c;
if (Particles[i]._y > Stage.height) {
removeMovieClip(Particles[i]);
Particles[i] = null;
}
if (((Particles[i]._x + (Particles[i]._width / 2)) > Stage.width) || (Particles[i]._x < 0)) {
ParticleDirection[i].a = -ParticleDirection[i].a;
}
}
}
i++;
}
}
function ParticleSystem_SpawnRandomTypeParticle() {
i = 0;
while (i < Particles.length) {
if (Particles[i] == null) {
var _local4 = new flash.geom.Matrix();
_local4.a = (Math.random() * 20) - 10;
_local4.b = (2 + (Math.random() * 2)) + _global.dropSpawnRate;
_local4.c = (Math.random() * 20) - 10;
var _local5 = (Math.random() * 2) - 0.5;
if (_local5 > 1.4) {
_local5 = 3;
}
_local5 = Math.round(_local5);
var _local6 = getName(_local5);
_local4.tx = 2;
if (_local5 == 1) {
_local4.d = 1 + (_global.dropSpawnRate * 0.1);
} else if (_local5 == 0) {
_local4.d = -1 - (_global.dropSpawnRate * 0.1);
} else if (_local5 == 3) {
snd_Dog.PlaySound();
_local4.d = 4;
_local4.tx = 20;
}
_root[_local6].duplicateMovieClip("particle" + i, this.getNextHighestDepth());
Particles[i] = _root["particle" + i];
Particles[i]._y = -10;
Particles[i]._x = (Math.random() * (Stage.width - 100)) + 50;
ParticleDirection[i] = _local4;
return(undefined);
}
i++;
}
}
function getName(type) {
var _local1;
if (type == 0) {
var _local2 = (Math.random() * 1) + 1;
_local2 = Math.round(_local2);
_local1 = "drug" + _local2;
} else if (type == 1) {
var _local2 = (Math.random() * 2) + 1;
_local2 = Math.round(_local2);
_local1 = "food" + _local2;
} else if (type == 3) {
_local1 = "dog";
}
return(_local1);
}
function ParticleSystem_SpawnEmitterTypeParticle(xx, yy, dir) {
i = 0;
while (i < Particles.length) {
if (Particles[i] == null) {
if (this._currentframe != 25) {
_root["snd_Puke" + Math.round((Math.random() * 1) + 0.7)].PlaySound();
}
var _local3 = new flash.geom.Matrix();
if (dir != 0) {
_local3.a = (dir * 10) + (dir * ((Math.random() * 15) - 7));
} else {
_local3.a = (Math.random() * 20) - 10;
}
_local3.b = (-10 + (Math.random() * 25)) - 10;
_local3.c = (Math.random() * 20) - 10;
var _local4 = (Math.random() * 2) - 0.5;
if (_local4 > 1.4) {
_local4 = 3;
}
_local4 = Math.round(_local4);
_local3.tx = 2;
if (_local4 == 1) {
_local3.d = 1;
} else if (_local4 == 0) {
_local3.d = -1;
} else if (_local4 == 3) {
_local3.d = 4;
_local3.tx = 20;
}
testname = getName(_local4);
_root[testname].duplicateMovieClip("particle" + i, this.getNextHighestDepth());
Particles[i] = _root["particle" + i];
Particles[i]._rotation = (Math.random() * 40) - 20;
Particles[i]._x = xx;
Particles[i]._y = yy;
ParticleDirection[i] = _local3;
return(undefined);
}
i++;
}
}
var Particles = new Array(150);
var ParticleDirection = new Array(150);
var Gravity = 0.5;
var EmitterSpawnInterval = 30;
var EmitterSpawnIntervalCounter = 0;
var EmitterSpawnIntervalFluct = 0;
var Counter = 0;
var ThresholdFluct = 0;
var Initialized = false;
var Direction = 1;
var NextTurn = 60;
var TurnCounter = 30;
this.onEnterFrame = function () {
ParticleSystem_Update(false);
Counter = Counter + 1;
TurnCounter = TurnCounter + 1;
if (TurnCounter > NextTurn) {
Direction = -Direction;
nicole._xscale = 100 * Direction;
mouth._xscale = 100 * Direction;
nicole._x = nicole._x + ((-Direction) * nicole._width);
TurnCounter = 0;
}
nicole._x = nicole._x + (Direction * 5);
if (Direction == -1) {
mouth._x = nicole._x - 55;
} else {
mouth._x = (nicole._x + mouth._width) + 25;
}
mouth._visible = false;
if (!Initialized) {
nicole.gotoAndStop(1);
Initialized = true;
}
if (Counter > (3 + ThresholdFluct)) {
Counter = 0;
mouth._visible = true;
ThresholdFluct = (Math.random() * 2) - 1;
ParticleSystem_SpawnEmitterTypeParticle(mouth._x + (20 * Direction), mouth._y - 5, Direction);
}
gotoAndStop (2);
};
bStart.onPress = function () {
DeleteAllParticles();
_global.ResetGame = true;
gotoAndStop (21);
};
Frame 4
this.onEnterFrame = function () {
gotoAndStop (2);
};
Frame 11
function ResetGame() {
_global.SCORE = 0;
nicole.gotoAndStop(35);
mouth._visible = false;
_global.dropSpawnRate = 0;
}
function UpdateFatoMeter() {
rnd = FatOMeter + FatOMeterMax;
fatpcnt = rnd / (FatOMeterMax * 2);
tt = Math.round(fatpcnt * 10);
if (tt < CurrentState) {
i = tt;
while (i < CurrentState) {
nicole.MakeThinner();
i++;
}
} else if (tt > CurrentState) {
i = CurrentState;
while (i < tt) {
nicole.MakeFatter();
i++;
}
}
CurrentState = tt;
FatoMeterToGo = 214 + (fatpcnt * 275);
FatoMeterToGo = Math.round(FatoMeterToGo);
if (FatoMeterToGo > ball._x) {
ball._x = ball._x + FatoGravity;
} else if (FatoMeterToGo < ball._x) {
ball._x = ball._x - FatoGravity;
}
if (((ball._x + 4) > FatoMeterToGo) && ((ball._x - 4) < FatoMeterToGo)) {
ball._x = FatoMeterToGo;
}
}
function UpdateNicole() {
if (mouth._visible) {
MouthVisibleCounter = MouthVisibleCounter + 1;
if (MouthVisibleCounter > 5) {
mouth._visible = false;
}
}
if (NicoleFlipped) {
nicole._xscale = -100;
mouth._xscale = -100;
}
if (!NicoleFlipped) {
nicole._xscale = 100;
mouth._xscale = 100;
}
if (NicoleFlipped) {
nicole._x = MoveLocation + (nicole._width / 2);
hitarea._x = (MoveLocation - (hitarea._width / 2)) - 5;
mouth._x = (MoveLocation + (mouth._width / 2)) - 10;
} else {
nicole._x = MoveLocation - (nicole._width / 2);
hitarea._x = (MoveLocation - (hitarea._width / 2)) + 10;
mouth._x = (MoveLocation + (mouth._width / 2)) - 22;
}
hitarea._visible = false;
}
function GameOver() {
DeleteAllParticles();
nicole.gotoAndStop(1);
playerIsDead = true;
}
function NicoleEat(nr) {
nrOfSpawnedDrops++;
DeleteParticle(nr);
totalScore = totalScore + ParticleDirection[nr].tx;
if (ParticleDirection[nr].d < 0) {
snd_Drugs.PlaySound();
} else if (ParticleDirection[nr].d == 4) {
snd_DogCry.PlaySound();
} else {
snd_Chew.PlaySound();
}
mouth._visible = true;
FatOMeter = FatOMeter + ParticleDirection[nr].d;
if (FatOMeter > FatOMeterMax) {
FatOMeter = FatOMeterMax;
}
if (FatOMeter < FatOMeterMin) {
FatOMeter = FatOMeterMin;
}
if ((FatOMeter >= FatOMeterMax) || (FatOMeter <= FatOMeterMin)) {
GameOver();
}
}
var timeLastDrop = 0;
var Timer = new Date();
var totalScore = 0;
var playerIsDead = false;
var nrOfEatenDrops = 0;
var nrOfSpawnedDrops = 0;
var RestoreHead = 0;
var FatOMeter = 0;
var FatOMeterMax = 10;
var FatOMeterMin = -10;
var LastMouseX = 0;
var NicoleFlipped = false;
var MouthVisibleCounter = 0;
var MoveVector = 0;
var MoveInc = 4;
var MoveMax = 20;
var MoveFade = 2;
var MoveLocation = (Stage.width / 2);
var MovingLeft = false;
var MovingRight = false;
var keyListener = new Object();
keyListener.onKeyUp = function () {
switch (Key.getAscii()) {
case 97 :
MovingLeft = false;
break;
case 100 :
MovingRight = false;
}
if (MovingRight && (MovingLeft)) {
MovingRight = false;
MovingLeft = false;
}
};
keyListener.onKeyDown = function () {
switch (Key.getAscii()) {
case 97 :
MovingLeft = true;
NicoleFlipped = true;
break;
case 100 :
MovingRight = true;
NicoleFlipped = false;
}
if (MovingRight && (MovingLeft)) {
MovingRight = false;
MovingLeft = false;
}
};
Key.addListener(keyListener);
this.onEnterFrame = function () {
if (_global.ResetGame) {
_global.ResetGame = false;
ResetGame();
}
if (MovingLeft) {
MoveVector = MoveVector - MoveInc;
} else if (MovingRight) {
MoveVector = MoveVector + MoveInc;
} else if (MoveVector < 0) {
MoveVector = MoveVector + MoveFade;
} else if (MoveVector > 0) {
MoveVector = MoveVector - MoveFade;
}
if (MoveVector > MoveMax) {
MoveVector = MoveMax;
}
if (MoveVector < (-MoveMax)) {
MoveVector = -MoveMax;
}
MoveLocation = MoveLocation + MoveVector;
if ((MoveLocation > Stage.width) || (MoveLocation < 0)) {
MoveVector = -MoveVector;
NicoleFlipped = !NicoleFlipped;
MoveLocation = MoveLocation + MoveVector;
}
UpdateNicole();
UpdateFatoMeter();
if (playerIsDead) {
_global.SCORE = totalScore;
_global.DIEDBY = FatOMeter;
_global.LOCATION = nicole._x;
_global.DIRECTION = nicole._xscale;
_global.EndInitialized = false;
DeleteAllParticles();
gotoAndStop (26);
return(undefined);
}
ParticleSystem_Update(true);
var _local2 = new Date();
_global.dropSpawnRate = _global.dropSpawnRate + 0.01;
if (_global.dropSpawnRate > 10) {
_global.dropSpawnRate = 10;
}
score.text = totalScore;
gotoAndStop (11);
};
var CurrentState = 5;
var FatoMeterToGo = 137.5;
var FatoGravity = 5;
var GrowOverTime = 0;
var GrowOverTimeCounter = 0;
Frame 16
var Counter = 0;
var ThresholdFluct = 0;
var CurrentScore = 0;
var Initialized = false;
var CurrentState = 0;
var StateThresholds = new Array(8);
var Finished = false;
var TimeStarted;
var TimeElapsed;
var TimeMax = 5;
var CounterInc = 0;
this.onEnterFrame = function () {
ParticleSystem_Update(false);
Counter = Counter + 1;
mouth._visible = false;
if (!Initialized) {
CounterInc = _global.SCORE / TimeMax;
Finished = false;
nicole.gotoAndStop(56);
StateThresholds[0] = 1;
StateThresholds[1] = 0.8;
StateThresholds[2] = 0.7;
StateThresholds[3] = 0.5;
StateThresholds[4] = 0.4;
StateThresholds[5] = 0.3;
StateThresholds[6] = 0.2;
StateThresholds[7] = 0.1;
Initialized = true;
TimeStarted = new Date();
}
var _local4 = new Date();
TimeElapsed = new Date();
var _local2 = new Date(TimeElapsed - TimeStarted);
var _local3 = Math.round((_local2.getSeconds() + (_local2.getMilliseconds() * 0.001)) * CounterInc);
if ((Counter > (3 + ThresholdFluct)) && (!Finished)) {
Counter = 0;
mouth._visible = true;
ThresholdFluct = (Math.random() * 2) - 1;
ParticleSystem_SpawnEmitterTypeParticle(mouth._x + 20, mouth._y - 5, 1);
if (((_global.SCORE - CurrentScore) / _global.SCORE) < StateThresholds[CurrentState]) {
nicole.MakeThinner();
CurrentState = CurrentState + 1;
}
}
CurrentScore = _local3;
if (CurrentScore >= _global.SCORE) {
CurrentScore = _global.SCORE;
Finished = true;
}
scorecounter.text = CurrentScore;
gotoAndStop (16);
};
bPlayAgain.onPress = function () {
_global.ResetGame = true;
gotoAndPlay (11);
};
Frame 21
bStartGame.onPress = function () {
_global.ResetGame = true;
gotoAndPlay (11);
};
this.onEnterFrame = function () {
gotoAndStop (21);
};
Frame 26
var Counter = 0;
var InitializedEnd = false;
var ParticlesLaunched = false;
this.onEnterFrame = function () {
if (!InitializedEnd) {
nicole_exp._visible = false;
nicole_blowaway._visible = false;
nicole_exp.stop();
nicole_blowaway.stop();
if (_global.DIEDBY > 0) {
nicole_exp._visible = true;
nicole_exp._x = _global.LOCATION;
nicole_exp._xscale = _global.DIRECTION;
nicole_exp.gotoAndPlay(3);
} else {
nicole_blowaway._visible = true;
nicole_blowaway._x = _global.LOCATION;
nicole_blowaway._xscale = _global.DIRECTION;
nicole_blowaway.gotoAndPlay(3);
}
InitializedEnd = true;
}
if ((Counter >= 14) and (nicole_blowaway._visible == true)) {
nicole_blowaway._visible = false;
Counter = 80;
}
if (((Counter >= 18) and (nicole_exp._visible == true)) and (!ParticlesLaunched)) {
nicole_exp._visible = false;
i = 0;
while (i < 20) {
var _local2 = nicole_exp._x + ((nicole_exp._width / 2) * (nicole_exp._xscale * 0.01));
ParticleSystem_SpawnEmitterTypeParticle(_local2, nicole_exp._y + (nicole_exp._height / 2), 0);
i++;
}
ParticlesLaunched = true;
}
if (ParticlesLaunched) {
ParticleSystem_Update(false);
}
if (Counter > 100) {
gotoAndStop (16);
return(undefined);
}
Counter = Counter + 1;
gotoAndStop (26);
};
Symbol 7 MovieClip Frame 1
this.onEnterFrame = function () {
play();
};
Symbol 34 MovieClip Frame 1
function MakeFatter() {
if (this._currentframe < 56) {
_global.REVERSE = false;
this.play();
}
}
function MakeThinner() {
if (this._currentframe > 1) {
_global.REVERSE = true;
this.gotoAndStop(this._currentframe - 2);
this.play();
}
}
_global.REVERSE = false;
this.onEnterFrame = function () {
if (((((((((this._currentframe == 1) || (this._currentframe == 7)) || (this._currentframe == 14)) || (this._currentframe == 21)) || (this._currentframe == 28)) || (this._currentframe == 35)) || (this._currentframe == 42)) || (this._currentframe == 49)) || (this._currentframe == 56)) {
stop();
return(undefined);
}
if (_global.REVERSE) {
gotoAndStop(this._currentframe - 1);
return(undefined);
}
nextFrame();
return(undefined);
};
Symbol 61 MovieClip Frame 1
function PlaySound() {
gotoAndPlay (2);
}
this.onEnterFrame = function () {
stop();
gotoAndStop(this._currentframe);
};
Symbol 71 MovieClip Frame 1
function PlaySound() {
gotoAndPlay (2);
}
this.onEnterFrame = function () {
stop();
gotoAndStop(this._currentframe);
};
Symbol 73 MovieClip Frame 1
function PlaySound() {
gotoAndPlay (2);
}
this.onEnterFrame = function () {
stop();
gotoAndStop(this._currentframe);
};
Symbol 75 MovieClip Frame 1
function PlaySound() {
gotoAndPlay (2);
}
this.onEnterFrame = function () {
stop();
gotoAndStop(this._currentframe);
};
Symbol 77 MovieClip Frame 1
function PlaySound() {
gotoAndPlay (2);
}
this.onEnterFrame = function () {
stop();
gotoAndStop(this._currentframe);
};
Symbol 98 MovieClip Frame 2