Instance of Symbol 125 MovieClip [TMPobwumbzru1] in Frame 1
//component parameters
onClipEvent (initialize) {
gameid = "lennyblast";
}
Frame 2
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.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 4
stop();
Frame 6
stop();
Frame 8
stop();
Frame 9
_root.gameControl.showBestScore();
Frame 10
stop();
Frame 12
stop();
Symbol 29 MovieClip [blue4] Frame 1
#initclip 29
Object.registerClass("blue4", Particle);
#endinitclip
Symbol 33 MovieClip [blue3] Frame 1
#initclip 5
Object.registerClass("blue3", Particle);
#endinitclip
Symbol 35 MovieClip [blue2] Frame 1
#initclip 6
Object.registerClass("blue2", Particle);
#endinitclip
Symbol 37 MovieClip [blue1] Frame 1
#initclip 7
Object.registerClass("blue1", Particle);
#endinitclip
Symbol 39 MovieClip [red1] Frame 1
#initclip 8
Object.registerClass("red1", Particle);
#endinitclip
Symbol 40 MovieClip [white4] Frame 1
#initclip 9
Object.registerClass("white4", Particle);
#endinitclip
Symbol 45 MovieClip [white3] Frame 1
#initclip 10
Object.registerClass("white3", Particle);
#endinitclip
Symbol 47 MovieClip [white2] Frame 1
#initclip 11
Object.registerClass("white2", Particle);
#endinitclip
Symbol 48 MovieClip [white1] Frame 1
#initclip 12
Object.registerClass("white1", Particle);
#endinitclip
Symbol 49 MovieClip [red4] Frame 1
#initclip 13
Object.registerClass("red4", Particle);
#endinitclip
Symbol 50 MovieClip [red3] Frame 1
#initclip 14
Object.registerClass("red3", Particle);
#endinitclip
Symbol 51 MovieClip [red2] Frame 1
#initclip 15
Object.registerClass("red2", Particle);
#endinitclip
Symbol 54 MovieClip [particle5] Frame 1
#initclip 16
Object.registerClass("particle5", Particle);
#endinitclip
Symbol 54 MovieClip [particle5] Frame 64
stop();
Symbol 55 MovieClip [particle4] Frame 1
#initclip 17
Object.registerClass("particle4", Particle);
#endinitclip
Symbol 55 MovieClip [particle4] Frame 64
stop();
Symbol 56 MovieClip [particle3] Frame 1
#initclip 18
Object.registerClass("particle3", Particle);
#endinitclip
Symbol 56 MovieClip [particle3] Frame 64
stop();
Symbol 57 MovieClip [particle2] Frame 1
#initclip 19
Object.registerClass("particle2", Particle);
#endinitclip
Symbol 57 MovieClip [particle2] Frame 64
stop();
Symbol 58 MovieClip [particle1] Frame 1
#initclip 20
Object.registerClass("particle1", Particle);
#endinitclip
Symbol 58 MovieClip [particle1] Frame 64
stop();
Symbol 77 MovieClip [rocket_white] Frame 1
#initclip 21
Object.registerClass("rocket_white", Rocket);
#endinitclip
gotoAndPlay(this.action);
Symbol 77 MovieClip [rocket_white] Frame 2
gotoAndPlay(this.action);
Symbol 77 MovieClip [rocket_white] Frame 3
gotoAndPlay(this.action);
Symbol 82 MovieClip [rocket_blue] Frame 1
#initclip 22
Object.registerClass("rocket_blue", Rocket);
#endinitclip
gotoAndPlay(this.action);
Symbol 82 MovieClip [rocket_blue] Frame 2
gotoAndPlay(this.action);
Symbol 82 MovieClip [rocket_blue] Frame 3
gotoAndPlay(this.action);
Symbol 87 MovieClip [rocket_red] Frame 1
#initclip 23
Object.registerClass("rocket_red", Rocket);
#endinitclip
gotoAndPlay(this.action);
Symbol 87 MovieClip [rocket_red] Frame 2
gotoAndPlay(this.action);
Symbol 87 MovieClip [rocket_red] Frame 3
gotoAndPlay(this.action);
Symbol 93 Button
on (release) {
_root.gameControl.abortGame();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 96 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 99 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 103 Button
on (release) {
_root.gameControl.unpauseGame();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 107 MovieClip [25pts] Frame 1
#initclip 24
Object.registerClass("25pts", Particle);
#endinitclip
Symbol 107 MovieClip [25pts] Frame 36
removeMovieClip(this);
Symbol 111 MovieClip [levelmsg] Frame 1
#initclip 25
Object.registerClass("levelmsg", Particle);
#endinitclip
Symbol 111 MovieClip [levelmsg] Frame 82
_root.gameControl.nextlevel();
removeMovieClip(this);
Symbol 113 MovieClip [100pts] Frame 1
#initclip 26
Object.registerClass("100pts", Particle);
#endinitclip
Symbol 113 MovieClip [100pts] Frame 36
removeMovieClip(this);
Symbol 115 MovieClip Frame 2
gotoAndPlay (1);
Symbol 116 MovieClip [wheel] Frame 1
#initclip 27
Object.registerClass("wheel", Wheel);
#endinitclip
Symbol 118 MovieClip [gameControl] Frame 1
#initclip 28
Object.registerClass("gameControl", GameMaster);
#endinitclip
Symbol 125 MovieClip [TMPobwumbzru1] Frame 1
function check_loader() {
_level0.checkCount = _level0.checkCount + 1;
if (_level0.checkCount > 60) {
clearInterval(_level0.check_load);
_level0.play();
}
}
System.security.allowDomain("*");
System.security.allowDomain("playads.net");
System.security.allowDomain("www.playads.net");
System.security.allowDomain("ww1.playads.net");
System.security.allowDomain("ww2.playads.net");
System.security.allowDomain("ww3.playads.net");
System.security.allowDomain("ww4.playads.net");
System.security.allowDomain("ww5.playads.net");
System.security.allowDomain("ww6.playads.net");
System.security.allowDomain("ww7.playads.net");
System.security.allowDomain("ww8.playads.net");
System.security.allowDomain("ww9.playads.net");
System.security.allowDomain("ads.ezone.com");
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain("playads.net");
System.security.allowInsecureDomain("www.playads.net");
System.security.allowInsecureDomain("ww1.playads.net");
System.security.allowInsecureDomain("ww2.playads.net");
System.security.allowInsecureDomain("ww3.playads.net");
System.security.allowInsecureDomain("ww4.playads.net");
System.security.allowInsecureDomain("ww5.playads.net");
System.security.allowInsecureDomain("ww6.playads.net");
System.security.allowInsecureDomain("ww7.playads.net");
System.security.allowInsecureDomain("ww8.playads.net");
System.security.allowInsecureDomain("ww9.playads.net");
System.security.allowInsecureDomain("ads.ezone.com");
_level0.checkCount = 0;
_level0.check_load = setInterval(check_loader, 100);
_level0.mygameID = this.gameid;
var protocol = _url.substr(0, _url.indexOf(":"));
if (protocol == "file") {
clearInterval(_level0.check_load);
} else {
this.loadMovie("http://www.playads.net/swfs/adplayer.swf");
_level0.stop();
}
Symbol 125 MovieClip [TMPobwumbzru1] Frame 2
this.stop();
Symbol 202 MovieClip [__Packages.Particle] Frame 0
class Particle extends MovieClip
{
function Particle (myName) {
var _local1 = this;
var _local2 = _root;
super();
_local1.name = myName;
_local1.velX = _local1.speed * _local2.sinQuick(_local1.angle);
_local1.velY = _local1.speed * _local2.cosQuick(_local1.angle);
_local1.accelY = _local2.gameControl.myGravity;
_local1.initialize();
}
function initialize() {
var _local1 = this;
_local1._x = _local1.origX;
_local1._y = _local1.origY;
_local1._xscale = _local1.myScale * 200;
_local1._yscale = _local1.myScale * 200;
if (_local1.dieCel == 60) {
_local1.gotoAndPlay(Math.round(Math.random() * 30) + 1);
_local1.dieCel = 60 + (Math.random() * 20);
}
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
_local1.animCel = _local1.animCel + 1;
_local1.velX = (_local1.velX + (_local1.accelX * _local2.gameControl.deltaT)) * _local2.gameControl.damping;
_local1.velY = (_local1.velY + (_local1.accelY * _local2.gameControl.deltaT)) * _local2.gameControl.damping;
_local1._x = _local1._x + (_local1.velX * _local1.myScale);
_local1._y = _local1._y + (_local1.velY * _local1.myScale);
if (_local1.animCel > _local1.dieCel) {
(_local1.removeMovieClip());// not popped
}
}
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 203 MovieClip [__Packages.Rocket] Frame 0
class Rocket extends MovieClip
{
function Rocket (myName) {
var _local1 = this;
var _local2 = _root;
super();
_local1.name = myName;
_local1.velX = _local1.speed * _local2.sinQuick(_local1.angle);
_local1.velY = _local1.speed * _local2.cosQuick(_local1.angle);
_local1.accelY = (-_local2.gameControl.myGravity) * 2;
_local1.initialize();
}
function initialize() {
var _local1 = this;
_local1._x = _local1.origX;
_local1._y = _local1.origY;
_local1._xscale = 300;
_local1._yscale = 300;
if (_local1.dieCel == 60) {
_local1.dieCel = 60 + (Math.random() * 20);
}
var _local2 = (Math.atan(_local1.velX / _local1.velY) * 180) / Math.PI;
if (_local1.velY <= 0) {
_local2 = _local2 + 180;
}
_local1._rotation = _local2;
if (_local1._rotation > 0) {
_local1._xscale = -Math.abs(_local1._xscale);
} else {
_local1._xscale = Math.abs(_local1._xscale);
}
_local1.mysound = new Sound(_local1);
_local1.mysound.setVolume(_root.gameControl.effectVolume * 0.2);
var _local3 = Math.ceil(Math.random() * 5);
_local1.mysound.attachSound(("rocket" + _local3) + "_snd");
if (_local1.velX > 0) {
_local1.mysound.setPan(100);
} else {
_local1.mysound.setPan(0);
}
_local1.mysound.start();
}
function explode() {
var _local1 = this;
var _local2 = _root;
if (_local1.action == "alivehot") {
_local2.gameControl.launchFirework(_local1.myParticle, _local1._x, _local1._y, 0.5, 100);
} else if (_local1.hitearly) {
_local2.gameControl.launchFirework(_local1.myParticle, _local1._x, _local1._y, 0.25, 25);
} else {
_local2.gameControl.launchFirework(_local1.myParticle, _local1._x, _local1._y, 0.1, 5);
}
_local2.gameControl.rocketsDead = _local2.gameControl.rocketsDead + 1;
_local1.action = "falling";
_local1.velX = (_local1.velX + 10) - (Math.random() * 20);
_local1.velY = 5 + (Math.random() * 5);
var _local3 = Math.ceil(Math.random() * 5);
_local1.mysound.attachSound(("lenny" + _local3) + "_snd");
_local1.mysound.setPan(50);
_local1.mysound.start();
}
function remove() {
var _local1 = this;
if (_local1.action != "falling") {
_root.gameControl.rocketsDead = _root.gameControl.rocketsDead + 1;
}
_local1.action = "dead";
_local1.mysound.stop();
_local1 = _local1.removeMovieClip();
}
function onEnterFrame() {
var _local1 = this;
var _local3 = _root;
_local3 = ((_local3.gameControl.action != "paused") ? (_local1.animCel = _local1.animCel + 1_local1.velX = _local1.velX + (_local1.accelX * _local3.gameControl.deltaT)_local1.velY = _local1.velY + (_local1.accelY * _local3.gameControl.deltaT)_local1._x = _local1._x + (_local1.velX * _local1.myScale)_local1._y = _local1._y - (_local1.velY * _local1.myScale)if (_local1.velY <= 0) {
_local2 = (_local2 = (Math.atan(_local1.velX / _local1.velY) * 180) / Math.PI) + 180}
_local1._rotation = if (_local1._rotation > 0) {
_local1._xscale = -Math.abs(_local1._xscale * 0.98)} else {
_local1._xscale = Math.abs(_local1._xscale * 0.98)}
_local1._yscale = _local1._yscale * 0.98if (_local1.action != "falling") {
if (Math.abs(_local1._x - (Stage.width / 2)) < 80) {
if (_local1.action == "alive") {
_local1.mysound.attachSound("audiocue_snd")_local1.mysound.setPan(50)_local1.mysound.start()}
_local1.action = "alivehot"_local1.hitearly = false} else {
_local1.action = "alive"}
}
if (((_local1.velX > 0) && (_local1._x > Stage.width)) || ((_local1.velX < 0) && (_local1._x < 0))) {
_local1.remove()}
if ((_local1.velY < 0) && (_local1._y > Stage.height)) {
_local1.remove()}
_local1.play()) : (_local1.stop()));
var _local2 = _local3;
_local1 = _local2;
}
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;
var myParticle = "white";
var hitearly = true;
}
Symbol 204 MovieClip [__Packages.Wheel] Frame 0
class Wheel extends MovieClip
{
var stop, play, _rotation;
function Wheel (myName) {
var _local1 = this;
super();
_local1.name = myName;
_local1.mysound = new Sound(_local1);
}
function cheer() {
var _local1 = this;
var _local2 = Math.ceil(Math.random() * 2);
_local1.mysound.attachSound(("crowd" + _local2) + "_snd");
_local1.mysound.setVolume(_root.gameControl.effectVolume * 0.25);
_local1.mysound.start();
}
function onEnterFrame() {
if (_root.gameControl.action == "paused") {
(stop());// not popped
return(undefined);
}
(play());// not popped
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 205 MovieClip [__Packages.GameMaster] Frame 0
class GameMaster extends MovieClip
{
var getURL;
function GameMaster () {
var _local3 = this;
super();
_local3._quality = "MEDIUM";
var protocol = _local3._url.substr(0, _local3._url.indexOf(":"));
if (protocol == "file") {
fscommand ("fullscreen", "true");
} else {
var urls = new Array("http://www.ezone.com/");
var ok = false;
var _local1 = 0;
while ((_local1 < urls.length) && (!ok)) {
var _local2 = urls[_local1];
if (_local3._url.substr(0, _local2.length).toLowerCase() == _local2) {
ok = true;
}
_local1++;
}
if (!ok) {
}
}
_local3.mymusic = new Sound(_root.gameControl.music_mc);
_local3.mymusic.attachSound("music_snd");
_local3.mymusic.setVolume(_local3.musicVolume);
_local3.mymusic.start(0, 99);
_local3.mysound = new Sound(_root.gameControl.effect_mc);
_local3.myStageWidth = Stage.width;
_local3.myStageHeight = Stage.height;
_root.attachMovie("pauseScreen", "pauseScreen", 2000);
_root.pauseScreen._visible = false;
_local3.initBestScore();
_local3.startDemo();
}
function explodeButton() {
}
function playSound(whichsound, whichVolume) {
var _local1 = this;
var _local2 = whichVolume;
if (!_local2) {
_local2 = 1;
}
if (_local1.effectVolume == 0) {
} else {
_local1.mysound.attachSound(whichsound);
_local1.mysound.setVolume(_local1.effectVolume * _local2);
_local1.mysound.start();
}
}
function updateScore(thisScore, noPower) {
var _local1 = this;
var _local2 = _root;
if ((_local1.action != "playing") or _local1.demo) {
} else {
_local2.gameScore = _local2.gameScore + thisScore;
if ((!noPower) && (thisScore == 100)) {
_local1.powerMult = _local1.powerMult + 1;
if (_local1.powerMult > 3) {
_local1.power = _local1.power + 50;
} else {
_local1.power = _local1.power + 25;
}
if (_local1.power >= 100) {
_local1.launchFirework("particle1", _local2.bonuswheel._x, _local2.bonuswheel._y - 30, 0.25, 0, "shoot");
_local2.bonuswheel.cheer();
_local2.gameScore = _local2.gameScore + 100;
}
} else {
_local1.powerMult = 0;
}
}
}
function pauseGame() {
var _local1 = this;
if (_local1.action != "playing") {
} else {
_local1.action = "paused";
_root.pause.swapMovie;
_local1.mymusic.setVolume(0);
_root.pauseScreen._visible = true;
}
}
function abortGame() {
var _local1 = this;
_local1.startMusic();
_root.pauseScreen._visible = false;
_local1.power = 0;
_local1.action = "gameover";
_local1.demo = true;
_root.gotoAndPlay("gameover");
}
function unpauseGame() {
var _local1 = this;
_local1.action = "playing";
_local1.mymusic.setVolume(_local1.musicVolume);
_root.pauseScreen._visible = false;
}
function toggleMute() {
var _local1 = this;
var _local2 = _root;
if (_local1.soundButton == "SOUND IS OFF") {
_local1.effectVolume = _local1.effectVolumePref;
_local1.musicVolume = _local1.musicVolumePref;
_local1.soundButton = "SOUND IS ON";
_local1.playSound("explode_snd");
_local1.mymusic.setVolume(_local1.musicVolume);
_local2.speakerOn._visible = true;
} else {
_local1.effectVolume = 0;
_local1.musicVolume = 0;
_local1.soundButton = "SOUND IS OFF";
_local2.speakerOn._visible = false;
_local2.bonuswheel.mysound.stop();
_local1.mysound.stop();
_local1.mymusic.setVolume(_local1.musicVolume);
}
}
function togglePause() {
var _local1 = this;
if (_local1.action == "paused") {
_local1.unpauseGame();
} else if (_local1.action == "playing") {
_local1.pauseGame();
}
}
function changeColor(myItem) {
var _local1 = myItem;
var _local2 = new Color("_root.background1");
_local1 = _local1 % mySkyColors.length;
_local2.setRGB(mySkyColors[_local1]);
}
function getParticleDepth() {
var _local1 = this;
_local1.particleDepth = _local1.particleDepth - 1;
if (_local1.particleDepth < 50) {
_local1.particleDepth = 299;
}
return(_local1.particleDepth);
}
function getRocketDepth() {
var _local1 = this;
_local1.rocketDepth = _local1.rocketDepth - 1;
if (_local1.rocketDepth < 300) {
_local1.rocketDepth = 320;
}
return(_local1.rocketDepth);
}
function launchFirework(whichParticle, whichX, whichY, whichScale, whichScore, whichType) {
var _local1 = this;
var _local2 = _root;
var _local3 = whichY;
var whichLevel = 1;
if (whichScore > 0) {
_local2.gameControl.updateScore(whichScore);
if (whichScore == 10) {
if (_local1.power > 75) {
_local1.power = _local1.power - 25;
}
} else if (whichScore == 25) {
if (_local1.power > 75) {
_local1.power = _local1.power - 25;
}
_local2.attachMovie("25pts", "points", _local2.gameControl.getParticleDepth(), {origx:whichX, origy:_local3, angle:180, speed:2, myScale:whichScale, dieCel:80});
} else {
_local2.attachMovie("100pts", "points", _local2.gameControl.getParticleDepth(), {origx:whichX, origy:_local3, angle:180, speed:2, myScale:whichScale, dieCel:80});
}
}
if ((_local1.power >= 100) || (_local1.action == "win")) {
whichLevel = _local1.level;
}
if (whichLevel > 1) {
var myRandSnd = (Math.ceil(Math.random() * 4) + 10);
_local1.playSound(("firework" + myRandSnd) + "_snd", whichScale);
} else {
var myRandSnd = Math.ceil(Math.random() * 6);
_local1.playSound(("firework" + myRandSnd) + "_snd", whichScale);
}
if (_local1.demo) {
whichLevel = Math.ceil(Math.random() * 4);
}
if (whichLevel > 4) {
whichLevel = 4;
}
whichParticle = whichParticle + String(whichLevel);
if (whichType == "normal") {
var i = 1;
while (i <= 9) {
_local2.attachMovie(whichParticle, "particle", _local1.getParticleDepth(), {origx:whichX, origy:_local3, angle:(i * 40) + (Math.random() * 5), speed:2 + Math.random(), myScale:whichScale});
i++;
}
var i = 1;
while (i <= 12) {
_local2.attachMovie(whichParticle, "particle", _local1.getParticleDepth(), {origx:whichX, origy:_local3, angle:(i * 30) + (Math.random() * 5), speed:4 + Math.random(), myScale:whichScale});
i++;
}
var i = 1;
while (i <= 18) {
_local2.attachMovie(whichParticle, "particle", _local1.getParticleDepth(), {origx:whichX, origy:_local3, angle:(i * 20) + (Math.random() * 5), speed:6 + Math.random(), myScale:whichScale});
i++;
}
} else if (whichType == "sparkle") {
var whichScale = 1;
var i = 1;
while (i <= 30) {
_local2.attachMovie(whichParticle, "particle", _local1.getParticleDepth(), {origx:(whichX + 200) - (Math.random() * 400), origy:(_local3 + 150) - (Math.random() * 300), angle:Math.random() * 360, speed:Math.random(), myScale:whichScale});
i++;
}
} else if (whichType == "shoot") {
_local2.attachMovie("100pts", "points", _local2.gameControl.getParticleDepth(), {origx:whichX, origy:_local3 + 30, angle:180, speed:2, myScale:0.75, dieCel:80});
var i = 1;
while (i <= 3) {
_local2.attachMovie(whichParticle, "particle", _local1.getParticleDepth(), {origx:whichX, origy:_local3, angle:Math.random() * 360, speed:5 + (Math.random() * 10), myScale:whichScale});
i++;
}
var i = 1;
while (i <= 3) {
_local2.attachMovie(whichParticle, "particle", _local1.getParticleDepth(), {origx:whichX, origy:_local3, angle:Math.random() * 360, speed:2 + (Math.random() * 5), myScale:whichScale});
i++;
}
} else {
var i = 4;
while (i <= 20) {
_local2.attachMovie(whichParticle, "particle", _local1.getParticleDepth(), {origx:whichX, origy:_local3, angle:i * 20, speed:5 + (Math.random() * 10), myScale:whichScale});
i++;
}
var i = 4;
while (i <= 20) {
_local2.attachMovie(whichParticle, "particle", _local1.getParticleDepth(), {origx:whichX, origy:_local3, angle:i * 20, speed:2 + (Math.random() * 5), myScale:whichScale});
i++;
}
}
}
function onMouseDown() {
var _local1 = this;
if (_local1.demo) {
_local1.launchFirework("white", _root._xmouse, _root._ymouse, 0.3 + (Math.random() * 0.3), 0, _local1.firetype);
}
}
function startSparks(whichX, whichY) {
var _local1 = this;
_local1.showSparks = true;
trace(whichX);
_local1.sparkX = whichX - 100;
_local1.sparkY = whichY;
}
function fireRocket(whichOne) {
var _local2 = this;
var _local3 = whichOne;
_local2.rocketsMade = _local2.rocketsMade + 1;
var _local1 = (20 + (Math.random() * 5)) + _local2.level;
if (_local1 > 60) {
_local1 = 60;
}
var myAngle = (28 + (Math.random() * (20 + (_local1 / 2))));
var myVelY = (_local1 * _root.cosQuick(myAngle));
var myHeight = (((((myVelY * myVelY) / (((2 * _local2.myGravity) * 2) * _local2.deltaT)) * 0.5) + 50) + (Math.random() * 100));
if ((_local2.level > 1) and (Math.random() >= 0.5)) {
_root.attachMovie("rocket_" + _local3, "rocket_" + _local3, _local2.getRocketDepth(), {myParticle:_local3, origx:Stage.width + 30, origy:myHeight, angle:-myAngle, speed:_local1});
} else {
_root.attachMovie("rocket_" + _local3, "rocket_" + _local3, _local2.getRocketDepth(), {myParticle:_local3, origx:-30, origy:myHeight, angle:myAngle, speed:_local1});
}
}
function explodeRocket(whichOne) {
var _local1 = _root;
if (action == "paused") {
} else if (whichOne == "red") {
if (_local1.rocket_red.action.indexOf("alive") != -1) {
_local1.rocket_red.explode();
}
} else if (whichOne == "blue") {
if (_local1.rocket_blue.action.indexOf("alive") != -1) {
_local1.rocket_blue.explode();
}
} else if (_local1.rocket_white.action.indexOf("alive") != -1) {
_local1.rocket_white.explode();
}
}
function onEnterFrame() {
var _local1 = this;
var _local2 = _root;
if (Key.isDown(77)) {
if (Math.abs(_local1.lastPressCel - _local1.animCel) > 20) {
_local1.lastPressCel = _local1.animCel;
_local1.toggleMute();
}
}
_local1._x = -10000;
if (_local1.showSparks) {
_local2.attachMovie("white1", "particle", _local1.getParticleDepth(), {origx:(_local2._xmouse + (Math.random() * 40)) - 20, origy:_local2._ymouse + 20, angle:Math.random() * 360, speed:Math.random(), myScale:0.5, dieCel:40});
}
if (Key.isDown(83)) {
_local1.firetype = "sparkle";
} else if (Key.isDown(82)) {
_local1.firetype = "random";
} else if (Key.isDown(78)) {
_local1.firetype = "normal";
}
if (_local1.action == "title") {
_local1.animCel = _local1.animCel + 1;
if ((_local1.animCel % 80) == 0) {
var myRand = Math.ceil(Math.random() * 4);
_local1.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 (_local1.action == "playing") {
if ((Key.isDown(27) or Key.isDown(80)) and (!_local1.demo)) {
if (Math.abs(_local1.lastPressCel - _local1.animCel) > 20) {
_local1.lastPressCel = _local1.animCel;
_local1.togglePause();
}
}
if ((Key.isDown(87) and (!_local1.demo)) and _local1.cheatsOn) {
}
_local1.animCel = _local1.animCel + 1;
if (_local1.rocketsMade > 0) {
_local1.power = _local1.power - _local1.powerReduction;
}
if (_local1.power <= 0) {
_local1.power = 0;
_local1.action = "gameover";
_local1.startMusic("music_snd", 99);
_local1.demo = true;
_local2.gotoAndPlay("gameover");
}
if (_local1.power > 100) {
_local1.power = 100;
}
var myMsg = ("level" + String(_local1.level + 1));
if ((_local1.animCel % _local1.rocketInterval) == 0) {
if (_local1.rocketList.length <= 0) {
if (_local1.rocketsMade == _local1.rocketsDead) {
_local1.action = "win";
_local1.launchFirework("white", Stage.width * 0.5, Stage.height * 0.25, 2, 0, "sparkle");
_local1.playSound("crowd2_snd");
_local2.attachMovie("levelmsg", "levelmsg", _local1.getParticleDepth(), {origx:Stage.width * 0.5, origy:Stage.height * 0.25, angle:180, speed:2, myScale:0.75, dieCel:100});
_local2.levelnum.text = "LEVEL " + String(_local1.level + 1);
}
} else {
_local1.fireRocket(_local1.rocketList.shift());
}
}
var _local3 = 30;
if ((_local1.animCel - _local1.mylasttime) > _local3) {
_local1.mylasttime = _local1.animCel;
_local2.gameTime = _local2.gameTime - 1;
}
}
while ((getTimer() - _local1.lastExitFrameMillis) < 33) {
}
_local1.lastExitFrameMillis = getTimer();
}
function startMusic(whichSound, whichLoop) {
var _local1 = this;
var _local2 = whichLoop;
var _local3 = whichSound;
if (_local3 == undefined) {
_local3 = "music_snd";
}
if (_local2 == undefined) {
_local2 = 99;
}
_local1.mymusic.stop();
_local1.mymusic.attachSound(_local3);
_local1.mymusic.setVolume(_local1.musicVolume);
_local1.mymusic.start(0, _local2);
}
function nextlevel() {
var _local1 = this;
_local1.level = _local1.level + 1;
_local1.levelmsg = " ";
_root.levelnum.text = "LEVEL " + String(_local1.level);
_local1.rocketsMade = 0;
_local1.rocketsDead = 0;
_local1.animCel = 1;
_local1.winFlag = false;
_local1.powerMult = 0;
_local1.action = "playing";
_local1.rocketList = ["white", "blue", "red", "white", "blue", "red", "white", "red", "white", "blue", "white", "red", "blue", "white"];
if (Math.random() < 0.5) {
_local1.rocketList.unshift("blue");
} else {
_local1.rocketList.unshift("red");
}
if (_local1.level < 8) {
_local1.powerReduction = _local1.level / 10;
_local1.rocketInterval = 70 - (5 * _local1.level);
}
if (_local1.rocketInterval < 30) {
_local1.rocketInterval = 30;
}
if (_local1.powerReduction > 0.65) {
_local1.powerReduction = 0.65;
}
_local1.startMusic("cricketloop_snd");
_root.gotoAndPlay("game");
}
function initialize() {
var _local1 = this;
var _local2 = _root;
_local2.gameScore = 0;
_local2.gameTime = 30;
_local2.gameLives = 2;
_local1.demo = false;
_local1.level = 0;
_local1.power = 50;
_local1.nextlevel();
}
function startDemo() {
var _local1 = this;
_local1.action = "title";
_local1.power = 50;
_local1.demo = true;
_local1.launchFirework("white", Stage.width / 2, Stage.height * 0.3, 2, 0, "sparkle");
_local1.startMusic();
_root.gotoAndPlay("title");
}
function showscores() {
(getURL("http://www.ezone.com/login2/scores.php?game=" + gameName, "scoreboard"));// not popped
}
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)));
startDemo();
_local3 = getURL(hs_submitURL, "scoreboard");
var _local2 = _local3;
_local1 = _local2;
}
function initBestScore() {
var _local1 = this;
_local1.so = SharedObject.getLocal("ezone_lennyblast");
if (_local1.so.data.bestscore == undefined) {
_local1.so.data.bestscore = 0;
_local1.so.flush();
}
_root.result_txt = (("YOUR SCORE: " + _root.gameScore) + "\nBEST SCORE: ") + _local1.so.data.bestscore;
}
function showBestScore() {
var _local1 = this;
var _local2 = _root;
if (_local2.gameScore > _local1.so.data.bestscore) {
_local1.so.data.bestscore = _local2.gameScore;
_local1.so.flush();
}
_local2.result_txt = (("YOUR SCORE: " + _local2.gameScore) + "\nBEST SCORE: ") + _local1.so.data.bestscore;
}
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 = 50;
var musicVolumePref = 50;
var lastPressCel = 0;
var screenTime = 0;
var cheatsOn = true;
var soundButton = "SOUND IS ON";
var scrollVel = [0, 0];
var scrolling = false;
var deltaT = 0.1;
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;
}
Symbol 145 Button
on (release) {
gotoAndPlay ("instructions");
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 150 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 152 Button
on (release) {
_root.gameControl.toggleMute();
}
Symbol 156 Button
on (release) {
_root.gameControl.togglePause();
}
Symbol 167 Button
on (press) {
_root.gameControl.explodeRocket("red");
}
Symbol 171 Button
on (press) {
_root.gameControl.explodeRocket("white");
}
Symbol 176 Button
on (press) {
_root.gameControl.explodeRocket("blue");
}
Symbol 179 Button
on (release) {
_root.gameControl.initialize();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 197 Button
on (release) {
_root.gameControl.startDemo();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}
Symbol 200 Button
on (release) {
_root.gameControl.initialize();
_root.gameControl.showSparks = false;
}
on (rollOver) {
_root.gameControl.showSparks = true;
}
on (rollOut) {
_root.gameControl.showSparks = false;
}