Instance of Symbol 490 MovieClip [TMP9ondtrqje4] in Frame 1
//component parameters
onClipEvent (initialize) {
bgcolor = 0;
gameid = "turkeyfling";
playads_mochiID = "";
playads_mochiRES = "640x480";
}
Frame 2
_global.validurls = new Array("http://www.ezone.com/", "http://ezone.com/", "http://sling.ezone.com/", "http://games.ezone.com/");
_global.gameid = "turkeyfling";
_global.lockcheck = false;
_global.domaincheck = false;
_global.gameURL = "http://www.ezone.com/gamesource/turkeyfling/";
_global.checkid = checkid;
_global.gameLock = new GameLock(this);
Frame 4
function showDirectX(whichWay) {
if (whichWay) {
directXScreen._visible = false;
mdm.System.DirectX.enable(640, 480, 16);
Mouse.hide();
mdm.Input.Mouse.hide();
} else {
Mouse.show();
mdm.Input.Mouse.show();
directXScreen._visible = true;
}
}
function onJoystick1ButtonDown(x, y, b1, b2, b3, b4) {
if (b1 == "true") {
button1 = "down";
} else {
button1 = "up";
}
}
function onJoystick1Move(x, y, b1, b2, b3, b4) {
if (b1 == "true") {
button1 = "down";
} else {
button1 = "up";
}
}
function jumpURL(whichURL) {
getURL (whichURL, "_blank");
if (_root.gameControl.action == "playing") {
_root.gameControl.togglePause();
}
showDirectX(false);
}
function zeroAngle(whichAngle) {
var _local1 = whichAngle;
_local1 = Math.round(_local1);
_local1 = _local1 % 360;
if (_local1 < 0) {
_local1 = _local1 + 360;
}
return(_local1);
}
function sinQuick(whichAngle) {
var _local1 = whichAngle;
_local1 = zeroAngle(_local1);
toReturn = _global.sinLookup[_local1];
return(toReturn);
}
function cosQuick(whichAngle) {
var _local1 = whichAngle;
_local1 = zeroAngle(_local1);
toReturn = _global.cosLookup[_local1];
return(toReturn);
}
_global.gameLock.checkValid();
_global.gameSaver = new GameSaver(this);
_global.sinLookup = new Array();
_global.cosLookup = new Array();
i = 0;
while (i <= 360) {
sinLookup[i] = Math.sin((i * Math.PI) / 180);
cosLookup[i] = Math.cos((i * Math.PI) / 180);
i++;
}
Mouse.hide();
mdm.Input.Mouse.hide();
attachMovie("directXScreen", "directXScreen", 2001);
directXScreen._visible = false;
button1 = "off";
mdm.Input.Joystick.enable(1, "mouse");
Instance of Symbol 599 MovieClip "speakerOn" in Frame 4
on (release) {
_root.gameControl.toggleMute();
}
Frame 5
_root.gameControl.action = "title";
_root.gameControl.level = 0;
if (_root.yourName == "") {
notYou._visible = false;
} else {
notYou._visible = true;
}
_root.gameControl.startMusic();
Frame 6
stop();
Frame 8
stop();
Frame 9
gotoAndPlay(_root.gameControl.currentFrame);
Frame 11
stop();
Frame 12
_root.gameControl.action = "title";
_root.Hero.makeWait();
Frame 13
stop();
Frame 15
stop();
Symbol 37 MovieClip [yellow_particle] Frame 1
#initclip 42
Object.registerClass("yellow_particle", Particle);
#endinitclip
Symbol 39 MovieClip [particle_brown] Frame 1
#initclip 9
Object.registerClass("particle_brown", Particle);
#endinitclip
Symbol 41 MovieClip [particle_pink] Frame 1
#initclip 10
Object.registerClass("particle_pink", Particle);
#endinitclip
Symbol 42 MovieClip [particle_purple] Frame 1
#initclip 11
Object.registerClass("particle_purple", Particle);
#endinitclip
Symbol 44 MovieClip [particle_white] Frame 1
#initclip 12
Object.registerClass("particle_white", Particle);
#endinitclip
Symbol 46 MovieClip [particle_green] Frame 1
#initclip 13
Object.registerClass("particle_green", Particle);
#endinitclip
Symbol 48 MovieClip [particle_orange] Frame 1
#initclip 14
Object.registerClass("particle_orange", Particle);
#endinitclip
Symbol 50 MovieClip [particle_normal] Frame 1
#initclip 15
Object.registerClass("particle_normal", Particle);
#endinitclip
Symbol 52 MovieClip [particle_red] Frame 1
#initclip 16
Object.registerClass("particle_red", Particle);
#endinitclip
Symbol 54 MovieClip [particle_blue] Frame 1
#initclip 17
Object.registerClass("particle_blue", Particle);
#endinitclip
Symbol 56 Button
on (release) {
_root.showDirectX(true);
}
Symbol 57 MovieClip [directXScreen] Frame 2
gotoAndPlay (1);
Symbol 60 Button
on (release) {
_root.jumpURL("http://sling.ezone.com/");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 64 Button
on (release) {
_root.jumpURL("http://sling.ezone.com/fire/");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 70 Button
on (release) {
_root.jumpURL("http://sling.ezone.com/fire/");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 73 Button
on (release) {
_root.jumpURL("http://sling.ezone.com/");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 76 Button
on (release) {
_root.gameControl.unpauseGame();
_root.gameControl.startFirstLevel();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 79 Button
on (release) {
_root.gameControl.showTitle();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 81 Button
on (release) {
_root.gameControl.unpauseGame();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 90 Button
on (release) {
getURL ("http://www.ezone.com/", "_blank");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 93 Button
on (release) {
_root.gameControl.resumeTutorial();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 95 MovieClip [pauseScreen] Frame 2
stop();
Symbol 95 MovieClip [pauseScreen] Frame 4
stop();
Symbol 100 MovieClip [coinbonus] Frame 1
#initclip 18
Object.registerClass("coinbonus", Scroller);
#endinitclip
Symbol 100 MovieClip [coinbonus] Frame 17
gotoAndPlay (1);
Symbol 106 MovieClip [Cursor] Frame 3
stop();
Symbol 106 MovieClip [Cursor] Frame 5
stop();
Symbol 106 MovieClip [Cursor] Frame 7
stop();
Symbol 108 MovieClip [wall_mc] Frame 1
#initclip 19
Object.registerClass("wall_mc", Wall);
#endinitclip
Symbol 112 MovieClip [wipeScreen] Frame 18
stop();
Symbol 114 MovieClip [cloud] Frame 1
#initclip 20
Object.registerClass("cloud", Scroller);
#endinitclip
Symbol 116 MovieClip [cloud2] Frame 1
#initclip 21
Object.registerClass("cloud2", Scroller);
#endinitclip
Symbol 117 MovieClip [badguyhalloweenMoving] Frame 1
#initclip 22
Object.registerClass("badguyhalloweenMoving", Scroller);
#endinitclip
Symbol 174 MovieClip Frame 4
this.gotoAndPlay("fly");
Symbol 174 MovieClip Frame 16
this.gotoAndPlay("fly");
Symbol 175 MovieClip [Bread] Frame 1
#initclip 23
Object.registerClass("Bread", Scroller);
#endinitclip
Symbol 175 MovieClip [Bread] Frame 6
gotoAndPlay ("alive");
Symbol 175 MovieClip [Bread] Frame 28
gotoAndPlay ("done");
Symbol 177 MovieClip [Tiled Blanket] Frame 1
#initclip 24
Object.registerClass("Tiled Blanket", Scroller);
#endinitclip
Symbol 178 MovieClip [emptyCannon] Frame 1
#initclip 25
Object.registerClass("emptyCannon", Scroller);
#endinitclip
Symbol 180 MovieClip [tree] Frame 1
#initclip 26
Object.registerClass("tree", Scroller);
#endinitclip
Symbol 182 MovieClip [wall slime] Frame 1
#initclip 27
Object.registerClass("wall slime", Wall);
#endinitclip
Symbol 230 MovieClip [Gravy] Frame 1
#initclip 28
Object.registerClass("Gravy", Scroller);
#endinitclip
Symbol 230 MovieClip [Gravy] Frame 6
gotoAndPlay ("alive");
Symbol 230 MovieClip [Gravy] Frame 68
gotoAndPlay ("done");
Symbol 320 MovieClip [Candles] Frame 1
#initclip 29
Object.registerClass("Candles", Scroller);
#endinitclip
Symbol 320 MovieClip [Candles] Frame 6
gotoAndPlay ("alive");
Symbol 320 MovieClip [Candles] Frame 103
gotoAndPlay ("done");
Symbol 341 MovieClip [Jelly] Frame 1
#initclip 30
Object.registerClass("Jelly", Scroller);
#endinitclip
Symbol 341 MovieClip [Jelly] Frame 6
gotoAndPlay ("alive");
Symbol 341 MovieClip [Jelly] Frame 44
gotoAndPlay ("done");
Symbol 354 MovieClip [Candle] Frame 1
#initclip 31
Object.registerClass("Candle", Scroller);
#endinitclip
Symbol 354 MovieClip [Candle] Frame 6
gotoAndPlay ("alive");
Symbol 354 MovieClip [Candle] Frame 105
gotoAndPlay ("done");
Symbol 367 MovieClip [ApplePie] Frame 1
#initclip 32
Object.registerClass("ApplePie", Scroller);
#endinitclip
Symbol 367 MovieClip [ApplePie] Frame 8
gotoAndPlay ("alive");
Symbol 367 MovieClip [ApplePie] Frame 36
gotoAndPlay ("done");
Symbol 390 MovieClip [Potato] Frame 1
#initclip 33
Object.registerClass("Potato", Scroller);
#endinitclip
Symbol 390 MovieClip [Potato] Frame 7
gotoAndPlay ("alive");
Symbol 390 MovieClip [Potato] Frame 58
gotoAndPlay ("done");
Symbol 405 MovieClip [Fork] Frame 1
#initclip 34
Object.registerClass("Fork", Scroller);
#endinitclip
Symbol 405 MovieClip [Fork] Frame 22
gotoAndPlay ("alive");
Symbol 405 MovieClip [Fork] Frame 89
gotoAndPlay ("active2");
Symbol 432 MovieClip [PumpkinPie] Frame 1
#initclip 35
Object.registerClass("PumpkinPie", Scroller);
#endinitclip
Symbol 432 MovieClip [PumpkinPie] Frame 7
gotoAndPlay ("alive");
Symbol 432 MovieClip [PumpkinPie] Frame 53
gotoAndPlay ("done");
Symbol 451 MovieClip [Pumpkin] Frame 1
#initclip 36
Object.registerClass("Pumpkin", Scroller);
#endinitclip
Symbol 451 MovieClip [Pumpkin] Frame 7
gotoAndPlay ("alive");
Symbol 451 MovieClip [Pumpkin] Frame 28
gotoAndPlay ("done");
Symbol 454 MovieClip [Instructs] Frame 1
#initclip 37
Object.registerClass("Instructs", Scroller);
#endinitclip
Symbol 461 MovieClip [PowerCorn] Frame 1
#initclip 38
Object.registerClass("PowerCorn", Scroller);
#endinitclip
Symbol 480 MovieClip [TurkeySpit] Frame 1
#initclip 39
Object.registerClass("TurkeySpit", Scroller);
#endinitclip
Symbol 483 MovieClip [BigBlanket] Frame 1
#initclip 40
Object.registerClass("BigBlanket", Scroller);
#endinitclip
Symbol 484 MovieClip [gameControl] Frame 1
#initclip 41
Object.registerClass("gameControl", GameMaster);
#endinitclip
Symbol 490 MovieClip [TMP9ondtrqje4] Frame 1
function onUpdate() {
if (System.capabilities.playerType == "External") {
myBackColorMain = new Color(this.myBackground);
myBackColorMain.setRGB(this.bgcolor);
}
}
function check_loader() {
_level0.checkCount = _level0.checkCount + 1;
total_bytes = MyExternallyLoadedSWFMovieHolder.getBytesTotal();
loaded_bytes = MyExternallyLoadedSWFMovieHolder.getBytesLoaded();
remaining_bytes = total_bytes - loaded_bytes;
percent_done = int((loaded_bytes / total_bytes) * 100);
if ((total_bytes > 0) && (remaining_bytes == 0)) {
clearInterval(_level0.check_load);
_level0.checkCount = 0;
} else if (_level0.checkCount > 100) {
clearInterval(_level0.check_load);
_level0.checkCount = 0;
if ((_level0.playads_noad == "") || (_level0.playads_noad == undefined)) {
_level0.play();
} else {
_level0.gotoAndPlay(_level0.playads_noad);
}
} else {
trace("no response: " + _level0.checkCount);
}
}
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
_level0.mygameID = this.gameid;
_level0.mybgcolor = this.bgcolor;
_level0.playads_mochiID = this.playads_mochiID;
_level0.playads_mochiRES = this.playads_mochiRES;
myBackColorMain = new Color(this.myBackground);
myBackColorMain.setRGB(this.bgcolor);
_level0.checkCount = 0;
_level0.check_load = setInterval(check_loader, 100);
var protocol = _url.substr(0, _url.indexOf(":"));
if (System.capabilities.playerType == "External") {
clearInterval(_level0.check_load);
if ((_level0.playads_noad == "") || (_level0.playads_noad == undefined)) {
_level0.play();
} else {
_level0.gotoAndPlay(_level0.playads_noad);
}
} else {
_level0.stop();
this.createEmptyMovieClip("MyExternallyLoadedSWFMovieHolder", 0);
var MyVariable = "http://www.adsb4.com/swfs/adplayer.swf";
MyExternallyLoadedSWFMovieHolder._x = 0;
MyExternallyLoadedSWFMovieHolder._y = 0;
loadMovie (MyVariable, MyExternallyLoadedSWFMovieHolder);
stop();
}
Symbol 490 MovieClip [TMP9ondtrqje4] Frame 2
this.stop();
Symbol 668 MovieClip [__Packages.Particle] Frame 0
class Particle extends MovieClip
{
function Particle (myName) {
var _local1 = this;
super();
_local1.name = myName;
_local1.velX = _local1.speed * _local1._parent.sinQuick(_local1.angle);
_local1.velY = _local1.speed * _local1._parent.cosQuick(_local1.angle);
_local1.accelY = _local1.myGravity;
_local1.initialize();
}
function initialize() {
var _local1 = this;
_local1._x = _local1.origx;
_local1._y = _local1.origy;
_local1.gotoAndPlay(Math.round(Math.random() * 30) + 1);
_local1._xscale = _local1.myScale * 200;
_local1._yscale = _local1.myScale * 200;
if (_local1.dieCel == 30) {
_local1.dieCel = 30 + (Math.random() * 20);
}
}
function onEnterFrame() {
var _local1 = this;
_local1.animCel = _local1.animCel + 1;
_local1.velX = (_local1.velX + (_local1.accelX * _local1.deltaT)) * _local1.damping;
_local1.velY = (_local1.velY + (_local1.accelY * _local1.deltaT)) * _local1.damping;
_local1._x = (_local1._x + (_local1.velX * _local1.myScale)) + _root.gameControl.scrollVel[0];
_local1._y = (_local1._y + (_local1.velY * _local1.myScale)) + _root.gameControl.scrollVel[1];
if (_local1.animCel > _local1.dieCel) {
_local1.removeMovieClip();
}
}
var animCel = 1;
var origx = 100;
var origy = 100;
var action = "alive";
var velX = 0;
var velY = 0;
var accelX = 0;
var accelY = 0;
var speed = 10;
var angle = 0;
var dieCel = 30;
var myScale = 0.5;
var myGravity = 5;
var deltaT = 0.1;
var damping = 0.99;
}
Symbol 669 MovieClip [__Packages.Scroller] Frame 0
class Scroller extends MovieClip
{
var gotoAndPlay, _x;
function Scroller () {
var _local1 = this;
var _local2 = _root;
super();
if (_local1.origX == 0) {
_local1.origX = _local1._x;
_local1.origY = _local1._y;
} else {
_local1._x = _local1.origX;
_local1._y = _local1.origY;
}
_local1.snapX = _local1.origX;
_local1.snapY = _local1.origY;
_local2.gameControl.myObstacles.push(_local1);
_local2.gameControl.avoidCount = _local2.gameControl.avoidCount + 1;
if (String(_local1).indexOf("Grab") != -1) {
_local1.myType = "grab";
if (String(_local1).indexOf("must") != -1) {
_local1.mustGrab = true;
_local2.gameControl.grabTarget = _local2.gameControl.grabTarget + 1;
}
} else if (String(_local1).indexOf("Warp") != -1) {
_local1.myType = "warp";
_local1.action = "wait";
} else if (String(_local1).indexOf("Wall") != -1) {
_local1.myType = "wall";
} else if (String(_local1).indexOf("Coin") != -1) {
_local1.myType = "coin";
} else if (String(_local1).indexOf("Hazard") != -1) {
_local1.myType = "hazard";
_local1._visible = false;
var _local3 = _local1._name;
_local1.myHazardID = _local3.charAt(_local3.length - 1);
}
if (String(_local1).indexOf("Cloud") != -1) {
_local1.myRegen = "cloud";
}
if (String(_local1).indexOf("Snap") != -1) {
_local1.myRegen = "snap";
}
if (String(_local1).indexOf("Foreground") != -1) {
_local1.myScrollMult = 1.5;
_local1.swapDepths(20 + _local2.gameControl.avoidCount);
}
if (String(_local1).indexOf("Background") != -1) {
_local1.myScrollMult = 0.5;
}
if (String(_local1).indexOf("Left") != -1) {
_local1.myMovement = "left";
_local1.xVel = -1;
}
if (String(_local1).indexOf("Right") != -1) {
_local1.myMovement = "right";
_local1.xVel = 1;
}
if (String(_local1).indexOf("Boss") != -1) {
_local1.myMaxHealth = 10;
_local1.myHealthRegen = 0.0075;
}
if (String(_local1).indexOf("Tuff") != -1) {
_local1.myMaxHealth = _local1.myMaxHealth * 2;
}
if (String(_local1).indexOf("Higher") != -1) {
_local1.myRegen = "higher";
}
if (_local2.gameControl.difficulty == "easy") {
_local1.myMaxHealth = _local1.myMaxHealth * 0.5;
} else if (_local2.gameControl.difficulty == "medium") {
_local1.myMaxHealth = _local1.myMaxHealth * 0.75;
}
_local1.myHealth = _local1.myMaxHealth;
_local1.reset();
if (!((((((String(_local1).indexOf("Warp") != -1) || (_local1._name == "Empty")) || (_local1._name == "Instructs")) || (_local1._name == "Marker")) || (_local1._name == "GeezaPos")) || (String(_local1).indexOf("Lever") != -1))) {
_local1._name = _local1._name + _local2.gameControl.avoidCount;
}
}
function reset() {
var _local1 = this;
_local1.myColor = "gray";
_local1.action = "alive";
_local1.myLocked = "no";
if (_local1.myType == "warp") {
_local1.action = "wait";
}
_local1.gotoAndPlay(1);
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local2.gameControl.action == "paused") {
_local1.stop();
} else {
_local1.play();
if (_local2.gameControl.scrolling) {
_local1._y = (_local1._y + (_local2.gameControl.scrollVel[1] * _local1.myScrollMult)) + _local1.yVel;
if (_local1.myType == "hazard") {
if (_local2.gameControl.myHazard == _local1.myHazardID) {
_local1._visible = true;
if (_local1._x < ((-_local1._width) / 2)) {
var tempHazard = ((Math.floor(((-_local2.gameControl.origin[0]) - 10) / 3000) % 9) + 1);
if (tempHazard != _local1.myHazardID) {
_local1._visible = false;
_local2.gameControl.myHazard = tempHazard;
_local1._x = (_local1._x + 1000) + (Math.random() * 1000);
return;
}
_local1._x = (_local1._x + 1000) + (Math.random() * 1000);
}
} else {
_local1._visible = false;
return;
}
}
_local1._x = (_local1._x + (_local2.gameControl.scrollVel[0] * _local1.myScrollMult)) + _local1.xVel;
if ((String(_local1).indexOf("Warp") != -1) || (String(_local1).indexOf("Start") != -1)) {
_local1.snapX = _local1._x;
_local1.snapY = _local1._y;
}
if (_local1.myRegen == "higher") {
if (_local1._y > (Stage.height * 1.4)) {
_local2.gameControl.regenerate(_local1);
}
} else if (_local1.myRegen == "snap") {
if ((_local1._x < 0) && (_local2.gameControl.scrollVel[0] < 0)) {
_local1._x = _local1._x + (_local1._width / 2);
} else if ((_local1._x > 640) && (_local2.gameControl.scrollVel[0] > 0)) {
_local1._x = _local1._x - (_local1._width / 2);
}
} else if (_local1.myRegen == "cloud") {
if (_local1._y > (Stage.height + 200)) {
_local1._y = -200 - (Math.random() * 100);
_local1._x = Math.random() * 640;
}
}
}
_local1.collideCount = _local1.collideCount - 1;
_local1.myHealth = _local1.myHealth + _local1.myHealthRegen;
if (_local1.myHealth > _local1.myMaxHealth) {
_local1.myHealth = _local1.myMaxHealth;
}
if (_local1.myHealth != _local1.myMaxHealth) {
_local1.scaleDamage();
}
if (String(_local1).indexOf("Hover") != -1) {
if ((_local1.action == "activate") && (_level0.Hero.currentGrab == _local1)) {
_local1._x = _local1._x + ((_local2._xmouse - _local1._x) / 50);
_local1._y = _local1._y + ((_local2._ymouse - _local1._y) / 50);
} else if (_level0.Hero.currentGrab != _local1) {
_local1._x = _local1._x + ((_local1.origX - _local1._x) / 30);
_local1._y = _local1._y + ((_local1.origY - _local1._y) / 30);
}
}
if (_local1.action == "alive") {
_local1.animCel = _local1.animCel + 1;
if (_local1.myType == "coin") {
if (_local1._x < -200) {
_local1._visible = true;
_local1.randomizeRight();
}
}
}
if ((_local1.myMovement == "left") && (_local2.Hero.action == "alive")) {
_local1.animCel = _local1.animCel + 1;
var _local3 = 100 + (1000000 / (_local2.gameControl.maxHeight + 1));
if (_local3 > 800) {
_local3 = 800;
}
if (_local1._x < (-_local3)) {
_local2.gameControl.playSound("ghostsnd.wav");
_local1._x = 660;
_local1._y = _local2.Hero._y;
var tempVel = Math.ceil(_local2.gameControl.maxHeight / 20000);
if (tempVel > 5) {
tempVel = 5;
}
_local1.xVel = (-tempVel) - 1;
} else {
_local1._y = _local1._y + (3 * _local2.sinQuick(_local1.animCel * 5));
if (_local1.hitTest(_local2.Hand) || (_local1.hitTest(_local2.Arm))) {
_local1.collide();
}
}
}
if ((_local1.myMovement == "right") && (_local2.Hero.action == "alive")) {
_local1.animCel = _local1.animCel + 1;
var _local3 = 100 + (1000000 / (_local2.gameControl.maxHeight + 1));
if (_local3 > 800) {
_local3 = 800;
}
if (_local1._x > (640 + _local3)) {
_local2.gameControl.playSound("pumpkinsnd.wav");
_local1._x = -20;
_local1._y = _local2.Hero._y - 300;
var tempVel = Math.ceil(_local2.gameControl.maxHeight / 20000);
if (tempVel > 5) {
tempVel = 5;
}
_local1.xVel = tempVel + 1;
} else {
_local1._y = _local1._y + (3 * _local2.sinQuick(_local1.animCel * 5));
if (_local1.hitTest(_local2.Hand) || (_local1.hitTest(_local2.Arm))) {
_local1.collide();
}
}
}
}
}
function scaleDamage() {
var myDamageBar = eval (this + ".DamageBar");
var myScale = ((myHealth / myMaxHealth) * 100);
if (myScale > 100) {
myScale = 100;
}
myDamageBar._xscale = myScale;
}
function doDamage(howMuch) {
_root.gameControl.explodeAt(_root.Hero);
myHealth = myHealth - howMuch;
var myDamageBar = eval (this + ".DamageBar");
var myDamageBarMatte = eval (this + ".DamageBarMatte");
myDamageBarMatte._visible = true;
myDamageBar._visible = true;
scaleDamage();
if (myHealth <= 0) {
action = "dying";
gotoAndPlay("dying");
if (mustGrab) {
_root.gameControl.gotGrab(score);
}
}
}
function disappear() {
action = "hidden";
_x = 100000 /* 0x0186A0 */;
}
function changeColor() {
var _local1 = this;
var _local2 = _root;
if ((_local1.myColor == "gray") && (_local1.mustGrab)) {
_local2.gameControl.gotGrab(_local1.score);
}
_local1.myColor = _local2.Hero.myColor;
if (_local1.myLocked == "no") {
_local1.myLocked = "yes";
_local1.gotoAndPlay("done");
if (String(_local1).indexOf("Lever1") != -1) {
_local2.gameControl.changeFrame(1);
} else if (String(_local1).indexOf("Lever2") != -1) {
_local2.gameControl.changeFrame(2);
} else if (String(_local1).indexOf("Lever3") != -1) {
_local2.gameControl.changeFrame(3);
} else if (String(_local1).indexOf("Lever4") != -1) {
_local2.gameControl.changeFrame(4);
}
}
}
function changeAction(whichAction) {
var _local1 = _root;
var _local2 = this;
_local2.action = whichAction;
if (_local1.Hero.currentGrab == _local2) {
if (((_local2.action == "fire") && (_local1.Hero.myElement != "fire")) && (_local1.Hero.myMode != "free")) {
_local1.Hero.changeAction("fire");
}
}
}
function collide() {
var _local1 = this;
var _local2 = _root;
if (_local2.Hero.action == "stop") {
} else if (_local1.myType == "grab") {
if (_local1.action == "alive") {
_local1.changeColor();
if (_local2.Hero.currentGrab != _local1) {
_local2.Hero.grabHold(_local1);
}
} else if (_local1.action == "ready") {
_local1.changeColor();
if (_local2.Hero.currentGrab != _local1) {
_local2.Hero.grabHold(_local1);
}
if (_local1.needfire) {
if (_local2.Hero.myElement == "fire") {
_local1.action = "activate";
_local1.gotoAndPlay("activate");
}
} else {
_local1.action = "activate";
_local1.gotoAndPlay("activate");
}
} else if (_local1.action == "kill") {
_local2.Hero.changeAction("dying");
} else if (_local1.action == "spike") {
_local2.Hero.changeAction("dying");
} else if (_local1.action == "slimegrab") {
var _local3 = Math.abs(_local2.Hero._x - _local1._x) + Math.abs(_local2.Hero._y - _local1._y);
if (_local3 > 40) {
return;
}
if (_local2.Hero.myElement == "slime") {
_local1.changeColor();
_local1.gotoAndPlay("done");
_local2.Hero.grabHold(_local1);
} else if (_local1.collideCount < 0) {
_local2.gameControl.playSound("grabslime.aif");
_local1.collideCount = 10;
_local2.Hero.forceDrop(_local1);
}
} else if (_local1.action == "firegrab") {
var _local3 = Math.abs(_local2.Hero._x - _local1._x) + Math.abs(_local2.Hero._y - _local1._y);
if (_local3 > 40) {
return;
}
if (_local2.Hero.myElement == "fire") {
_local1.changeColor();
_local1.gotoAndPlay("done");
if (_local2.Hero.currentGrab != _local1) {
_local2.Hero.grabHold(_local1);
}
} else if (_local1.collideCount < 0) {
_local1.collideCount = 10;
_local2.Hero.changeAction("fire");
}
} else if (_local1.action == "slime") {
_local1.gotoAndPlay("done");
if (((_local2.Hero.myElement == "slime") && (_local2.Hero.myMode == "free")) && (_local1.collideCount < 0)) {
_local1.collideCount = 10;
_local1.doDamage(1);
if (_local2.Hero.velocity[0] > _local2.Hero.velocity[1]) {
_local2.Hero.velocity[0] = -_local2.Hero.velocity[0];
} else {
_local2.Hero.velocity[1] = -_local2.Hero.velocity[1];
}
}
_local2.Hero.changeAction("slime");
} else if (_local1.action == "fire") {
_local1.gotoAndPlay("done");
if (((_local2.Hero.myElement == "fire") && (_local2.Hero.myMode == "free")) && (_local1.collideCount < 0)) {
_local1.collideCount = 10;
_local1.doDamage(1);
if (_local2.Hero.velocity[0] > _local2.Hero.velocity[1]) {
_local2.Hero.velocity[0] = -_local2.Hero.velocity[0];
} else {
_local2.Hero.velocity[1] = -_local2.Hero.velocity[1];
}
}
_local2.Hero.changeAction("fire");
} else if (String(_local1.action).indexOf("cannon") != -1) {
if (((_local2.Hero.velocity[1] > 0) && (_local2.Hero._y < _local1._y)) || (_local2.Hero.velocity[1] > 3)) {
_local1.gotoAndPlay("done");
}
}
} else if (_local1.myType == "warp") {
if (_local2.Hero.currentGrab != _local1) {
_local2.Hero.grabHold(_local1);
_local2.gameControl.winLevel();
}
} else if (_local1.myType == "wall") {
} else if (((_local1.myType == "hazard") && (_local1.action == "alive")) && (_local2.Hero.action == "alive")) {
_local1.action = "done";
_local1.gotoAndPlay("active");
_local2.Hero.myCannon = _local1;
_local2.Hero.changeAction("stop");
} else if (_local1.myType == "coin") {
_local2.gameControl.gotCoin(_local1);
}
}
function randomize() {
var _local1 = this;
var tempHighest = _root.gameControl.highestObstacle;
var _local3 = Math.random() * 360;
var tempX = (tempHighest._x + (_root.sinQuick(_local3) * 70));
var tempY = (tempHighest._y - (_root.cosQuick(_local3) * 70));
_local1.animCel = 50 + Math.ceil(Math.random() * 100);
_local1._x = tempX;
_local1._y = tempY;
_local1._visible = true;
var _local2 = Math.ceil(_root.gameControl.maxHeight / 1000);
if (_local2 > 55) {
_local2 = 55;
}
_local1.myLolly = "lolly" + _local2;
}
function randomizeRight() {
var _local1 = this;
_local1._x = 640 + (Math.random() * 200);
_local1._y = Math.random() * 240;
_local1._visible = true;
}
function initialize() {
animCel = 1;
}
var animCel = 1;
var action = "alive";
var xVel = 0;
var yVel = 0;
var score = 100;
var offsetEdge = 100;
var myColor = "gray";
var myType = "normal";
var mustGrab = false;
var origX = 0;
var origY = 0;
var snapX = 0;
var snapY = 0;
var myLocked = "no";
var myHealth = 5;
var myHealthRegen = 0;
var myMaxHealth = 5;
var collideCount = 0;
var needfire = false;
var crumblecount = 0;
var myRegen = "none";
var myMovement = "none";
var myLolly = "lolly1";
var myScrollMult = 1;
var myHazardID = 0;
}
Symbol 670 MovieClip [__Packages.Wall] Frame 0
class Wall extends MovieClip
{
function Wall () {
var _local1 = this;
super();
if (String(_local1).indexOf("Snap") != -1) {
_local1.myRegen = "snap";
}
_root.gameControl.myWalls.push(_local1);
_local1.findBounds();
}
function findBounds() {
var _local1 = this;
_local1.myBounds = new Object();
_local1.myBounds.xmin = (_local1._x - (_local1._width / 2)) - 0;
_local1.myBounds.xmax = (_local1._x + (_local1._width / 2)) + 0;
_local1.myBounds.ymin = (_local1._y - (_local1._height / 2)) - 0;
_local1.myBounds.ymax = (_local1._y + (_local1._height / 2)) + 0;
if (_root.gameControl.scrolling) {
_local1.myVelX = 0;
_local1.myVelY = 0;
} else {
_local1.myVelX = _local1._x - _local1.myLastX;
_local1.myVelY = _local1._y - _local1.myLastY;
}
_local1.myLastX = _local1._x;
_local1.myLastY = _local1._y;
}
function updateScroll() {
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local2.gameControl.action == "paused") {
} else if (_local2.gameControl.scrolling) {
_local1._x = _local1._x + _local2.gameControl.scrollVel[0];
_local1._y = _local1._y + _local2.gameControl.scrollVel[1];
if (_local1.myRegen == "snap") {
if ((_local1._x < 0) && (_local2.gameControl.scrollVel[0] < 0)) {
_local1._x = _local1._x + (_local1._width / 2);
} else if ((_local1._x > 640) && (_local2.gameControl.scrollVel[0] > 0)) {
_local1._x = _local1._x - (_local1._width / 2);
}
}
_local1.findBounds();
}
}
function checkCollision() {
var _local1 = _root;
var _local2 = this;
if (_local1.gameControl.action == "paused") {
_local2.stop();
} else {
_local2.play();
if (_local1.Hero.action != "alive") {
} else {
if ((_local2.myLastX != _local2._x) || (_local2.myLastY != _local2._y)) {
_local2.findBounds();
} else {
_local2.myVelX = 0;
_local2.myVelY = 0;
}
if (_local2.action == "spike") {
if (_local2.hitTest(_local1.Hero)) {
_local1.Hero.changeAction("dying");
return;
}
} else {
var _local3 = false;
if (_local1.Hero.myMode == "free") {
if ((_local1.Hero._y >= _local2.myBounds.ymin) && (_local1.Hero._y <= _local2.myBounds.ymax)) {
if (((_local1.Hero.velocity[0] > 0) && (_local1.Hero._x >= _local2.myBounds.xmin)) && (_local1.Hero.myLastX <= ((_local2.myBounds.xmin - _local1.gameControl.scrollVel[0]) + 10))) {
_local1.Hero._x = _local2.myBounds.xmin - 1;
_local1.Hero.velocity[0] = (-_local1.Hero.velocity[0]) * _local2.coeffRest;
_local1.Hero.collideCount = _local1.Hero.collideCount + 1;
_local3 = true;
_local1.Hero.playSound("bounce");
} else if (((_local1.Hero.velocity[0] < 0) && (_local1.Hero._x <= _local2.myBounds.xmax)) && (_local1.Hero.myLastX >= ((_local2.myBounds.xmax - _local1.gameControl.scrollVel[0]) - 10))) {
_local1.Hero._x = _local2.myBounds.xmax + 1;
_local1.Hero.velocity[0] = (-_local1.Hero.velocity[0]) * _local2.coeffRest;
_local1.Hero.collideCount = _local1.Hero.collideCount + 1;
_local3 = true;
_local1.Hero.playSound("bounce");
}
}
if ((_local1.Hero._x > _local2.myBounds.xmin) && (_local1.Hero._x < _local2.myBounds.xmax)) {
if (((_local1.Hero.velocity[1] > 0) && (_local1.Hero._y >= _local2.myBounds.ymin)) && (_local1.Hero.myLastY <= ((_local2.myBounds.ymin - _local1.gameControl.scrollVel[1]) + 10))) {
_local1.Hero._y = _local2.myBounds.ymin - 1;
_local1.Hero.sitCount = -10;
if (_local1.Hero.velocity[1] > 19) {
_local1.Hero.myDeath = "crater";
_local1.Hero.gotoAndPlay("crater");
_local1.Hero.velocity[0] = 0;
_local1.Hero.velocity[1] = 0;
} else {
if (_local1.Hero.sittingOn != _local2) {
_local1.Hero.playSound("bounce");
}
_local1.Hero.velocity[0] = _local1.Hero.velocity[0] * _local2.coeffRest;
_local1.Hero.velocity[1] = (-_local1.Hero.velocity[1]) * 0.8;
_local1.Hero.changeLabel("bounce");
}
_local1.Hero.sittingOn = _local2;
_local1.Hero.collideCount = _local1.Hero.collideCount + 1;
_local3 = true;
} else if (((_local1.Hero.velocity[1] < 0) && (_local1.Hero._y <= _local2.myBounds.ymax)) && (_local1.Hero.myLastY >= _local2.myBounds.ymax)) {
_local1.Hero._y = _local2.myBounds.ymax + 1;
_local1.Hero.velocity[0] = _local1.Hero.velocity[0] * _local2.coeffRest;
_local1.Hero.velocity[1] = (-_local1.Hero.velocity[1]) * 0.8;
_local3 = true;
_local1.Hero.playSound("bounce");
_local1.Hero.collideCount = _local1.Hero.collideCount + 1;
}
}
} else {
if ((_local1.Hero._y > _local2.myBounds.ymin) && (_local1.Hero._y < _local2.myBounds.ymax)) {
if ((_local1.Hand._x <= _local2.myBounds.xmin) && (_local1.Hero._x > _local2.myBounds.xmin)) {
_local3 = true;
_local1.Hero._x = _local2.myBounds.xmin;
} else if ((_local1.Hand._x >= _local2.myBounds.xmax) && (_local1.Hero._x < _local2.myBounds.xmax)) {
_local3 = true;
_local1.Hero._x = _local2.myBounds.xmax;
}
}
if ((_local1.Hero._x > _local2.myBounds.xmin) && (_local1.Hero._x < _local2.myBounds.xmax)) {
if (((_local1.Hand._y - 10) <= _local2.myBounds.ymin) && (_local1.Hero._y > _local2.myBounds.ymin)) {
_local3 = true;
_local1.Hero._y = _local2.myBounds.ymin;
} else if ((_local1.Hand._y >= _local2.myBounds.ymax) && (_local1.Hero._y < _local2.myBounds.ymax)) {
_local3 = true;
_local1.Hero._y = _local2.myBounds.ymax;
}
}
}
if (_local2.action == "fire") {
if (_local2.hitTest(_local1.Hero) && (_local1.Hero.myElement != "fire")) {
_local1.Hero.changeAction("fire");
}
}
}
}
}
}
var animCel = 1;
var myLastX = 0;
var myLastY = 0;
var myVelX = 0;
var myVelY = 0;
var action = "alive";
var coeffRest = 0.8;
var myRegen = "none";
}
Symbol 671 MovieClip [__Packages.GameMaster] Frame 0
class GameMaster extends MovieClip
{
var myObstacles, highestObstacle, so, mymusic, mysound;
function GameMaster () {
var _local1 = this;
super();
Stage.showMenu = false;
_root.kongregateServices.connect();
_local1.lastExitFrameMillis = getTimer();
var protocol = _local1._url.substr(0, _local1._url.indexOf(":"));
if (protocol == "file") {
fscommand ("fullscreen", "true");
} else if (_global.domaincheck) {
var ok = false;
var _local2 = 0;
while ((_local2 < _global.validurls.length) && (!ok)) {
var _local3 = _global.validurls[_local2];
if (_local1._url.substr(0, _local3.length).toLowerCase() == _local3) {
ok = true;
}
_local2++;
}
if (!ok) {
_local1.getURL(_global.gameURL, "_parent");
_root.gotoAndPlay("stolen");
}
}
_local1.mysound = new Sound();
_local1.mymusic = new Sound();
_root.attachMovie("Cursor", "Cursor", 2010);
_root.attachMovie("pauseScreen", "pauseScreen", 2000);
_root.pauseScreen._visible = false;
_root.attachMovie("wipeScreen", "wipeScreen", 1999);
_root.wipeScreen._visible = false;
_root.attachMovie("geezahand", "GeezaHand", 20, {name:"hand"});
_root.attachMovie("geeza", "Geeza", 21, {name:"hero"});
_local1.levelPreview = new Object();
_local1.levelPreview.level1 = "Stretching";
_local1.levelPreview.level2 = "Slinging";
_local1.levelPreview.level3 = "Springing";
_local1.levelPreview.level4 = "Rebounding";
_local1.levelPreview.level5 = "Mini Boss";
_local1.levelPreview.level6 = "Lava Lake";
_local1.levelPreview.level7 = "Spiked Walls";
_local1.levelPreview.level8 = "Spikes & Lava";
_local1.levelPreview.level9 = "Moving Platform";
_local1.levelPreview.level10 = "Moving Mini Boss";
_local1.levelPreview.level11 = "Flaming Grabs";
_local1.levelPreview.level12 = "Moving Flaming Grabs";
_local1.levelPreview.level13 = "Lever";
_local1.levelPreview.level14 = "Multiple Levers";
_local1.levelPreview.level15 = "Multiple Mini Bosses";
_local1.levelPreview.level16 = "Magma Beetle";
_local1.levelPreview.level17 = "Multiple Magma Beetles";
_local1.levelPreview.level18 = "Red Fire Grabs";
_local1.levelPreview.level19 = "Multiple Red Fire Grabs";
_local1.levelPreview.level20 = "More Mini Bosses";
_local1.levelPreview.level21 = "Popping Lava Grabs";
_local1.levelPreview.level22 = "Popping Flaming Grabs";
_local1.levelPreview.level23 = "Spiked Grabs";
_local1.levelPreview.level24 = "Red Spiked Grabs";
_local1.levelPreview.level25 = "Again with the Mini Bosses!";
_local1.levelPreview.level26 = "Flingas!";
_local1.levelPreview.level27 = "Shakers!";
_local1.levelPreview.level28 = "Moving Red Spikes!";
_local1.levelPreview.level29 = "Old School Moves";
_local1.levelPreview.level30 = "Still More Mini Bosses!";
_local1.levelPreview.level31 = "Fire Cannons!";
_local1.levelPreview.level32 = "More Fire Cannons!";
_local1.levelPreview.level33 = "Fire Magma Beetle";
_local1.levelPreview.level34 = "Volcano";
_local1.levelPreview.level35 = "Fire Mini Bosses!";
_local1.levelPreview.level36 = "Hot Air Balloon";
_local1.levelPreview.level37 = "Boiling Point!";
_local1.levelPreview.level38 = "Is It Hot in Here?";
_local1.levelPreview.level39 = "Hot Drop!";
_local1.levelPreview.level40 = "More Fire Mini Bosses";
_local1.levelPreview.level41 = "Fire up that Rocket!";
_local1.levelPreview.level42 = "More Rockets!";
_local1.levelPreview.level43 = "Ready for Launch!";
_local1.levelPreview.level44 = "Stretch & Wait For POP!";
_local1.levelPreview.level45 = "Loopy Mini Bosses";
_local1.levelPreview.level46 = "MiniBoss: DIZZY!";
_local1.levelPreview.level47 = "MiniBoss: RETRO HOMAGE!";
_local1.levelPreview.level48 = "MiniBoss: RING OF FIRE!";
_local1.levelPreview.level49 = "MiniBoss: DOUBLE TROUBLE!";
_local1.levelPreview.level50 = "THE BIG BAD BOSS!";
_local1.levelPreview.gold1 = 10;
_local1.levelPreview.gold2 = 10;
_local1.levelPreview.gold3 = 13;
_local1.levelPreview.gold4 = 25;
_local1.levelPreview.gold5 = 13;
_local1.levelPreview.gold6 = 15;
_local1.levelPreview.gold7 = 15;
_local1.levelPreview.gold8 = 21;
_local1.levelPreview.gold9 = 12;
_local1.levelPreview.gold10 = 20;
_local1.levelPreview.gold11 = 12;
_local1.levelPreview.gold12 = 12;
_local1.levelPreview.gold13 = 25;
_local1.levelPreview.gold14 = 25;
_local1.levelPreview.gold15 = 20;
_local1.levelPreview.gold16 = 13;
_local1.levelPreview.gold17 = 22;
_local1.levelPreview.gold18 = 25;
_local1.levelPreview.gold19 = 20;
_local1.levelPreview.gold20 = 20;
_local1.levelPreview.gold21 = 16;
_local1.levelPreview.gold22 = 43;
_local1.levelPreview.gold23 = 30;
_local1.levelPreview.gold24 = 23;
_local1.levelPreview.gold25 = 25;
_local1.levelPreview.gold26 = 40;
_local1.levelPreview.gold27 = 35;
_local1.levelPreview.gold28 = 30;
_local1.levelPreview.gold29 = 30;
_local1.levelPreview.gold30 = 20;
_local1.levelPreview.gold31 = 17;
_local1.levelPreview.gold32 = 30;
_local1.levelPreview.gold33 = 21;
_local1.levelPreview.gold34 = 35;
_local1.levelPreview.gold35 = 50;
_local1.levelPreview.gold36 = 24;
_local1.levelPreview.gold37 = 27;
_local1.levelPreview.gold38 = 25;
_local1.levelPreview.gold39 = 27;
_local1.levelPreview.gold40 = 20;
_local1.levelPreview.gold41 = 35;
_local1.levelPreview.gold42 = 33;
_local1.levelPreview.gold43 = 35;
_local1.levelPreview.gold44 = 26;
_local1.levelPreview.gold45 = 37;
_local1.levelPreview.gold46 = 60;
_local1.levelPreview.gold47 = 35;
_local1.levelPreview.gold48 = 40;
_local1.levelPreview.gold49 = 60;
_local1.levelPreview.gold50 = 80;
_local1.levelPreview.gold500 = 140;
_local1.showTitle();
_local1.initBestScore();
}
function regenerate(whichObject) {
var tempObstacle = undefined;
var tempArray = new Array();
var i = 0;
while (i < myObstacles.length) {
var myObstacleCheck = eval (_root.gameControl.myObstacles[i]);
if ((myObstacleCheck.myType == whichObject.myType) && (myObstacleCheck != whichObject)) {
tempArray.push({obstacle:myObstacleCheck, myY:myObstacleCheck._y});
}
i++;
}
tempArray.sortOn("myY", Array.NUMERIC);
tempObstacle = tempArray[0].obstacle;
highestObstacle = tempObstacle;
var tempPos = [_root.Hero._x, 0];
if (tempObstacle != undefined) {
tempPos[0] = tempObstacle._x;
tempPos[1] = tempObstacle._y;
} else {
return(undefined);
}
var tempOffset = obstacleDist;
if (Math.random() < 0.5) {
tempOffset = -obstacleDist;
}
var tempWidth = (150 + (maxHeight / 100));
if (tempWidth > 350) {
tempWidth = 350;
}
tempOffset = tempWidth * (1 - (Math.random() * 2));
var tempX = (tempPos[0] + tempOffset);
var tempY = (tempPos[1] - obstacleDist);
whichObject._x = tempX;
whichObject._y = tempY;
whichObject.snapX = tempX;
whichObject.snapY = tempY;
whichObject.reset();
return(undefined);
}
function doCursor() {
var _local1 = _root;
var _local2 = this;
if ((((_local1.Hero.action != "alive") || (_local2.action == "paused")) || (_local2.action == "cutscene")) || (_local2.action == "map")) {
_local2.myCursor = "hidden";
} else if ((_local1.Hero.myMode == "pull") || (_local1.Hero.myMode == "flick")) {
_local2.myCursor = "closedHand";
} else if (_local1.Hero.myMode == "dangle") {
var _local3 = Math.abs(_local2.myNewMouseX - _local1.Hero._x) + Math.abs(_local2.myNewMouseY - _local1.Hero._y);
if (_local3 < 80) {
_local2.myCursor = "openHand";
} else {
_local2.myCursor = "hidden";
}
} else {
var _local3 = Math.abs(_local2.myNewMouseX - _local1.Hero._x) + Math.abs(_local2.myNewMouseY - _local1.Hero._y);
if ((_local3 < 100) && (_local1.Hero.sittingOn != undefined)) {
_local2.myCursor = "openHand";
} else {
_local2.myCursor = "hidden";
}
}
if (_local2.myCursor == "hidden") {
if (_local1.Cursor._visible) {
Mouse.show();
_local1.Cursor._visible = false;
}
} else if (_local1.Cursor._visible == false) {
Mouse.hide();
_local1.Cursor._visible = true;
}
_local1.Cursor._x = _local2.myNewMouseX;
_local1.Cursor._y = _local2.myNewMouseY;
if (_local2.myCursor == "closedHand") {
_local1.Cursor._rotation = _local1.Hero._rotation;
} else {
_local1.Cursor._rotation = 0;
}
_local1.Cursor.gotoAndPlay(_local2.myCursor);
}
function gotCoin(whichCoin) {
var _local1 = this;
var _local2 = _root;
_local1.coinCount = _local1.coinCount + 1;
_local1.powerMeter = _local1.powerMeter + 20;
if (_local1.powerMeter > 100) {
_local1.powerMeter = 100;
}
var _local3 = 100;
_local1.updateScore(_local3);
_local2.Score.text = _local2.gameScore;
_local1.playSound("collect");
if (_local1.coinCount == 100) {
_local2.Warp.action = "alive";
_local2.Warp.gotoAndPlay("open");
} else {
whichCoin.randomizeRight();
}
}
function gotGrab(thisScore) {
var _local1 = this;
_local1.updateScore(thisScore);
_local1.grabGot = _local1.grabGot + 1;
if ((_local1.grabGot >= _local1.grabTarget) && (_local1.grabTarget != 0)) {
_root.Warp.action = "alive";
_root.Warp.gotoAndPlay("open");
}
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local1.showSparks) {
_local2.attachMovie("bubble", "particle", _local1.getParticleDepth(), {origx:(_local2._xmouse + (Math.random() * 80)) - 40, origy:_local2._ymouse + 20, angle:Math.random() * 360, speed:Math.random(), myScale:0.5, dieCel:40});
}
_local1.myMouseDiffX = _local2._xmouse - _local1.myNewMouseX;
_local1.myMouseDiffY = _local2._ymouse - _local1.myNewMouseY;
_local1.myNewMouseX = _local2._xmouse;
if (_local1.myNewMouseX > 640) {
_local1.myNewMouseX = 640;
}
_local1.myNewMouseY = _local2._ymouse;
if (_local1.myNewMouseY > 480) {
_local1.myNewMouseY = 480;
}
_local1._x = -10000;
_local1.doCursor();
_local1.geezacount = _local1.geezacount - 1;
if ((_local1.action == "upsell") && (_local1.geezacount < 0)) {
var myRand = (Math.random() * 4);
if (myRand < 1) {
_local2.Geeza.say("35cmon.aif");
} else if (myRand < 2) {
_local2.Geeza.say("35hurryup.aif");
} else if (myRand < 3) {
_local2.Geeza.say("end03.aif");
} else {
_local2.Geeza.say("CS1D.aif");
}
_local1.geezacount = (Math.random() * 100) + 400;
}
if (_local1.action == "playing") {
if (_local1.powerMeter < 0) {
_local1.powerMeter = 0;
}
_local2.PowerMeter._height = _local1.powerMeter * 2;
if (_local2.Hero.action == "alive") {
_local1.animCel = _local1.animCel + 1;
_local1.maxHeight = _local1.maxHeight + _local1.scrollVel[1];
if (_local1.myHighest < _local1.origin[1]) {
_local1.myHighest = _local1.origin[1];
}
}
if (((Key.isDown(87) && (_local1.cheatsOn)) && (_local1.notWon)) && (_local1.animCel > 90)) {
_local1.notWon = false;
_local1.updateSummary();
_local2.Warp.gotoAndPlay("close");
}
var _local3 = Math.floor(_local1.goldTime - (_local1.animCel / 30));
if (_local3 <= 0) {
_local3 = 0;
}
_local2.Clock.text = _local3;
if (_local1.animCel < (_local1.goldTime * 30)) {
} else if (_local2.Clock._visible) {
_local2.gameControl.playSound("poweroff.aif");
_local2.Clock._visible = false;
}
}
while ((getTimer() - _local1.lastExitFrameMillis) < 33) {
}
_local1.lastExitFrameMillis = getTimer();
}
function choosePlayer() {
var _local1 = this;
if (_root.yourName == "") {
_local1.gotoAndPlay("_root.newName");
} else if (_local1.firstTime) {
_local1.gotoAndPlay("_root.gender");
} else {
_global.gameSaver.readData();
_local1.level = _global.gameSaver.maxLevel + 1;
_local1.showMap();
}
}
function chooseDifficulty(whichOne) {
var _local1 = _root;
difficulty = whichOne;
_global.gameSaver.saveDifficulty();
_local1.wipeScreen._visible = true;
_local1.wipeScreen.gotoAndPlay(1);
_local1.play();
}
function adjustGold(whichTime) {
var _local2 = whichTime;
var _local1 = _local2;
if (difficulty == "easy") {
_local1 = _local2 + 30;
} else if (difficulty == "medium") {
_local1 = _local2 + 15;
}
return(_local1);
}
function firstLevel() {
var _local1 = this;
var _local2 = _root;
_local2.Geeza.disappear();
_local2.Hero.makeWait();
_local1.frommap = false;
_local1.currentFrame = "instructs";
_local2.gotoAndPlay("instructs");
_local1.mymusic.setVolume(_local1.musicVolume);
_local1.startMusic("ingame_snd");
}
function startFirstLevel() {
var _local1 = this;
_local1.level = 1;
_local1.currentFrame = "_root.level1";
_root.Score.text = "0";
_local1.startLevel();
}
function startLevel() {
var _local1 = this;
_local1.avoidCount = 0;
_local1.resetLevel();
_local1.gotoAndPlay("_root.restart");
_local1.action = "playing";
_local1.lastLevel = _local1.level;
_root.nextLevel._visible = false;
if (_local1.level == 1) {
_local1.scrolling = true;
} else {
_local1.scrolling = false;
}
}
function resetLevel() {
var _local1 = this;
var _local2 = _root;
_local1.animCel = 1;
_local1.mylasttime = 1;
_local1.winFlag = false;
_local1.myHighest = 0;
_local1.grabGot = 0;
_local1.grabTarget = 0;
_local1.coinCount = 0;
_local1.notWon = true;
_local1.avoidCount = 0;
_local1.myObstacles = new Array();
_local1.myWalls = new Array();
_local2.Hero.makeWait();
_local2.nextLevel._visible = false;
_local2.Clock._visible = true;
_local1.scrollVel[0] = 0;
_local1.scrollVel[1] = 0;
_local1.origin[0] = 0;
_local1.origin[1] = 0;
_local1.obstacleDist = 100;
_local1.scoreMult = 0;
_local1.maxHeight = 0;
_local2.gameScore = 0;
_local1.myHazard = 1;
_local2.Background._y = -200;
_local1.powerMeter = 100;
_local1.startMusic("ingame_snd");
}
function newHazard(myY) {
var _local3 = this;
var myHazardList = Array("ApplePie", "Candle", "Candles", "Jelly", "Fork", "Gravy", "Potato", "Pumpkin", "PumpkinPie", "Bread");
var myTempHazard = myHazardList[Math.floor(myHazardList.length * Math.random())];
trace((myTempHazard + " ") + _root.Hazard._name);
if (_root.Hazard._name == "Hazard") {
trace("attempting to removing from list");
var tempArray = Array();
var _local1 = 0;
while (_local1 < _local3.myObstacles.length) {
var _local2 = _local3.myObstacles.i;
if (_local2 != _root.Hazard) {
tempArray.push(_local2);
} else {
trace("found it!");
}
_local1++;
}
_local3.myObstacles = tempArray;
_local3.removeMovieClip();
trace("removed it!");
}
_root.attachMovie(myTempHazard, "Hazard", -1, {name:"Hazard", origX:1000 + (Math.random() * 1000), origY:myY});
_root.Hazard._xscale = 10;
_root.Hazard._yscale = 10;
}
function showTitle() {
var _local1 = this;
_root.pauseScreen._visible = false;
_local1.startMusic("music_snd");
_local1.level = 0;
_local1.currentFrame = "_root.title";
_local1.startLevel();
_local1.action = "title";
_local1.firstTime = false;
}
function showCredits() {
var _local1 = this;
_root.Geeza.disappear();
_root.pauseScreen._visible = false;
_local1.startMusic("music_snd");
_local1.level = 0;
_local1.currentFrame = "_root.credits";
_local1.startLevel();
_local1.action = "title";
_local1.firstTime = false;
}
function showMap() {
var _local1 = this;
var _local2 = _root;
if (_local1.cutscenes == false) {
_local1.startMusic("ingame_snd");
if (_local1.upsellList.length <= 0) {
_local1.upsellList = Array(1, 2, 3, 4, 5, 6, 7, 8, 9);
}
var _local3 = Math.floor(Math.random() * _local1.upsellList.length);
var whichFirst = _local1.upsellList[0];
_local1.upsellList[0] = _local1.upsellList[_local3];
_local1.upsellList[_local3] = whichFirst;
var whichFrame = _local1.upsellList.shift();
_local2.gotoAndPlay("upsell_" + whichFrame);
} else {
_local1.firstTime = false;
_local2.Geeza.disappear();
_local1.resetLevel();
_local1.startMusic("ingame_snd");
_local1.currentFrame = "_root.map";
_local2.gotoAndPlay("map");
_local2.Hero.makeWait();
_global.gameSaver.updateMap();
_local1.action = "map";
_local2.nextLevel._visible = false;
}
}
function goCutScene(whichLabel) {
var _local1 = this;
var _local2 = _root;
if (_local1.cutscenes == true) {
_local1.startMusic("ingame_snd");
_local2.Hero.makeWait();
_local1.action = "cutscene";
_local2.gotoAndPlay(whichLabel);
} else {
_local1.startMusic("ingame_snd");
if (whichLabel == "csIntro") {
_local2.gotoAndPlay("upsellIntro");
} else {
_local1.showMap();
}
}
}
function goLabel(whichLabel) {
var _local1 = whichLabel;
var _local2 = _root;
if (_local1 == undefined) {
_local1 = nextLabel;
}
if (_local2.Geeza.action != "hidden") {
_local2.Geeza.changeAction("wait");
}
startMusic("ingame_snd");
_local2.gotoAndPlay(_local1);
}
function startTutorial() {
var _local1 = this;
_local1.currentFrame = "_root.tutorial";
_local1.startLevel();
_local1.action = "tutorial";
}
function selectLevel(whichLevel) {
if (whichLevel <= (_global.gameSaver.maxLevel + 1)) {
level = whichLevel;
var myLoc = eval ("_root.level" + whichLevel);
_root.Marker._x = myLoc._x;
_root.Marker._y = myLoc._y;
currentFrame = "_root.level" + level;
}
preview(whichLevel);
}
function preview(whichLevel) {
if (whichLevel == undefined) {
whichLevel = level;
}
bestTime = Math.round(_global.gameSaver.levelTimes[whichLevel - 1] / 3) / 10;
goldTime = eval ("_root.gameControl.levelPreview.gold" + whichLevel);
goldTime = adjustGold(goldTime);
if ((whichLevel > levellimit) && (_global.gameSaver.maxLevel >= 5)) {
_root.myHint.text = "Play Sling to unlock this level";
_root.playSling._visible = true;
}
if (whichLevel > (_global.gameSaver.maxLevel + 1)) {
return(undefined);
}
_root.playSling._visible = false;
var myMessage = ("_root.gameControl.levelPreview.level" + String(whichLevel));
myMessage = eval (myMessage);
if (myMessage == undefined) {
_root.myHint.text = "Level " + whichLevel;
} else {
_root.myHint.text = (("Level " + whichLevel) + ": ") + myMessage;
}
var myScoreSummary = scoreSummary(_global.gameSaver.levelTimes[whichLevel - 1], whichLevel);
if (whichLevel > _global.gameSaver.maxLevel) {
_root.myHint.text = _root.myHint.text + "\nNot played yet";
} else {
_root.myHint.text = _root.myHint.text + ("\nBest Score: " + myScoreSummary.total);
}
_root.score_txt.text = "Game Score: " + _global.gameSaver.gameScore;
if ((_global.gameSaver.gameScore == _global.gameSaver.lastAdded) || (noscores)) {
_root.addScore._visible = false;
}
}
function changeFrame(whichNum) {
var _local1 = this;
_local1.currentFrame = (("_root.level" + _local1.level) + "_") + whichNum;
_local1.gotoAndPlay(_local1.currentFrame);
}
function loseLevel(myForceIt) {
var _local1 = this;
if ((_local1.gameType == "singleLevel") && (myForceIt == undefined)) {
_local1.updateSummary();
_local1.showResults();
} else {
_local1.currentFrame = "_root.level" + _local1.level;
_local1.resetLevel();
_local1.gotoAndPlay("_root.restart");
}
}
function restartLevel() {
var _local1 = this;
_local1.currentFrame = "_root.level" + _local1.level;
_local1.resetLevel();
_local1.gotoAndPlay("_root.restart");
}
function initBestScore() {
var _local1 = this;
_local1.so = SharedObject.getLocal("best_" + _global.gameid);
if ((_local1.so.data.best == undefined) || (_local1.so.data.best == 0)) {
_local1.clearScores();
}
_root.result_txt = (("Your Score: " + _root.gameScore) + "\nYour Best: ") + _local1.so.data.level1;
}
function clearScores() {
so.data.best = 0;
so.flush();
}
function saveScore() {
var _local1 = this;
var _local2 = _root;
_local1.madeGold = false;
if (_local2.gameScore > _local1.so.data.best) {
_local1.so.data.best = _local2.gameScore;
_local1.madeGold = true;
_local1.so.flush();
}
_local2.result_txt = (("Your Score: " + _local2.gameScore) + "\nYour Best: ") + _local1.so.data.best;
}
function updateSummary() {
var _local1 = _root;
var _local2 = this;
_local2.saveScore();
_local1.nextLevel.your_summary.text = (("Your Score: " + _local1.gameScore) + "\nBest Score: ") + _local2.so.data.best;
_local1.nextLevel.your_summary_shad.text = (("Your Score: " + _local1.gameScore) + "\nBest Score: ") + _local2.so.data.best;
_local1.kongregateStats.submit("Highest", _local2.myHighest);
_local1.kongregateScores.submit(_local1.gameScore);
_local1.kongregateStats.submit("HighScore", _local1.gameScore);
}
function scoreSummary(myAnimCel, myLevel) {
if (myLevel == undefined) {
myLevel = level;
}
if (myAnimCel == undefined) {
myAnimCel = animCel;
}
var myReturn = new Object();
var myGoldTime = eval ("_root.gameControl.levelPreview.gold" + myLevel);
myGoldTime = adjustGold(myGoldTime);
myReturn.timeleft = (myGoldTime * 30) - myAnimCel;
myReturn.timeleft = Math.round(myReturn.timeleft / 3) / 10;
if (myReturn.timeleft <= 0) {
myReturn.timeleft = 0;
myReturn.madeGold = false;
} else {
myReturn.madeGold = true;
}
if (difficulty == "easy") {
myReturn.levelbonus = 700;
myReturn.timebonus = Math.ceil(myReturn.timeleft * 10);
} else if (difficulty == "medium") {
myReturn.levelbonus = 1000;
myReturn.timebonus = Math.ceil(myReturn.timeleft * 25);
} else {
myReturn.levelbonus = 1500;
myReturn.timebonus = Math.ceil(myReturn.timeleft * 100);
}
myReturn.total = myReturn.timebonus + myReturn.levelbonus;
return(myReturn);
}
function winLevel() {
var _local1 = this;
if (_root.Hero.action == "won") {
} else {
_root.Hero.changeAction("won");
if ((_local1.action == "tutorial") || (_local1.action == "title")) {
} else if (_local1.level == 500) {
} else {
_local1.action = "won";
_local1.updateSummary();
}
}
}
function showResults() {
_root.nextLevel.gotoAndPlay("results");
_root.nextLevel._visible = true;
}
function launchFirework(whichParticle, whichX, whichY, whichScale, whichType) {
var _local2 = whichParticle;
var _local3 = whichScale;
var _local1 = 4;
while (_local1 <= 20) {
_root.attachMovie(_local2, "particle", getParticleDepth(), {origx:whichX, origy:whichY, angle:_local1 * 20, speed:5 + (Math.random() * 10), myScale:_local3});
_local1++;
}
_local1 = 4;
while (_local1 <= 20) {
_root.attachMovie(_local2, "particle", getParticleDepth(), {origx:whichX, origy:whichY, angle:_local1 * 20, speed:2 + (Math.random() * 5), myScale:_local3});
_local1++;
}
}
function explodeButton(whichSound) {
var _local1 = whichSound;
if (_local1 == undefined) {
_local1 = "rolloversnd";
}
playSound(_local1);
launchFirework("particle_normal", _root._xmouse, _root._ymouse, 0.2, "random");
}
function explodeScore(whichX, whichY, whichSound) {
var _local1 = whichSound;
if (_local1 == undefined) {
_local1 = "note1.aif";
}
playSound(_local1);
launchFirework("yellow_particle", whichX, whichY, 0.2, "random");
}
function explodeAt(whichObject, whichSound, whichScore) {
var _local1 = whichObject;
var _local3 = whichSound;
if (_local3 == undefined) {
_local3 = "rolloversnd";
}
playSound(_local3);
var _local2 = "particle_normal";
if (_local1.myExplodeParticle != undefined) {
_local2 = _local1.myExplodeParticle;
}
launchFirework(_local2, _local1._x, _local1._y, 0.2, "random");
}
function getParticleDepth() {
var _local1 = this;
_local1.particleDepth = _local1.particleDepth - 1;
if (_local1.particleDepth < 50) {
_local1.particleDepth = 299;
}
return(_local1.particleDepth);
}
function updateScore(thisScore) {
var _local1 = _root;
if ((action != "playing") or demo) {
} else {
_local1.gameScore = _local1.gameScore + thisScore;
_local1.Score.text = _local1.gameScore;
}
}
function pauseGame() {
var _local1 = this;
var _local2 = _root;
if ((_local1.level == 0) && (_local1.action != "tutorial")) {
} else {
if (_local1.action != "tutorial") {
_local1.action = "paused";
}
_local2.pause.swapMovie;
_local1.mymusic.setVolume(0);
_local2.pauseScreen.gotoAndPlay("normal");
_local2.pauseScreen._visible = true;
}
}
function pauseTutorial() {
var _local1 = _root;
_local1.pause.swapMovie;
mymusic.setVolume(0);
_local1.pauseScreen.gotoAndPlay("tutorial");
_local1.pauseScreen._visible = true;
}
function resumeTutorial() {
mymusic.setVolume(musicVolume);
_root.pauseScreen._visible = false;
}
function abortGame(whichMarker) {
var _local1 = this;
var _local2 = whichMarker;
var _local3 = _root;
_local3.pauseScreen._visible = false;
if (_local2 == undefined) {
_local1.startMusic();
_local1.action = "enterscore";
_local3.gameControl.startDemo();
} else if (_local2 == "map") {
_local1.firstTime = false;
_local1.unpauseGame();
_local1.showMap();
} else {
_local3.gotoAndPlay(_local2);
}
}
function goSubmit() {
var _local1 = this;
_local1.action = "enterscore";
_root.gotoAndPlay("SubmitScore");
_local1.startMusic();
_local1.showTitle();
}
function unpauseGame() {
var _local1 = this;
var _local2 = _root;
if (_local1.action != "tutorial") {
_local1.action = "playing";
}
_local1.mymusic.setVolume(_local1.musicVolume);
_local1.myNewMouseX = _local2._xmouse;
_local1.myNewMouseY = _local2._ymouse;
_local1.myLastMouseX = _local1.myNewMouseX;
_local1.myLastMouseY = _local1.myNewMouseY;
_local1._x = _local1.myNewMouseX;
_local1._y = _local1.myNewMouseY;
_local1.myCursor = "hidden";
_local2.pauseScreen._visible = false;
}
function togglePause() {
var _local1 = this;
if (_local1.action == "paused") {
_local1.unpauseGame();
} else if ((_local1.action == "playing") || (_local1.action == "tutorial")) {
_local1.pauseGame();
}
}
function startMusic(whichSound, whichLoop) {
var _local1 = this;
var _local2 = whichSound;
var _local3 = whichLoop;
if (_local2 == undefined) {
_local2 = "music_snd";
}
if (_local3 == undefined) {
_local3 = 99;
}
if (_local1.myMusicSound != _local2) {
if (_local1.myMusicSound != "none") {
_local1.mymusic.stop(_local1.myMusicSound);
}
_local1.mymusic.attachSound(_local2);
_local1.mymusic.setVolume(_local1.musicVolume);
_local1.mymusic.start(0, _local3);
_local1.myMusicSound = _local2;
}
}
function playSound(whichSound) {
var _local1 = whichSound;
if (_local1 == "collect") {
var _local2 = Math.ceil(Math.random() * 4);
_local1 = ("collect0" + _local2) + ".aif";
}
mysound.attachSound(_local1);
mysound.start(_local1);
}
function toggleMute() {
var _local1 = this;
if (_local1.mute) {
_local1.musicVolume = _local1.musicVolumePref;
_local1.mymusic.setVolume(_local1.musicVolume);
_local1.mute = false;
_local1.playSound("note1.aif");
_root.speakerOn._visible = true;
} else {
_local1.musicVolume = 0;
_local1.mymusic.setVolume(_local1.musicVolume);
_local1.mute = true;
_root.speakerOn._visible = false;
}
}
function swapheads() {
var _local1 = _root;
var _local2 = _local1.Hero._x;
var _local3 = _local1.Hero._y;
if (gender == "male") {
_local1.attachMovie("hand", "Hand", 10, {name:"hand"});
_local1.attachMovie("head", "Hero", 11, {name:"hero"});
} else {
_local1.attachMovie("femalehand", "Hand", 10, {name:"hand"});
_local1.attachMovie("femalehead", "Hero", 11, {name:"hero"});
}
_local1.Hero._visible = true;
_local1.Hand._visible = true;
_local1.Hero.initialize();
if (_local2 == undefined) {
_local1.Hero._y = -10000;
} else {
_local1.Hero._x = _local2;
_local1.Hero._y = _local3;
_local1.Hand._x = _local2;
_local1.Hand._y = _local3 - 50;
_local1.Hero.moveAttachments();
}
}
var animCel = 1;
var action = "ready";
var level = 1;
var mylasttime = 1;
var levelscore = 200;
var levelmsg = "";
var powerupcount = 200;
var baddiecount = 300;
var myLastMouseX = 0;
var myLastMouseY = 0;
var myNewMouseX = 0;
var myNewMouseY = 0;
var myMouseDiffX = 0;
var myMouseDiffY = 0;
var myMaxLevels = 8;
var winFlag = false;
var demo = false;
var musicVolume = 80;
var musicVolumePref = 80;
var lastPressCel = 0;
var screenTime = 0;
var cheatsOn = true;
var soundButton = "SOUND IS ON";
var numGrabs = 3;
var grabGot = 0;
var grabTarget = 0;
var mute = false;
var jumpframe = "";
var currentFrame = "title";
var showSparks = false;
var particleDepth = 299;
var bestTime = 1000;
var goldTime = 1000;
var firstTime = false;
var lastLevel = 0;
var lastExitFrameMillis = 0;
var nextLabel = "title";
var myCursor = "hidden";
var notWon = true;
var coinCount = 0;
var difficulty = "easy";
var madeGold = false;
var frommap = false;
var levellimit = 600;
var geezacount = -1;
var gender = "male";
var avoidCount = 0;
var noscores = false;
var cutscenes = true;
var upsellList = Array(1, 2, 3, 4, 5, 6, 7, 8, 9);
var obstacleDist = 100;
var scoreMult = 0;
var maxHeight = 0;
var gameType = "singleLevel";
var scrollVel = [0, 0];
var scrolling = false;
var origin = [0, 0];
var myHazard = 1;
var powerMeter = 100;
var myMusicSound = "none";
var myHighest = 0;
}
Symbol 672 MovieClip [__Packages.GameLock] Frame 0
class GameLock
{
function GameLock () {
var _local1 = this;
if (_global.lockcheck == false) {
_local1.notValid = false;
} else {
var _local2 = _url.substr(0, _url.indexOf(":"));
if (_local2 == "file") {
} else {
_local1.initialize();
_local1.sendID();
}
}
}
function initialize() {
var _local1 = this;
_local1.loadscore = new XML();
_local1.loadscore.onData = function (data) {
var _local1 = this;
var _local2 = data;
if (_local2 == undefined) {
_local1.myStatus = "idle";
_local1.onLoad(false);
_local1.feedback = "Could not access the script...";
} else if (_local2.indexOf("false") != -1) {
_local1.myStatus = "idle";
_global.gameLock.notValid = true;
_local1.onLoad(false);
_local1.feedback = "The script was accessed, but returned false and notValid=" + _local1.notValid;
_global.gameLock.checkValid();
} else {
_local1.myStatus = "idle";
_local1.feedback = _local2;
_local1.onLoad(false);
}
};
}
function checkValid() {
if (notValid == true) {
_root.gotoAndPlay("stolen");
getURL (_global.gameURL, "_parent");
}
}
function sendID() {
var _local1 = this;
_local1.loadscore.load("http://sling.ezone.com/php/gamelock.php?checkid=" + _global.checkid);
_local1.nextAction = "goScore";
_local1.myStatus = "getting";
}
var feedback = "none";
var nextAction = "goScore";
var myStatus = "idle";
var notValid = false;
}
Symbol 673 MovieClip [__Packages.Freebody] Frame 0
class Freebody extends MovieClip
{
var sittingOn, _x, _y, _rotation, _xscale, springLength, currentGrab, hitTest;
function Freebody () {
var _local1 = this;
super();
_local1.mysound = new Sound();
_local1.mysound.attachSound("grab01.aif");
_local1.mysound.onSoundComplete = _local1.soundFinishedHero;
_local1.headOffsetX = 0;
_local1.headOffsetY = 0;
_local1.headOffsetDist = 50;
_local1.myOrigScale = 80;
_local1.myGravity = _local1.myGravityOrig;
_local1.adjustScale(_local1.myBodyScale);
}
function soundFinishedHero() {
_root.Hero.myCurrentSound = "none";
}
function adjustScale(whichScale) {
var _local1 = this;
_local1.myBodyScale = whichScale;
_local1._xscale = _local1.myOrigScale * _local1.myBodyScale;
_local1._yscale = _local1.myOrigScale * _local1.myBodyScale;
_root.Hand._xscale = _local1.myOrigScale * _local1.myBodyScale;
_root.Hand._yscale = _local1.myOrigScale * _local1.myBodyScale;
_local1.myScale = 10 * _local1.myBodyScale;
_local1.springLength = _local1.springLengthOrig * _local1.myBodyScale;
_local1.headOffsetDist = 100 * _local1.myBodyScale;
_local1.myMinLength = _local1.myOrigLength * _local1.myBodyScale;
_local1.offsetEdge = _local1._width / 2;
}
function initialize() {
var _local1 = this;
var _local2 = _root;
_local1.tuteCount = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
_local1.animCel = 1;
_local1.adjustScale(_local1.myBodyScale);
_local1.myElementCount = 0;
_local1.myElement = "none";
_local1._x = _local2.Start._x;
_local1._y = _local2.Start._y;
_local1.myLastX = _local1._x;
_local1.myLastY = _local1._y;
_local2.Hand._x = _local1._x;
_local2.Hand._y = _local1._y - 50;
_local1.velocity[0] = 0;
_local1.velocity[1] = 0;
_local1.myGravity = _local1.myGravityOrig;
_local1.moveAttachments();
_local1.currentGrab = undefined;
_local1.gotoAndPlay("alive");
_local1.myMode = "free";
_local1.action = "alive";
_local1.sittingOn = undefined;
_local1.sitCount = 10;
_local1.stopCount = 0;
_local1.myMaxY = 0;
_local1.health = 0;
if (_local2.gameControl.difficulty == "easy") {
_local1.health = 5;
} else if (_local2.gameControl.difficulty == "medium") {
_local1.health = 3;
}
_local2.Health.gotoAndPlay("level" + _local1.health);
_local1._visible = true;
_local1.myDeath = "none";
}
function makeWait(whichCannon) {
var _local1 = this;
_local1.myDeath = "none";
_local1.currentGrab = undefined;
_local1.action = "wait";
_local1.myCannon = whichCannon;
_local1._x = 1000;
_root.Hand._x = 1100;
_local1.moveAttachments();
}
function forceDrop(whichObject) {
var _local1 = this;
var _local2 = whichObject;
_root.Hand._x = _local2._x;
_root.Hand._y = _local2._y;
_local1._x = _local2._x;
_local1._y = _local2._y + _local1.myMinLength;
_local1.moveAttachments();
_local1.velocity[0] = 0;
_local1.velocity[1] = 0;
_local1.myMode = "free";
}
function justDrop() {
var _local1 = this;
_local1.myGrabCount = 10;
_local1.velocity[0] = 0;
_local1.velocity[1] = 0;
_local1.myMode = "free";
}
function shootUp(whichObject) {
var _local1 = this;
_local1._x = whichObject._x;
_local1._y = whichObject._y;
_root.Hand._x = _local1._x;
_root.Hand._y = _local1._y + 20;
_local1.moveAttachments();
_local1.velocity[0] = 0;
_local1.velocity[1] = -8;
_local1.action = "alive";
_local1.myMode = "free";
_local1.myGrabCount = 10;
_local1.myCannon = undefined;
}
function resetObstacles() {
var i = 0;
while (i < _root.gameControl.myObstacles.length) {
var myCollideObstacle = eval (_root.gameControl.myObstacles[i]);
myCollideObstacle.reset();
i++;
}
}
function onMouseUp() {
var _local1 = this;
if (_local1.action != "alive") {
} else if (_root.gameControl.action == "cutscene") {
} else if (_local1.myMode == "pull") {
_local1.myMode = "flick";
_local1.flickCount = 5;
_local1.playSound("fling");
}
}
function onMouseDown() {
var _local1 = this;
var _local2 = _root;
_local2.Instructs._visible = false;
_local2.gameControl.scoreMult = 0;
if (_local1.action != "alive") {
} else if (_local2.gameControl.action == "cutscene") {
} else {
var _local3 = Math.abs(_local2.gameControl.myNewMouseX - _local1._x) + Math.abs(_local2.gameControl.myNewMouseY - _local1._y);
if ((_local1.myMode == "dangle") && (_local3 < 80)) {
_local1.myMode = "pull";
_local1.myMaxY = 0;
if (_local1.sittingOn != undefined) {
_local2.Head._x = _local2.gameControl.myNewMouseX;
_local2.Hand._y = _local1.sittingOn.myBounds.ymin + 10;
_local1.myMode = "pull";
_local1.myMaxY = _local1.sittingOn.myBounds.ymin - 30;
}
} else if (_local1.myMode == "pull") {
_local1.myMode = "flick";
_local1.flickCount = 5;
} else if (_local1.myMode == "flick") {
_local1.myMode = "pull";
} else if (((_local1.sittingOn != undefined) && (_local3 < 100)) && false) {
if ((_local2.Hand._x > _local1.sittingOn.myBounds.xmin) && (_local2.Hand._x < _local1.sittingOn.myBounds.xmax)) {
_local2.Head._x = _local2.gameControl.myNewMouseX;
_local2.Hand._y = _local1.sittingOn.myBounds.ymin + 10;
_local1.myMode = "pull";
_local1.myMaxY = _local1.sittingOn.myBounds.ymin - 30;
}
} else if (_local1.myMode == "free") {
if (_local2.gameControl.powerMeter > 0) {
_local2.gameControl.powerMeter = _local2.gameControl.powerMeter - 5;
_local1.velocity[1] = _local1.velocity[1] - 2;
_local1.changeLabel("flap");
}
}
}
}
function reposLastGrab() {
var _local1 = this;
var _local2 = _root;
_local1.myMode = "free";
_local2.Hand._x = _local1.lastGrab.snapX;
_local2.Hand._y = _local1.lastGrab.snapY - 50;
_local1._x = _local2.Hand._x;
_local1._y = _local2.Hand._y - 50;
_local1.velocity[0] = 0;
_local1.velocity[1] = 0;
}
function changeElement(whichElement) {
var _local1 = this;
if (_local1.action == "alive") {
_local1.myElement = whichElement;
if (_root.gameControl.difficulty == "easy") {
_local1.myElementCount = 600;
} else if (_root.gameControl.difficulty == "medium") {
_local1.myElementCount = 300;
} else {
_local1.myElementCount = 200;
}
if (_local1.myElement == "none") {
_local1.gotoAndPlay("alive");
} else {
_local1.gotoAndPlay(_local1.myElement);
}
}
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (_local2.gameControl.action == "paused") {
_local1.stop();
} else {
_local1.play();
_local1.animCel = _local1.animCel + 1;
_local1.myGrabCount = _local1.myGrabCount - 1;
_local1.flickCount = _local1.flickCount - 1;
_local1.hitCount = _local1.hitCount - 1;
_local1.stopCount = _local1.stopCount - 1;
if (_local2.gameControl.scrolling && (_local2.gameControl.animCel > 20)) {
if (_local1.myCannon != undefined) {
var scrollDistX = (320 - _local1.myCannon._x);
var scrollDistY = (320 - _local1.myCannon._y);
_local2.gameControl.scrollVel[0] = Math.floor((scrollDistX - _local2.gameControl.scrollVel[0]) / 10);
_local2.gameControl.scrollVel[1] = Math.floor((scrollDistY - _local2.gameControl.scrollVel[1]) / 10);
_local1._x = _local1.myCannon._x;
_local1._y = _local1.myCannon._y;
} else if ((_local1.action == "alive") || (_local1.action == "stop")) {
if (_local1.myMode == "free") {
var scrollDistX = (100 - _local2.Hand._x);
var scrollDistY = (100 - _local2.Hand._y);
} else {
var scrollDistX = (320 - _local2.Hand._x);
var scrollDistY = (100 - _local2.Hand._y);
}
_local2.gameControl.scrollVel[0] = Math.floor((scrollDistX - _local2.gameControl.scrollVel[0]) / 2);
_local2.gameControl.scrollVel[1] = Math.floor((scrollDistY - _local2.gameControl.scrollVel[1]) / 2);
} else {
_local2.gameControl.scrollVel[0] = 0;
_local2.gameControl.scrollVel[1] = 0;
}
if ((_local2.gameControl.origin[1] + _local2.gameControl.scrollVel[1]) < 0) {
_local2.gameControl.scrollVel[1] = 0;
}
_local2.gameControl.updateScore(-_local2.gameControl.scrollVel[0]);
_local2.gameControl.origin[0] = _local2.gameControl.origin[0] + _local2.gameControl.scrollVel[0];
_local2.gameControl.origin[1] = _local2.gameControl.origin[1] + _local2.gameControl.scrollVel[1];
_local2.Background._y = -200 + (_local2.gameControl.origin[1] / 12);
if (_local2.Background._y > 700) {
_local2.Background._y = 700;
}
}
if (_local1.action == "stop") {
_local2.Hand._x = Math.round(_local2.Hand._x + _local2.gameControl.scrollVel[0]);
_local2.Hand._y = Math.round(_local2.Hand._y + _local2.gameControl.scrollVel[1]);
if (_local1.stopCount == 0) {
_local2.gameControl.loseLevel();
}
} else {
_local1.myElementCount = _local1.myElementCount - 1;
if (_local1.myElementCount == 0) {
_local1.changeElement("none");
if (_local1.currentGrab.action == "firegrab") {
_local1.changeAction("fire");
_local1.justDrop();
}
} else if ((_local1.myElementCount > 0) && (_local1.myElementCount < 50)) {
if ((_local1.myElementCount % 10) == 0) {
_local1.gotoAndPlay("alive");
} else if ((_local1.myElementCount % 5) == 0) {
_local1.gotoAndPlay(_local1.myElement);
}
}
if ((_local1.myGrabCount <= 0) and (_local1.myMode == "free")) {
_local1.currentGrab = undefined;
}
_local1.myLastX = _local1._x;
_local1.myLastY = _local1._y;
_local1.myLastRot = _local1._rotation;
var myLag = 20;
var diffX = 0;
var diffY = 0;
var accelX = 0;
var accelY = _local1.myGravity;
if (_local1.action == "wait") {
_local1.adjustScale(0.5);
_local1._x = 10000;
_local1._y = 10000;
} else {
if (_local1.action == "dying") {
_local1.adjustScale(_local1.myBodyScale * 1.05);
if (_local1.animCel == 44) {
_local2.wipeScreen._visible = true;
_local2.wipeScreen.gotoAndPlay(1);
} else if (_local1.animCel == 50) {
_local1.action = "wait";
_local2.gameControl.loseLevel();
return;
}
} else if (_local1.action == "suckup") {
_local1.adjustScale(_local1.myBodyScale * 0.95);
_local1._x = _local1._x + ((_local2.Hand._x - _local1._x) / 5);
_local1._y = _local1._y + ((_local2.Hand._y - _local1._y) / 5);
_local1.moveAttachments();
if (_local1.animCel == 20) {
_local1.makeWait();
if (_local2.gameControl.level == 0) {
_local2.gotoAndPlay("credits");
} else if (_local2.gameControl.action == "map") {
_local2.gameControl.showMap();
} else if (_local2.gameControl.action == "bonusgame") {
_local2.gameControl.level = 500;
_local2.gameControl.currentFrame = "_root.level" + _local2.gameControl.level;
_local2.gameControl.startLevel();
} else if (String(_local2.gameControl.action).indexOf("WarpLevel") != -1) {
var myLevel = _local2.gameControl.action;
_local2.gameControl.level = myLevel.substr(9, myLevel.myLevel);
_local2.gameControl.currentFrame = "_root.level" + _local2.gameControl.level;
_local2.gameControl.preview(_local2.gameControl.level);
_local2.gameControl.startLevel();
} else if (String(_local2.gameControl.action).indexOf("WarpCS_") != -1) {
var myMarker = _local2.gameControl.action;
myMarker = myMarker.substr(7, myMarker.length - 1);
_local2.gotoAndPlay(myMarker);
} else if (_local2.gameControl.level == 500) {
_local2.gameControl.goCutScene("csBonusReturn");
} else {
_local2.gameControl.showResults();
}
}
} else {
if (_local1.myMode == "free") {
_local1.handDist = _local1.handDist * 0.9;
if (_local1.handDist < 20) {
_local1.handDist = 20;
}
_local1.checkGrab();
} else if ((_local1.myMode == "dangle") || (_local1.myMode == "flick")) {
if (_local1.action == "won") {
_local1.mouseForceX = _local1.mouseForceX + (((_local2.gameControl.myMouseDiffX * 0.5) - _local1.mouseForceX) / 5);
_local1.mouseForceY = _local1.mouseForceY + (((_local2.gameControl.myMouseDiffY * 0.5) - _local1.mouseForceY) / 5);
} else {
_local1.mouseForceX = 0;
_local1.mouseForceY = 0;
}
var diffX = (_local1._x - _local2.Hand._x);
var diffY = (_local1._y - _local2.Hand._y);
_local1.handDist = Math.sqrt((diffX * diffX) + (diffY * diffY));
if ((_local1.handDist - _local1.springLength) < 0) {
_local1.handDist = _local1.springLength;
}
var springStretch = ((_local1.handDist - _local1.springLength) / _local1.myScale);
accelX = ((accelX + (((_local1.springK / _local1.myMass) * springStretch) * _local2.sinQuick(_local1._rotation))) - (_local1.myDamping * _local1.velocity[0])) + (_local1.mouseForceX / _local1.myMass);
accelY = ((accelY - (((_local1.springK / _local1.myMass) * springStretch) * _local2.cosQuick(_local1._rotation))) - (_local1.myDamping * _local1.velocity[1])) + (_local1.mouseForceY / _local1.myMass);
if (_local1.myMode == "flick") {
if ((((_local1.myLastAccelX * accelX) < 0) || ((_local1.myLastAccelY * accelY) < 0)) || (_local1.flickCount < 0)) {
_local1.myMode = "free";
_local1.myGrabCount = 10;
_local2.Hand._visible = false;
_local1.changeLabel("fly");
if (_local1.flickCount < 0) {
_local1.velocity[1] = 0;
}
}
}
} else if (_local1.myMode == "pull") {
accelX = 0;
accelY = 0;
_local1.velocity[0] = 0;
_local1.velocity[1] = 0;
_local1._x = _local2.gameControl.myNewMouseX;
_local1._y = _local2.gameControl.myNewMouseY;
if (_local1.sittingOn != undefined) {
if (_local1._y >= (_local1.sittingOn.myBounds.ymin - 10)) {
_local1._y = _local1.sittingOn.myBounds.ymin - 30;
}
}
var diffX = (_local1._x - _local2.Hand._x);
var diffY = (_local1._y - _local2.Hand._y);
_local1.myLastLength = _local1.myCurrentLength;
_local1.myCurrentLength = Math.sqrt((diffX * diffX) + (diffY * diffY));
if (_local1.myCurrentLength > _local1.myMaxStretch) {
_local1._x = _local2.Hand._x + ((diffX * _local1.myMaxStretch) / _local1.myCurrentLength);
_local1._y = _local2.Hand._y + ((diffY * _local1.myMaxStretch) / _local1.myCurrentLength);
_local1.myCurrentLength = _local1.myMaxStretch;
}
if (_local1.myLastLength < _local1.myCurrentLength) {
_local1.playSound("stretch");
}
var _local3 = 0;
while (_local3 < 5) {
_local1.collideCount = 0;
_local1.checkWall();
if (_local1.collideCount == 0) {
break;
}
_local3++;
}
}
_local1.checkCollision();
if (_local1.currentGrab.action == "drop") {
_local1.currentGrab = undefined;
_local1.myMode = "free";
_local1.myGrabCount = 10;
}
if (_local1.currentGrab.action == "spike") {
_local1.currentGrab.collide();
}
if (_local1.currentGrab.action == "slimegrab") {
_local1.currentGrab.collide();
}
_local1.myLastAccelX = accelX;
_local1.myLastAccelY = accelY;
_local1.velocity[0] = _local1.velocity[0] + (accelX * _local1.deltaT);
_local1.velocity[1] = _local1.velocity[1] + (accelY * _local1.deltaT);
var mySpeed = Math.sqrt((_local1.velocity[0] * _local1.velocity[0]) + (_local1.velocity[1] * _local1.velocity[1]));
if ((mySpeed * _local1.myScale) > _local1.myMaxPixels) {
var myAdjust = (_local1.myMaxPixels / (mySpeed * _local1.myScale));
_local1.velocity[0] = _local1.velocity[0] * myAdjust;
_local1.velocity[1] = _local1.velocity[1] * myAdjust;
}
_local1.pixelVelX = _local1.velocity[0] * _local1.myScale;
_local1.pixelVelY = _local1.velocity[1] * _local1.myScale;
_local1._x = (_local1._x + (_local1.velocity[0] * _local1.myScale)) + _local2.gameControl.scrollVel[0];
_local1._y = (_local1._y + (_local1.velocity[1] * _local1.myScale)) + _local2.gameControl.scrollVel[1];
if ((_local1.sittingOn != undefined) && (_local1.myMode == "free")) {
_local1._x = _local1._x + _local1.sittingOn.myVelX;
_local1._y = _local1._y + _local1.sittingOn.myVelY;
}
if ((_local1.action == "alive") && (_local1.myMode != "pull")) {
var _local3 = 0;
while (_local3 < 5) {
_local1.collideCount = 0;
_local1.checkWall();
if (_local1.collideCount == 0) {
break;
}
_local3++;
}
}
if (_local1.action == "won") {
if (_local1.animCel == 10) {
_local2.Hero.currentGrab.action = "close";
}
}
if (_local1.myMode == "free") {
_local2.Hand._x = _local1._x + _local1.pixelVelX;
_local2.Hand._y = _local1._y + _local1.pixelVelY;
} else if (_local1.currentGrab != undefined) {
_local2.Hand._x = _local1.currentGrab.snapX;
_local2.Hand._y = _local1.currentGrab.snapY;
} else if (_local1.sittingOn != undefined) {
_local2.Hand._x = (_local2.Hand._x + _local2.gameControl.scrollVel[0]) + _local1.sittingOn.myVelX;
_local2.Hand._y = (_local2.Hand._y + _local2.gameControl.scrollVel[1]) + _local1.sittingOn.myVelY;
} else {
_local2.Hand._x = _local2.Hand._x + _local2.gameControl.scrollVel[0];
_local2.Hand._y = _local2.Hand._y + _local2.gameControl.scrollVel[1];
}
_local1.moveAttachments();
if (_local2.gameControl.scrolling) {
if (_local1._y > (Stage.height * 2.5)) {
_local1.changeAction("falling");
}
} else if (_local1._y > (Stage.height * 1.5)) {
if (_local2.gameControl.action == "map") {
_local1.reposLastGrab();
} else {
_local1.changeAction("falling");
}
}
}
_local1.checkCollision();
if (_local1.currentGrab.action == "drop") {
_local1.currentGrab = undefined;
_local1.myMode = "free";
_local1.myGrabCount = 10;
}
if (_local1.currentGrab.action == "spike") {
_local1.currentGrab.collide();
}
if (_local1.currentGrab.action == "slimegrab") {
_local1.currentGrab.collide();
}
_local1.myLastAccelX = accelX;
_local1.myLastAccelY = accelY;
_local1.velocity[0] = _local1.velocity[0] + (accelX * _local1.deltaT);
_local1.velocity[1] = _local1.velocity[1] + (accelY * _local1.deltaT);
var mySpeed = Math.sqrt((_local1.velocity[0] * _local1.velocity[0]) + (_local1.velocity[1] * _local1.velocity[1]));
if ((mySpeed * _local1.myScale) > _local1.myMaxPixels) {
var myAdjust = (_local1.myMaxPixels / (mySpeed * _local1.myScale));
_local1.velocity[0] = _local1.velocity[0] * myAdjust;
_local1.velocity[1] = _local1.velocity[1] * myAdjust;
}
_local1.pixelVelX = _local1.velocity[0] * _local1.myScale;
_local1.pixelVelY = _local1.velocity[1] * _local1.myScale;
_local1._x = (_local1._x + (_local1.velocity[0] * _local1.myScale)) + _local2.gameControl.scrollVel[0];
_local1._y = (_local1._y + (_local1.velocity[1] * _local1.myScale)) + _local2.gameControl.scrollVel[1];
if ((_local1.sittingOn != undefined) && (_local1.myMode == "free")) {
_local1._x = _local1._x + _local1.sittingOn.myVelX;
_local1._y = _local1._y + _local1.sittingOn.myVelY;
}
if ((_local1.action == "alive") && (_local1.myMode != "pull")) {
var _local3 = 0;
while (_local3 < 5) {
_local1.collideCount = 0;
_local1.checkWall();
if (_local1.collideCount == 0) {
break;
}
_local3++;
}
}
if (_local1.action == "won") {
if (_local1.animCel == 10) {
_local2.Hero.currentGrab.action = "close";
}
}
if (_local1.myMode == "free") {
_local2.Hand._x = _local1._x + _local1.pixelVelX;
_local2.Hand._y = _local1._y + _local1.pixelVelY;
} else if (_local1.currentGrab != undefined) {
_local2.Hand._x = _local1.currentGrab.snapX;
_local2.Hand._y = _local1.currentGrab.snapY;
} else if (_local1.sittingOn != undefined) {
_local2.Hand._x = (_local2.Hand._x + _local2.gameControl.scrollVel[0]) + _local1.sittingOn.myVelX;
_local2.Hand._y = (_local2.Hand._y + _local2.gameControl.scrollVel[1]) + _local1.sittingOn.myVelY;
} else {
_local2.Hand._x = _local2.Hand._x + _local2.gameControl.scrollVel[0];
_local2.Hand._y = _local2.Hand._y + _local2.gameControl.scrollVel[1];
}
_local1.moveAttachments();
if (_local2.gameControl.scrolling) {
if (_local1._y > (Stage.height * 2.5)) {
_local1.changeAction("falling");
}
} else if (_local1._y > (Stage.height * 1.5)) {
if (_local2.gameControl.action == "map") {
_local1.reposLastGrab();
} else {
_local1.changeAction("falling");
}
}
}
}
}
}
function playSound(whichSound) {
var _local1 = whichSound;
var _local2 = this;
if ((_local2.myCurrentSound == _local1) && (_local1 == "stretch")) {
} else {
_local2.myCurrentSound = _local1;
if (_local1 == "bounce") {
var _local3 = Math.ceil(Math.random() * 5);
_local1 = ("bounce0" + _local3) + ".aif";
} else if (_local1 == "stretch") {
var _local3 = Math.ceil(Math.random() * 9);
_local1 = ("stretch0" + _local3) + ".aif";
} else if (_local1 == "fling") {
var _local3 = Math.ceil(Math.random() * 9);
_local1 = ("fling0" + _local3) + ".aif";
}
_local2.mysound.attachSound(_local1);
_local2.mysound.start(_local1);
}
}
function checkWall() {
if (action == "stop") {
return(undefined);
}
if (myMode == "free") {
sitCount = sitCount + 1;
if (sitCount > 10) {
sittingOn = undefined;
}
}
var i = 0;
while (i < _root.gameControl.myWalls.length) {
var myWallObstacle = eval (_root.gameControl.myWalls[i]);
myWallObstacle.checkCollision();
i++;
}
}
function changeLabel(whichLabel) {
var _local1 = this;
if (_local1.action == "stop") {
} else if (whichLabel == _local1.animationLabel) {
} else {
_local1.animationLabel = whichLabel;
_root.Hero.gotoAndPlay(_local1.animationLabel);
_root.Hand.gotoAndPlay(_local1.animationLabel);
}
}
function moveAttachments() {
var diffX = (_x - _root.Hand._x);
var diffY = (_y - _root.Hand._y);
var myDist = Math.sqrt((diffX * diffX) + (diffY * diffY));
var myFrame = Math.floor(myDist / 30);
if (myFrame < 1) {
myFrame = 1;
}
if (myFrame > 4) {
myFrame = 4;
}
var newrot = _rotation;
if (Math.abs(diffY) > 0.5) {
newrot = 180 - (57.32 * Math.atan(diffX / diffY));
if (diffY > 0) {
newrot = 180 + newrot;
}
}
_rotation = newrot;
_root.Hand._rotation = _rotation;
_root.ArmBlack.clear();
_root.Arm.clear();
if (myMode == "free") {
if (_rotation < 0) {
_xscale = -Math.abs(_xscale);
} else {
_xscale = Math.abs(_xscale);
}
return(undefined);
}
changeLabel("stretch" + myFrame);
_root.Hand._visible = true;
var myLineThickness = ((10 - ((myFrame - 1) * 2)) * myBodyScale);
_root.createEmptyMovieClip("ArmBlack", 8);
_root.ArmBlack.lineStyle(myLineThickness + 3, 6656, 100);
_root.ArmBlack.moveTo(_x, _y);
_root.ArmBlack.lineTo(_root.Hand._x, _root.Hand._y);
_root.createEmptyMovieClip("Arm", 9);
_root.Arm.lineStyle(myLineThickness, 16764057, 100);
_root.Arm.moveTo(_x, _y);
_root.Arm.lineTo(_root.Hand._x, _root.Hand._y);
_root.ThrowPath.clear();
if ((myMode == "pull") && false) {
myPullCount = myPullCount + 0.25;
if (myPullCount >= 50) {
myPullCount = 50;
}
_root.createEmptyMovieClip("ThrowPath", 7);
_root.ThrowPath.lineStyle(12 * myBodyScale, 16777215, myPullCount);
_root.ThrowPath.moveTo(_x, _y);
var accelX = 0;
var accelY = myGravity;
var velocityX = 0;
var velocityY = 0;
var newX = _x;
var newY = _y;
var myHits = 0;
var i = 0;
while (i < 25) {
if (i < 3) {
var diffX = (newX - _root.Hand._x);
var diffY = (newY - _root.Hand._y);
var handDist = Math.sqrt((diffX * diffX) + (diffY * diffY));
if ((handDist - springLength) < 0) {
handDist = springLength;
}
var springStretch = ((handDist - springLength) / myScale);
accelX = (0 + (((springK / myMass) * springStretch) * _root.sinQuick(_rotation))) - (myDamping * velocityX);
accelY = (myGravity - (((springK / myMass) * springStretch) * _root.cosQuick(_rotation))) - (myDamping * velocityY);
} else {
accelX = 0;
accelY = myGravity;
}
velocityX = velocityX + (accelX * deltaT);
velocityY = velocityY + (accelY * deltaT);
var mySpeed = Math.sqrt((velocityX * velocityX) + (velocityY * velocityY));
if ((mySpeed * myScale) > myMaxPixels) {
var myAdjust = (myMaxPixels / (mySpeed * myScale));
velocityX = velocityX * myAdjust;
velocityY = velocityY * myAdjust;
}
var lastX = newX;
var lastY = newY;
newX = newX + (velocityX * myScale);
newY = newY + (velocityY * myScale);
var j = 0;
while (j < _root.gameControl.myWalls.length) {
var myWallObstacle = eval (_root.gameControl.myWalls[j]);
if (myWallObstacle.hitTest(newX, newY)) {
var whichDir = "x";
if (myWallObstacle.hitTest(newX, lastY) == false) {
whichDir = "y";
}
var k = 1;
while (k > 0) {
var checkX = (lastX + ((velocityX * myScale) * k));
var checkY = (lastY + ((velocityY * myScale) * k));
if (myWallObstacle.hitTest(checkX, checkY)) {
} else {
newX = checkX;
newY = checkY;
k = 0;
}
k = k - 0.1;
}
if (whichDir == "x") {
velocityX = (-velocityX) * 0.8;
velocityY = velocityY * 0.8;
} else {
velocityX = velocityX * 0.8;
velocityY = (-velocityY) * 0.8;
}
j = _root.gameControl.myWalls.length;
myHits = myHits + 1;
}
j++;
}
if (myHits < 2) {
_root.ThrowPath.lineTo(newX, newY);
} else {
i = 25;
}
i = i + 1;
}
} else {
myPullCount = 0;
}
}
function checkGrab() {
if ((action == "won") || (action == "stop")) {
return(undefined);
}
var closest = undefined;
var closeDist = 100000;
var i = 0;
while (i < _root.gameControl.myObstacles.length) {
var myCollideObstacle = eval (_root.gameControl.myObstacles[i]);
if (((myCollideObstacle.myType == "grab") || (myCollideObstacle.myType == "warp")) && (myCollideObstacle.action == "alive")) {
var manHatDist = (Math.abs(myCollideObstacle._x - _x) + Math.abs(myCollideObstacle._y - _y));
if ((((manHatDist < 50) && (myGrabCount <= 8)) && (myCollideObstacle != currentGrab)) || ((manHatDist < 50) && (myGrabCount < 0))) {
if (manHatDist < closeDist) {
closeDist = manHatDist;
closest = myCollideObstacle;
}
}
}
i++;
}
if (closest != undefined) {
sittingOn = undefined;
closest.collide();
}
}
function grabHold(whichObject) {
var _local1 = this;
var _local2 = _root;
if ((_local1.action == "dying") || (_local1.action == "stop")) {
} else if (_local2.gameControl.action == "won") {
} else {
_local1.myMode = "dangle";
_local1.currentGrab = whichObject;
_local2.Hand._x = _local1.currentGrab.snapX;
_local2.Hand._y = _local1.currentGrab.snapY;
_local1.myGrabCount = 10;
_local1.sittingOn = undefined;
_local1.lastGrab = _local1.currentGrab;
var myRand = Math.ceil(Math.random() * 3);
}
}
function forceGrab(whichObject) {
var _local1 = this;
var _local2 = whichObject;
if (_local1.currentGrab == _local2) {
} else {
_local1.myMode = "dangle";
_root.Hand._x = _local2.snapX;
_root.Hand._y = _local2.snapY;
_local1._x = _local2.snapX;
_local1._y = _local2.snapY + 30;
_local1.moveAttachments();
_local1.myGrabCount = 0;
_local1.sittingOn = undefined;
_local2.collide();
_local1.moveTutorial(_local2);
}
}
function jumpTute(whichLabel) {
_root.gameControl.goLabel(whichLabel);
}
function moveTutorial(whichObject) {
}
function checkCollision() {
if (((action == "dying") || (action == "won")) || (action == "stop")) {
return(undefined);
}
var i = 0;
while (i < _root.gameControl.myObstacles.length) {
var myCollideObstacle = eval (_root.gameControl.myObstacles[i]);
if (hitTest(myCollideObstacle)) {
myCollideObstacle.collide();
}
i++;
}
}
function doDamage(howMuch) {
var _local1 = this;
_local1.health = _local1.health - howMuch;
_local1.hitCount = 30;
if (_local1.health < 0) {
_local1.health = 0;
}
if (_local1.health > 5) {
_local1.health = 5;
}
_root.Health.gotoAndPlay("level" + _local1.health);
}
function changeAction(whichAction) {
var _local1 = this;
var _local2 = whichAction;
var _local3 = _root;
if (_local1.action == _local2) {
} else if (_local2 == _local1.myElement) {
} else if (_local1.action == "dying") {
} else if (_local1.action == "stop") {
} else if ((((_local2 == "dying") || (_local2 == "fire")) || (_local2 == "slime")) || (_local2 == "falling")) {
if (_local1.hitCount > 0) {
return;
}
_local3.gameControl.playSound("ow3snd");
if (_local2 == "falling") {
_local2 = "dying";
} else {
_local1.doDamage(1);
if (_local1.health > 0) {
_local3.gameControl.explodeAt(_local1);
_local1.gotoAndPlay("ouch");
return;
}
}
_local1.myElement = "none";
_local1.animCel = 1;
_local1.currentGrab = undefined;
_local1.myMode = "free";
_local1.myGrabCount = 10;
_local1.myElementCount = 0;
_local1.myElement = "none";
if (_local2 != "dying") {
_local2 = "dying_" + _local2;
}
_local1.gotoAndPlay(_local2);
_local1.myGravity = 2;
_local1.velocity[0] = _local1.velocity[0] * 0.1;
_local1.velocity[1] = -2;
_local1.action = "dying";
} else if (_local2 == "won") {
_local1.animCel = 1;
_local1.action = _local2;
} else if (_local2 == "wait") {
_local1.animCel = 1;
_local1.action = _local2;
_local1.currentGrab = undefined;
_local1.myMode = "free";
_local1.myGrabCount = 10;
_local1._x = 10000;
_local1._y = 10000;
_local3.Hand._x = _local1._x;
_local3.Hand._y = _local1._y;
_local1.moveAttachments();
} else if (_local2 == "suckup") {
_local1.animCel = 1;
_local1.action = _local2;
_local3.Element.gotoAndPlay("suckup");
} else if (_local2 == "stop") {
_local1.animCel = 1;
_local1.action = "stop";
_local1._visible = false;
_local3.Hand._visible = false;
_local3.ArmBlack.clear();
_local3.Arm.clear();
_local1.stopCount = 100;
_local3.gameControl.startMusic("ingame_snd");
_local1.gotoAndPlay("stop");
}
}
var tilt = 2;
var animCel = 1;
var origX = 0;
var origY = 0;
var bobHeight = 5;
var action = "alive";
var velocity = [0, 0];
var mySpeed = 5;
var offsetEdge = 50;
var mymotion = "across";
var powerupcount = 0;
var mypowerup = "none";
var baddiecount = 0;
var myBullets = 0;
var bulletType = "single";
var demoRot = 0;
var headOffsetX = 0;
var headOffsetY = 0;
var headOffsetDist = 0;
var armLength = 0;
var fixed = false;
var myVelY = 0;
var myVelX = 0;
var mouseForceX = 0;
var mouseForceY = 0;
var deltaT = 0.05;
var springK = 10;
var springLengthOrig = 70;
var myMass = 1;
var myGravityOrig = 5;
var myGravity = 0;
var myDamping = 2;
var myMaxPixels = 100;
var handDist = 0;
var myScale = 10;
var myBodyScale = 0.5;
var myGrabCount = 0;
var myMode = "free";
var myLastAccelX = 0;
var myLastAccelY = 0;
var myMaxStretch = 150;
var myColor = "green";
var pixelVelX = 0;
var pixelVelY = 0;
var sitCount = 10;
var myMaxY = 0;
var flickCount = 0;
var collideCount = 0;
var myOrigLength = 40;
var myMinLength = 20;
var tuteCount = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var myElement = "none";
var myElementCount = 0;
var myLastLength = 0;
var myCurrentLength = 0;
var myCurrentSound = "none";
var health = 1;
var hitCount = 0;
var myPullCount = 0;
var myCannon = undefined;
var animationLabel = "none";
var stopCount = 0;
var myDeath = "none";
}
Symbol 674 MovieClip [__Packages.GameSaver] Frame 0
class GameSaver
{
var gameData;
function GameSaver () {
initialize();
}
function initialize() {
var _local1 = this;
var _local2 = _root;
_local2.yourName = "";
_local1.gameData = SharedObject.getLocal(_local1.gameName, "/");
if (_local1.gameData.data.activeSlot == undefined) {
_local2.gameControl.gender = "male";
_local2.gameControl.swapheads();
_local1.gameData.data.best = 0;
} else if (_local1.gameData.data["name" + _local1.gameData.data.activeSlot] != undefined) {
_local2.yourName = _local1.gameData.data["name" + _local1.gameData.data.activeSlot];
_local2.gameControl.difficulty = _local1.gameData.data["difficulty" + _local1.gameData.data.activeSlot];
if (_local2.gameControl.difficulty == undefined) {
_local2.gameControl.difficulty = "hard";
}
_local2.gameControl.gender = _local1.gameData.data["gender" + _local1.gameData.data.activeSlot];
if (_local2.gameControl.gender == undefined) {
_local2.gameControl.gender = "male";
} else {
_local2.gameControl.swapheads();
}
}
}
function readData() {
goldTimes = 0;
maxLevel = 0;
gameScore = 0;
var i = 0;
while (i < 10) {
var goldTime = eval ("_root.gameControl.levelPreview.gold" + (i + 1));
goldTime = _root.gameControl.adjustGold(goldTime);
var thisTime = gameData.data[(("time" + gameData.data.activeSlot) + "_") + i];
if (thisTime == undefined) {
thisTime = 10000000 /* 0x989680 */;
}
if (thisTime <= (goldTime * 30)) {
goldTimes = goldTimes + 1;
}
var thisGem = gameData.data[(("gem" + gameData.data.activeSlot) + "_") + i];
if (thisGem == undefined) {
thisGem = 0;
}
levelTimes[i] = thisTime;
levelGems[i] = thisGem;
if (thisTime != 10000000) {
maxLevel = i + 1;
}
if (thisTime != 10000000) {
var myScoreSummary = _root.gameControl.scoreSummary(thisTime, i + 1);
gameScore = gameScore + myScoreSummary.total;
}
i++;
}
if (maxLevel >= _root.gameControl.levellimit) {
maxLevel = _root.gameControl.levellimit - 1;
}
lastAdded = gameData.data["submit" + gameData.data.activeSlot];
_root.gameControl.level = maxLevel + 1;
}
function updateMap() {
var i = 0;
while (i < 50) {
var myMarker = eval ("_root.level" + (i + 1));
var goldTime = eval ("_root.gameControl.levelPreview.gold" + (i + 1));
goldTime = _root.gameControl.adjustGold(goldTime);
if (levelTimes[i] <= (goldTime * 30)) {
myMarker.action = "gold";
} else if (levelTimes[i] < 10000000) {
myMarker.action = "complete";
} else if (i == maxLevel) {
myMarker.action = "unlocked";
}
i++;
}
if (_root.gameControl.level > 50) {
_root.gameControl.level = 50;
}
}
function cheat(myLevel, howMuch) {
myLevel = myLevel - 1;
var i = 0;
while (i < 50) {
var goldTime = eval ("_root.gameControl.levelPreview.gold" + (i + 1));
gameData.data[(("time" + gameData.data.activeSlot) + "_") + i] = (30 * goldTime) + howMuch;
if (i > myLevel) {
gameData.data[(("time" + gameData.data.activeSlot) + "_") + i] = undefined;
gameData.data[(("gem" + gameData.data.activeSlot) + "_") + i] = undefined;
}
i++;
}
gameData.flush();
readData();
updateMap();
}
function saveScore() {
var _local1 = this;
var _local3 = _root;
var _local2 = _local3.gameControl.level - 1;
if (_local1.levelTimes[_local2] > _local3.gameControl.animCel) {
_local1.levelTimes[_local2] = _local3.gameControl.animCel;
}
_local1.gameScore = _local3.gameScore;
_local1.gameData.data[(("time" + _local1.gameData.data.activeSlot) + "_") + _local2] = _local1.levelTimes[_local2];
if (_local1.gameData.data.best < _local1.gameScore) {
_local1.gameData.data.best = _local1.gameScore;
}
_local1.gameBest = _local1.gameData.data.best;
_local1.gameData.flush();
_local1.readData();
}
function saveName() {
var _local2 = this;
var _local3 = _root.Name_txt.text;
var _local1 = 0;
while (_local1 < 5) {
if (_local3 == _local2.gameData.data["name" + _local1]) {
trace(_local3 + " already exists, so using and continuing...");
_local2.gameData.data.activeSlot = _local1;
_local2.chooseName();
return;
}
if (_local2.gameData.data["name" + _local1] == undefined) {
_local2.gameData.data["name" + _local1] = _local3;
_local2.gameData.data.activeSlot = _local1;
break;
}
_local1++;
}
_root.gameControl.firstTime = true;
_local2.saveChoice();
}
function saveDifficulty() {
var _local1 = this;
_local1.gameData.data["difficulty" + _local1.gameData.data.activeSlot] = _root.gameControl.difficulty;
_local1.gameData.flush();
}
function saveGender() {
var _local1 = this;
_local1.gameData.data["gender" + _local1.gameData.data.activeSlot] = _root.gameControl.gender;
_local1.gameData.flush();
}
function saveChoice() {
var _local1 = this;
_local1.gameData.flush();
_root.yourName = _local1.gameData.data["name" + _local1.gameData.data.activeSlot];
_local1.readData();
_root.gameControl.choosePlayer();
}
function deleteChoice() {
var _local1 = this;
var _local3 = _root;
_local1.gameData.data["name" + _local1.gameData.data.activeSlot] = undefined;
var _local2 = 0;
while (_local2 < 50) {
delete _local1.gameData.data[(("time" + _local1.gameData.data.activeSlot) + "_") + _local2];
delete _local1.gameData.data[(("gem" + _local1.gameData.data.activeSlot) + "_") + _local2];
_local2++;
}
delete _local1.gameData.data.activeSlot;
delete _local1.gameData.data["difficulty" + _local1.gameData.data.activeSlot];
delete _local1.gameData.data["gender" + _local1.gameData.data.activeSlot];
_local2 = 0;
while (_local2 < 5) {
if (_local1.gameData.data["name" + _local2] != undefined) {
_local1.gameData.data.activeSlot = _local2;
break;
}
_local2++;
}
_local1.gameData.flush();
if (_local1.gameData.data["name" + _local1.gameData.data.activeSlot] == undefined) {
_local3.yourName = "";
_local3.gotoAndPlay("title");
} else {
_local3.yourName = _local1.gameData.data["name" + _local1.gameData.data.activeSlot];
_local1.selectName(_local1.gameData.data.activeSlot);
_local1.chooseName();
}
}
function chooseName() {
_root.gotoAndPlay("chooseName");
var i = 0;
while (i < 5) {
var myText = eval (("_root.Name" + i) + ".Name_txt");
if (gameData.data["name" + i] == undefined) {
myText.text = "EMPTY";
} else {
myText.text = gameData.data["name" + i];
}
i++;
}
selectName(gameData.data.activeSlot);
}
function selectName(whichNum) {
var hotName = eval (("_root.Name" + whichNum) + ".Name_txt");
if (hotName.text == "EMPTY") {
_root.gameControl.playSound("badsnd");
return(undefined);
}
_root.gameControl.playSound("clicksnd");
var i = 0;
while (i < 5) {
var myText = eval (("_root.Name" + i) + ".Name_txt");
myText.textColor = 9547587 /* 0x91AF43 */;
i++;
}
gameData.data.activeSlot = whichNum;
_root.yourName = gameData.data["name" + gameData.data.activeSlot];
_root.gameControl.difficulty = gameData.data["difficulty" + gameData.data.activeSlot];
_root.gameControl.gender = gameData.data["gender" + gameData.data.activeSlot];
_root.gameControl.swapheads();
hotName.textColor = 4939787 /* 0x4B600B */;
}
function showscores() {
_root.gameControl.togglePause();
getURL ("http://www.ezone.com/login2/scores.php?game=" + gameName, "scoreboard");
}
function postscore() {
var myGamescore = _root.gameScore;
var _local3 = gameName + String(myGamescore);
var myEncoded = "";
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = _local3.charCodeAt(_local1) % myGamescore;
myEncoded = myEncoded + String(_local2);
trace((_local3.charAt(_local1) + ": ") + _local2);
_local1++;
}
trace(myEncoded);
var hs_submitURL = ((((((("http://www.ezone.com/login2/scores.php?action=submit&game=" + gameName) + "&score=") + myGamescore) + "&check=") + myEncoded) + "&") + String(Math.round(Math.random() * 10000)));
getURL (hs_submitURL, "scoreboard");
gameData.data["submit" + gameData.data.activeSlot] = gameScore;
trace("submitted the score");
gameData.flush();
readData();
_root.gameControl.preview();
}
function submitscore() {
var _local1 = _root;
namesData.push((((_local1.gameScore + ":") + _local1.gameControl.level) + ":") + _local1.yourName);
showScore();
}
function showScore() {
var _local3 = this;
_local3.namesData.sort(_local3.order);
_root.scoreboard = "";
var _local1 = 0;
while (_local1 < _local3.namesData.length) {
var _local2 = _local3.namesData[_local1];
_root.scoreboard = (((((((_root.scoreboard + (_local1 + 1)) + ". ") + _local2.split(":")[2]) + " Level ") + _local2.split(":")[1]) + " ") + _local2.split(":")[0]) + newline;
_local1++;
}
gotoAndPlay ("HighScores");
}
function order(a, b) {
var _local2 = Math.floor(a.split(":")[0]);
var _local1 = Math.floor(b.split(":")[0]);
if (_local2 < _local1) {
return(1);
}
if (_local2 > _local1) {
return(-1);
}
return(0);
}
var gameName = "turkeyfling";
var namesData = [];
var nameList = ["", "", "", "", ""];
var activeSlot = 0;
var levelTimes = [];
var levelGems = [];
var maxLevel = 0;
var goldTimes = 0;
var gameScore = 0;
var lastAdded = 0;
var gameBest = 0;
}
Symbol 675 MovieClip [__Packages.Grabtracker] Frame 0
class Grabtracker extends MovieClip
{
function Grabtracker () {
var _local1 = this;
super();
if (String(_local1).indexOf("blue") != -1) {
_local1.myColor = "blue";
} else if (String(_local1).indexOf("gray") != -1) {
_local1.myColor = "gray";
} else if (String(_local1).indexOf("green") != -1) {
_local1.myColor = "green";
}
}
function onEnterFrame() {
var _local1 = this;
_local1._parent.snapX = _local1._parent._x + _local1._x;
_local1._parent.snapY = _local1._parent._y + _local1._y;
if (_local1._parent.myColor == _local1.myColor) {
_local1._visible = true;
} else {
_local1._visible = false;
}
}
var myColor = "gray";
}
Symbol 496 MovieClip Frame 1
this._visible = false;
Symbol 500 MovieClip Frame 1
blackMatte._x = 0;
blackMatte._y = 0;
_root.stop();
Symbol 500 MovieClip Frame 2
_root.barWidth = bar._width;
Symbol 500 MovieClip Frame 3
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._width = (_root.barWidth * PercentLoaded) / 100;
} else {
_root.gotoAndPlay(4);
}
Symbol 500 MovieClip Frame 4
gotoAndPlay ("loadbar");
Symbol 501 Button
on (release) {
getURL ("http://www.ezone.com/", "_blank");
}
Symbol 506 Button
on (release) {
getURL ("http://www.ezone.com/", "_blank");
}
Symbol 509 Button
on (release) {
getURL ("http://www.ezone.com/affiliates/", "_blank");
}
Symbol 565 MovieClip [head] Frame 1
#initclip 43
Object.registerClass("head", Freebody);
#endinitclip
Symbol 565 MovieClip [head] Frame 44
gotoAndPlay ("stretch1");
Symbol 565 MovieClip [head] Frame 69
gotoAndPlay ("stretch2");
Symbol 565 MovieClip [head] Frame 94
gotoAndPlay ("stretch3");
Symbol 565 MovieClip [head] Frame 119
gotoAndPlay ("stretch4");
Symbol 565 MovieClip [head] Frame 120
if (this.velocity[1] > 19) {
this.animationLabel = "re-entry4";
_root.gameControl.startMusic("freefall_snd", 0);
gotoAndPlay(this.animationLabel);
} else if (this.velocity[1] > 18) {
this.animationLabel = "re-entry3";
_root.gameControl.startMusic("freefall_snd", 0);
gotoAndPlay(this.animationLabel);
} else if (this.velocity[1] > 17) {
this.animationLabel = "re-entry2";
_root.gameControl.startMusic("freefall_snd", 0);
gotoAndPlay(this.animationLabel);
} else if (this.velocity[1] > 16) {
this.animationLabel = "re-entry1";
_root.gameControl.startMusic("freefall_snd", 0);
gotoAndPlay(this.animationLabel);
} else if ((_root.gameControl.action == "playing") && (this.action != "stop")) {
this.animationLabel = "fly";
if ((_root.gameControl.origin[1] > 4000) || (_root.Hero.velocity[1] > 5)) {
_root.gameControl.startMusic("wind_snd");
} else {
_root.gameControl.startMusic("ingame_snd");
}
} else if (this.action == "stop") {
if (_root.Hero.myDeath != "none") {
this.gotoAndPlay(_root.Hero.myDeath);
}
}
Symbol 565 MovieClip [head] Frame 123
gotoAndPlay ("fly");
Symbol 565 MovieClip [head] Frame 124
this.animationLabel = "fly";
Symbol 565 MovieClip [head] Frame 135
gotoAndPlay ("fly");
Symbol 565 MovieClip [head] Frame 136
this.animationLabel = "fly";
if (this.velocity[0] < 3) {
gotoAndPlay ("bouncestop");
}
Symbol 565 MovieClip [head] Frame 148
gotoAndPlay ("fly");
Symbol 565 MovieClip [head] Frame 149
_root.attachMovie("emptyCannon", "Empty", this.getNextHighestDepth(), {origx:this._x, origy:this._y});
this.myCannon = _root.Empty;
this.changeAction("stop");
this._visible = true;
this._rotation = 0;
Symbol 565 MovieClip [head] Frame 170
gotoAndPlay ("bounceloop");
Symbol 565 MovieClip [head] Frame 285
if (this.action != "stop") {
gotoAndPlay ("fly");
}
Symbol 565 MovieClip [head] Frame 293
if (this.action != "stop") {
gotoAndPlay ("fly");
}
Symbol 565 MovieClip [head] Frame 301
if (this.action != "stop") {
gotoAndPlay ("fly");
}
Symbol 565 MovieClip [head] Frame 309
if (this.action != "stop") {
gotoAndPlay ("fly");
}
Symbol 565 MovieClip [head] Frame 310
if (this.action == "stop") {
this.gotoAndPlay("stop");
} else {
_root.attachMovie("emptyCannon", "Empty", this.getNextHighestDepth(), {origx:this._x, origy:this._y});
this.myCannon = _root.Empty;
this.changeAction("stop");
this.action = "stop";
this._visible = true;
this._rotation = 0;
}
Symbol 565 MovieClip [head] Frame 426
this.gotoAndPlay("craterend");
Symbol 565 MovieClip [head] Frame 428
gotoAndPlay ("stop");
Symbol 596 MovieClip [hand] Frame 27
gotoAndPlay ("stretch1");
Symbol 596 MovieClip [hand] Frame 54
gotoAndPlay ("stretch2");
Symbol 596 MovieClip [hand] Frame 81
gotoAndPlay ("stretch3");
Symbol 596 MovieClip [hand] Frame 108
gotoAndPlay ("stretch4");
Symbol 597 Button
on (release) {
jumpURL("http://www.ezone.com/");
}
Symbol 602 Button
on (release) {
_root.gameControl.toggleMute();
}
Symbol 603 Button
on (release) {
jumpURL("http://www.ezone.com/affiliates/");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 608 Button
on (release) {
_global.gameSaver.showscores();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 611 Button
on (release) {
gotoAndPlay ("credits");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 615 Button
on (release) {
jumpURL("http://www.ezone.com/");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 618 Button
on (release) {
_root.gameControl.playSound("clicksnd");
_root.gameControl.startFirstLevel();
_global.gameLock.checkValid();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 619 Button
on (release) {
_root.gameControl.playSound("clicksnd");
_root.Hero.changeAction("wait");
_root.gameControl.showTitle();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 633 MovieClip [grabgrey] Frame 1
#initclip 46
Object.registerClass("grabgrey", Grabtracker);
#endinitclip
Symbol 634 MovieClip [grabgreen] Frame 1
#initclip 44
Object.registerClass("grabgreen", Grabtracker);
#endinitclip
Symbol 636 MovieClip [grabblue] Frame 1
#initclip 45
Object.registerClass("grabblue", Grabtracker);
#endinitclip
Symbol 639 Button
on (release) {
_root.gameControl.playSound("clicksnd");
_root.gameControl.startFirstLevel();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 645 Button
on (release) {
getURL ("http://www.ezone.com/", "_blank");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 648 Button
on (release) {
_root.gameControl.startFirstLevel();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 651 Button
on (release) {
_root.gameControl.playSound("clicksnd");
_global.gameSaver.postscore();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 654 MovieClip Frame 1
stop();
Symbol 654 MovieClip Frame 2
_root.gameControl.explodeScore(390, 210, "note1.aif");
_root.kongregateScores.submit(_root.gameScore);
_root.kongregateStats.submit("HighScore", _root.gameScore);
Symbol 654 MovieClip Frame 16
if (_root.gameControl.madeGold) {
_root.gameControl.explodeScore(260, 140, "sparkle.aif");
}
Symbol 654 MovieClip Frame 30
this.gotoAndPlay("loop");
Symbol 656 MovieClip [grab] Frame 1
#initclip 47
Object.registerClass("grab", Scroller);
#endinitclip
Symbol 656 MovieClip [grab] Frame 2
stop();
Symbol 657 MovieClip Frame 1
_root.Hero.initialize();
Symbol 657 MovieClip Frame 2
stop();
Symbol 658 Button
on (release) {
if (_root.Hero.action != "wait") {
_root.gameControl.togglePause();
} else {
_root.gameControl.showTitle();
}
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 659 Button
on (release) {
jumpURL("http://www.ezone.com/");
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 660 Button
on (release) {
_root.gameControl.playSound("clicksnd");
_root.Hero.changeAction("wait");
_root.gameControl.showTitle();
}
on (rollOver) {
_root.gameControl.explodeButton();
}
Symbol 667 Button
on (release) {
getURL (_global.gameURL, "_parent");
}