Frame 3
var inboxTagClientID = 52;
var inboxTagList = [];
inboxTagList.initLoad = 553;
_global.inboxTag = new classes.InboxTag(inboxTagClientID, inboxTagList, true);
_global.inboxTag.callTag({pg:"initLoad"});
playgame_but.onRelease = function () {
this._parent.gotoAndStop("game");
};
var overture = new Sound();
overture.loadSound("overture3.mp3", true);
if (_global.mySO.data.volumeLevel == 0) {
overture.setVolume(0);
} else {
overture.setVolume(40);
}
overture.stop();
overture.onSoundComplete = function () {
this.start();
};
stop();
Frame 4
playgame_but.onRelease = function () {
this._parent.gotoAndStop("game");
};
gameover_mc.removeMovieClip();
stop();
Frame 5
function globalRankLoaded() {
updateUI();
}
function newRocket() {
rocketDepth++;
var _local5 = 6 + ((rocketDepth - 10) / 3);
var _local9 = 1;
var _local4 = Math.floor(Math.random() * 10);
var _local3 = Math.floor(Math.random() * 250) + 250;
if (_local4 == 0) {
var _local8 = Math.floor(Math.random() * 340) + 125;
_local9 = (Math.PI/2);
_local5 = _local5 * 0.7;
_local3 = 10000;
var _local6 = true;
var _local10 = _global.soundController.playSound("Left", "whistle", 40, 0, 0, true);
} else if ((_local4 % 2) == 0) {
var _local8 = Math.floor(Math.random() * 250) - 100;
_local9 = 1;
var _local6 = true;
var _local10 = _global.soundController.playSound("Left", "whistle", 40, 0, 0, true);
} else {
var _local8 = 700 - Math.floor(Math.random() * 250);
_local9 = 2.3;
var _local6 = false;
var _local10 = _global.soundController.playSound("Right", "whistle", 40, 0, 0, true);
}
var _local7 = floorY + (Math.floor(Math.random() * 20) - 40);
var _local11 = _root.attachClassMovie("Rocket", game.Rocket, ("rocket" + rocketDepth) + "_mc", rocketDepth, [_local8, _local7, _local5, _local9, _local3, _local6, false, fireworks_off_bmp, _local10]);
_root.rocketList.push(_local11);
}
function endGame() {
for (var _local2 in rocketList) {
rocketList[_local2].removeMovieClip();
}
clearInterval(rocketInt);
_global.score.updateScore(score);
updateUI();
startEyeRocket();
_global.soundController.playSound("Explode", "exploderocket", 100, 0, 0, true);
}
function updateUI() {
bestscore_box.text = _global.score.bestScore;
globalrank_box.text = _global.globalRanking.myRanking;
}
function removeFirework(ref) {
for (var _local1 in fireworkList) {
if (fireworkList[_local1] == ref) {
fireworkList.splice(_local1, 1);
}
}
}
function startGame() {
var _local5 = particleglowList[Math.floor(Math.random() * particleglowList.length)];
var _local6 = new flash.filters.GlowFilter(_local5, 1, 8, 8, 4);
fireworks_mc.filters = [_local6];
rocketDepth = 10;
rocketList = [];
fireworkList = [];
newRocket();
score = 0;
clearInterval(rocketInt);
rocketInt = setInterval(newRocket, 3200);
howtoplay_mc.removeMovieClip();
gameover_mc.removeMovieClip();
_global.inboxTag.callTag({pg:"playGame"});
overture.start();
if (_global.mySO.data.volumeLevel != 0) {
overture.setVolume(30);
}
delete this.onEnterFrame;
this.onEnterFrame = function () {
fireworks_off_bmp.colorTransform(fireworks_off_bmp.rectangle, fade);
var _local5 = _root.rocketList;
for (var _local2 in rocketList) {
rocketList[_local2].move();
}
var _local4 = _root.fireworkList;
for (var _local2 in fireworkList) {
fireworkList[_local2].move();
}
fireworks_bmp.copyPixels(fireworks_off_bmp, fireworks_off_bmp.rectangle, p);
var _local3 = getTimer();
frC++;
if ((_local3 - fSI) > 1000) {
fSI = getTimer();
cFR = frC;
frC = 0;
if (cFR < 20) {
cFR = 20;
}
}
};
}
function startRec(x, y) {
recInd = 0;
clearInterval(recInt);
var _local1 = Math.floor(Math.random() * 500) + 500;
recInt = setInterval(newRecRocket, _local1, x, y);
}
function newRecRocket(x, y) {
_root.recInd++;
if (_root.recInd > 4) {
clearInterval(_root.recInt);
} else {
_global.soundController.playSound("Explode", "explode", 100, 0, 0, true);
_root.fireworkList.push(new game.fireworks.Explode(_root, _root.fireworks_off_bmp, x, y, 3));
}
}
function startEyeRocket() {
eyeInd = 0;
var _local1 = Math.floor(Math.random() * 10);
if (_local1 == 7) {
eyeRndCol = true;
} else {
eyeRndCol = false;
}
clearInterval(eyeInt);
eyeInt = setInterval(newEyeRocket, 150, x, y);
}
function newEyeRocket() {
_root.eyeInd++;
_global.soundController.playSound("Explode", "explode", 30, 0, 0, true);
_root.fireworkList.push(new game.fireworks.EyeSequence(_root, _root.fireworks_off_bmp, x, y, eyeRndCol, eyeInd));
}
function endEyeRocket() {
clearInterval(eyeInt);
var _local2 = this.attachMovie("GameOver", "gameover_mc", 6000);
_local2._x = 90;
_local2._y = 110;
}
MovieClip.prototype.attachClassMovie = function (linkageID, className, instanceName, depth, argv) {
var _local2 = this.attachMovie(linkageID, instanceName, depth);
_local2.__proto__ = className.prototype;
className.apply(_local2, argv);
if (_local2.init) {
_local2.init();
}
return(_local2);
};
MovieClip.prototype.createEmptyClassMovieClip = function (className, instanceName, depth, argv) {
var _local2 = this.createEmptyMovieClip(instanceName, depth);
_local2.__proto__ = className.prototype;
className.apply(_local2, argv);
if (_local2.init) {
_local2.init();
}
return(_local2);
};
MovieClip.prototype.realign = function (pointX, refAlign) {
if (refAlign == "center") {
this._x = pointX - (this._width / 2);
} else if (refAlign == "right") {
this._x = pointX - this._width;
}
};
MovieClip.prototype.destroyMe = function () {
this.swapDepths(1);
this.removeMovieClip();
};
TextField.prototype.resizeTextField = function (fieldWidth, startFontSize, refAlign, yInc) {
if (yInc == undefined) {
yInc = 0.6;
}
var _local2 = new TextFormat();
_local2.size = startFontSize;
this.autoSize = refAlign;
this.setNewTextFormat(_local2);
if (this.textWidth > fieldWidth) {
this._y = this._y + yInc;
this.resizeTextField(fieldWidth, startFontSize - 1, refAlign, yInc);
} else {
this._y = Math.round(this._y);
}
};
TextField.prototype.realignTextField = function (targetX, textContent, refAlign) {
this.autoSize = "left";
this.text = textContent;
if (refAlign == "right") {
this._x = Math.round(targetX - this._width);
} else if (refAlign == "center") {
this._x = Math.round(targetX - (this._width / 2));
}
};
_global.onRollOver = function () {
this.gotoAndStop(2);
};
_global.onRollOut = function () {
this.gotoAndStop(1);
};
_global.onRollOver2 = function () {
this.left_mc.gotoAndStop(2);
this.mid_mc.gotoAndStop(2);
this.right_mc.gotoAndStop(2);
};
_global.onRollOut2 = function () {
this.left_mc.gotoAndStop(1);
this.mid_mc.gotoAndStop(1);
this.right_mc.gotoAndStop(1);
};
_global.thegame = this;
_global.projectName = "fireworksfrenzy";
_global.isPositive = true;
_global.defaultScore = 0;
_global.defaultVolumeLevel = 100;
_global.mySO = new classes.CustomSharedObject("Fireworks");
_global.score = new classes.Score(_global.mySO.checkData("bestScore", true, _global.defaultScore), _global.isPositive);
_global.soundController = new classes.SoundControl(_global.mySO.checkData("volumeLevel", true, _global.defaultVolumeLevel), 300000);
var floorY = 390;
var fireworksCount = 1000;
var rocketDepth = 10;
var rocketList = [];
var fireworkList = [];
var particleglowList = [16777215, 16737792, 39372, 16776960];
fireworksCount = 2;
var ref = this.createEmptyMovieClip("fireworks_mc", fireworksCount);
this.attachMovie("Score", "score_mc", 4);
var fireworks_bmp = (new flash.display.BitmapData(590, 500, true, 0));
var fireworks_off_bmp = (new flash.display.BitmapData(590, 500, true, 0));
ref.attachBitmap(fireworks_bmp, 1);
var glow = (new flash.filters.GlowFilter(particleglowcolor, 1, 8, 8, 4));
ref.filters = [glow];
ref.blendMode = "add";
fade = new flash.geom.ColorTransform();
fade.alphaMultiplier = 0.94;
var fSI = getTimer();
var cFR = 0;
var score = 0;
var ref = this.attachMovie("HowToPlay", "howtoplay_mc", 6002);
ref._x = 90;
ref._y = 110;
updateUI();
var p = new Point(0, 0);
var eMouse = new Object();
eMouse.ref = this;
eMouse.onMouseDown = function () {
for (var _local6 in rocketList) {
if (rocketList[_local6].hitTest(_root._xmouse, _root._ymouse)) {
score_mc._x = Math.round(rocketList[_local6]._x);
score_mc._y = Math.round(rocketList[_local6]._y);
score_mc.gotoAndPlay("start");
score = score + rocketList[_local6].score;
score_mc.score_box.text = rocketList[_local6].score;
var _local5 = 100;
var _local4 = Math.floor(Math.random() * _local5);
if (_local4 < 50) {
fireworkList.push(new game.fireworks.Explode(this.ref, fireworks_off_bmp, rocketList[_local6]._x, rocketList[_local6]._y));
} else if (_local4 < 80) {
fireworkList.push(new game.fireworks.ExplodeBall(this.ref, fireworks_off_bmp, rocketList[_local6]._x, rocketList[_local6]._y));
} else if (_local4 < 99) {
fireworkList.push(new game.fireworks.Sequence(this.ref, fireworks_off_bmp, rocketList[_local6]._x, rocketList[_local6]._y));
} else if (_local4 < 100) {
fireworkList.push(new game.fireworks.Custom(this.ref, fireworks_off_bmp, rocketList[_local6]._x, rocketList[_local6]._y));
} else if (_local4 == 101) {
fireworkList.push(new game.fireworks.Inbox(this.ref, fireworks_off_bmp, rocketList[_local6]._x, rocketList[_local6]._y));
}
_global.soundController.playSound("Explode", "explode", 80, 0, 0, true, true);
rocketList[_local6].explode();
}
}
};
Mouse.addListener(eMouse);
inbox_but.onRelease = function () {
_global.inboxTag.callTag({pg:"clickInbox"});
getURL ("http://www.inboxgames.co.uk/", "_blank");
};
playmore_but.onRelease = function () {
_global.inboxTag.callTag({pg:"clickGamenet", p1:"game"});
getURL ("http://www.gamenet.com/laserjumper/", "_blank");
};
stop();
Symbol 11 MovieClip [Score] Frame 1
stop();
Symbol 17 MovieClip Frame 1
this._visible = false;
Symbol 27 Button
on (release) {
gameURL = ("http://www.miniclip.com/games/" + gamename) + "/en/";
getURL (gameURL, "_blank");
}
Symbol 29 MovieClip Frame 1
System.security.allowDomain("www.miniclip.com");
Instance of Symbol 17 MovieClip "mcHighscores" in Symbol 29 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 29 MovieClip Frame 2
if ((((_url.indexOf("miniclip.com") == -1) && (_url.indexOf("miniclip.net") == -1)) && (_url.indexOf("miniclip.co.uk") == -1)) && (_url.indexOf("miniclips.com"))) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 29 MovieClip Frame 3
stop();
Symbol 35 MovieClip [GameOver] Frame 187
if (_global.mySO.data.volumeLevel != 0) {
var sVol = _global.thegame.overture.getVolume();
delete this.onEnterFrame;
this.onEnterFrame = function () {
sVol = sVol - 1;
_global.thegame.overture.setVolume(sVol);
if (sVol < 0) {
delete this.onEnterFrame;
}
};
}
score_box.text = _global.thegame.score;
bestscore_box.text = _global.score.bestScore;
ranking_box.text = _global.globalRanking.myRanking;
playagain_but.onRelease = function () {
_global.thegame.gotoAndStop(4);
};
playmore_but.onRelease = function () {
_global.inboxTag.callTag({pg:"clickGamenet", p1:"gameOver"});
getURL ("http://www.gamenet.com/laserjumper/", "_blank");
};
tellfriend_but.onRelease = function () {
_global.inboxTag.callTag({pg:"clickTellFriend"});
var _local3 = "Cool fireworks game";
var _local2 = "Want to have a blast? Then play Fireworks Frenzy, click on the rockets before they hit the ground and see how long you can last.";
_local2 = _local2 + "%0D %0A";
_local2 = _local2 + "Go to http://www.gamenet.com/fireworks to play";
getURL ((("mailto:?subject=" + _local3) + "&body=") + _local2);
};
stop();
Instance of Symbol 29 MovieClip "comHighscores" in Symbol 35 MovieClip [GameOver] Frame 187
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.score";
gamename = "fireworks";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 45 MovieClip [HowToPlay] Frame 1
startgame_but.onRelease = function () {
_global.thegame.startGame();
};
Symbol 49 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 50 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 50 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 60
Symbol 64 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 69 MovieClip Frame 1
this._visible = false;
Symbol 75 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 80 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 80 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 80 MovieClip Frame 12
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 100
stop();
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 93 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 69 MovieClip "mcIntro" in Symbol 93 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 93 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 92 MovieClip "mcLoadingAnimated" in Symbol 93 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 93 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 93 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 113 MovieClip [__Packages.classes.InboxTag] Frame 0
class classes.InboxTag
{
var tagList, tagMC;
function InboxTag (clientIDP, tagListP, isDebugP) {
clientID = clientIDP;
tagList = tagListP;
isDebug = isDebugP;
_global.tagPath = "http://www.inboxtag.com";
System.security.allowDomain(_global.tagPath);
tagMC = _root.createEmptyMovieClip("inboxtag_mc", tagDepth);
}
function callTag(obj) {
if (isNaN(obj.pg)) {
var _local5 = obj.pg;
obj.pg = tagList[obj.pg];
}
if (obj.pg != undefined) {
if (isDebug) {
if (_local5 != undefined) {
}
for (var _local4 in obj) {
}
}
curTagDepth++;
if (curTagDepth > maxTagDepth) {
curTagDepth = initTagDepth;
}
var _local3 = tagMC.createEmptyMovieClip("inboxtag_mc" + curTagDepth, curTagDepth);
_local3.cl = clientID;
_local3.js = "yes";
_local3.isFlashCall = true;
_local3.ti = 600;
var _local4 = 1;
while (_local4 <= 5) {
_local3["p" + _local4] == undefined;
_local4++;
}
_local4 = 1;
while (_local4 <= 3) {
_local3["i" + _local4] == undefined;
_local4++;
}
for (_local4 in obj) {
_local3[_local4] = obj[_local4];
}
_local3.rnd = random(999999);
_local3.loadMovie("http://www.inboxtag.com/tag.swf", "GET");
}
}
var clientID = 0;
var isDebug = false;
var tagDepth = 789;
var initTagDepth = 1;
var curTagDepth = classes.InboxTag.prototype.initTagDepth;
var maxTagDepth = 10;
var timeOut = 600;
}
Symbol 114 MovieClip [__Packages.classes.CustomSharedObject] Frame 0
class classes.CustomSharedObject extends SharedObject
{
var ID, so, data;
function CustomSharedObject (nameP) {
super();
ID = nameP;
so = SharedObject.getLocal(ID);
data = so.data;
}
function checkData(propertyName, isSetting, defaultValue) {
if (so.data[propertyName] != undefined) {
return(so.data[propertyName]);
}
if (isSetting) {
so.data[propertyName] = defaultValue;
}
return(defaultValue);
}
function updateData(obj) {
for (var _local3 in obj) {
so.data[_local3] = obj[_local3];
}
so.flush();
data = so.data;
}
function deleteData(obj) {
for (var _local3 in obj) {
delete so.data[_local3];
}
so.flush();
data = so.data;
}
function clear() {
so.clear();
so.flush();
data = so.data;
}
}
Symbol 115 MovieClip [__Packages.game.fireworks.Firework] Frame 0
class game.fireworks.Firework
{
var bmp, base;
function Firework () {
}
function move() {
for (var _local8 in particles) {
var _local3 = particles[_local8];
if (_local3.imp > _local3.impl) {
var _local4 = Math.cos(_local3.a) * _local3.p;
} else {
var _local4 = _local3.ovx;
}
var _local6 = (-Math.sin(_local3.a)) * _local3.p;
_local3.a = _local3.a + _local3.ai;
_local3.imp = _local3.imp - _local3.impd;
_local3.vy = _local3.vy - (gravK * _local3.imp);
_local3.vy = _local3.vy + gravK;
_local3.p = _local3.p + _local3.pi;
bmp.setPixel32(_local3.x, _local3.y, _local3.col);
if (_local3.b) {
bmp.setPixel32(_local3.x, _local3.y + 1, _local3.col);
bmp.setPixel32(_local3.x + 1, _local3.y + 1, _local3.col);
bmp.setPixel32(_local3.x + 1, _local3.y, _local3.col);
}
_local3.x = _local3.x + _local4;
_local3.ovx = _local4;
_local3.y = _local3.y + _local6;
_local3.y = _local3.y + _local3.vy;
if (_local3.par) {
if ((_local3.imp < _local3.parl) && (_local3.ci < 2)) {
particles.splice(_local8, 1);
_local3.par = false;
var _local7 = Math.floor(Math.random() * 7);
if (_local3.ci == 1) {
if (_local3.isball) {
var _local5 = 20;
} else {
var _local5 = 5;
}
} else {
var _local5 = 30;
}
_global.soundController.playSound("Explode", "explode", _local5, 0, 0, true);
createNew(_local3);
}
}
}
if (_local3.y > 500) {
base.removeFirework(this);
}
}
function createNew() {
}
var gravK = 0.03;
var particles = [];
var col = 4294901760;
}
Symbol 116 MovieClip [__Packages.game.Rocket] Frame 0
class game.Rocket extends MovieClip
{
var col, bmp, mysound, _x, _y, power, angle, aI, score, ox, oy, _rotation, _parent, removeMovieClip;
function Rocket (sX, sY, sPower, sAngle, traj, isRight, isMortar, bmpP, mysoundP) {
super();
col = 4294953984;
bmp = bmpP;
mysound = mysoundP;
_x = sX;
_y = sY;
power = sPower;
angle = sAngle;
aF = traj;
if (isRight) {
aI = power / aF;
} else {
aI = (-power) / aF;
}
score = maxScore;
}
function move() {
score--;
var _local3 = Math.cos(angle) * power;
var _local2 = (-Math.sin(angle)) * power;
_x = _x + _local3;
_y = _y + _local2;
ox = _x;
oy = _y;
angle = angle - aI;
_rotation = 90 - (angle / (Math.PI/180));
if (_y > 460) {
destroy(true);
} else if (_y < 0) {
destroy(true);
}
bmp.setPixel32(_x, _y, col);
}
function explode() {
destroy();
}
function destroy(isCrash) {
mysound.stop();
if (isCrash) {
_parent.fireworkList.push(new game.fireworks.RocketCrash(_parent, _parent.fireworks_bmp, _x, _y));
_parent.endGame();
}
for (var _local2 in _parent.rocketList) {
if (_parent.rocketList[_local2] == this) {
_parent.rocketList.splice(_local2, 1);
}
}
removeMovieClip();
}
var gravK = 0.2;
var aF = 400;
var maxScore = 100;
}
Symbol 117 MovieClip [__Packages.game.fireworks.RocketCrash] Frame 0
class game.fireworks.RocketCrash extends game.fireworks.Firework
{
var base, bmp, particles, col;
function RocketCrash (baseP, bmpP, x, y) {
super();
base = baseP;
bmp = bmpP;
particles = [];
col = 4294953984;
var _local7 = 3.54159265358979;
var _local8 = (_local7 - 0.4) / num;
var _local6 = 0;
while (_local6 < num) {
var _local3 = new Object();
_local3.x = x;
_local3.y = y;
_local3.col = col;
_local3.b = true;
_local7 = _local7 - _local8;
var _local5 = _local7;
var _local4 = 1;
_local3.ai = 0;
_local3.pi = 0;
_local3.p = _local4;
_local3.a = _local5;
_local3.imp = 1.2;
_local3.impd = _local3.imp / 50;
_local3.impl = _local3.imp / 20;
_local3.vx = Math.cos(_local5) * _local4;
_local3.vy = -1;
particles.push(_local3);
_local6++;
}
}
var num = 20;
}
Symbol 118 MovieClip [__Packages.classes.SoundControl] Frame 0
class classes.SoundControl
{
function SoundControl (initialVolume, clipDepth) {
soundEffectsVolumeLevel = initialVolume;
_global.sounds = new Object();
}
function playSound(soundLinkage, soundInstance, soundVolume, offSet, loops, allowMultiple, isOverRide) {
if (soundVolume == undefined) {
soundVolume = 100;
}
var _local4 = false;
if (_global.sounds[soundInstance] != undefined) {
if (_global.sounds[soundInstance].position < _global.sounds[soundInstance].duration) {
_local4 = true;
}
}
if (isOverRide) {
_global.sounds[soundInstance].removeMovieClip();
delete _global.sounds[soundInstance];
_local4 = false;
}
if (allowMultiple || ((!allowMultiple) && (!_local4))) {
soundIndex++;
_global.thegame.createEmptyMovieClip(soundInstance, 300000 + soundIndex);
_global.sounds[soundInstance] = new Sound(_global.thegame[soundInstance]);
_global.sounds[soundInstance].setVolume((soundVolume / 100) * soundEffectsVolumeLevel);
_global.sounds[soundInstance].vol = soundVolume;
_global.sounds[soundInstance].soundName = soundLinkage;
_global.sounds[soundInstance].attachSound(soundLinkage);
_global.sounds[soundInstance].start(offSet, loops);
_global.sounds[soundInstance].onSoundComplete = function () {
this.removeMovieClip();
};
}
return(_global.sounds[soundInstance]);
}
function setVolumeLevel(soundInstance, soundVolume) {
_global.sounds[soundInstance].setVolume((soundVolume / 100) * soundEffectsVolumeLevel);
_global.sounds[soundInstance].vol = soundVolume;
}
function setOverallVolumeLevel(soundVolume) {
soundEffectsVolumeLevel = soundVolume;
for (var _local3 in _global.sounds) {
_global.sounds[_local3].setVolume((_global.sounds[_local3].vol / 100) * soundEffectsVolumeLevel);
}
}
var soundIndex = 0;
var soundEffectsVolumeLevel = 0;
}
Symbol 119 MovieClip [__Packages.classes.Score] Frame 0
class classes.Score
{
function Score (bestScoreP, isPositiveP) {
bestScore = bestScoreP;
isPositive = isPositiveP;
}
function updateScore(newScore) {
var _local3 = false;
if (isPositive) {
if (newScore > bestScore) {
bestScore = newScore;
_local3 = true;
}
} else if (newScore < bestScore) {
bestScore = newScore;
_local3 = true;
}
if (_local3) {
_global.globalRanking.calculateRanking(bestScore);
_global.inboxTag.callTag({pg:"submitScore", i1:bestScore});
if (_global.myLeague.currentStatus != "league") {
_global.mySO.updateData({bestScore:bestScore});
}
}
if (_global.myLeague.currentStatus == "league") {
_global.myLeague.sendScore(bestScore, _local3);
}
return(_local3);
}
function setScore(newScore) {
bestScore = newScore;
}
var isPositive = true;
var bestScore = 0;
var currentAttempts = 0;
}
Symbol 120 MovieClip [__Packages.game.fireworks.Inbox] Frame 0
class game.fireworks.Inbox extends game.fireworks.Firework
{
var base, bmp, particles, col;
function Inbox (baseP, bmpP, x, y) {
super();
base = baseP;
bmp = bmpP;
particles = [];
col = 4294967295;
var _local7 = dataList.length;
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = new Object();
_local3.x = x;
_local3.y = y;
_local3.b = true;
_local3.col = col;
var _local6 = dataList[_local4][0];
var _local5 = dataList[_local4][1];
_local3.ai = 0;
_local3.pi = 0;
_local3.p = _local5;
_local3.a = _local6;
_local3.imp = 1.2;
_local3.impd = _local3.imp / 50;
_local3.impl = _local3.imp / 20;
_local3.vx = Math.cos(_local6) * _local5;
_local3.vy = -1;
particles.push(_local3);
_local4++;
}
}
var dataList = [[1.5, 2.5], [1.6, 2.6], [1.7, 2.7], [1.8, 2.8], [1.9, 2.9], [2, 3]];
}
Symbol 121 MovieClip [__Packages.game.fireworks.ExplodeBall] Frame 0
class game.fireworks.ExplodeBall extends game.fireworks.Firework
{
var base, bmp, particles, col;
function ExplodeBall (baseP, bmpP, x, y) {
super();
base = baseP;
bmp = bmpP;
particles = [];
col = 4278190080 + (Math.random() * 16777215);
var _local5 = Math.floor(Math.random() * 4);
var _local8 = Math.floor(Math.random() * 2);
var _local9 = Math.floor(Math.random() * 40);
var _local4 = 0;
while (_local4 < num) {
var _local3 = new Object();
_local3.x = x;
_local3.y = y;
if (_local9 == 27) {
_local3.col = 4278190080 + (Math.random() * 16777215);
} else {
_local3.col = col;
}
_local3.b = true;
var _local7 = 1.0471975511966 * (_local4 % 6);
var _local6 = 4 - (Math.floor(_local4 / 6) / 1.5);
if (_local5 == 0) {
_local3.ai = 0.05;
} else if (_local5 == 1) {
_local3.ai = 0.1 - (0.02 * Math.floor(_local4 / 6));
} else if (_local5 == 2) {
_local3.ai = (Math.random() * 0.07) - 0.14;
} else if (_local5 == 3) {
_local3.ai = 0;
}
if (_local8 == 0) {
_local3.pi = -0.02;
} else if (_local8 == 1) {
_local3.pi = 0;
}
_local3.p = _local6;
_local3.a = _local7;
_local3.imp = 1.2;
_local3.impd = _local3.imp / 50;
_local3.impl = _local3.imp / 20;
_local3.vx = Math.cos(_local7) * _local6;
_local3.vy = -1;
particles.push(_local3);
_local4++;
}
}
var num = 30;
}
Symbol 122 MovieClip [__Packages.game.fireworks.EyeSequence] Frame 0
class game.fireworks.EyeSequence extends game.fireworks.Firework
{
var base, bmp, particles, col;
function EyeSequence (baseP, bmpP, x, y, isRndCol, eInd) {
super();
if (eInd > posList.length) {
_root.endEyeRocket();
}
base = baseP;
bmp = bmpP;
particles = [];
col = 4294967295;
var _local5 = 3.5707963267949;
var _local14 = -0.429203673205103;
var _local15 = (_local5 - _local14) / posList.length;
_local5 = _local5 - (_local15 * eInd);
var _local11 = _local5;
var _local16 = _local5 + 0.3;
var _local13 = _local5 - 0.3;
var _local10 = (_local16 - _local13) / num;
_local5 = _local13;
var _local8 = 0;
while (_local8 < num) {
var _local4 = new Object();
_local4.x = posList[eInd][0];
_local4.y = posList[eInd][1];
if (isRndCol) {
_local4.col = 4278190080 + (Math.random() * 16777215);
} else {
_local4.col = col;
}
_local4.b = true;
_local5 = _local5 + _local10;
var _local7 = _local5;
var _local6 = 1 + (2 - (Math.abs(_local5 - _local11) * 2));
_local4.ai = 0;
_local4.pi = 0;
_local4.p = _local6;
_local4.a = _local7;
_local4.imp = 1.2;
_local4.impd = _local4.imp / 50;
_local4.impl = _local4.imp / 20;
_local4.vx = Math.cos(_local7) * _local6;
_local4.vy = -1;
particles.push(_local4);
_local8++;
}
}
var num = 7;
var posList = [[257, 375], [261, 367], [267, 358], [275, 351], [283, 344], [292, 341], [302, 339], [312, 339], [322, 341], [331, 344], [339, 350], [347, 357], [352, 365], [358, 375]];
}
Symbol 123 MovieClip [__Packages.game.fireworks.Explode] Frame 0
class game.fireworks.Explode extends game.fireworks.Firework
{
var base, bmp, particles, col;
function Explode (baseP, bmpP, x, y, tIndP) {
super();
base = baseP;
bmp = bmpP;
particles = [];
col = 4278190080 + (Math.random() * 16777215);
if (tIndP == undefined) {
if (_global.thegame.rocketDepth > 25) {
var _local15 = Math.floor(Math.random() * typeList.length);
} else {
var _local15 = Math.floor(Math.random() * (typeList.length - 1));
}
} else {
var _local15 = tIndP;
}
var _local8 = typeList[_local15];
var _local16 = Math.floor(Math.random() * numArray[_local15].length);
var _local7 = numArray[_local15][_local16];
var _local12 = Math.floor(Math.random() * 40);
if (tIndP != undefined) {
var _local11 = true;
} else {
var _local11 = false;
}
var _local6 = 0;
while (_local6 < _local7) {
var _local5 = new Object();
_local5.x = x;
_local5.y = y;
if (_local12 == 27) {
_local5.col = 4278190080 + (Math.random() * 16777215);
} else {
_local5.col = col;
}
_local5.b = true;
if (_local8 == "flail") {
var _local10 = ((Math.PI*2) / _local7) * _local6;
var _local9 = (_local6 % 5) / 3;
_local5.ai = -0.04;
} else if (_local8 == "ball") {
if (_local7 == 30) {
var _local10 = ((Math.PI*2) / _local7) * _local6;
var _local9 = 2 + (_local6 % 2);
if ((_local6 % 2) == 0) {
_local5.b = false;
_local5.ai = 0;
} else {
_local5.ai = 0;
}
} else if (_local7 == 45) {
var _local10 = ((Math.PI*2) / (_local7 / 1.5)) * _local6;
var _local9 = 2 + (_local6 % 3);
if ((_local6 % 3) == 0) {
_local5.b = false;
_local5.ai = 0.04;
} else {
_local5.ai = 0.04;
}
} else if (_local7 == 60) {
var _local10 = ((Math.PI*2) / (_local7 / 2)) * _local6;
var _local9 = 1 + ((_local6 % 4) / 2);
if ((_local6 % 2) == 0) {
_local5.ai = 0.04;
} else {
_local5.ai = -0.04;
}
}
} else if (_local8 == "circle") {
var _local10 = ((Math.PI*2) / _local7) * _local6;
var _local9 = 2;
_local5.ai = 0;
} else if (_local8 == "circleref") {
var _local10 = ((Math.PI*2) / _local7) * _local6;
var _local9 = 2;
_local5.ai = 0;
if (!_local11) {
var _local11 = true;
_root.startRec(_local5.x, _local5.y);
}
}
_local5.pi = 0;
_local5.p = _local9;
_local5.a = _local10;
_local5.imp = 1.2;
_local5.impd = _local5.imp / 50;
_local5.impl = _local5.imp / 20;
_local5.vx = Math.cos(_local10) * _local9;
_local5.vy = -1;
particles.push(_local5);
_local6++;
}
}
var numArray = [[30], [30, 45, 60], [30], [20]];
var typeList = ["flail", "ball", "circle", "circleref"];
}
Symbol 124 MovieClip [__Packages.game.fireworks.Custom] Frame 0
class game.fireworks.Custom extends game.fireworks.Firework
{
var base, bmp, particles, col;
function Custom (baseP, bmpP, x, y) {
super();
base = baseP;
bmp = bmpP;
particles = [];
col = 4294967295;
col = 4278190080 + (Math.random() * 16777215);
var _local11 = 20;
var _local7 = -2.74159265358979;
var _local12 = (_local7 + 0.4) / 20;
var _local8 = Math.floor(Math.random() * 100);
var _local4 = 0;
while (_local4 < _local11) {
var _local3 = new Object();
_local3.x = x;
_local3.y = y;
if (_local8 == 56) {
_local3.col = 4278190080 + (Math.random() * 16777215);
} else {
_local3.col = col;
}
_local3.b = true;
_local7 = _local7 - _local12;
var _local6 = _local7;
var _local5 = 1;
_local3.ai = 0;
_local3.pi = 0;
_local3.p = _local5;
_local3.a = _local6;
_local3.imp = 1.2;
_local3.impd = _local3.imp / 50;
_local3.impl = _local3.imp / 20;
_local3.vx = Math.cos(_local6) * _local5;
_local3.vy = -1;
_local3.cn = 0;
particles.push(_local3);
_local4++;
}
_local11 = dataList.length;
_local4 = 0;
while (_local4 < _local11) {
var _local3 = new Object();
_local3.x = x;
_local3.y = y;
if (_local8 == 56) {
_local3.col = 4278190080 + (Math.random() * 16777215);
} else {
_local3.col = col;
}
_local3.b = true;
var _local6 = dataList[_local4][0];
var _local5 = dataList[_local4][1];
_local3.ai = 0;
_local3.pi = 0;
_local3.p = _local5;
_local3.a = _local6;
_local3.imp = 1.2;
_local3.impd = _local3.imp / 50;
_local3.impl = _local3.imp / 20;
_local3.vx = Math.cos(_local6) * _local5;
_local3.vy = -1;
particles.push(_local3);
_local4++;
}
}
var dataList = [[0.670796326794897, 0.5], [2.4707963267949, 0.5]];
}
Symbol 125 MovieClip [__Packages.game.fireworks.Sequence] Frame 0
class game.fireworks.Sequence extends game.fireworks.Firework
{
var base, bmp, particles, col;
function Sequence (baseP, bmpP, x, y) {
super();
base = baseP;
bmp = bmpP;
particles = [];
col = 4278190080 + (Math.random() * 16777215);
var _local11 = Math.floor(Math.random() * typeList.length);
var _local9 = typeList[_local11];
var _local17 = Math.floor(Math.random() * numArray[_local11].length);
if (_local9 == "balls") {
var _local5 = Math.floor(Math.random() * numArray[_local11][0]) + 4;
} else {
var _local5 = numArray[_local11][_local17];
}
var _local10 = Math.floor(Math.random() * 4) + 3;
var _local13 = Math.floor(Math.random() * 2);
var _local6 = Math.floor(Math.random() * 4);
var _local12 = Math.floor(Math.random() * numArray[1][1].length);
var _local14 = Math.floor(Math.random() * 10);
var _local4 = 0;
while (_local4 < _local5) {
var _local3 = new Object();
_local3.x = x;
_local3.y = y;
_local3.b = true;
if (_local14 == 6) {
_local3.col = 4278190080 + (Math.random() * 16777215);
_local3.rndcol = true;
} else {
_local3.col = col;
}
if (_local9 == "normal") {
var _local8 = (Math.PI/2) - (((_local5 / 2) - _local4) / 4);
var _local7 = 2;
_local3.ai = 0;
if (_local10 > 6) {
_local3.ci = 1;
} else {
_local3.ci = 0;
}
if (_local13 == 0) {
_local3.parrnd = true;
}
_local3.parn = _local10;
} else if (_local9 == "balls") {
var _local8 = ((Math.PI*2) - _local5) * _local4;
var _local7 = 2;
_local3.ai = 0;
_local3.ci = 1;
_local3.isball = true;
_local3.parn = numArray[_local11][1][_local12];
if (_local6 == 0) {
_local3.ai = 0.04;
_local8 = (Math.PI/2) - (((_local5 / 2) - _local4) / 4);
} else if (_local6 == 1) {
_local3.ai = -0.04;
_local8 = (Math.PI/2) - (((_local5 / 2) - _local4) / 4);
} else if (_local6 == 2) {
_local8 = ((Math.PI*2) - _local5) * _local4;
_local3.ai = (Math.random() * 0.6) - 0.12;
} else if (_local6 == 3) {
_local8 = ((Math.PI*2) - _local5) * _local4;
_local3.ai = 0;
}
}
_local3.pi = 0;
_local3.p = _local7;
_local3.a = _local8;
_local3.imp = 1.2;
_local3.impd = _local3.imp / 50;
_local3.impl = _local3.imp / 20;
_local3.par = true;
_local3.parl = _local3.imp / 20;
_local3.vx = Math.cos(_local8) * _local7;
_local3.vy = 1;
particles.push(_local3);
_local4++;
}
}
function createNew(p, rndP1) {
col = 4278190080 + (Math.random() * 16777215);
var _local4 = 0;
while (_local4 < p.parn) {
var _local2 = new Object();
_local2.x = p.x;
_local2.y = p.y;
if (p.rndcol) {
_local2.col = 4278190080 + (Math.random() * 16777215);
_local2.rndcol = true;
} else {
_local2.col = col;
}
if (rndP1 == 0) {
_local2.b = false;
} else {
_local2.b = true;
}
if (p.isball) {
var _local6 = ((Math.PI*2) / p.parn) * _local4;
} else if (p.parrnd) {
var _local6 = Math.random() * (Math.PI*2);
} else {
var _local6 = ((Math.PI*2) / p.parn) * (_local4 % p.parn);
}
var _local5 = 3;
_local2.ai = 0;
_local2.pi = 0;
if (p.parrnd) {
_local2.parrnd = true;
_local2.ai = (Math.random() * 0.6) - 0.12;
} else {
_local2.ai = 0;
}
_local2.p = _local5;
_local2.a = _local6;
_local2.imp = 1.2;
_local2.impd = _local2.imp / 50;
_local2.impl = _local2.imp / 20;
_local2.par = true;
_local2.parl = _local2.imp / 20;
_local2.parn = p.parn;
_local2.ci = p.ci + 1;
_local2.vx = Math.cos(_local6) * _local5;
_local2.vy = -1;
particles.push(_local2);
_local4++;
}
}
var numArray = [[5], [4, [5, 10, 15, 20, 25]]];
var typeList = ["normal", "balls"];
}
Symbol 99 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 106 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 109 Button
on (press) {
_global.soundController.setOverallVolumeLevel(0);
_global.thegame.overture.setVolume(0);
_global.mySO.updateData({volumeLevel:0});
gotoAndStop (2);
soundText = _global.strings.soundOffText;
}
Symbol 111 Button
on (press) {
_global.soundController.setOverallVolumeLevel(100);
_global.thegame.overture.setVolume(30);
_global.mySO.updateData({volumeLevel:100});
gotoAndStop (1);
soundText = _global.strings.soundOnText;
}
Symbol 112 MovieClip Frame 1
if (_global.mySO.checkData("volumeLevel") == "100") {
soundText = _global.strings.soundOnText;
} else {
gotoAndStop (2);
soundText = _global.strings.soundOffText;
}
stop();