Frame 1
_lockroot = true;
Instance of Symbol 111 MovieClip [TMP575pauenq3] in Frame 1
//component parameters
onClipEvent (construct) {
bgcolor = 0;
gameid = "4thofjulygame";
playads_mochiID = "";
playads_mochiRES = "640x480";
}
Instance of Symbol 117 MovieClip [ezone_hs] in Frame 2
//component parameters
onClipEvent (construct) {
hs_gameid = "4thofjulygame";
}
Frame 4
function zeroAngle(whichAngle) {
whichAngle = Math.round(whichAngle);
whichAngle = whichAngle % 360;
if (whichAngle < 0) {
whichAngle = whichAngle + 360;
}
return(whichAngle);
}
function sinQuick(whichAngle) {
whichAngle = zeroAngle(whichAngle);
toReturn = _global.sinLookup[whichAngle];
return(toReturn);
}
function cosQuick(whichAngle) {
whichAngle = zeroAngle(whichAngle);
toReturn = _global.cosLookup[whichAngle];
return(toReturn);
}
_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++;
}
Frame 6
stop();
Frame 8
stop();
Frame 9
stop();
Frame 10
var pauseCounter = 90;
Frame 12
pauseCounter = pauseCounter - 1;
if (pauseCounter > 0) {
gotoAndPlay(this._currentframe - 1);
} else {
_root.EzoneHS.submitScore(_root.gameScore);
_root.kongregateStats.submit("HighScore", _root.gameScore);
stop();
}
Frame 13
stop();
Frame 15
stop();
Symbol 5 Button
on (press) {
fscommand ("quit");
}
Symbol 6 MovieClip [quitMatte] Frame 1
var protocol = _url.substr(0, _url.indexOf(":"));
if (protocol != "file") {
quit._visible = false;
}
Symbol 9 MovieClip [blue4] Frame 1
#initclip 36
Object.registerClass("blue4", Particle);
#endinitclip
Symbol 12 MovieClip [blue3] Frame 1
#initclip 8
Object.registerClass("blue3", Particle);
#endinitclip
Symbol 13 MovieClip Frame 64
this.gotoAndPlay(1);
Symbol 15 MovieClip [blue2] Frame 1
#initclip 9
Object.registerClass("blue2", Particle);
#endinitclip
Symbol 16 MovieClip [blue1] Frame 1
#initclip 10
Object.registerClass("blue1", Particle);
#endinitclip
Symbol 18 MovieClip [red1] Frame 1
#initclip 11
Object.registerClass("red1", Particle);
#endinitclip
Symbol 19 MovieClip [white4] Frame 1
#initclip 12
Object.registerClass("white4", Particle);
#endinitclip
Symbol 21 MovieClip [white3] Frame 1
#initclip 13
Object.registerClass("white3", Particle);
#endinitclip
Symbol 22 MovieClip [white2] Frame 1
#initclip 14
Object.registerClass("white2", Particle);
#endinitclip
Symbol 23 MovieClip [white1] Frame 1
#initclip 15
Object.registerClass("white1", Particle);
#endinitclip
Symbol 24 MovieClip [red4] Frame 1
#initclip 16
Object.registerClass("red4", Particle);
#endinitclip
Symbol 25 MovieClip [red3] Frame 1
#initclip 17
Object.registerClass("red3", Particle);
#endinitclip
Symbol 26 MovieClip Frame 64
this.gotoAndPlay(1);
Symbol 27 MovieClip [red2] Frame 1
#initclip 18
Object.registerClass("red2", Particle);
#endinitclip
Symbol 29 MovieClip Frame 2
gotoAndPlay (1);
Symbol 30 MovieClip [wheel] Frame 1
#initclip 19
Object.registerClass("wheel", Wheel);
#endinitclip
Symbol 33 MovieClip [particle5] Frame 1
#initclip 20
Object.registerClass("particle5", Particle);
#endinitclip
Symbol 33 MovieClip [particle5] Frame 64
stop();
Symbol 34 MovieClip [particle4] Frame 1
#initclip 21
Object.registerClass("particle4", Particle);
#endinitclip
Symbol 34 MovieClip [particle4] Frame 64
stop();
Symbol 35 MovieClip [particle3] Frame 1
#initclip 22
Object.registerClass("particle3", Particle);
#endinitclip
Symbol 35 MovieClip [particle3] Frame 64
stop();
Symbol 36 MovieClip [particle2] Frame 1
#initclip 23
Object.registerClass("particle2", Particle);
#endinitclip
Symbol 36 MovieClip [particle2] Frame 64
stop();
Symbol 37 MovieClip [particle1] Frame 1
#initclip 24
Object.registerClass("particle1", Particle);
#endinitclip
Symbol 37 MovieClip [particle1] Frame 64
stop();
Symbol 45 Button
on (release) {
getURL ("http://www.ezone.com/", "_blank");
}
Symbol 49 Button
on (release) {
getURL ("http://www.ezone.com/affiliates", "_blank");
}
Symbol 54 Button
on (release) {
getURL ("http://www.ezone.com/", "_blank");
_root.gameControl.pauseGame();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 57 Button
on (release) {
_root.gameControl.unpauseGame();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 59 Button
on (release) {
_root.gameControl.lose();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 61 Button
on (release) {
_root.gameControl.restart();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 65 MovieClip [25pts] Frame 1
#initclip 25
Object.registerClass("25pts", Particle);
#endinitclip
Symbol 65 MovieClip [25pts] Frame 36
removeMovieClip(this);
Symbol 67 MovieClip [levelmsg] Frame 1
#initclip 26
Object.registerClass("levelmsg", Particle);
#endinitclip
Symbol 67 MovieClip [levelmsg] Frame 82
_root.gameControl.nextlevel();
removeMovieClip(this);
Symbol 69 MovieClip [100pts] Frame 1
#initclip 27
Object.registerClass("100pts", Particle);
#endinitclip
Symbol 69 MovieClip [100pts] Frame 36
removeMovieClip(this);
Symbol 70 MovieClip [pickup] Frame 1
#initclip 28
Object.registerClass("pickup", Scroller);
#endinitclip
Symbol 73 MovieClip [pickup2] Frame 1
#initclip 29
Object.registerClass("pickup2", Scroller);
#endinitclip
Symbol 81 MovieClip [spark] Frame 1
#initclip 30
Object.registerClass("spark", Spark);
#endinitclip
stop();
Symbol 81 MovieClip [spark] Frame 2
stop();
Symbol 81 MovieClip [spark] Frame 3
stop();
Symbol 81 MovieClip [spark] Frame 4
stop();
Symbol 81 MovieClip [spark] Frame 5
stop();
Symbol 88 MovieClip [rocket_red] Frame 1
#initclip 31
Object.registerClass("rocket_red", Rocket);
#endinitclip
gotoAndPlay(this.action);
Symbol 88 MovieClip [rocket_red] Frame 2
gotoAndPlay(this.action);
Symbol 96 MovieClip [rocket_lenny] Frame 1
#initclip 32
Object.registerClass("rocket_lenny", Lenny);
#endinitclip
Symbol 101 MovieClip [background] Frame 1
#initclip 33
Object.registerClass("background", Scroller);
#endinitclip
Symbol 103 MovieClip [gameControl] Frame 1
#initclip 34
Object.registerClass("gameControl", GameMaster);
#endinitclip
Symbol 105 MovieClip [star] Frame 1
#initclip 35
Object.registerClass("star", Scroller);
#endinitclip
Symbol 111 MovieClip [TMP575pauenq3] 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 111 MovieClip [TMP575pauenq3] Frame 2
this.stop();
Symbol 187 MovieClip [__Packages.Particle] Frame 0
class Particle extends MovieClip
{
var name, _x, origx, _y, origy, _xscale, _yscale, gotoAndPlay, removeMovieClip;
function Particle (myName) {
super();
name = myName;
velX = speed * _root.sinQuick(angle);
velY = speed * _root.cosQuick(angle);
accelY = _root.gameControl.myGravity;
initialize();
}
function initialize() {
_x = origx;
_y = origy;
_xscale = myScale * 200;
_yscale = myScale * 200;
if (dieCel == 60) {
gotoAndPlay(Math.round(Math.random() * 30) + 1);
dieCel = 40 + (Math.random() * 20);
}
}
function onEnterFrame() {
animCel = animCel + 1;
velX = (velX + (accelX * _root.gameControl.deltaT)) * _root.gameControl.damping;
velY = (velY + (accelY * _root.gameControl.deltaT)) * _root.gameControl.damping;
_x = _x + (velX * myScale);
_y = _y + (velY * myScale);
if (animCel > dieCel) {
removeMovieClip();
}
}
var animCel = 1;
var action = "alive";
var velX = 0;
var velY = 0;
var accelX = 0;
var accelY = 0;
var speed = 10;
var angle = 0;
var dieCel = 60;
var myScale = 0.5;
}
Symbol 188 MovieClip [__Packages.Wheel] Frame 0
class Wheel extends MovieClip
{
var name, mysound, stop, play, _rotation;
function Wheel (myName) {
super();
name = myName;
mysound = new Sound(this);
}
function cheer() {
var _local3 = Math.ceil(Math.random() * 2);
mysound.attachSound(("crowd" + _local3) + "_snd");
mysound.setVolume(_root.gameControl.effectVolume * 0.25);
mysound.start();
}
function onEnterFrame() {
if (_root.gameControl.action == "paused") {
stop();
return(undefined);
}
play();
animCel = animCel + 1;
speed = _root.gameControl.power / 10;
_rotation = _rotation + speed;
var i = 1;
while (i <= 8) {
var whichSpark = eval ("this.spark" + i);
whichSpark._rotation = -_rotation;
whichSpark._xscale = speed * 30;
whichSpark._yscale = speed * 30;
i++;
}
}
var animCel = 1;
var action = "alive";
var velX = 0;
var velY = 0;
var accelX = 0;
var accelY = 0;
var speed = 10;
var angle = 0;
var dieCel = 60;
var myScale = 0.5;
}
Symbol 189 MovieClip [__Packages.Scroller] Frame 0
class Scroller extends MovieClip
{
var getDepth, collider, _parent, _name, _width, _height, mysound, _x, _y, _visible, play, stop, removeMovieClip;
function Scroller () {
super();
_root.gameControl.myObstacles.push(this);
var _local4 = getDepth();
if (String(this).indexOf("Regen") != -1) {
myRegen = true;
}
if (String(this).indexOf("Star") != -1) {
myScrollMult = 0.5;
}
if (String(this).indexOf("Back") != -1) {
myScrollMult = 0.45;
}
if (String(this).indexOf("Terrain") != -1) {
collider = _parent.makeCollider(this);
moveCollider();
} else {
_name = _name + _root.gameControl.myObstacles.length;
}
myWidth = _width;
myHeight = _height;
mysound = new Sound(this);
mysound.setVolume(_root.gameControl.effectVolume * 1);
}
function revert() {
_x = lastPos[0];
_y = lastPos[1];
if (collider) {
moveCollider();
}
}
function regenerate(newY) {
action = "alive";
_y = newY;
_x = _root.Hero._x;
}
function moveCollider() {
collider._x = _x;
collider._y = _y;
_visible = false;
}
function update() {
if (action != "alive") {
return(undefined);
}
animCel = animCel + 1;
lastPos = [_x, _y];
if (_root.gameControl.scrolling) {
_x = (_x + xVel) + (_root.gameControl.scrollVel[0] * myScrollMult);
_y = (_y + yVel) + (_root.gameControl.scrollVel[1] * myScrollMult);
}
}
function onEnterFrame() {
if (_root.gameControl.action == "playing") {
play();
update();
} else {
stop();
return(undefined);
}
if (collider) {
moveCollider();
}
if (myRegen) {
if ((_root.gameControl.scrollVel[1] > 0) && (_y > (480 + (myHeight / 2)))) {
regenerate((-myHeight) / 2);
} else if ((_root.gameControl.scrollVel[1] < 0) && (_y < ((-myHeight) / 2))) {
regenerate(480 + (myHeight / 2));
}
}
}
function remove() {
action = "hidden";
_visible = false;
_x = 10000;
if (collider) {
moveCollider();
trace("removed: " + collider._name);
_root.removeMovieClip(_root.terrainBMP);
}
removeMovieClip();
}
function playSound(whichsound, whichVolume) {
if (!whichVolume) {
whichVolume = 1;
}
if (_root.gameControl.effectVolume == 0) {
return(undefined);
}
mysound.attachSound(whichsound);
mysound.setVolume(_root.gameControl.effectVolume * whichVolume);
if (whichsound == "crowd_snd") {
mysound.start(Math.random() * 4);
} else {
mysound.start();
}
}
var animCel = 1;
var action = "alive";
var xVel = 0;
var yVel = 0;
var accelX = 0;
var accelY = 0;
var speed = 10;
var angle = 0;
var myScale = 1;
var myRegen = false;
var myWidth = 0;
var myHeight = 0;
var mycoin = false;
var mywin = false;
var myOffsetX = 0;
var myOffsetY = 0;
var myDist = 10000;
var myType = "background";
var myScore = 10;
var lastPos = [0, 0];
var collideOffset = [0, 0];
var myScrollMult = 1;
}
Symbol 190 MovieClip [__Packages.Spark] Frame 0
class Spark extends Scroller
{
var myType, update, _x, _y, myScore, playSound, myHeight, gotoAndStop;
function Spark () {
super();
myType = "spark";
}
function onEnterFrame() {
if (_root.gameControl.action == "playing") {
update();
} else {
return(undefined);
}
var _local4 = _root.Hero._x - _x;
var _local3 = _root.Hero._y - _y;
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 < 80) {
_root.Hero.boost(myBoost);
_root.gameControl.launchFirework(myColor, _x, _y, 1, 0, "normal");
_root.gameControl.addScore(myScore);
if (myColor != "white") {
playSound("crowd_snd");
_root.Hero.playSound("rocket");
}
regenerate();
}
if ((_root.gameControl.scrollVel[1] > 0) && (_y > (480 + myHeight))) {
regenerate();
}
}
function regenerate() {
var tempObstacle = undefined;
var tempArray = new Array();
_root.gameControl.sparkCount = _root.gameControl.sparkCount + 1;
var i = 0;
while (i < _root.gameControl.myObstacles.length) {
var myObstacleCheck = eval (_root.gameControl.myObstacles[i]);
if ((myObstacleCheck.myType == myType) && (myObstacleCheck != this)) {
tempArray.push({obstacle:myObstacleCheck, myY:myObstacleCheck._y});
}
i++;
}
tempArray.sortOn("myY", Array.NUMERIC);
tempObstacle = tempArray[0].obstacle;
var tempPos = [_root.Hero._x, 0];
if (tempObstacle != undefined) {
tempPos[0] = tempObstacle._x;
tempPos[1] = tempObstacle._y;
}
var tempOffset = 100;
var tempX = tempPos[0];
if (Math.abs(tempPos[0] - _root.Hero._x) > Stage.width) {
if (tempPos[0] > _root.Hero._x) {
tempX = tempPos[0] - tempOffset;
} else {
tempX = tempPos[0] + tempOffset;
}
} else if (Math.random() < 0.5) {
tempX = tempPos[0] + tempOffset;
} else {
tempX = tempPos[0] - tempOffset;
}
var tempY = (tempPos[1] - tempOffset);
_x = tempX;
_y = tempY;
myColor = "white";
myBoost = 1;
myScore = 1;
if (_root.gameScore > 10000) {
if ((_root.gameControl.sparkCount % 10) == 0) {
myColor = "blue";
myBoost = 2;
myScore = 50;
}
}
if (_root.gameScore > 20000) {
if ((_root.gameControl.sparkCount % 40) == 0) {
myColor = "red";
myBoost = 5;
myScore = 100;
}
}
gotoAndStop(myColor);
return(undefined);
}
var mySpark = true;
var myColor = "white";
var myBoost = 1;
}
Symbol 191 MovieClip [__Packages.Rocket] Frame 0
class Rocket extends MovieClip
{
var name, _x, origx, _y, origy, _xscale, _yscale, mysound, _visible, removeMovieClip, stop, play, _parent, _rotation;
function Rocket (myName) {
super();
name = myName;
velX = speed * _root.sinQuick(angle);
velY = speed * _root.cosQuick(angle);
initialize();
}
function initialize() {
_x = origx;
_y = origy;
_xscale = 100;
_yscale = 100;
if (dieCel == 60) {
dieCel = 60 + (Math.random() * 20);
}
mysound = new Sound(this);
mysound.setVolume(_root.gameControl.effectVolume * 1);
_root.Hero.Flame._yscale = 0;
}
function playSound(whichsound, whichVolume) {
if (!whichVolume) {
whichVolume = 1;
}
if (_root.gameControl.effectVolume == 0) {
return(undefined);
}
if (whichsound == "rocket") {
var _local3 = Math.ceil(Math.random() * 5);
whichsound = ("rocket" + _local3) + "_snd";
}
mysound.attachSound(whichsound);
mysound.setVolume(_root.gameControl.effectVolume * whichVolume);
mysound.start();
}
function onMouseUp() {
if (_root.gameControl.action == "ready") {
_root.gameControl.action = "playing";
_root.play();
playSound("rocket");
}
}
function explode() {
if (action == "alivehot") {
_root.gameControl.launchFirework(myParticle, _x, _y, 0.5, 100);
} else if (hitearly) {
_root.gameControl.launchFirework(myParticle, _x, _y, 0.25, 25);
} else {
_root.gameControl.launchFirework(myParticle, _x, _y, 0.1, 5);
}
remove();
}
function remove() {
action = "dead";
mysound.stop();
_visible = false;
removeMovieClip();
}
function boost(howMuch) {
velY = velY + (howMuch * 1.25);
}
function onEnterFrame() {
if (_root.gameControl.action != "playing") {
stop();
return(undefined);
}
play();
animCel = animCel + 1;
if (animCel < 100) {
accelY = 5;
} else {
accelY = -_root.gameControl.myGravity;
}
var _local4 = (-(320 - _parent._xmouse)) / 25;
velX = velX + (_local4 * _root.gameControl.deltaT);
velY = velY + (accelY * _root.gameControl.deltaT);
_root.Hero.Flame._yscale = velY * 10;
speed = Math.sqrt((velX * velX) + (velY * velY));
if (speed > maxSpeed) {
velX = (velX * maxSpeed) / speed;
velY = (velY * maxSpeed) / speed;
}
var _local3 = (Math.atan(velX / velY) * 180) / Math.PI;
if (velY <= 0) {
_local3 = _local3 + 180;
}
_rotation = _local3;
if (velY < -2) {
_root.gameControl.lose();
}
}
var animCel = 1;
var action = "alive";
var velX = 0;
var velY = 0;
var accelX = 0;
var accelY = 0;
var speed = 2;
var angle = 0;
var dieCel = 60;
var myScale = 0.5;
var myParticle = "white";
var hitearly = true;
var maxSpeed = 30;
}
Symbol 192 MovieClip [__Packages.Lenny] Frame 0
class Lenny extends Scroller
{
var myType, myScrollMult, action, xVel, yVel, accelY, update, playSound, _rotation, _xscale;
function Lenny () {
super();
myType = "lenny";
myScrollMult = 0;
action = "waiting";
xVel = 5;
yVel = -11;
myScrollMult = 0;
accelY = _root.gameControl.myGravity * 2;
}
function onEnterFrame() {
if (_root.gameControl.action == "playing") {
update();
} else {
return(undefined);
}
if ((_root.gameScore > 100000) && (action == "waiting")) {
action = "alive";
playSound("lenny_snd");
}
if (action != "alive") {
return(undefined);
}
yVel = yVel + (accelY * _root.gameControl.deltaT);
var _local3 = ((-Math.atan(xVel / yVel)) * 180) / Math.PI;
if (yVel <= 0) {
_local3 = _local3 + 180;
}
_rotation = _local3;
if (_rotation > 0) {
_xscale = -Math.abs(_xscale);
} else {
_xscale = Math.abs(_xscale);
}
}
function regenerate() {
return(undefined);
}
var mySpark = true;
var myColor = "white";
var myBoost = 1;
}
Symbol 193 MovieClip [__Packages.GameMaster] Frame 0
class GameMaster extends MovieClip
{
var _url, mymusic, _parent, mysound, myStageWidth, myStageHeight, _x, myObstacles, getURL;
function GameMaster () {
super();
var _local8 = _url.substr(0, _url.indexOf(":"));
if (_local8 == "file") {
fscommand ("fullscreen", "true");
} else {
var _local7 = new Array("ezone.com");
var _local6 = false;
var _local4 = 0;
while ((_local4 < _local7.length) && (!_local6)) {
var _local5 = _local7[_local4];
if (_url.toLowerCase().indexOf(_local5) != -1) {
_local6 = true;
}
_local4++;
}
if (!_local6) {
}
}
mymusic = new Sound(_parent.gameControl.music_mc);
mymusic.attachSound("music_snd");
mymusic.setVolume(musicVolume);
mymusic.start(0, 99);
mysound = new Sound(_parent.gameControl.effect_mc);
myStageWidth = Stage.width;
myStageHeight = Stage.height;
_parent.attachMovie("pauseScreen", "pauseScreen", 2000);
_parent.pauseScreen._visible = false;
_root.attachMovie("quitMatte", "quitMatte", 2001);
_root.kongregateServices.connect();
startDemo();
}
function explodeButton() {
}
function playSound(whichsound, whichVolume) {
if (!whichVolume) {
whichVolume = 1;
}
if (effectVolume == 0) {
return(undefined);
}
mysound.attachSound(whichsound);
mysound.setVolume(effectVolume * whichVolume);
mysound.start();
}
function updateScore(thisScore, noPower) {
if ((action != "playing") or demo) {
return(undefined);
}
_parent.gameScore = _parent.gameScore + thisScore;
if ((!noPower) && (thisScore == 100)) {
powerMult = powerMult + 1;
if (powerMult > 3) {
power = power + 50;
} else {
power = power + 25;
}
if (power >= 100) {
launchFirework("particle1", _parent.bonuswheel._x, _parent.bonuswheel._y - 30, 0.25, 0, "shoot");
_parent.bonuswheel.cheer();
_parent.gameScore = _parent.gameScore + 100;
}
} else {
powerMult = 0;
}
}
function pauseGame() {
if (action != "playing") {
return(undefined);
}
action = "paused";
_parent.pause.swapMovie;
mymusic.setVolume(0);
_parent.pauseScreen._visible = true;
}
function abortGame() {
startMusic();
_parent.pauseScreen._visible = false;
power = 0;
action = "gameover";
demo = true;
_parent.gotoAndPlay("gameover");
}
function unpauseGame() {
action = "playing";
mymusic.setVolume(musicVolume);
_parent.pauseScreen._visible = false;
}
function toggleMute() {
if (soundButton == "SOUND IS OFF") {
effectVolume = effectVolumePref;
musicVolume = musicVolumePref;
soundButton = "SOUND IS ON";
playSound("explode_snd");
mymusic.setVolume(musicVolume);
_parent.speakerOn._visible = true;
} else {
effectVolume = 0;
musicVolume = 0;
soundButton = "SOUND IS OFF";
_parent.speakerOn._visible = false;
_parent.bonuswheel.mysound.stop();
mysound.stop();
mymusic.setVolume(musicVolume);
}
}
function togglePause() {
if (action == "paused") {
unpauseGame();
} else if (action == "playing") {
pauseGame();
}
}
function changeColor(myItem) {
var _local3 = new Color("_parent.background1");
myItem = myItem % mySkyColors.length;
_local3.setRGB(mySkyColors[myItem]);
}
function getParticleDepth() {
particleDepth = particleDepth - 1;
if (particleDepth < 50) {
particleDepth = 299;
}
return(particleDepth);
}
function getRocketDepth() {
rocketDepth = rocketDepth - 1;
if (rocketDepth < 300) {
rocketDepth = 320;
}
return(rocketDepth);
}
function launchFirework(whichParticle, whichX, whichY, whichScale, whichScore, whichType) {
var _local13 = Math.ceil(_root.gameScore / 10000);
if (whichScore > 0) {
_parent.gameControl.updateScore(whichScore);
if (whichScore == 10) {
if (power > 75) {
power = power - 25;
}
} else if (whichScore == 25) {
if (power > 75) {
power = power - 25;
}
_parent.attachMovie("25pts", "points", _parent.gameControl.getParticleDepth(), {origx:whichX, origy:whichY, angle:180, speed:2, myScale:whichScale, dieCel:80});
} else {
_parent.attachMovie("100pts", "points", _parent.gameControl.getParticleDepth(), {origx:whichX, origy:whichY, angle:180, speed:2, myScale:whichScale, dieCel:80});
}
}
if (whichParticle != "white") {
var _local15 = Math.ceil(Math.random() * 4) + 10;
playSound(("firework" + _local15) + "_snd", whichScale);
} else {
_local13 = 1;
var _local15 = Math.ceil(Math.random() * 6);
playSound(("firework" + _local15) + "_snd", whichScale);
}
if (demo) {
_local13 = Math.ceil(Math.random() * 4);
}
if (_local13 > 4) {
_local13 = 4;
}
whichParticle = whichParticle + String(_local13);
if (whichType == "normal") {
var _local7 = 1;
while (_local7 <= 9) {
_parent.attachMovie(whichParticle, "particle", getParticleDepth(), {origx:whichX, origy:whichY, angle:(_local7 * 40) + (Math.random() * 5), speed:2 + Math.random(), myScale:whichScale});
_local7++;
}
_local7 = 1;
while (_local7 <= 12) {
_parent.attachMovie(whichParticle, "particle", getParticleDepth(), {origx:whichX, origy:whichY, angle:(_local7 * 30) + (Math.random() * 5), speed:4 + Math.random(), myScale:whichScale});
_local7++;
}
_local7 = 1;
while (_local7 <= 18) {
_parent.attachMovie(whichParticle, "particle", getParticleDepth(), {origx:whichX, origy:whichY, angle:(_local7 * 20) + (Math.random() * 5), speed:6 + Math.random(), myScale:whichScale});
_local7++;
}
} else if (whichType == "sparkle") {
whichScale = 1;
var _local7 = 1;
while (_local7 <= 30) {
_parent.attachMovie(whichParticle, "particle", getParticleDepth(), {origx:(whichX + 200) - (Math.random() * 400), origy:(whichY + 150) - (Math.random() * 300), angle:Math.random() * 360, speed:2 + (Math.random() * 2), myScale:whichScale});
_local7++;
}
} else if (whichType == "shoot") {
_parent.attachMovie("100pts", "points", _parent.gameControl.getParticleDepth(), {origx:whichX, origy:whichY + 30, angle:180, speed:2, myScale:0.75, dieCel:80});
var _local7 = 1;
while (_local7 <= 3) {
_parent.attachMovie(whichParticle, "particle", getParticleDepth(), {origx:whichX, origy:whichY, angle:Math.random() * 360, speed:5 + (Math.random() * 10), myScale:whichScale});
_local7++;
}
_local7 = 1;
while (_local7 <= 3) {
_parent.attachMovie(whichParticle, "particle", getParticleDepth(), {origx:whichX, origy:whichY, angle:Math.random() * 360, speed:2 + (Math.random() * 5), myScale:whichScale});
_local7++;
}
} else {
var _local7 = 4;
while (_local7 <= 20) {
_parent.attachMovie(whichParticle, "particle", getParticleDepth(), {origx:whichX, origy:whichY, angle:_local7 * 20, speed:5 + (Math.random() * 10), myScale:whichScale});
_local7++;
}
_local7 = 4;
while (_local7 <= 20) {
_parent.attachMovie(whichParticle, "particle", getParticleDepth(), {origx:whichX, origy:whichY, angle:_local7 * 20, speed:2 + (Math.random() * 5), myScale:whichScale});
_local7++;
}
}
}
function onMouseDown() {
if (demo) {
launchFirework("white", _parent._xmouse, _parent._ymouse, 0.3 + (Math.random() * 0.3), 0, firetype);
}
}
function startSparks(whichX, whichY) {
showSparks = true;
trace(whichX);
sparkX = whichX - 100;
sparkY = whichY;
}
function fireRocket(whichOne) {
rocketsMade = rocketsMade + 1;
var _local2 = (20 + (Math.random() * 5)) + level;
if (_local2 > 60) {
_local2 = 60;
}
var _local4 = 30 + (Math.random() * (20 + (_local2 / 2)));
var _local6 = _local2 * _parent.cosQuick(_local4);
var _local5 = ((((_local6 * _local6) / (((2 * myGravity) * 2) * deltaT)) * 0.5) + 50) + (Math.random() * 100);
if ((level > 1) and (Math.random() >= 0.5)) {
_parent.attachMovie("rocket_" + whichOne, "rocket_" + whichOne, getRocketDepth(), {myParticle:whichOne, origx:Stage.width, origy:_local5, angle:-_local4, speed:_local2});
} else {
_parent.attachMovie("rocket_" + whichOne, "rocket_" + whichOne, getRocketDepth(), {myParticle:whichOne, origx:0, origy:_local5, angle:_local4, speed:_local2});
}
}
function explodeRocket(whichOne) {
if (action == "paused") {
return(undefined);
}
_parent.Hint._visible = false;
if (whichOne == "red") {
if (_parent.rocket_red.action.indexOf("alive") != -1) {
_parent.rocket_red.explode();
}
} else if (whichOne == "blue") {
if (_parent.rocket_blue.action.indexOf("alive") != -1) {
_parent.rocket_blue.explode();
}
} else if (_parent.rocket_white.action.indexOf("alive") != -1) {
_parent.rocket_white.explode();
}
}
function onEnterFrame() {
while ((getTimer() - lastExitFrameMillis) < myTargetFPS) {
}
lastExitFrameMillis = getTimer();
if (Key.isDown(77)) {
if (Math.abs(lastPressCel - animCel) > 20) {
lastPressCel = animCel;
toggleMute();
}
}
_x = -10000;
if (showSparks) {
_parent.attachMovie("white1", "particle", getParticleDepth(), {origx:(_parent._xmouse + (Math.random() * 40)) - 20, origy:_parent._ymouse + 20, angle:Math.random() * 360, speed:Math.random(), myScale:0.5, dieCel:40});
}
if (Key.isDown(83)) {
firetype = "sparkle";
} else if (Key.isDown(82)) {
firetype = "random";
} else if (Key.isDown(78)) {
firetype = "normal";
}
if (action == "title") {
animCel = animCel + 1;
if ((animCel % 80) == 0) {
var _local7 = Math.ceil(Math.random() * 4);
launchFirework("white", (Stage.width * 0.1) + ((Math.random() * Stage.width) * 0.8), (Stage.height * 0.1) + ((Math.random() * Stage.height) * 0.5), 0.2 + (Math.random() * 0.3), 0, "random");
}
} else if (action == "playing") {
if ((Key.isDown(27) or Key.isDown(80)) and (!demo)) {
if (Math.abs(lastPressCel - animCel) > 20) {
lastPressCel = animCel;
togglePause();
}
}
if ((Key.isDown(87) and (!demo)) and cheatsOn) {
}
animCel = animCel + 1;
if (scrolling) {
scrollVel[0] = -_root.Hero.velX;
scrollVel[1] = _root.Hero.velY;
if (scrollVel[1] > 0) {
addScore(scrollVel[1]);
}
}
var _local3 = _root.Hero.speed / _root.Hero.maxSpeed;
mymusic.setVolume(musicVolume * _local3);
}
}
function addScore(howMuch) {
_root.gameScore = Math.ceil(_root.gameScore + howMuch);
}
function lose() {
if (action == "paused") {
unpauseGame();
}
demo = true;
action = "gameover";
launchFirework("red", _root.Hero._x, _root.Hero._y, 1, 0, "normal");
_root.Hero.remove();
playSound("crowd_snd");
bigFirework();
startMusic("music_snd", 99);
demo = true;
_parent.gotoAndPlay("gameover");
}
function startMusic(whichSound, whichLoop) {
if (whichSound == undefined) {
whichSound = "music_snd";
}
if (whichLoop == undefined) {
whichLoop = 99;
}
mymusic.stop();
mymusic.attachSound(whichSound);
mymusic.setVolume(musicVolume);
mymusic.start(0, whichLoop);
}
function nextlevel() {
level = level + 1;
levelmsg = " ";
_parent.levelnum.text = "L" + String(level);
sparkCount = 0;
rocketsMade = 0;
rocketsDead = 0;
animCel = 1;
winFlag = false;
powerMult = 0;
scrolling = true;
action = "ready";
myObstacles = new Array();
rocketList = ["white", "blue", "red", "white", "blue", "red", "white", "red", "white", "blue", "white", "red", "blue", "white"];
if (Math.random() < 0.5) {
rocketList.unshift("blue");
} else {
rocketList.unshift("red");
}
if (level < 8) {
powerReduction = level / 10;
rocketInterval = 70 - (5 * level);
}
if (rocketInterval < 30) {
rocketInterval = 30;
}
if (powerReduction > 0.65) {
powerReduction = 0.65;
}
_parent.gotoAndPlay("game");
}
function initialize() {
_parent.gameScore = 0;
_parent.gameTime = 30;
_parent.gameLives = 2;
demo = false;
level = 0;
power = 50;
nextlevel();
}
function restart() {
unpauseGame();
myObstacles = new Array();
_root.gotoAndPlay("Restart");
initialize();
}
function startDemo() {
action = "title";
power = 50;
demo = true;
launchFirework("white", Stage.width / 2, Stage.height * 0.3, 2, 0, "sparkle");
playSound("crowd_snd");
startMusic();
_parent.gotoAndPlay("title");
}
function bigFirework() {
launchFirework("white", (Stage.width / 4) + ((Math.random() * Stage.width) / 2), (Stage.height / 4) + ((Math.random() * Stage.height) / 2), 2, 0, "sparkle");
launchFirework("red", (Stage.width / 4) + ((Math.random() * Stage.width) / 2), (Stage.height / 4) + ((Math.random() * Stage.height) / 2), 2, 0, "sparkle");
launchFirework("blue", (Stage.width / 4) + ((Math.random() * Stage.width) / 2), (Stage.height / 4) + ((Math.random() * Stage.height) / 2), 2, 0, "sparkle");
}
function showCredits() {
action = "title";
demo = true;
launchFirework("white", Stage.width / 2, Stage.height * 0.3, 2, 0, "sparkle");
_parent.gotoAndPlay("credits");
}
function showscores() {
getURL("http://www.ezone.com/login2/scores.php?game=" + gameName, "scoreboard");
}
function postscore() {
var _local6 = _parent.gameScore;
var _local4 = gameName + String(_local6);
var _local5 = "";
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4.charCodeAt(_local2) % _local6;
_local5 = _local5 + String(_local3);
trace((_local4.charAt(_local2) + ": ") + _local3);
_local2++;
}
trace(_local5);
var _local7 = (((((("http://www.ezone.com/login2/scores.php?action=submit&game=" + gameName) + "&score=") + _local6) + "&check=") + _local5) + "&") + String(Math.round(Math.random() * 10000));
getURL(_local7, "scoreboard");
startDemo();
}
var animCel = 1;
var action = "ready";
var level = 1;
var gems = 4;
var mylasttime = 1;
var levelscore = 200;
var levelmsg = "";
var fishMade = 0;
var fishTarget = 100;
var fishEaten = 0;
var powerupDepth = 20;
var baddieDepth = 500;
var bulletDepth = 50;
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 myTargetFPS = 30;
var myExtraLives = [10000, 30000, 50000, 75000, 100000];
var winFlag = false;
var demo = false;
var firsttime = true;
var effectVolume = 100;
var effectVolumePref = 100;
var musicVolume = 100;
var musicVolumePref = 100;
var lastPressCel = 0;
var screenTime = 0;
var cheatsOn = true;
var soundButton = "SOUND IS ON";
var scrollVel = [0, 0];
var scrolling = false;
var deltaT = 0.04;
var myScale = 1;
var myGravity = 2;
var particleDepth = 0;
var rocketDepth = 0;
var damping = 0.99;
var showSparks = false;
var sparkX = -100;
var sparkY = -100;
var rocketList = [1, 2, 3];
var mySkyColors = ["0x000000", "0x222222", "0x000022", "0x220000"];
var myColorCount = 0;
var rocketInterval = 50;
var rocketsMade = 0;
var rocketsDead = 0;
var power = 50;
var powerReduction = 0;
var firetype = "normal";
var gameName = "fireworks";
var powerMult = 0;
var lastExitFrameMillis = 0;
var sparkCount = 0;
}
Symbol 117 MovieClip [ezone_hs] Frame 1
function check_loader() {
total_bytes = _level0.EzoneHS.getBytesTotal();
loaded_bytes = _level0.EzoneHS.getBytesLoaded();
remaining_bytes = total_bytes - loaded_bytes;
percent_done = int((loaded_bytes / total_bytes) * 100);
_level0.hs_loaded = ("hs: " + percent_done) + "%";
if ((total_bytes > 0) && (remaining_bytes == 0)) {
clearInterval(_level0.check_load);
_level0.checkCount = 0;
_level0.EzoneHS._visible = false;
_root.debugtrace = _root.debugtrace + "\nExternal highscore loaded.";
} else {
trace("loading: " + percent_done);
}
}
this._visible = false;
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
_parent.hs_gameid = this.hs_gameid;
_parent.hs_score = this.hs_score;
_root.debugtrace = _root.debugtrace + ("\nhighscoreURL: " + _root.highscoreURL);
if (_root.highscoreURL == undefined) {
var protocol = _url.substr(0, _url.indexOf(":"));
if (System.capabilities.playerType == "External") {
_root.highscoreURL = "hs_ezone.swf";
} else {
_root.highscoreURL = "http://www.ezone.com/highscores/hs_ezone.swf";
}
_root.debugtrace = _root.debugtrace + ("\nSet highscoreURL to default: " + _root.highscoreURL);
}
_level0.createEmptyMovieClip("EzoneHS", 1000);
loadMovieNum (_root.highscoreURL, 0.EzoneHS);
_root.EzoneHS._x = 0;
_root.EzoneHS._y = 0;
_level0.check_load = setInterval(check_loader, 100);
stop();
Symbol 117 MovieClip [ezone_hs] Frame 2
stop();
Symbol 119 Button
on (release) {
getURL ("http://www.ezone.com/", "_blank");
}
Symbol 120 Button
on (release) {
getURL ("http://www.ezone.com/affiliates/", "_blank");
}
Symbol 127 MovieClip Frame 1
this._visible = false;
Symbol 130 MovieClip Frame 1
blackMatte._x = 0;
blackMatte._y = 0;
_root.stop();
Symbol 130 MovieClip Frame 2
_root.barWidth = bar._width;
Symbol 130 MovieClip Frame 3
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._width = (_root.barWidth * PercentLoaded) / 100;
} else {
_root.gotoAndPlay(4);
}
Symbol 130 MovieClip Frame 4
gotoAndPlay ("loadbar");
Symbol 155 MovieClip Frame 1
stop();
Symbol 161 Button
on (release) {
_root.EzoneHS.showScores();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 163 Button
on (release) {
_root.gameControl.initialize();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 164 Button
on (release) {
getURL ("http://www.ezone.com/", "_blank");
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 165 Button
on (release) {
getURL ("http://www.ezone.com/affiliates/", "_blank");
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 168 Button
on (release) {
_root.gameControl.toggleMute();
}
Symbol 172 Button
on (release) {
_root.gameControl.togglePause();
}
Symbol 181 Button
on (release) {
_root.gameControl.showCredits();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 183 Button
on (release) {
_root.gameControl.restart();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 185 Button
on (release) {
_root.gameControl.startDemo();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}