Section 1
//answer0_63 (morplee_fla.answer0_63)
package morplee_fla {
import flash.display.*;
public dynamic class answer0_63 extends MovieClip {
public var highlight:MovieClip;
public function answer0_63(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 2
//answer1_66 (morplee_fla.answer1_66)
package morplee_fla {
import flash.display.*;
public dynamic class answer1_66 extends MovieClip {
public var highlight:MovieClip;
public function answer1_66(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 3
//answer2_67 (morplee_fla.answer2_67)
package morplee_fla {
import flash.display.*;
public dynamic class answer2_67 extends MovieClip {
public var highlight:MovieClip;
public function answer2_67(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 4
//apple_126 (morplee_fla.apple_126)
package morplee_fla {
import flash.display.*;
public dynamic class apple_126 extends MovieClip {
public function apple_126(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 5
//apple_75 (morplee_fla.apple_75)
package morplee_fla {
import flash.display.*;
public dynamic class apple_75 extends MovieClip {
public function apple_75(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
}
}//package morplee_fla
Section 6
//balloon_48 (morplee_fla.balloon_48)
package morplee_fla {
import flash.display.*;
public dynamic class balloon_48 extends MovieClip {
public var hitmap:MovieClip;
public function balloon_48(){
addFrameScript(0, frame1, 1, frame2, 6, frame7);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame7(){
stop();
}
}
}//package morplee_fla
Section 7
//bgSunB_6 (morplee_fla.bgSunB_6)
package morplee_fla {
import flash.display.*;
public dynamic class bgSunB_6 extends MovieClip {
public var sunMask:MovieClip;
public var sun:MovieClip;
public function bgSunB_6(){
addFrameScript(0, frame1);
}
function frame1(){
sunMask.cacheAsBitmap = true;
sun.cacheAsBitmap = true;
sun.mask = sunMask;
}
}
}//package morplee_fla
Section 8
//bossHolder_153 (morplee_fla.bossHolder_153)
package morplee_fla {
import flash.display.*;
public dynamic class bossHolder_153 extends MovieClip {
public function bossHolder_153(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 9, frame10);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
play();
}
function frame10(){
gotoAndStop(2);
}
}
}//package morplee_fla
Section 9
//bottle_129 (morplee_fla.bottle_129)
package morplee_fla {
import flash.display.*;
public dynamic class bottle_129 extends MovieClip {
public function bottle_129(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 14, frame15);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
play();
}
function frame15(){
stop();
}
}
}//package morplee_fla
Section 10
//cat_70 (morplee_fla.cat_70)
package morplee_fla {
import flash.display.*;
public dynamic class cat_70 extends MovieClip {
public function cat_70(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package morplee_fla
Section 11
//cityGround_135 (morplee_fla.cityGround_135)
package morplee_fla {
import flash.display.*;
public dynamic class cityGround_135 extends MovieClip {
public function cityGround_135(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 12
//cloudAnim_53 (morplee_fla.cloudAnim_53)
package morplee_fla {
import flash.display.*;
public dynamic class cloudAnim_53 extends MovieClip {
public var hitpoint:MovieClip;
public function cloudAnim_53(){
addFrameScript(0, frame1, 1, frame2, 29, frame30);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame30(){
stop();
}
}
}//package morplee_fla
Section 13
//cowAnim_81 (morplee_fla.cowAnim_81)
package morplee_fla {
import flash.display.*;
public dynamic class cowAnim_81 extends MovieClip {
public function cowAnim_81(){
addFrameScript(0, frame1);
}
function frame1(){
play();
}
}
}//package morplee_fla
Section 14
//dice_141 (morplee_fla.dice_141)
package morplee_fla {
import flash.display.*;
public dynamic class dice_141 extends MovieClip {
public function dice_141(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package morplee_fla
Section 15
//dog_72 (morplee_fla.dog_72)
package morplee_fla {
import flash.display.*;
public dynamic class dog_72 extends MovieClip {
public function dog_72(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package morplee_fla
Section 16
//envelopeHolder_109 (morplee_fla.envelopeHolder_109)
package morplee_fla {
import flash.display.*;
public dynamic class envelopeHolder_109 extends MovieClip {
public function envelopeHolder_109(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 17
//failAnim_157 (morplee_fla.failAnim_157)
package morplee_fla {
import flash.display.*;
public dynamic class failAnim_157 extends MovieClip {
public var fail:MovieClip;
public function failAnim_157(){
addFrameScript(0, frame1, 1, frame2, 84, frame85);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame85(){
stop();
}
}
}//package morplee_fla
Section 18
//fgGameA_155 (morplee_fla.fgGameA_155)
package morplee_fla {
import flash.display.*;
import flash.text.*;
public dynamic class fgGameA_155 extends MovieClip {
public var speaker:MovieClip;
public var pass:MovieClip;
public var pauseGame:MovieClip;
public var scoreText:TextField;
public var fail:MovieClip;
public var pauseFade:MovieClip;
public function fgGameA_155(){
addFrameScript(0, frame1, 10, frame11, 11, frame12);
}
function frame1(){
play();
}
function frame11(){
stop();
}
function frame12(){
play();
}
}
}//package morplee_fla
Section 19
//fgMenu_24 (morplee_fla.fgMenu_24)
package morplee_fla {
import flash.display.*;
public dynamic class fgMenu_24 extends MovieClip {
public var speaker:MovieClip;
public function fgMenu_24(){
addFrameScript(0, frame1, 10, frame11, 11, frame12);
}
function frame1(){
play();
}
function frame11(){
stop();
}
function frame12(){
play();
}
}
}//package morplee_fla
Section 20
//invader_149 (morplee_fla.invader_149)
package morplee_fla {
import flash.display.*;
public dynamic class invader_149 extends MovieClip {
public function invader_149(){
addFrameScript(0, frame1, 1, frame2, 60, frame61);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame61(){
stop();
}
}
}//package morplee_fla
Section 21
//MainTimeline (morplee_fla.MainTimeline)
package morplee_fla {
import flash.geom.*;
import flash.utils.*;
import flash.events.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.events.*;
import org.flintparticles.twoD.zones.*;
import flash.filters.*;
import flash.display.*;
import org.flintparticles.common.energyEasing.*;
import flash.media.*;
import org.flintparticles.twoD.emitters.*;
import org.flintparticles.twoD.initializers.*;
import org.flintparticles.twoD.actions.*;
import flash.text.*;
import flash.ui.*;
import flash.net.*;
import org.flintparticles.twoD.renderers.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var level24:MovieClip;
public var level15:MovieClip;
public var cityScape:MovieClip;
public var level25:MovieClip;
public var level16:MovieClip;
public var level17:MovieClip;
public var buttonCredits:SimpleButton;
public var level18:MovieClip;
public var level0:MovieClip;
public var buttonSubmit:SimpleButton;
public var invader2:MovieClip;
public var level19:MovieClip;
public var level1:MovieClip;
public var loader_info:TextField;
public var countdownText:TextField;
public var invader3:MovieClip;
public var level2:MovieClip;
public var fm_bar:MovieClip;
public var buttonMenu:SimpleButton;
public var invader0:MovieClip;
public var level3:MovieClip;
public var morpleeLines:MovieClip;
public var invader1:MovieClip;
public var level4:MovieClip;
public var morpleeBubble:MovieClip;
public var level5:MovieClip;
public var scoreText:TextField;
public var balloon4:MovieClip;
public var level6:MovieClip;
public var finalScoreText:TextField;
public var level7:MovieClip;
public var buttonScores:SimpleButton;
public var fm_bar_bg:MovieClip;
public var balloon2:MovieClip;
public var level8:MovieClip;
public var bonusText:TextField;
public var balloon3:MovieClip;
public var level10:MovieClip;
public var level9:MovieClip;
public var buttonLink:SimpleButton;
public var balloon0:MovieClip;
public var level20:MovieClip;
public var level11:MovieClip;
public var fg:MovieClip;
public var buttonHelp:SimpleButton;
public var balloon1:MovieClip;
public var cityGround:MovieClip;
public var level21:MovieClip;
public var level12:MovieClip;
public var shield:MovieClip;
public var level22:MovieClip;
public var level13:MovieClip;
public var buttonPlay:SimpleButton;
public var level23:MovieClip;
public var level14:MovieClip;
public var allowed_site:String;
public var domain:String;
public var domain_idx:int;
public var loaded:Number;
public var percent:Number;
public var sound:Boolean;
public var myMenu:ContextMenu;
public var agi_url:String;
public var devKey:String;
public var gameKey:String;
public var agi;
public var urlRequest:URLRequest;
public var loader:Loader;
public var obj:Object;
public var i;
public var j;
public var k;
public var menu:Boolean;
public var rock:Boolean;
public var help:Boolean;
public var scores:Boolean;
public var credits:Boolean;
public var submit:Boolean;
public var emitter:Emitter2D;
public var renderer:BitmapRenderer;
public var alert:Sound;
public var alertCounter;
public var alertPlayed;
public var zap:Sound;
public var bossExplosion:Sound;
public var pickup:Sound;
public var whoops:Sound;
public var shatter:Sound;
public var bass:Sound;
public var squash:Sound;
public var blip:Sound;
public var pop:Sound;
public var laser:Sound;
public var explosion:Sound;
public var jump:Sound;
public var success:Sound;
public var abduct:Sound;
public var run:Sound;
public var meaw:Sound;
public var bark:Sound;
public var squeal:Sound;
public var carStart:Sound;
public var ding:Sound;
public var applause:Sound;
public var noisemaker:Sound;
public var crunch:Sound;
public var lastSoundTime;
public var theme:Sound;
public var themeChannel:SoundChannel;
public var themeTransform:SoundTransform;
public var themeSongPaused;
public var score;
public var bonus;
public var scoreTotal;
public var levelScore;
public var invaderScore;
public var quit;
public var gamePaused;
public var gameWon;
public var gameOver;
public var shaking;
public var shakeCount;
public var levels;
public var levelsDone;
public var tileSpeed;
public var tileGravity;
public var levelPassed;
public var pos;
public var lastY;
public var inv;
public var invB;
public var invC;
public var invaderSpeed;
public var invadersShot;
public var countdown:int;
public var wholeValue:int;
public var decimalValue:int;
public var hundredths:int;
public var level0windowPick;
public var l1;
public var level1carStarted;
public var level1carCrashed;
public var level1dir;
public var l2;
public var l2b;
public var level2firing;
public var level2shipDown;
public var level2shipUp;
public var level2shipCounter;
public var level2enemiesDown;
public var level2enemyShot;
public var l3;
public var level3balloonsPopped;
public var l4;
public var level4draggingCloud;
public var l4X:int;
public var l4Y:int;
public var l4Width:int;
public var l4Height:int;
public var l4BoundArea:Rectangle;
public var l5;
public var level5truckPoint:Point;
public var l6;
public var l7;
public var level7penaltyCountdown;
public var level9PenaltyCountdown;
public var level10abducted;
public var level10beaming;
public var level10cowGravity;
public var level11running;
public var level11jumping;
public var level11spiked;
public var level11jump;
public var level11ninjaGravity;
public var level11ninjaX;
public var level11ninjaY;
public var level11ninjaPoint:Point;
public var l12;
public var level12plumberRunning;
public var level12plumberJumping;
public var level12plumberJump;
public var level12plumberSpeed;
public var level12plumberGravity;
public var level12plumberX;
public var level12plumberY;
public var level12plumberPoint:Point;
public var level12coins;
public var level12coinCollected;
public var l13X:int;
public var l13Y:int;
public var l13Width:int;
public var l13Height:int;
public var l13BoundArea:Rectangle;
public var l14;
public var level14penaltyCountdown;
public var level14envelopeOver;
public var level14envelopeChosen;
public var level16carYellowMoving;
public var level17nextNinja;
public var l18;
public var level18boulderDir;
public var level18boulderSpeed;
public var level18boulderStarted;
public var level18adventurers;
public var level18adventurersSquashed;
public var l19;
public var level19apples;
public var level19applesDone;
public var level19applesPicked;
public var l20X:int;
public var l20Y:int;
public var l20Width:int;
public var l20Height:int;
public var l20BoundArea:Rectangle;
public var l20DraggingBottle;
public var l20Gravity:Number;
public var monstersChosen;
public var l22X:int;
public var l22Y:int;
public var l22Width:int;
public var l22Height:int;
public var l22BoundArea:Rectangle;
public var carBlueGravity;
public var draggingCarBlue;
public var l23;
public var level23PenaltyCountdown;
public var level23Answer;
public var l24;
public var l25;
public var level25Ready;
public var finalScore;
public function MainTimeline(){
addFrameScript(0, frame1, 33, frame34, 250, frame251, 251, frame252, 252, frame253, 253, frame254, 254, frame255, 0xFF, frame256, 0x0100, frame257, 0x0101, frame258);
}
public function load_progress(_arg1:Event):void{
loaded = (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal);
percent = Math.round((loaded * 100));
fm_bar.scaleX = loaded;
loader_info.text = (("Loading: " + percent) + "%");
if (percent == 100){
fm_bar.removeEventListener(Event.ENTER_FRAME, load_progress);
if (((!((domain_idx == -1))) && ((domain_idx == (domain.length - allowed_site.length))))){
gotoAndPlay(1, "splash");
} else {
stop();
this.x = 50000;
this.y = 40000;
};
};
}
public function loadComplete(_arg1:Event):void{
agi = _arg1.currentTarget.content;
addChild(agi);
agi.init(devKey, gameKey);
play();
}
public function handleOnAGUIClose():void{
gotoAndStop(1, "menu");
}
public function onMenuClick(_arg1:MouseEvent):void{
menu = true;
submit = false;
fg.play();
}
public function onSubmitClick(_arg1:MouseEvent):void{
menu = false;
submit = true;
fg.play();
}
public function onPlayClick(_arg1:MouseEvent):void{
rock = true;
help = false;
scores = false;
credits = false;
fg.play();
}
public function onHelpClick(_arg1:MouseEvent):void{
rock = false;
help = true;
scores = false;
credits = false;
fg.play();
}
public function onScoresClick(_arg1:MouseEvent):void{
rock = false;
help = false;
scores = true;
credits = false;
fg.play();
}
public function onCreditsClick(_arg1:MouseEvent):void{
rock = false;
help = false;
scores = false;
credits = true;
fg.play();
}
public function onLinkClick(_arg1:MouseEvent):void{
var event = _arg1;
var url = "http://www.armorgames.com";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function menuScreen(_arg1:Event):void{
fg.speaker.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (fg.currentFrame == fg.totalFrames){
stage.removeEventListener(Event.ENTER_FRAME, menuScreen);
if (rock){
nextScene();
stage.addEventListener(Event.ENTER_FRAME, myEnterFrame);
};
if (help){
gotoAndStop(1, "help");
};
if (scores){
gotoAndStop(1, "scores");
};
if (credits){
gotoAndStop(1, "credits");
};
};
}
public function myEnterFrame(_arg1:Event):void{
if (((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(quit)))){
fg.speaker.buttonMode = true;
fg.pauseGame.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
fg.pauseGame.addEventListener(MouseEvent.MOUSE_DOWN, onPauseClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
} else {
fg.speaker.buttonMode = false;
fg.pauseGame.buttonMode = false;
fg.speaker.removeEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
fg.pauseGame.removeEventListener(MouseEvent.MOUSE_DOWN, onPauseClick);
if (gameWon){
if (fg.pass.currentFrame == 1){
fg.pass.play();
};
fg.pauseGame.gotoAndStop(2);
if (fg.pass.currentFrame == fg.pass.totalFrames){
if (fg.currentFrame != fg.totalFrames){
fg.play();
};
};
if (fg.currentFrame == fg.totalFrames){
nextScene();
};
};
if (gameOver){
if (fg.fail.currentFrame == 1){
fg.fail.play();
};
fg.pauseGame.gotoAndStop(2);
if (fg.fail.currentFrame == fg.fail.totalFrames){
if (fg.currentFrame != fg.totalFrames){
fg.play();
};
};
if (fg.currentFrame == fg.totalFrames){
nextScene();
};
};
if (gamePaused){
if (fg.pauseFade.currentFrame == 1){
fg.pauseFade.play();
fg.pauseFade.pauseMenu.buttonResume.addEventListener(MouseEvent.MOUSE_DOWN, onResumeClick);
fg.pauseFade.pauseMenu.buttonQuit.addEventListener(MouseEvent.MOUSE_DOWN, onQuitClick);
};
if (quit){
if (fg.currentFrame != fg.totalFrames){
fg.play();
};
if (fg.currentFrame == fg.totalFrames){
gotoAndStop(1, "menu");
stage.removeEventListener(Event.ENTER_FRAME, myEnterFrame);
this.x = 0;
this.y = 0;
};
};
};
};
}
public function onSpeakerClick(_arg1:MouseEvent):void{
if (sound){
sound = false;
SoundMixer.soundTransform = new SoundTransform(0);
} else {
sound = true;
SoundMixer.soundTransform = new SoundTransform(1);
};
}
public function onPauseClick(_arg1:MouseEvent):void{
if (gamePaused){
gamePaused = false;
} else {
gamePaused = true;
};
}
public function onResumeClick(_arg1:MouseEvent):void{
gamePaused = false;
fg.pauseFade.pauseMenu.buttonResume.removeEventListener(MouseEvent.MOUSE_DOWN, onResumeClick);
fg.pauseFade.pauseMenu.buttonQuit.removeEventListener(MouseEvent.MOUSE_DOWN, onQuitClick);
if (fg.pauseFade.currentFrame == 10){
fg.pauseFade.play();
};
}
public function onQuitClick(_arg1:MouseEvent):void{
quit = true;
fg.pauseFade.pauseMenu.buttonResume.removeEventListener(MouseEvent.MOUSE_DOWN, onResumeClick);
fg.pauseFade.pauseMenu.buttonQuit.removeEventListener(MouseEvent.MOUSE_DOWN, onQuitClick);
}
public function remove(_arg1:EmitterEvent):void{
emitter.stop();
}
public function mainGame(_arg1:Event):void{
if (((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(quit)))){
themeChannel.addEventListener(Event.SOUND_COMPLETE, onThemeComplete);
if (themeSongPaused){
themeChannel = theme.play(lastSoundTime, 0, themeTransform);
themeSongPaused = false;
};
countdown = ((theme.length / 100) - (themeChannel.position / 100));
countdownText.text = ("" + Math.round((countdown / 10)));
if (scoreTotal < score){
scoreTotal = (scoreTotal + 5);
pickup.play();
} else {
scoreTotal = score;
};
if (scoreTotal < 10){
fg.scoreText.text = ("000" + scoreTotal);
};
if ((((scoreTotal < 100)) && ((scoreTotal > 9)))){
fg.scoreText.text = ("00" + scoreTotal);
};
if ((((scoreTotal < 1000)) && ((scoreTotal > 99)))){
fg.scoreText.text = ("0" + scoreTotal);
};
if (scoreTotal > 1000){
fg.scoreText.text = scoreTotal;
};
if (shaking){
this.x = (Math.floor((Math.random() * ((1 + 6) - 1))) + 1);
this.y = (Math.floor((Math.random() * ((1 + 6) - 1))) + 1);
shakeCount--;
if (shakeCount == 0){
shaking = false;
this.x = 0;
this.y = 0;
};
};
i = 0;
while (i < levels) {
tileGravity[i] = (tileGravity[i] * 1.1);
tileSpeed[i] = tileGravity[i];
if (this[("level" + i)].y < 300){
this[("level" + i)].y = (this[("level" + i)].y + tileSpeed[i]);
} else {
this[("level" + i)].y = 300;
};
j = 0;
while (j < levels) {
if (j != i){
if (this[("level" + j)].hitTestPoint(this[("level" + i)].x, (this[("level" + i)].y + (this[("level" + i)].height / 2)), true)){
tileSpeed[i] = 0;
tileGravity[i] = 1;
this[("level" + i)].y = ((this[("level" + j)].y - this[("level" + i)].height) + 1);
};
};
j++;
};
i++;
};
k = 0;
while (k < (levels - 1)) {
if (levelPassed[k]){
if (this[("level" + k)].alpha > 0){
this[("level" + k)].alpha = (this[("level" + k)].alpha - 0.1);
this[("level" + k)].scaleX = (this[("level" + k)].scaleX - 0.1);
this[("level" + k)].scaleY = (this[("level" + k)].scaleY - 0.1);
} else {
this[("level" + k)].visible = false;
};
};
k++;
};
if (levelPassed[25]){
if (level25.alpha > 0){
level25.alpha = (level25.alpha - 0.025);
level25.scaleX = (level25.scaleX + 0.2);
level25.scaleY = (level25.scaleY + 0.2);
level25.scaleY = (level25.scaleY + 0.1);
level25.rotation = (level25.rotation + 20);
} else {
level25.visible = false;
};
};
if (((((((((((((((((((((((((((((((((((((((((((((((((((levelPassed[0]) && (levelPassed[1]))) && (levelPassed[2]))) && (levelPassed[3]))) && (levelPassed[4]))) && (levelPassed[5]))) && (levelPassed[6]))) && (levelPassed[7]))) && (levelPassed[8]))) && (levelPassed[9]))) && (levelPassed[10]))) && (levelPassed[11]))) && (levelPassed[12]))) && (levelPassed[13]))) && (levelPassed[14]))) && (levelPassed[15]))) && (levelPassed[16]))) && (levelPassed[17]))) && (levelPassed[18]))) && (levelPassed[19]))) && (levelPassed[20]))) && (levelPassed[21]))) && (levelPassed[22]))) && (levelPassed[23]))) && (levelPassed[24]))) && (levelPassed[25]))){
levelsDone = true;
themeChannel.stop();
fg.pauseGame.gotoAndStop(2);
bonus = Math.round(countdown);
inv = 0;
while (inv < 4) {
if (this[("invader" + inv)].currentFrame == 1){
this[("invader" + inv)].play();
};
inv++;
};
if ((((level25.visible == false)) && ((scoreTotal == score)))){
gameWon = true;
};
};
if (!levelsDone){
invader0.buttonMode = true;
invader1.buttonMode = true;
invader2.buttonMode = true;
invader3.buttonMode = true;
invader0.addEventListener(MouseEvent.MOUSE_DOWN, onInvader0MouseDown);
invader1.addEventListener(MouseEvent.MOUSE_DOWN, onInvader1MouseDown);
invader2.addEventListener(MouseEvent.MOUSE_DOWN, onInvader2MouseDown);
invader3.addEventListener(MouseEvent.MOUSE_DOWN, onInvader3MouseDown);
if (shield.width < 400){
shield.width = (shield.width + 0.25);
} else {
shield.width = 400;
};
cityGround.gotoAndStop(1);
inv = 0;
while (inv < 4) {
if (!invadersShot[inv]){
if (this[("invader" + inv)].hitTestObject(cityGround)){
if (!alertPlayed){
alert.play();
alertPlayed = true;
};
if (alertCounter > 0){
alertCounter--;
} else {
alert.play();
alertCounter = (alert.length / 10);
};
shaking = true;
cityGround.gotoAndStop(2);
if (shield.width > 1){
shield.width = (shield.width - 1);
} else {
shield.width = 1;
gameOver = true;
whoops.play();
fg.fail.fail.infoText.text = "Out of NRG!";
invB = 0;
while (invB < 4) {
if (this[("invader" + invB)].currentFrame == 1){
this[("invader" + invB)].play();
};
invB++;
};
};
};
if ((this[("invader" + inv)].y + (this[("invader" + inv)].height / 2)) < 360){
this[("invader" + inv)].y = (this[("invader" + inv)].y + invaderSpeed);
};
} else {
if (this[("invader" + inv)].currentFrame == this[("invader" + inv)].totalFrames){
this[("invader" + inv)].y = (-120 - (inv * 80));
this[("invader" + inv)].gotoAndStop(1);
invadersShot[inv] = false;
};
};
inv++;
};
if (((((((((!(invader0.hitTestObject(cityGround))) && (!(invader1.hitTestObject(cityGround))))) && (!(invader2.hitTestObject(cityGround))))) && (!(invader3.hitTestObject(cityGround))))) && (!(level25.hitTestObject(cityGround))))){
alertPlayed = false;
};
invaderSpeed = (invaderSpeed * 1.0002);
} else {
invader0.buttonMode = false;
invader1.buttonMode = false;
invader2.buttonMode = false;
invader3.buttonMode = false;
invader0.removeEventListener(MouseEvent.MOUSE_DOWN, onInvader0MouseDown);
invader1.removeEventListener(MouseEvent.MOUSE_DOWN, onInvader1MouseDown);
invader2.removeEventListener(MouseEvent.MOUSE_DOWN, onInvader2MouseDown);
invader3.removeEventListener(MouseEvent.MOUSE_DOWN, onInvader3MouseDown);
};
} else {
this.x = 0;
this.y = 0;
if (!themeSongPaused){
lastSoundTime = themeChannel.position;
themeChannel.stop();
themeSongPaused = true;
};
if (((((gameWon) || (gameOver))) || (quit))){
invader0.buttonMode = false;
invader1.buttonMode = false;
invader2.buttonMode = false;
invader3.buttonMode = false;
invader0.removeEventListener(MouseEvent.MOUSE_DOWN, onInvader0MouseDown);
invader1.removeEventListener(MouseEvent.MOUSE_DOWN, onInvader1MouseDown);
invader2.removeEventListener(MouseEvent.MOUSE_DOWN, onInvader2MouseDown);
invader3.removeEventListener(MouseEvent.MOUSE_DOWN, onInvader3MouseDown);
stage.removeEventListener(Event.ENTER_FRAME, mainGame);
stage.removeEventListener(Event.ENTER_FRAME, onLevel0);
stage.removeEventListener(Event.ENTER_FRAME, onLevel1);
stage.removeEventListener(Event.ENTER_FRAME, onLevel2);
stage.removeEventListener(Event.ENTER_FRAME, onLevel3);
stage.removeEventListener(Event.ENTER_FRAME, onLevel4);
stage.removeEventListener(Event.ENTER_FRAME, onLevel5);
stage.removeEventListener(Event.ENTER_FRAME, onLevel6);
stage.removeEventListener(Event.ENTER_FRAME, onLevel7);
stage.removeEventListener(Event.ENTER_FRAME, onLevel8);
stage.removeEventListener(Event.ENTER_FRAME, onLevel9);
stage.removeEventListener(Event.ENTER_FRAME, onLevel10);
stage.removeEventListener(Event.ENTER_FRAME, onLevel11);
stage.removeEventListener(Event.ENTER_FRAME, onLevel12);
stage.removeEventListener(Event.ENTER_FRAME, onLevel13);
stage.removeEventListener(Event.ENTER_FRAME, onLevel14);
stage.removeEventListener(Event.ENTER_FRAME, onLevel15);
stage.removeEventListener(Event.ENTER_FRAME, onLevel16);
stage.removeEventListener(Event.ENTER_FRAME, onLevel17);
stage.removeEventListener(Event.ENTER_FRAME, onLevel18);
stage.removeEventListener(Event.ENTER_FRAME, onLevel19);
stage.removeEventListener(Event.ENTER_FRAME, onLevel20);
stage.removeEventListener(Event.ENTER_FRAME, onLevel21);
stage.removeEventListener(Event.ENTER_FRAME, onLevel22);
stage.removeEventListener(Event.ENTER_FRAME, onLevel23);
stage.removeEventListener(Event.ENTER_FRAME, onLevel24);
stage.removeEventListener(Event.ENTER_FRAME, onLevel25);
};
};
}
public function onThemeComplete(_arg1:Event):void{
invC = 0;
while (invC < 4) {
if (this[("invader" + invC)].currentFrame == 1){
this[("invader" + invC)].play();
};
invC++;
};
whoops.play();
gameOver = true;
fg.fail.fail.infoText.text = "Out of Time!";
}
public function onInvader0MouseDown(_arg1:MouseEvent):void{
if (!invadersShot[0]){
invadersShot[0] = true;
zap.play();
invader0.play();
shaking = true;
emitter.x = mouseX;
emitter.y = mouseY;
emitter.start();
shakeCount = 10;
score = (score + invaderScore);
};
}
public function onInvader1MouseDown(_arg1:MouseEvent):void{
if (!invadersShot[1]){
invadersShot[1] = true;
zap.play();
invader1.play();
shaking = true;
emitter.x = mouseX;
emitter.y = mouseY;
emitter.start();
shakeCount = 10;
score = (score + invaderScore);
};
}
public function onInvader2MouseDown(_arg1:MouseEvent):void{
if (!invadersShot[2]){
invadersShot[2] = true;
zap.play();
invader2.play();
shaking = true;
emitter.x = mouseX;
emitter.y = mouseY;
emitter.start();
shakeCount = 10;
score = (score + invaderScore);
};
}
public function onInvader3MouseDown(_arg1:MouseEvent):void{
if (!invadersShot[3]){
invadersShot[3] = true;
zap.play();
invader3.play();
shaking = true;
emitter.x = mouseX;
emitter.y = mouseY;
emitter.start();
shakeCount = 10;
score = (score + invaderScore);
};
}
public function onLevel0(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[0])))) && (!(quit)))){
level0.window0.buttonMode = true;
level0.window1.buttonMode = true;
level0.window2.buttonMode = true;
level0.window3.buttonMode = true;
level0.window4.buttonMode = true;
level0.window5.buttonMode = true;
level0.window0.addEventListener(MouseEvent.MOUSE_DOWN, onlevel0window0mouseClick);
level0.window1.addEventListener(MouseEvent.MOUSE_DOWN, onlevel0window1mouseClick);
level0.window2.addEventListener(MouseEvent.MOUSE_DOWN, onlevel0window2mouseClick);
level0.window3.addEventListener(MouseEvent.MOUSE_DOWN, onlevel0window3mouseClick);
level0.window4.addEventListener(MouseEvent.MOUSE_DOWN, onlevel0window4mouseClick);
level0.window5.addEventListener(MouseEvent.MOUSE_DOWN, onlevel0window5mouseClick);
if (level0.windowPattern.currentFrame == 1){
if ((((((((((((level0.window0.currentFrame == 2)) && ((level0.window1.currentFrame == 1)))) && ((level0.window2.currentFrame == 1)))) && ((level0.window3.currentFrame == 2)))) && ((level0.window4.currentFrame == 2)))) && ((level0.window5.currentFrame == 1)))){
levelPassed[0] = true;
score = (score + levelScore);
};
};
if (level0.windowPattern.currentFrame == 2){
if ((((((((((((level0.window0.currentFrame == 1)) && ((level0.window1.currentFrame == 2)))) && ((level0.window2.currentFrame == 2)))) && ((level0.window3.currentFrame == 1)))) && ((level0.window4.currentFrame == 1)))) && ((level0.window5.currentFrame == 2)))){
levelPassed[0] = true;
score = (score + levelScore);
};
};
} else {
level0.window0.buttonMode = false;
level0.window1.buttonMode = false;
level0.window2.buttonMode = false;
level0.window3.buttonMode = false;
level0.window4.buttonMode = false;
level0.window5.buttonMode = false;
level0.window0.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel0window0mouseClick);
level0.window1.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel0window1mouseClick);
level0.window2.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel0window2mouseClick);
level0.window3.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel0window3mouseClick);
level0.window4.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel0window4mouseClick);
level0.window5.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel0window5mouseClick);
};
}
public function onlevel0window0mouseClick(_arg1:MouseEvent):void{
blip.play();
level0.window0.play();
}
public function onlevel0window1mouseClick(_arg1:MouseEvent):void{
blip.play();
level0.window1.play();
}
public function onlevel0window2mouseClick(_arg1:MouseEvent):void{
blip.play();
level0.window2.play();
}
public function onlevel0window3mouseClick(_arg1:MouseEvent):void{
blip.play();
level0.window3.play();
}
public function onlevel0window4mouseClick(_arg1:MouseEvent):void{
blip.play();
level0.window4.play();
}
public function onlevel0window5mouseClick(_arg1:MouseEvent):void{
blip.play();
level0.window5.play();
}
public function onLevel1(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[1])))) && (!(quit)))){
level1.buttonMode = true;
level1.addEventListener(MouseEvent.MOUSE_DOWN, onlevel1mouseClick);
if (level1carStarted){
if (level1dir == 1){
level1.car.x = (level1.car.x - 2);
};
if (level1dir == 2){
level1.car.y = (level1.car.y - 2);
};
if (level1dir == 3){
level1.car.x = (level1.car.x + 2);
};
if (level1dir == 4){
level1.car.y = (level1.car.y + 2);
};
};
l1 = 0;
while (l1 < 5) {
if (this.level1[("hitmap" + l1)].hitTestObject(level1.car)){
if (!level1carCrashed){
bass.play();
level1carCrashed = true;
level1carStarted = false;
};
};
l1++;
};
if (level1.startLine.hitTestObject(level1.car)){
level1carStarted = false;
levelPassed[1] = true;
score = (score + levelScore);
};
if (level1carCrashed){
if (level1.car.alpha > 0){
level1.car.alpha = (level1.car.alpha - 0.05);
level1.car.scaleX = (level1.car.scaleX - 0.05);
level1.car.scaleY = (level1.car.scaleY - 0.05);
level1.car.rotation = (level1.car.rotation + 20);
} else {
level1dir = 0;
level1carStarted = false;
level1carCrashed = false;
level1.car.x = (level1.startLine.x - 20);
level1.car.y = level1.startLine.y;
level1.car.scaleX = 1;
level1.car.scaleY = 1;
level1.car.rotation = 0;
level1.car.alpha = 1;
};
};
} else {
level1.buttonMode = false;
level1.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel1mouseClick);
};
}
public function onlevel1mouseClick(_arg1:MouseEvent):void{
if (!level1carCrashed){
if (!level1carStarted){
carStart.play();
level1carStarted = true;
} else {
level1.car.rotation = (level1.car.rotation + 90);
};
if (level1dir < 4){
level1dir++;
} else {
level1dir = 1;
};
};
}
public function onLevel2(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[2])))) && (!(quit)))){
level2.buttonMode = true;
level2.addEventListener(MouseEvent.MOUSE_DOWN, onlevel2mouseClick);
l2 = 0;
while (l2 < 5) {
if (level2[("starSmall" + l2)].x > (level2.bg.x - (level2.bg.width / 2))){
level2[("starSmall" + l2)].x--;
} else {
level2[("starSmall" + l2)].x = (level2.bg.x + (level2.bg.width / 2));
};
if (level2[("starBig" + l2)].x > (level2.bg.x - (level2.bg.width / 2))){
level2[("starBig" + l2)].x = (level2[("starBig" + l2)].x - 2);
} else {
level2[("starBig" + l2)].x = (level2.bg.x + (level2.bg.width / 2));
};
l2++;
};
if (level2shipDown){
if (level2shipCounter > 0){
level2.ship.y++;
level2shipCounter--;
} else {
level2shipDown = false;
level2shipUp = true;
level2shipCounter = 60;
};
};
if (level2shipUp){
if (level2shipCounter > 0){
level2.ship.y--;
level2shipCounter--;
} else {
level2shipDown = true;
level2shipUp = false;
level2shipCounter = 60;
};
};
if (!level2firing){
level2.shipLaser.x = level2.ship.x;
level2.shipLaser.y = level2.ship.y;
level2.shipLaser.visible = false;
} else {
if (!level2.shipLaser.visible){
laser.play();
level2.shipLaser.visible = true;
};
if ((level2.shipLaser.x + (level2.shipLaser.width / 2)) < (level2.bg.x + (level2.bg.width / 2))){
level2.shipLaser.x = (level2.shipLaser.x + 5);
} else {
level2firing = false;
};
};
l2b = 0;
while (l2b < 3) {
if (level2.shipLaser.hitTestObject(level2[("enemy" + l2b)])){
if (!level2enemyShot[l2b]){
explosion.play();
level2enemyShot[l2b] = true;
level2enemiesDown++;
};
};
if (level2enemyShot[l2b]){
if (level2[("enemy" + l2b)].alpha > 0){
level2[("enemy" + l2b)].alpha = (level2[("enemy" + l2b)].alpha - 0.05);
level2[("enemy" + l2b)].scaleX = (level2[("enemy" + l2b)].scaleX - 0.05);
level2[("enemy" + l2b)].scaleY = (level2[("enemy" + l2b)].scaleY - 0.05);
level2[("enemy" + l2b)].rotation = (level2[("enemy" + l2b)].rotation + 20);
} else {
level2[("enemy" + l2b)].visible = false;
};
};
l2b++;
};
if (level2enemiesDown == 3){
levelPassed[2] = true;
score = (score + levelScore);
};
} else {
level2.buttonMode = false;
level2.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel2mouseClick);
};
}
public function onlevel2mouseClick(_arg1:MouseEvent):void{
level2firing = true;
}
public function onLevel3(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[3])))) && (!(quit)))){
level3.balloon0.hitmap.buttonMode = true;
level3.balloon1.hitmap.buttonMode = true;
level3.balloon2.hitmap.buttonMode = true;
level3.balloon3.hitmap.buttonMode = true;
level3.balloon4.hitmap.buttonMode = true;
level3.balloon0.hitmap.addEventListener(MouseEvent.MOUSE_OVER, onBalloon0MouseOver);
level3.balloon1.hitmap.addEventListener(MouseEvent.MOUSE_OVER, onBalloon1MouseOver);
level3.balloon2.hitmap.addEventListener(MouseEvent.MOUSE_OVER, onBalloon2MouseOver);
level3.balloon3.hitmap.addEventListener(MouseEvent.MOUSE_OVER, onBalloon3MouseOver);
level3.balloon4.hitmap.addEventListener(MouseEvent.MOUSE_OVER, onBalloon4MouseOver);
if (level3balloonsPopped == 5){
levelPassed[3] = true;
score = (score + levelScore);
};
} else {
level3.balloon0.hitmap.buttonMode = false;
level3.balloon1.hitmap.buttonMode = false;
level3.balloon2.hitmap.buttonMode = false;
level3.balloon3.hitmap.buttonMode = false;
level3.balloon4.hitmap.buttonMode = false;
level3.balloon0.hitmap.removeEventListener(MouseEvent.MOUSE_OVER, onBalloon0MouseOver);
level3.balloon1.hitmap.removeEventListener(MouseEvent.MOUSE_OVER, onBalloon1MouseOver);
level3.balloon2.hitmap.removeEventListener(MouseEvent.MOUSE_OVER, onBalloon2MouseOver);
level3.balloon3.hitmap.removeEventListener(MouseEvent.MOUSE_OVER, onBalloon3MouseOver);
level3.balloon4.hitmap.removeEventListener(MouseEvent.MOUSE_OVER, onBalloon4MouseOver);
};
}
public function onBalloon0MouseOver(_arg1:MouseEvent):void{
if (level3.balloon0.currentFrame == 1){
pop.play();
level3.balloon0.play();
level3balloonsPopped++;
};
}
public function onBalloon1MouseOver(_arg1:MouseEvent):void{
if (level3.balloon1.currentFrame == 1){
pop.play();
level3.balloon1.play();
level3balloonsPopped++;
};
}
public function onBalloon2MouseOver(_arg1:MouseEvent):void{
if (level3.balloon2.currentFrame == 1){
pop.play();
level3.balloon2.play();
level3balloonsPopped++;
};
}
public function onBalloon3MouseOver(_arg1:MouseEvent):void{
if (level3.balloon3.currentFrame == 1){
pop.play();
level3.balloon3.play();
level3balloonsPopped++;
};
}
public function onBalloon4MouseOver(_arg1:MouseEvent):void{
if (level3.balloon4.currentFrame == 1){
pop.play();
level3.balloon4.play();
level3balloonsPopped++;
};
}
public function onLevel4(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[4])))) && (!(quit)))){
level4.cloud.buttonMode = true;
level4.cloud.addEventListener(MouseEvent.MOUSE_DOWN, onCloudDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, onCloudDrop);
if (!level4.sun.hitTestObject(level4.cloud.hitpoint)){
if (level4.sun.currentFrame == 1){
success.play();
level4.sun.play();
level4.cloud.play();
};
};
if (level4.sun.currentFrame == level4.sun.totalFrames){
levelPassed[4] = true;
score = (score + levelScore);
};
} else {
level4.cloud.buttonMode = false;
level4.cloud.removeEventListener(MouseEvent.MOUSE_DOWN, onCloudDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onCloudDrop);
};
}
public function onCloudDrag(_arg1:MouseEvent):void{
if (level4.sun.currentFrame == 1){
level4.cloud.startDrag(false, l4BoundArea);
level4.cloud.alpha = 50;
level4draggingCloud = true;
};
}
public function onCloudDrop(_arg1:MouseEvent):void{
level4.cloud.stopDrag();
level4draggingCloud = false;
}
public function onLevel5(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[5])))) && (!(quit)))){
level5.truck.buttonMode = true;
level5.truck.addEventListener(MouseEvent.MOUSE_DOWN, onTruckDown);
if (level5.warehouse.hitTestPoint(level5.truck.localToGlobal(level5truckPoint).x, level5.truck.localToGlobal(level5truckPoint).y, true)){
levelPassed[5] = true;
score = (score + levelScore);
};
} else {
level5.truck.buttonMode = false;
level5.truck.removeEventListener(MouseEvent.MOUSE_DOWN, onTruckDown);
};
}
public function onTruckDown(_arg1:MouseEvent):void{
blip.play();
level5.truck.x = (level5.truck.x + 10);
}
public function onLevel6(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[6])))) && (!(quit)))){
level6.monster.eye0.buttonMode = true;
level6.monster.eye1.buttonMode = true;
level6.monster.eye2.buttonMode = true;
level6.monster.eye0.addEventListener(MouseEvent.MOUSE_DOWN, onLevel6eye0Down);
level6.monster.eye1.addEventListener(MouseEvent.MOUSE_DOWN, onLevel6eye1Down);
level6.monster.eye2.addEventListener(MouseEvent.MOUSE_DOWN, onLevel6eye2Down);
if ((((((level6.monster.eye0.currentFrame == 4)) && ((level6.monster.eye1.currentFrame == 4)))) && ((level6.monster.eye2.currentFrame == 4)))){
levelPassed[6] = true;
score = (score + levelScore);
};
} else {
level6.monster.eye0.buttonMode = false;
level6.monster.eye1.buttonMode = false;
level6.monster.eye2.buttonMode = false;
level6.monster.eye0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel6eye0Down);
level6.monster.eye1.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel6eye1Down);
level6.monster.eye2.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel6eye2Down);
};
}
public function onLevel6eye0Down(_arg1:MouseEvent):void{
blip.play();
level6.monster.eye2.play();
}
public function onLevel6eye1Down(_arg1:MouseEvent):void{
blip.play();
level6.monster.eye0.play();
level6.monster.eye1.play();
}
public function onLevel6eye2Down(_arg1:MouseEvent):void{
blip.play();
level6.monster.eye0.play();
}
public function onLevel7(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[7])))) && (!(quit)))){
level7.answer0.buttonMode = true;
level7.answer1.buttonMode = true;
level7.answer2.buttonMode = true;
level7.answer0.addEventListener(MouseEvent.MOUSE_DOWN, onLevel7answer0Down);
level7.answer0.addEventListener(MouseEvent.ROLL_OVER, onLevel7answer0RollOver);
level7.answer0.addEventListener(MouseEvent.ROLL_OUT, onLevel7answer0RollOut);
level7.answer1.addEventListener(MouseEvent.MOUSE_DOWN, onLevel7answer1Down);
level7.answer1.addEventListener(MouseEvent.ROLL_OVER, onLevel7answer1RollOver);
level7.answer1.addEventListener(MouseEvent.ROLL_OUT, onLevel7answer1RollOut);
level7.answer2.addEventListener(MouseEvent.MOUSE_DOWN, onLevel7answer2Down);
level7.answer2.addEventListener(MouseEvent.ROLL_OVER, onLevel7answer2RollOver);
level7.answer2.addEventListener(MouseEvent.ROLL_OUT, onLevel7answer2RollOut);
if (level7penaltyCountdown > 0){
level7penaltyCountdown--;
level7.penalty.visible = true;
} else {
level7penaltyCountdown = 0;
level7.penalty.visible = false;
};
} else {
level7.answer0.buttonMode = false;
level7.answer1.buttonMode = false;
level7.answer2.buttonMode = false;
level7.answer0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel7answer0Down);
level7.answer0.removeEventListener(MouseEvent.ROLL_OVER, onLevel7answer0RollOver);
level7.answer0.removeEventListener(MouseEvent.ROLL_OUT, onLevel7answer0RollOut);
level7.answer1.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel7answer1Down);
level7.answer1.removeEventListener(MouseEvent.ROLL_OVER, onLevel7answer1RollOver);
level7.answer1.removeEventListener(MouseEvent.ROLL_OUT, onLevel7answer1RollOut);
level7.answer2.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel7answer2Down);
level7.answer2.removeEventListener(MouseEvent.ROLL_OVER, onLevel7answer2RollOver);
level7.answer2.removeEventListener(MouseEvent.ROLL_OUT, onLevel7answer2RollOut);
};
}
public function onLevel7answer0Down(_arg1:MouseEvent):void{
if (level7.situations.currentFrame == 1){
levelPassed[7] = true;
score = (score + levelScore);
} else {
bass.play();
level7.penalty.visible = true;
level7penaltyCountdown = 60;
};
}
public function onLevel7answer0RollOver(_arg1:MouseEvent){
level7.answer0.gotoAndStop(2);
}
public function onLevel7answer0RollOut(_arg1:MouseEvent){
level7.answer0.gotoAndStop(1);
}
public function onLevel7answer1Down(_arg1:MouseEvent):void{
if (level7.situations.currentFrame == 2){
levelPassed[7] = true;
score = (score + levelScore);
} else {
bass.play();
level7.penalty.visible = true;
level7penaltyCountdown = 60;
};
}
public function onLevel7answer1RollOver(_arg1:MouseEvent){
level7.answer1.gotoAndStop(2);
}
public function onLevel7answer1RollOut(_arg1:MouseEvent){
level7.answer1.gotoAndStop(1);
}
public function onLevel7answer2Down(_arg1:MouseEvent):void{
if (level7.situations.currentFrame == 3){
levelPassed[7] = true;
score = (score + levelScore);
} else {
bass.play();
level7.penalty.visible = true;
level7penaltyCountdown = 60;
};
}
public function onLevel7answer2RollOver(_arg1:MouseEvent){
level7.answer2.gotoAndStop(2);
}
public function onLevel7answer2RollOut(_arg1:MouseEvent){
level7.answer2.gotoAndStop(1);
}
public function onLevel8(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[8])))) && (!(quit)))){
level8.buttonMode = true;
level8.addEventListener(MouseEvent.MOUSE_DOWN, onLevel8down);
if (level8.apple.currentFrame == level8.apple.totalFrames){
levelPassed[8] = true;
score = (score + levelScore);
};
} else {
level8.buttonMode = false;
level8.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel8down);
};
}
public function onLevel8down(_arg1:MouseEvent):void{
if (level8.apple.currentFrame < level8.apple.totalFrames){
crunch.play();
level8.apple.play();
};
}
public function onLevel9(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[9])))) && (!(quit)))){
level9.pig.buttonMode = true;
level9.cat.buttonMode = true;
level9.dog.buttonMode = true;
level9.pig.addEventListener(MouseEvent.MOUSE_DOWN, onlevel9pigDown);
level9.cat.addEventListener(MouseEvent.MOUSE_DOWN, onlevel9catDown);
level9.dog.addEventListener(MouseEvent.MOUSE_DOWN, onlevel9dogDown);
if (level9PenaltyCountdown > 0){
level9PenaltyCountdown--;
level9.penalty.visible = true;
} else {
level9PenaltyCountdown = 0;
level9.penalty.visible = false;
};
if (level9.pig.currentFrame == level9.pig.totalFrames){
if (level9.soundActions.currentFrame == 1){
levelPassed[9] = true;
score = (score + levelScore);
} else {
bass.play();
level9.penalty.visible = true;
level9PenaltyCountdown = 60;
};
};
if (level9.cat.currentFrame == level9.cat.totalFrames){
if (level9.soundActions.currentFrame == 2){
levelPassed[9] = true;
score = (score + levelScore);
} else {
bass.play();
level9.penalty.visible = true;
level9PenaltyCountdown = 60;
};
};
if (level9.dog.currentFrame == level9.dog.totalFrames){
if (level9.soundActions.currentFrame == 3){
levelPassed[9] = true;
score = (score + levelScore);
} else {
bass.play();
level9.penalty.visible = true;
level9PenaltyCountdown = 60;
};
};
} else {
level9.pig.buttonMode = false;
level9.cat.buttonMode = false;
level9.dog.buttonMode = false;
level9.pig.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel9pigDown);
level9.cat.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel9catDown);
level9.dog.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel9dogDown);
};
}
public function onlevel9pigDown(_arg1:MouseEvent):void{
if (level9.pig.currentFrame == 1){
squeal.play();
level9.pig.play();
};
}
public function onlevel9catDown(_arg1:MouseEvent):void{
if (level9.cat.currentFrame == 1){
meaw.play();
level9.cat.play();
};
}
public function onlevel9dogDown(_arg1:MouseEvent):void{
if (level9.dog.currentFrame == 1){
bark.play();
level9.dog.play();
};
}
public function onLevel10(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[10])))) && (!(quit)))){
level10.ufo.buttonMode = true;
level10.ufo.addEventListener(MouseEvent.MOUSE_DOWN, onlevel10ufoDown);
stage.addEventListener(MouseEvent.MOUSE_UP, onlevel10ufoUp);
if (level10.ufo.ship.hitTestObject(level10.cow)){
level10abducted = true;
};
if (!level10abducted){
if (level10beaming){
level10.ufo.beam.visible = true;
if (level10.ufo.beam.hitTestObject(level10.cow)){
level10.cow.y = (level10.cow.y - 1);
};
} else {
if (level10.cow.y < ((level10.bg.y + (level10.bg.height / 2)) - 20)){
level10.cow.y = (level10.cow.y + level10cowGravity);
level10cowGravity = (level10cowGravity * 1.2);
} else {
level10.cow.y = ((level10.bg.y + (level10.bg.height / 2)) - 20);
level10cowGravity = 2;
};
level10.ufo.beam.visible = false;
};
} else {
if (level10.cow.alpha > 0){
level10.cow.alpha = (level10.cow.alpha - 0.05);
level10.cow.scaleX = (level10.cow.scaleX - 0.05);
level10.cow.scaleY = (level10.cow.scaleY - 0.05);
level10.cow.rotation = (level10.cow.rotation + 20);
} else {
level10.cow.visible = false;
levelPassed[10] = true;
score = (score + levelScore);
};
};
} else {
level10.ufo.buttonMode = false;
level10.ufo.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel10ufoDown);
};
}
public function onlevel10ufoDown(_arg1:MouseEvent):void{
abduct.play();
level10beaming = true;
}
public function onlevel10ufoUp(_arg1:MouseEvent):void{
level10beaming = false;
}
public function onLevel11(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[11])))) && (!(quit)))){
level11.buttonMode = true;
level11.addEventListener(MouseEvent.MOUSE_DOWN, onlevel11ninjaDown);
if (level11running){
level11.ninja.x = (level11.ninja.x + 2);
if (level11.ninja.currentFrame == 1){
level11.ninja.play();
};
};
if (level11jumping){
level11.ninja.gotoAndStop(3);
if (level11jump > 1){
level11.ninja.y = (level11.ninja.y - level11jump);
level11jump = (level11jump * 0.8);
} else {
level11jump = 0;
if (level11.ninja.y < level11ninjaY){
level11.ninja.y = (level11.ninja.y + level11ninjaGravity);
level11ninjaGravity = (level11ninjaGravity * 1.2);
} else {
level11jumping = false;
level11.ninja.y = level11ninjaY;
level11ninjaGravity = 2;
};
};
};
if (level11.hole.hitTestPoint(level11.ninja.localToGlobal(level11ninjaPoint).x, (level11.ninja.localToGlobal(level11ninjaPoint).y + (level11.ninja.height / 2)))){
level11running = false;
level11jumping = false;
level11spiked = true;
};
if (level11spiked){
if (level11.ninja.alpha > 0){
level11.ninja.alpha = (level11.ninja.alpha - 0.05);
level11.ninja.scaleX = (level11.ninja.scaleX - 0.05);
level11.ninja.scaleY = (level11.ninja.scaleY - 0.05);
level11.ninja.rotation = (level11.ninja.rotation + 20);
} else {
level11.ninja.x = level11ninjaX;
level11.ninja.y = level11ninjaY;
level11.ninja.alpha = 1;
level11.ninja.scaleX = 1;
level11.ninja.scaleY = 1;
level11.ninja.rotation = 0;
level11.ninja.gotoAndStop(1);
level11spiked = false;
};
};
if (level11.ninja.x > level11.hole.x){
if (!level11jumping){
level11.ninja.gotoAndStop(1);
levelPassed[11] = true;
score = (score + levelScore);
};
};
} else {
level11.buttonMode = false;
level11.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel11ninjaDown);
};
}
public function onlevel11ninjaDown(_arg1:MouseEvent):void{
if (!level11running){
run.play();
level11running = true;
} else {
if (!level11jumping){
jump.play();
if (level11.ninja.x < level11.hole.x){
level11jumping = true;
level11jump = 7;
};
};
};
}
public function onLevel12(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[12])))) && (!(quit)))){
level12.buttonMode = true;
level12.addEventListener(MouseEvent.MOUSE_DOWN, onlevel12down);
if (level12plumberRunning){
level12.plumber.x = (level12.plumber.x + level12plumberSpeed);
if (level12.plumber.currentFrame == 1){
level12.plumber.play();
};
};
if (level12plumberJumping){
level12.plumber.gotoAndStop(3);
if (level12plumberJump > 1){
level12.plumber.y = (level12.plumber.y - level12plumberJump);
level12plumberJump = (level12plumberJump * 0.8);
} else {
level12plumberJump = 0;
if (level12.plumber.y < level12plumberY){
level12.plumber.y = (level12.plumber.y + level12plumberGravity);
level12plumberGravity = (level12plumberGravity * 1.2);
} else {
level12plumberJumping = false;
level12.plumber.gotoAndStop(1);
level12.plumber.y = level12plumberY;
level12plumberGravity = 2;
};
};
};
if ((level12.plumber.x + (level12.plumber.width / 2)) > (level12.bg.x + (level12.bg.width / 2))){
level12plumberSpeed = (level12plumberSpeed * -1);
level12.plumber.scaleX = (level12.plumber.scaleX * -1);
};
if ((level12.plumber.x - (level12.plumber.width / 2)) < (level12.bg.x - (level12.bg.width / 2))){
level12plumberSpeed = (level12plumberSpeed * -1);
level12.plumber.scaleX = (level12.plumber.scaleX * -1);
};
l12 = 0;
while (l12 < level12coins) {
if (level12.plumber.hitTestObject(this.level12[("coin" + l12)])){
level12coinCollected[l12] = true;
};
if (level12coinCollected[l12]){
if (this.level12[("coin" + l12)].alpha > 0){
this.level12[("coin" + l12)].alpha = (this.level12[("coin" + l12)].alpha - 0.05);
this.level12[("coin" + l12)].scaleX = (this.level12[("coin" + l12)].scaleX - 0.05);
this.level12[("coin" + l12)].scaleY = (this.level12[("coin" + l12)].scaleY - 0.05);
this.level12[("coin" + l12)].rotation = (this.level12[("coin" + l12)].rotation + 20);
} else {
this.level12[("coin" + l12)].visible = false;
};
};
l12++;
};
if (((((((((level12coinCollected[0]) && (level12coinCollected[1]))) && (level12coinCollected[2]))) && (level12coinCollected[3]))) && (level12coinCollected[4]))){
levelPassed[12] = true;
score = (score + levelScore);
};
} else {
level12.buttonMode = false;
level12.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel12down);
};
}
public function onlevel12down(_arg1:MouseEvent):void{
if (!level12plumberRunning){
level12plumberRunning = true;
} else {
if (!level12plumberJumping){
jump.play();
level12plumberJumping = true;
level12plumberJump = 5;
};
};
}
public function onLevel13(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[13])))) && (!(quit)))){
level13.shuriken0.buttonMode = true;
level13.shuriken1.buttonMode = true;
level13.shuriken2.buttonMode = true;
level13.shuriken0.addEventListener(MouseEvent.MOUSE_DOWN, onlevel13shuriken0Drag);
stage.addEventListener(MouseEvent.MOUSE_UP, onlevel13shuriken0Drop);
level13.shuriken1.addEventListener(MouseEvent.MOUSE_DOWN, onlevel13shuriken1Drag);
stage.addEventListener(MouseEvent.MOUSE_UP, onlevel13shuriken1Drop);
level13.shuriken2.addEventListener(MouseEvent.MOUSE_DOWN, onlevel13shuriken2Drag);
stage.addEventListener(MouseEvent.MOUSE_UP, onlevel13shuriken2Drop);
if (((((!(level13.shuriken0.visible)) && (!(level13.shuriken1.visible)))) && (!(level13.shuriken2.visible)))){
levelPassed[13] = true;
score = (score + levelScore);
};
} else {
level13.shuriken0.buttonMode = false;
level13.shuriken1.buttonMode = false;
level13.shuriken2.buttonMode = false;
level13.shuriken0.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel13shuriken0Drag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onlevel13shuriken0Drop);
level13.shuriken1.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel13shuriken1Drag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onlevel13shuriken1Drop);
level13.shuriken2.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel13shuriken2Drag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onlevel13shuriken2Drop);
};
}
public function onlevel13shuriken0Drag(_arg1:MouseEvent):void{
level13.shuriken0.startDrag(false, l13BoundArea);
}
public function onlevel13shuriken0Drop(_arg1:MouseEvent):void{
level13.shuriken0.stopDrag();
if (!level13.shuriken0.hitTestObject(level13.shurikenBox0)){
level13.shuriken0.x = level13.shuriken0Starter.x;
level13.shuriken0.y = level13.shuriken0Starter.y;
} else {
blip.play();
level13.shuriken0.visible = false;
};
}
public function onlevel13shuriken1Drag(_arg1:MouseEvent):void{
level13.shuriken1.startDrag(false, l13BoundArea);
}
public function onlevel13shuriken1Drop(_arg1:MouseEvent):void{
level13.shuriken1.stopDrag();
if (!level13.shuriken1.hitTestObject(level13.shurikenBox1)){
level13.shuriken1.x = level13.shuriken1Starter.x;
level13.shuriken1.y = level13.shuriken1Starter.y;
} else {
blip.play();
level13.shuriken1.visible = false;
};
}
public function onlevel13shuriken2Drag(_arg1:MouseEvent):void{
level13.shuriken2.startDrag(false, l13BoundArea);
}
public function onlevel13shuriken2Drop(_arg1:MouseEvent):void{
level13.shuriken2.stopDrag();
if (!level13.shuriken2.hitTestObject(level13.shurikenBox2)){
level13.shuriken2.x = level13.shuriken2Starter.x;
level13.shuriken2.y = level13.shuriken2Starter.y;
} else {
blip.play();
level13.shuriken2.visible = false;
};
}
public function onLevel14(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[14])))) && (!(quit)))){
level14.envelope0.buttonMode = true;
level14.envelope1.buttonMode = true;
level14.envelope2.buttonMode = true;
level14.envelope3.buttonMode = true;
level14.envelope4.buttonMode = true;
level14.envelope5.buttonMode = true;
level14.envelope0.addEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope0Down);
level14.envelope0.addEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope0Over);
level14.envelope0.addEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope0Out);
level14.envelope1.addEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope1Down);
level14.envelope1.addEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope1Over);
level14.envelope1.addEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope1Out);
level14.envelope2.addEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope2Down);
level14.envelope2.addEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope2Over);
level14.envelope2.addEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope2Out);
level14.envelope3.addEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope3Down);
level14.envelope3.addEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope3Over);
level14.envelope3.addEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope3Out);
level14.envelope4.addEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope4Down);
level14.envelope4.addEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope4Over);
level14.envelope4.addEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope4Out);
level14.envelope5.addEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope5Down);
level14.envelope5.addEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope5Over);
level14.envelope5.addEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope5Out);
if (level14penaltyCountdown > 0){
level14penaltyCountdown--;
level14.penalty.visible = true;
} else {
level14penaltyCountdown = 0;
level14.penalty.visible = false;
};
} else {
level14.envelope0.buttonMode = false;
level14.envelope1.buttonMode = false;
level14.envelope2.buttonMode = false;
level14.envelope3.buttonMode = false;
level14.envelope4.buttonMode = false;
level14.envelope5.buttonMode = false;
level14.envelope0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope0Down);
level14.envelope0.removeEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope0Over);
level14.envelope0.removeEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope0Out);
level14.envelope1.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope1Down);
level14.envelope1.removeEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope1Over);
level14.envelope1.removeEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope1Out);
level14.envelope2.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope2Down);
level14.envelope2.removeEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope2Over);
level14.envelope2.removeEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope2Out);
level14.envelope3.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope3Down);
level14.envelope3.removeEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope3Over);
level14.envelope3.removeEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope3Out);
level14.envelope4.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope4Down);
level14.envelope4.removeEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope4Over);
level14.envelope4.removeEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope4Out);
level14.envelope5.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel14envelope5Down);
level14.envelope5.removeEventListener(MouseEvent.MOUSE_OVER, onLevel14envelope5Over);
level14.envelope5.removeEventListener(MouseEvent.MOUSE_OUT, onLevel14envelope5Out);
};
}
public function onLevel14envelope0Down(_arg1:MouseEvent):void{
if (level14.envelope0.currentFrame == 2){
levelPassed[14] = true;
score = (score + levelScore);
} else {
bass.play();
level14.penalty.visible = true;
level14penaltyCountdown = 60;
};
}
public function onLevel14envelope0Over(_arg1:MouseEvent):void{
level14.envelope0.alpha = 0.5;
}
public function onLevel14envelope0Out(_arg1:MouseEvent):void{
level14.envelope0.alpha = 1;
}
public function onLevel14envelope1Down(_arg1:MouseEvent):void{
if (level14.envelope1.currentFrame == 2){
levelPassed[14] = true;
score = (score + levelScore);
} else {
bass.play();
level14.penalty.visible = true;
level14penaltyCountdown = 60;
};
}
public function onLevel14envelope1Over(_arg1:MouseEvent):void{
level14.envelope1.alpha = 0.5;
}
public function onLevel14envelope1Out(_arg1:MouseEvent):void{
level14.envelope1.alpha = 1;
}
public function onLevel14envelope2Down(_arg1:MouseEvent):void{
if (level14.envelope2.currentFrame == 2){
levelPassed[14] = true;
score = (score + levelScore);
} else {
bass.play();
level14.penalty.visible = true;
level14penaltyCountdown = 60;
};
}
public function onLevel14envelope2Over(_arg1:MouseEvent):void{
level14.envelope2.alpha = 0.5;
}
public function onLevel14envelope2Out(_arg1:MouseEvent):void{
level14.envelope2.alpha = 1;
}
public function onLevel14envelope3Down(_arg1:MouseEvent):void{
if (level14.envelope3.currentFrame == 2){
levelPassed[14] = true;
score = (score + levelScore);
} else {
bass.play();
level14.penalty.visible = true;
level14penaltyCountdown = 60;
};
}
public function onLevel14envelope3Over(_arg1:MouseEvent):void{
level14.envelope3.alpha = 0.5;
}
public function onLevel14envelope3Out(_arg1:MouseEvent):void{
level14.envelope3.alpha = 1;
}
public function onLevel14envelope4Down(_arg1:MouseEvent):void{
if (level14.envelope4.currentFrame == 2){
levelPassed[14] = true;
score = (score + levelScore);
} else {
bass.play();
level14.penalty.visible = true;
level14penaltyCountdown = 60;
};
}
public function onLevel14envelope4Over(_arg1:MouseEvent):void{
level14.envelope4.alpha = 0.5;
}
public function onLevel14envelope4Out(_arg1:MouseEvent):void{
level14.envelope4.alpha = 1;
}
public function onLevel14envelope5Down(_arg1:MouseEvent):void{
if (level14.envelope5.currentFrame == 2){
levelPassed[14] = true;
score = (score + levelScore);
} else {
bass.play();
level14.penalty.visible = true;
level14penaltyCountdown = 60;
};
}
public function onLevel14envelope5Over(_arg1:MouseEvent):void{
level14.envelope5.alpha = 0.5;
}
public function onLevel14envelope5Out(_arg1:MouseEvent):void{
level14.envelope5.alpha = 1;
}
public function onLevel15(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[15])))) && (!(quit)))){
level15.buttonMode = true;
level15.addEventListener(MouseEvent.MOUSE_DOWN, onLevel15mouseDown);
if ((level15.carGreen.x - (level15.carGreen.width / 2)) < (level15.bg.x + (level15.bg.width / 2))){
level15.carGreen.x = (level15.carGreen.x + 1);
} else {
level15.carGreen.x = ((level15.bg.x - (level15.bg.width / 2)) - (level15.carGreen.width / 2));
};
if ((level15.carRed.x - (level15.carRed.width / 2)) < (level15.bg.x + (level15.bg.width / 2))){
level15.carRed.x = (level15.carRed.x + 1);
} else {
level15.carRed.x = ((level15.bg.x - (level15.bg.width / 2)) - (level15.carRed.width / 2));
};
if ((level15.carYellow.x - (level15.carYellow.width / 2)) < (level15.bg.x + (level15.bg.width / 2))){
level15.carYellow.x = (level15.carYellow.x + 2);
} else {
level15.carYellow.x = ((level15.bg.x - (level15.bg.width / 2)) - (level15.carYellow.width / 2));
};
if (level15.carGreen.hitTestObject(level15.dudeBlond.hitpoint)){
bass.play();
level15.dudeBlond.y = ((level15.bg.y + (level15.bg.height / 2)) - 15);
};
if (level15.carRed.hitTestObject(level15.dudeBlond.hitpoint)){
bass.play();
level15.dudeBlond.y = ((level15.bg.y + (level15.bg.height / 2)) - 15);
};
if (level15.carYellow.hitTestObject(level15.dudeBlond.hitpoint)){
bass.play();
level15.dudeBlond.y = ((level15.bg.y + (level15.bg.height / 2)) - 15);
};
if (level15.dudeBlond.y < level15.carYellow.y){
levelPassed[15] = true;
score = (score + levelScore);
};
} else {
level15.buttonMode = false;
level15.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel15mouseDown);
};
}
public function onLevel15mouseDown(_arg1:MouseEvent):void{
level15.dudeBlond.y = (level15.dudeBlond.y - 10);
}
public function onLevel16(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[16])))) && (!(quit)))){
level16.buttonMode = true;
level16.addEventListener(MouseEvent.MOUSE_DOWN, onlevel16mouseDown);
if (level16carYellowMoving){
level16.carYellow.x = (level16.carYellow.x + 4);
};
if ((level16.carYellow.x - (level16.carYellow.width / 2)) > (level16.bg.x + (level16.bg.width / 2))){
level16carYellowMoving = false;
levelPassed[16] = true;
score = (score + levelScore);
};
} else {
level16.buttonMode = false;
level16.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel16mouseDown);
};
}
public function onlevel16mouseDown(_arg1:MouseEvent):void{
if (level16.trafficLight.currentFrame > 60){
level16.trafficLight.stop();
if (!level16carYellowMoving){
carStart.play();
level16carYellowMoving = true;
};
};
}
public function onLevel17(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[17])))) && (!(quit)))){
level17.ninja0.buttonMode = true;
level17.ninja1.buttonMode = true;
level17.ninja2.buttonMode = true;
level17.ninja0.addEventListener(MouseEvent.MOUSE_DOWN, onlevel17ninja0MouseDown);
level17.ninja1.addEventListener(MouseEvent.MOUSE_DOWN, onlevel17ninja0MouseDown);
level17.ninja2.addEventListener(MouseEvent.MOUSE_DOWN, onlevel17ninja0MouseDown);
this.level17[("ninja" + level17nextNinja)].play();
if (this.level17[("ninja" + level17nextNinja)].currentFrame == this.level17[("ninja" + level17nextNinja)].totalFrames){
level17nextNinja = Math.floor((Math.random() * ((1 + 2) - 1)));
};
} else {
level17.ninja0.buttonMode = false;
level17.ninja1.buttonMode = false;
level17.ninja2.buttonMode = false;
level17.ninja0.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel17ninja0MouseDown);
level17.ninja1.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel17ninja0MouseDown);
level17.ninja2.removeEventListener(MouseEvent.MOUSE_DOWN, onlevel17ninja0MouseDown);
};
}
public function onlevel17ninja0MouseDown(_arg1:MouseEvent):void{
levelPassed[17] = true;
score = (score + levelScore);
}
public function onlevel17ninja1MouseDown(_arg1:MouseEvent):void{
levelPassed[17] = true;
score = (score + levelScore);
}
public function onlevel17ninja2MouseDown(_arg1:MouseEvent):void{
levelPassed[17] = true;
score = (score + levelScore);
}
public function onLevel18(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[18])))) && (!(quit)))){
level18.buttonMode = true;
level18.addEventListener(MouseEvent.MOUSE_DOWN, onLevel18MouseDown);
if (level18boulderStarted){
if (level18boulderDir == 1){
if ((level18.boulder.x - (level18.boulder.width / 2)) > (level18.bg.x - (level18.bg.width / 2))){
level18.boulder.x = (level18.boulder.x - level18boulderSpeed);
} else {
level18boulderDir = 3;
};
};
if (level18boulderDir == 2){
if ((level18.boulder.y - (level18.boulder.height / 2)) > (level18.bg.y - (level18.bg.height / 2))){
level18.boulder.y = (level18.boulder.y - level18boulderSpeed);
} else {
level18boulderDir = 4;
};
};
if (level18boulderDir == 3){
if ((level18.boulder.x + (level18.boulder.width / 2)) < (level18.bg.x + (level18.bg.width / 2))){
level18.boulder.x = (level18.boulder.x + level18boulderSpeed);
} else {
level18boulderDir = 1;
};
};
if (level18boulderDir == 4){
if ((level18.boulder.y + (level18.boulder.height / 2)) < (level18.bg.y + (level18.bg.height / 2))){
level18.boulder.y = (level18.boulder.y + level18boulderSpeed);
} else {
level18boulderDir = 2;
};
};
};
l18 = 0;
while (l18 < level18adventurers) {
if (level18.boulder.hitTestObject(this.level18[("adventurer" + l18)])){
if (!level18adventurersSquashed[l18]){
squash.play();
level18adventurersSquashed[l18] = true;
};
};
if (level18adventurersSquashed[l18]){
if (this.level18[("adventurer" + l18)].alpha > 0){
this.level18[("adventurer" + l18)].alpha = (this.level18[("adventurer" + l18)].alpha - 0.05);
this.level18[("adventurer" + l18)].scaleX = (this.level18[("adventurer" + l18)].scaleX - 0.05);
this.level18[("adventurer" + l18)].scaleY = (this.level18[("adventurer" + l18)].scaleY - 0.05);
this.level18[("adventurer" + l18)].rotation = (this.level18[("adventurer" + l18)].rotation + 20);
} else {
this.level18[("adventurer" + l18)].visible = false;
};
};
l18++;
};
if (((((((((level18adventurersSquashed[0]) && (level18adventurersSquashed[1]))) && (level18adventurersSquashed[2]))) && (level18adventurersSquashed[3]))) && (level18adventurersSquashed[4]))){
levelPassed[18] = true;
score = (score + levelScore);
};
} else {
level18.buttonMode = false;
level18.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel18MouseDown);
};
}
public function onLevel18MouseDown(_arg1:MouseEvent):void{
level18boulderStarted = true;
if (level18boulderDir < 4){
level18boulderDir++;
} else {
level18boulderDir = 1;
};
}
public function onLevel19(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[19])))) && (!(quit)))){
level19.apple0.buttonMode = true;
level19.apple1.buttonMode = true;
level19.apple2.buttonMode = true;
level19.apple3.buttonMode = true;
level19.apple4.buttonMode = true;
level19.apple5.buttonMode = true;
level19.apple0.addEventListener(MouseEvent.MOUSE_DOWN, onApple0mouseDown);
level19.apple1.addEventListener(MouseEvent.MOUSE_DOWN, onApple1mouseDown);
level19.apple2.addEventListener(MouseEvent.MOUSE_DOWN, onApple2mouseDown);
level19.apple3.addEventListener(MouseEvent.MOUSE_DOWN, onApple3mouseDown);
level19.apple4.addEventListener(MouseEvent.MOUSE_DOWN, onApple4mouseDown);
level19.apple5.addEventListener(MouseEvent.MOUSE_DOWN, onApple5mouseDown);
l19 = 0;
while (l19 < level19apples) {
if (level19applesPicked[l19]){
if (this.level19[("apple" + l19)].alpha > 0){
this.level19[("apple" + l19)].alpha = (this.level19[("apple" + l19)].alpha - 0.05);
this.level19[("apple" + l19)].scaleX = (this.level19[("apple" + l19)].scaleX - 0.05);
this.level19[("apple" + l19)].scaleY = (this.level19[("apple" + l19)].scaleY - 0.05);
this.level19[("apple" + l19)].rotation = (this.level19[("apple" + l19)].rotation + 20);
} else {
this.level19[("apple" + l19)].visible = false;
};
};
l19++;
};
if (level19applesDone == 3){
levelPassed[19] = true;
score = (score + levelScore);
};
} else {
level19.apple0.buttonMode = false;
level19.apple1.buttonMode = false;
level19.apple2.buttonMode = false;
level19.apple3.buttonMode = false;
level19.apple4.buttonMode = false;
level19.apple5.buttonMode = false;
level19.apple0.removeEventListener(MouseEvent.MOUSE_DOWN, onApple0mouseDown);
level19.apple1.removeEventListener(MouseEvent.MOUSE_DOWN, onApple1mouseDown);
level19.apple2.removeEventListener(MouseEvent.MOUSE_DOWN, onApple2mouseDown);
level19.apple3.removeEventListener(MouseEvent.MOUSE_DOWN, onApple3mouseDown);
level19.apple4.removeEventListener(MouseEvent.MOUSE_DOWN, onApple4mouseDown);
level19.apple5.removeEventListener(MouseEvent.MOUSE_DOWN, onApple5mouseDown);
};
}
public function onApple0mouseDown(_arg1:MouseEvent):void{
if (level19.apple0.currentFrame == 1){
crunch.play();
level19applesPicked[0] = true;
level19applesDone++;
} else {
bass.play();
};
}
public function onApple1mouseDown(_arg1:MouseEvent):void{
if (level19.apple1.currentFrame == 1){
crunch.play();
level19applesPicked[1] = true;
level19applesDone++;
} else {
bass.play();
};
}
public function onApple2mouseDown(_arg1:MouseEvent):void{
if (level19.apple2.currentFrame == 1){
crunch.play();
level19applesPicked[2] = true;
level19applesDone++;
} else {
bass.play();
};
}
public function onApple3mouseDown(_arg1:MouseEvent):void{
if (level19.apple3.currentFrame == 1){
crunch.play();
level19applesPicked[3] = true;
level19applesDone++;
};
}
public function onApple4mouseDown(_arg1:MouseEvent):void{
if (level19.apple4.currentFrame == 1){
crunch.play();
level19applesPicked[4] = true;
level19applesDone++;
} else {
bass.play();
};
}
public function onApple5mouseDown(_arg1:MouseEvent):void{
if (level19.apple5.currentFrame == 1){
crunch.play();
level19applesPicked[5] = true;
level19applesDone++;
} else {
bass.play();
};
}
public function onLevel20(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[20])))) && (!(quit)))){
level20.bottle.buttonMode = true;
level20.bottle.addEventListener(MouseEvent.MOUSE_DOWN, onl20BottleDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, onl20BottleDrop);
if (((!(l20DraggingBottle)) && ((level20.bottle.currentFrame < 3)))){
if (((level20.bottle.y + (level20.bottle.height / 2)) + l20Gravity) < ((level20.bg.y + (level20.bg.height / 2)) - 12.5)){
level20.bottle.y = (level20.bottle.y + l20Gravity);
l20Gravity = (l20Gravity * 1.2);
} else {
level20.bottle.y = (((level20.bg.y + (level20.bg.height / 2)) - (level20.bottle.height / 2)) - 12.5);
if (l20Gravity > 10){
if (level20.bottle.y == (((level20.bg.y + (level20.bg.height / 2)) - (level20.bottle.height / 2)) - 12.5)){
if (level20.bottle.currentFrame == 1){
ding.play();
};
level20.bottle.play();
};
};
l20Gravity = 2;
};
};
if (level20.bottle.currentFrame == 3){
shatter.play();
level20.bottle.buttonMode = false;
};
if (level20.bottle.currentFrame == level20.bottle.totalFrames){
levelPassed[20] = true;
score = (score + levelScore);
};
} else {
level20.bottle.buttonMode = false;
level20.bottle.removeEventListener(MouseEvent.MOUSE_DOWN, onl20BottleDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onl20BottleDrop);
};
}
public function onl20BottleDrag(_arg1:MouseEvent):void{
if (level20.bottle.currentFrame < 3){
level20.bottle.startDrag(false, l20BoundArea);
level20.bottle.alpha = 0.5;
l20DraggingBottle = true;
};
}
public function onl20BottleDrop(_arg1:MouseEvent):void{
level20.bottle.stopDrag();
level20.bottle.alpha = 1;
l20DraggingBottle = false;
}
public function onLevel21(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[21])))) && (!(quit)))){
level21.buttonMode = true;
level21.hotspot0a.addEventListener(MouseEvent.MOUSE_DOWN, onHotspot0MouseDown);
level21.hotspot0b.addEventListener(MouseEvent.MOUSE_DOWN, onHotspot0MouseDown);
level21.hotspot1a.addEventListener(MouseEvent.MOUSE_DOWN, onHotspot1MouseDown);
level21.hotspot1b.addEventListener(MouseEvent.MOUSE_DOWN, onHotspot1MouseDown);
level21.hotspot2a.addEventListener(MouseEvent.MOUSE_DOWN, onHotspot2MouseDown);
level21.hotspot2b.addEventListener(MouseEvent.MOUSE_DOWN, onHotspot2MouseDown);
level21.hotspot3a.addEventListener(MouseEvent.MOUSE_DOWN, onHotspot3MouseDown);
level21.hotspot3b.addEventListener(MouseEvent.MOUSE_DOWN, onHotspot3MouseDown);
};
}
public function onHotspot0MouseDown(_arg1:MouseEvent):void{
if (level21.monsters.currentFrame == 1){
levelPassed[21] = true;
score = (score + levelScore);
};
}
public function onHotspot1MouseDown(_arg1:MouseEvent):void{
if (level21.monsters.currentFrame == 2){
levelPassed[21] = true;
score = (score + levelScore);
};
}
public function onHotspot2MouseDown(_arg1:MouseEvent):void{
if (level21.monsters.currentFrame == 3){
levelPassed[21] = true;
score = (score + levelScore);
};
}
public function onHotspot3MouseDown(_arg1:MouseEvent):void{
if (level21.monsters.currentFrame == 4){
levelPassed[21] = true;
score = (score + levelScore);
};
}
public function onLevel22(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[22])))) && (!(quit)))){
level22.carBlue.buttonMode = true;
level22.carBlue.addEventListener(MouseEvent.MOUSE_DOWN, onCarBlueDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, onCarBlueDrop);
if (!draggingCarBlue){
if (((level22.carBlue.y + (level22.carBlue.height / 2)) + carBlueGravity) < ((level22.bg.y + (level22.bg.height / 2)) - 20)){
level22.carBlue.y = (level22.carBlue.y + carBlueGravity);
carBlueGravity = (carBlueGravity * 1.2);
} else {
level22.carBlue.y = (((level22.bg.y + (level22.bg.height / 2)) - (level22.carBlue.height / 2)) - 20);
carBlueGravity = 2;
};
};
if (level22.carBlue.hitpoint.hitTestObject(level22.rock)){
bass.play();
level22.carBlue.x = ((level22.bg.x - (level22.bg.width / 2)) + 20);
level22.carBlue.stopDrag();
level22.carBlue.alpha = 1;
draggingCarBlue = false;
};
if ((((((level22.carBlue.x > level22.rock.x)) && (!(draggingCarBlue)))) && ((level22.carBlue.y == (((level22.bg.y + (level22.bg.height / 2)) - (level22.carBlue.height / 2)) - 20))))){
levelPassed[22] = true;
score = (score + levelScore);
};
} else {
level22.carBlue.buttonMode = false;
level22.carBlue.removeEventListener(MouseEvent.MOUSE_DOWN, onCarBlueDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, onCarBlueDrop);
};
}
public function onCarBlueDrag(_arg1:MouseEvent):void{
level22.carBlue.startDrag(false, l22BoundArea);
level22.carBlue.alpha = 0.5;
draggingCarBlue = true;
}
public function onCarBlueDrop(_arg1:MouseEvent):void{
level22.carBlue.stopDrag();
level22.carBlue.alpha = 1;
draggingCarBlue = false;
}
public function onLevel23(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[23])))) && (!(quit)))){
level23.button0.buttonMode = true;
level23.button1.buttonMode = true;
level23.button2.buttonMode = true;
level23.button0.addEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button0Down);
level23.button0.addEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button0Over);
level23.button0.addEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button0Out);
level23.button1.addEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button1Down);
level23.button1.addEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button1Over);
level23.button1.addEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button1Out);
level23.button2.addEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button2Down);
level23.button2.addEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button2Over);
level23.button2.addEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button2Out);
if (level23PenaltyCountdown > 0){
level23PenaltyCountdown--;
level23.penalty.visible = true;
} else {
level23PenaltyCountdown = 0;
level23.penalty.visible = false;
};
} else {
level23.button0.buttonMode = false;
level23.button1.buttonMode = false;
level23.button2.buttonMode = false;
level23.button0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button0Down);
level23.button0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button0Over);
level23.button0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button0Out);
level23.button0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button1Down);
level23.button0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button1Over);
level23.button0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button1Out);
level23.button0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button2Down);
level23.button0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button2Over);
level23.button0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel23Button2Out);
};
}
public function onLevel23Button0Down(_arg1:MouseEvent):void{
if (level23Answer == 1){
levelPassed[23] = true;
score = (score + levelScore);
} else {
bass.play();
level23.penalty.visible = true;
level23PenaltyCountdown = 60;
};
}
public function onLevel23Button0Over(_arg1:MouseEvent):void{
level23.button0.scaleX = 1.1;
level23.button0.scaleY = 1.1;
}
public function onLevel23Button0Out(_arg1:MouseEvent):void{
level23.button0.scaleX = 1;
level23.button0.scaleY = 1;
}
public function onLevel23Button1Down(_arg1:MouseEvent):void{
if (level23Answer == 2){
levelPassed[23] = true;
score = (score + levelScore);
} else {
bass.play();
level23.penalty.visible = true;
level23PenaltyCountdown = 60;
};
}
public function onLevel23Button1Over(_arg1:MouseEvent):void{
level23.button1.scaleX = 1.1;
level23.button1.scaleY = 1.1;
}
public function onLevel23Button1Out(_arg1:MouseEvent):void{
level23.button1.scaleX = 1;
level23.button1.scaleY = 1;
}
public function onLevel23Button2Down(_arg1:MouseEvent):void{
if (level23Answer == 3){
levelPassed[23] = true;
score = (score + levelScore);
} else {
bass.play();
level23.penalty.visible = true;
level23PenaltyCountdown = 60;
};
}
public function onLevel23Button2Over(_arg1:MouseEvent):void{
level23.button2.scaleX = 1.1;
level23.button2.scaleY = 1.1;
}
public function onLevel23Button2Out(_arg1:MouseEvent):void{
level23.button2.scaleX = 1;
level23.button2.scaleY = 1;
}
public function onLevel24(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[24])))) && (!(quit)))){
level24.pipe0.buttonMode = true;
level24.pipe1.buttonMode = true;
level24.pipe2.buttonMode = true;
level24.pipe0.addEventListener(MouseEvent.MOUSE_DOWN, onLevel24Pipe0Down);
level24.pipe1.addEventListener(MouseEvent.MOUSE_DOWN, onLevel24Pipe1Down);
level24.pipe2.addEventListener(MouseEvent.MOUSE_DOWN, onLevel24Pipe2Down);
if ((((((level24.pipe0.rotation == 0)) && ((((level24.pipe1.rotation == 0)) || ((level24.pipe1.rotation == 180)))))) && ((level24.pipe2.rotation == 180)))){
levelPassed[24] = true;
score = (score + levelScore);
};
} else {
level24.pipe0.buttonMode = false;
level24.pipe1.buttonMode = false;
level24.pipe2.buttonMode = false;
level24.pipe0.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel24Pipe0Down);
level24.pipe1.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel24Pipe1Down);
level24.pipe2.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel24Pipe2Down);
};
}
public function onLevel24Pipe0Down(_arg1:MouseEvent):void{
blip.play();
level24.pipe0.rotation = (level24.pipe0.rotation + 90);
}
public function onLevel24Pipe1Down(_arg1:MouseEvent):void{
blip.play();
level24.pipe1.rotation = (level24.pipe1.rotation + 90);
}
public function onLevel24Pipe2Down(_arg1:MouseEvent):void{
blip.play();
level24.pipe2.rotation = (level24.pipe2.rotation + 90);
}
public function onLevel25(_arg1:Event):void{
if (((((((((!(gamePaused)) && (!(gameWon)))) && (!(gameOver)))) && (!(levelPassed[25])))) && (!(quit)))){
level25.boss.buttonMode = true;
level25.boss.addEventListener(MouseEvent.MOUSE_DOWN, onLevel25BossDown);
if (((((((((((((((((((((((((((((((((((((((((((((((((levelPassed[0]) && (levelPassed[1]))) && (levelPassed[2]))) && (levelPassed[3]))) && (levelPassed[4]))) && (levelPassed[5]))) && (levelPassed[6]))) && (levelPassed[7]))) && (levelPassed[8]))) && (levelPassed[9]))) && (levelPassed[10]))) && (levelPassed[11]))) && (levelPassed[12]))) && (levelPassed[13]))) && (levelPassed[14]))) && (levelPassed[15]))) && (levelPassed[16]))) && (levelPassed[17]))) && (levelPassed[18]))) && (levelPassed[19]))) && (levelPassed[20]))) && (levelPassed[21]))) && (levelPassed[22]))) && (levelPassed[23]))) && (levelPassed[24]))){
if (!level25Ready){
level25Ready = true;
level25.boss.play();
};
} else {
level25Ready = false;
level25.boss.gotoAndStop(1);
};
if (level25.hitTestObject(cityGround)){
if (!alertPlayed){
alert.play();
alertPlayed = true;
};
if (alertCounter > 0){
alertCounter--;
} else {
alert.play();
alertCounter = (alert.length / 10);
};
shaking = true;
cityGround.gotoAndStop(2);
if (shield.width > 1){
shield.width = (shield.width - 1);
} else {
shield.width = 1;
gameOver = true;
whoops.play();
fg.fail.fail.infoText.text = "Out of Energy!";
};
};
if (level25.health.width == 1){
levelPassed[25] = true;
score = (score + 200);
bossExplosion.play();
l25 = 0;
while (l25 < 4) {
invadersShot[l25] = true;
l25++;
};
};
} else {
level25.boss.buttonMode = false;
level25.boss.removeEventListener(MouseEvent.MOUSE_DOWN, onLevel25BossDown);
};
}
public function onLevel25BossDown(_arg1:MouseEvent):void{
if (level25Ready){
if (level25.health.width > 1){
zap.play();
level25.boss.play();
emitter.x = mouseX;
emitter.y = mouseY;
emitter.start();
if (level25.health.width > 5){
level25.health.width = (level25.health.width - 5);
} else {
level25.health.width = 1;
};
};
};
}
public function gameOverScreen(_arg1:Event):void{
if (gameWon){
i = 0;
while (i < 5) {
if (this[("balloon" + i)].y > -80){
this[("balloon" + i)].y = (this[("balloon" + i)].y - 2);
} else {
this[("balloon" + i)].y = 600;
};
i++;
};
};
fg.speaker.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (fg.currentFrame == fg.totalFrames){
buttonMenu.removeEventListener(MouseEvent.CLICK, onMenuClick);
buttonSubmit.removeEventListener(MouseEvent.CLICK, onSubmitClick);
stage.removeEventListener(Event.ENTER_FRAME, gameOverScreen);
if (menu){
gotoAndStop(1, "menu");
};
if (submit){
gotoAndStop(1, "submit");
};
};
}
public function helpScreen(_arg1:Event):void{
fg.speaker.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (fg.currentFrame == fg.totalFrames){
buttonMenu.removeEventListener(MouseEvent.CLICK, onMenuClick);
stage.removeEventListener(Event.ENTER_FRAME, helpScreen);
if (menu){
gotoAndStop(1, "menu");
};
};
}
public function creditsScreen(_arg1:Event):void{
fg.speaker.buttonMode = true;
fg.speaker.addEventListener(MouseEvent.MOUSE_DOWN, onSpeakerClick);
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (fg.currentFrame == fg.totalFrames){
buttonMenu.removeEventListener(MouseEvent.CLICK, onMenuClick);
stage.removeEventListener(Event.ENTER_FRAME, creditsScreen);
if (menu){
gotoAndStop(1, "menu");
};
};
}
function frame1(){
stop();
stage.quality = "high";
stage.scaleMode = StageScaleMode.NO_SCALE;
allowed_site = "armorgames.com";
domain = this.root.loaderInfo.url.split("/")[2];
domain_idx = domain.indexOf(allowed_site);
fm_bar.addEventListener(Event.ENTER_FRAME, load_progress);
sound = true;
SoundMixer.soundTransform = new SoundTransform(1);
myMenu = new ContextMenu();
myMenu.builtInItems.forwardAndBack = false;
myMenu.builtInItems.loop = false;
myMenu.builtInItems.play = false;
myMenu.builtInItems.print = false;
myMenu.builtInItems.quality = false;
myMenu.builtInItems.rewind = false;
myMenu.builtInItems.save = false;
myMenu.builtInItems.zoom = false;
contextMenu = myMenu;
}
function frame34(){
stop();
agi_url = "http://agi.armorgames.com/assets/agi/AGI.swf";
Security.allowDomain(agi_url);
devKey = "2e1a0ea07ba410b66df1e2aa99500abe";
gameKey = "morplee";
urlRequest = new URLRequest(agi_url);
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
loader.load(urlRequest);
obj = new Object();
obj.onClose = handleOnAGUIClose;
agi.initAGUI(obj);
}
function frame251(){
play();
}
function frame252(){
stop();
SoundMixer.stopAll();
stage.quality = "low";
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
i = 0;
j = 0;
k = 0;
menu = false;
rock = false;
help = false;
scores = false;
credits = false;
submit = false;
buttonPlay.addEventListener(MouseEvent.MOUSE_DOWN, onPlayClick);
buttonHelp.addEventListener(MouseEvent.MOUSE_DOWN, onHelpClick);
buttonScores.addEventListener(MouseEvent.MOUSE_DOWN, onScoresClick);
buttonCredits.addEventListener(MouseEvent.MOUSE_DOWN, onCreditsClick);
buttonLink.addEventListener(MouseEvent.MOUSE_DOWN, onLinkClick);
stage.addEventListener(Event.ENTER_FRAME, menuScreen);
}
function frame253(){
emitter = new Emitter2D();
emitter.counter = new Blast(10);
emitter.addInitializer(new ImageClass(square));
emitter.addInitializer(new ScaleImageInit(0.5, 1));
emitter.addInitializer(new ColorInit(4294967295, 4294927872));
emitter.addInitializer(new Velocity(new DiscZone(new Point(0, 0), 200, 120)));
emitter.addInitializer(new Lifetime(1));
emitter.addAction(new Age(Quadratic.easeIn));
emitter.addAction(new Move());
emitter.addAction(new Fade());
emitter.addAction(new Accelerate(0, 500));
emitter.addAction(new LinearDrag(0.5));
emitter.addEventListener(EmitterEvent.EMITTER_EMPTY, remove, false, 0, true);
renderer = new BitmapRenderer(new Rectangle(0, 0, 640, 480));
renderer.addEmitter(emitter);
addChild(renderer);
stop();
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
countdownText.mouseEnabled = false;
alert = new alertWav();
alertCounter = (alert.length / 10);
alertPlayed = false;
zap = new zapWav();
bossExplosion = new bossExplosionWav();
pickup = new pickupWav();
whoops = new whoopsWav();
shatter = new shatterWav();
bass = new bassWav();
squash = new squashWav();
blip = new blipWav();
pop = new popWav();
laser = new laserWav();
explosion = new explosionWav();
jump = new jumpWav();
success = new successWav();
abduct = new abductWav();
run = new runWav();
meaw = new meawWav();
bark = new barkWav();
squeal = new squealWav();
carStart = new carStartWav();
ding = new dingWav();
applause = new applauseWav();
noisemaker = new noisemakerWav();
crunch = new crunchWav();
lastSoundTime = 0;
theme = new themeWav();
themeTransform = new SoundTransform(0.4, 0);
themeChannel = theme.play(lastSoundTime, 0, themeTransform);
themeSongPaused = false;
score = 0;
bonus = 0;
scoreTotal = 0;
fg.scoreText.text = "0000";
levelScore = 100;
invaderScore = 20;
quit = false;
gamePaused = false;
gameWon = false;
gameOver = false;
shaking = false;
shakeCount = 0;
levels = 26;
levelsDone = false;
tileSpeed = new Array();
tileGravity = new Array();
levelPassed = new Array();
pos = new Array();
lastY = 300;
i = 0;
while (i < levels) {
tileGravity[i] = 1;
lastY = (lastY - this[("level" + i)].height);
pos[i] = {x:320, y:lastY};
i++;
};
level25.x = pos[25].x;
level25.y = pos[25].y;
levelPassed[25] = false;
pos.splice(25, 1);
i = 0;
while (i < (levels - 1)) {
j = Math.floor((Math.random() * pos.length));
this[("level" + i)].x = pos[j].x;
this[("level" + i)].y = pos[j].y;
pos.splice(j, 1);
this[("level" + i)].overlay.mouseEnabled = false;
this[("level" + i)].overlay.mouseChildren = false;
levelPassed[i] = false;
i++;
};
inv = 0;
invB = 0;
invC = 0;
invaderSpeed = 0.5;
invadersShot = new Array();
invadersShot[0] = false;
countdown = 0;
wholeValue = 0;
decimalValue = 0;
hundredths = 0;
stage.addEventListener(Event.ENTER_FRAME, mainGame);
level0windowPick = (Math.floor((Math.random() * ((1 + 2) - 1))) + 1);
this.level0.windowPattern.gotoAndStop(level0windowPick);
stage.addEventListener(Event.ENTER_FRAME, onLevel0);
l1 = 0;
level1carStarted = false;
level1carCrashed = false;
level1dir = 0;
level1.car.x = (level1.startLine.x - 20);
level1.car.y = level1.startLine.y;
stage.addEventListener(Event.ENTER_FRAME, onLevel1);
l2 = 0;
l2b = 0;
level2firing = false;
level2shipDown = true;
level2shipUp = false;
level2shipCounter = 60;
level2enemiesDown = 0;
level2enemyShot = new Array();
level2enemyShot[0] = false;
level2enemyShot[1] = false;
level2enemyShot[2] = false;
stage.addEventListener(Event.ENTER_FRAME, onLevel2);
l3 = 0;
level3balloonsPopped = 0;
stage.addEventListener(Event.ENTER_FRAME, onLevel3);
l4 = 0;
level4draggingCloud = false;
l4X = ((level4.bg.x - (level4.bg.width / 2)) + (level4.cloud.width / 2));
l4Y = (((level4.bg.y - (level4.bg.height / 2)) + (level4.cloud.height / 2)) - 1);
l4Width = (level4.bg.width - level4.cloud.width);
l4Height = (level4.bg.height - level4.cloud.height);
l4BoundArea = new Rectangle(l4X, l4Y, l4Width, l4Height);
stage.addEventListener(Event.ENTER_FRAME, onLevel4);
l5 = 0;
level5truckPoint = new Point(level5.truck);
stage.addEventListener(Event.ENTER_FRAME, onLevel5);
l6 = 0;
stage.addEventListener(Event.ENTER_FRAME, onLevel6);
l7 = 0;
level7penaltyCountdown = 0;
level7.penalty.visible = false;
level7.situations.gotoAndStop((Math.floor((Math.random() * ((1 + 3) - 1))) + 1));
stage.addEventListener(Event.ENTER_FRAME, onLevel7);
stage.addEventListener(Event.ENTER_FRAME, onLevel8);
level9PenaltyCountdown = 0;
level9.penalty.visible = false;
level9.soundActions.gotoAndStop((Math.floor((Math.random() * ((1 + 3) - 1))) + 1));
stage.addEventListener(Event.ENTER_FRAME, onLevel9);
level10abducted = false;
level10beaming = false;
level10cowGravity = 2;
level10.ufo.beam.visible = false;
stage.addEventListener(Event.ENTER_FRAME, onLevel10);
level11running = false;
level11jumping = false;
level11spiked = false;
level11jump = 1;
level11ninjaGravity = 2;
level11ninjaX = (level11.bg.x - 60);
level11ninjaY = (level11.bg.y + 24);
level11ninjaPoint = new Point(level11.ninja);
stage.addEventListener(Event.ENTER_FRAME, onLevel11);
l12 = 0;
level12plumberRunning = false;
level12plumberJumping = false;
level12plumberJump = 7;
level12plumberSpeed = 2;
level12plumberGravity = 1;
level12plumberX = (level12.bg.x - 60);
level12plumberY = (level12.bg.y + 22);
level12plumberPoint = new Point(level12.plumber);
level12coins = 5;
level12coinCollected = new Array();
level12coinCollected[0] = false;
level12coinCollected[1] = false;
level12coinCollected[2] = false;
level12coinCollected[3] = false;
level12coinCollected[4] = false;
stage.addEventListener(Event.ENTER_FRAME, onLevel12);
l13X = ((level13.bg.x - (level13.bg.width / 2)) + (level13.shuriken0.width / 2));
l13Y = (((level13.bg.y - (level13.bg.height / 2)) + (level13.shuriken0.height / 2)) - 1);
l13Width = (level13.bg.width - level13.shuriken0.width);
l13Height = (level13.bg.height - level13.shuriken0.height);
l13BoundArea = new Rectangle(l13X, l13Y, l13Width, l13Height);
stage.addEventListener(Event.ENTER_FRAME, onLevel13);
l14 = 0;
level14penaltyCountdown = 0;
level14.penalty.visible = false;
level14envelopeOver = new Array();
l14 = 0;
while (l14 < 6) {
level14envelopeOver[l14] = false;
l14++;
};
level14envelopeChosen = (Math.floor((Math.random() * ((1 + 5) - 1))) + 1);
this.level14[("envelope" + level14envelopeChosen)].gotoAndStop(2);
stage.addEventListener(Event.ENTER_FRAME, onLevel14);
stage.addEventListener(Event.ENTER_FRAME, onLevel15);
level16carYellowMoving = false;
stage.addEventListener(Event.ENTER_FRAME, onLevel16);
level17nextNinja = Math.floor((Math.random() * ((1 + 2) - 1)));
stage.addEventListener(Event.ENTER_FRAME, onLevel17);
l18 = 0;
level18boulderDir = 0;
level18boulderSpeed = 2;
level18boulderStarted = false;
level18adventurers = 5;
level18adventurersSquashed = new Array();
level18adventurersSquashed[0] = false;
level18adventurersSquashed[1] = false;
level18adventurersSquashed[2] = false;
level18adventurersSquashed[3] = false;
level18adventurersSquashed[4] = false;
stage.addEventListener(Event.ENTER_FRAME, onLevel18);
l19 = 0;
level19.apple0.gotoAndStop(2);
level19.apple3.gotoAndStop(2);
level19.apple5.gotoAndStop(2);
level19apples = 6;
level19applesDone = 0;
level19applesPicked = new Array();
level19applesPicked[0] = false;
level19applesPicked[1] = false;
level19applesPicked[2] = false;
level19applesPicked[3] = false;
level19applesPicked[4] = false;
level19applesPicked[5] = false;
stage.addEventListener(Event.ENTER_FRAME, onLevel19);
l20X = ((level20.bg.x - (level20.bg.width / 2)) + (level20.bottle.width / 2));
l20Y = (((level20.bg.y - (level20.bg.height / 2)) + (level20.bottle.height / 2)) - 1);
l20Width = (level20.bg.width - level20.bottle.width);
l20Height = (level20.bg.height - level20.bottle.height);
l20BoundArea = new Rectangle(l20X, l20Y, l20Width, l20Height);
l20DraggingBottle = false;
l20Gravity = 1;
stage.addEventListener(Event.ENTER_FRAME, onLevel20);
monstersChosen = (Math.floor((Math.random() * ((1 + 4) - 1))) + 1);
level21.monsters.gotoAndStop(monstersChosen);
stage.addEventListener(Event.ENTER_FRAME, onLevel21);
l22X = ((level22.bg.x - (level22.bg.width / 2)) + (level22.carBlue.width / 2));
l22Y = ((level22.bg.y - (level22.bg.height / 2)) + (level22.carBlue.height / 2));
l22Width = (level22.bg.width - level22.carBlue.width);
l22Height = (level22.bg.height - level22.carBlue.height);
l22BoundArea = new Rectangle(l22X, l22Y, l22Width, l22Height);
carBlueGravity = 1;
draggingCarBlue = false;
stage.addEventListener(Event.ENTER_FRAME, onLevel22);
l23 = 0;
level23PenaltyCountdown = 0;
level23.penalty.visible = false;
level23Answer = (Math.floor((Math.random() * ((1 + 3) - 1))) + 1);
this.level23.dice.gotoAndStop(level23Answer);
stage.addEventListener(Event.ENTER_FRAME, onLevel23);
l24 = 0;
stage.addEventListener(Event.ENTER_FRAME, onLevel24);
l25 = 0;
level25Ready = false;
stage.addEventListener(Event.ENTER_FRAME, onLevel25);
}
function frame254(){
stop();
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
if (score > 0){
buttonSubmit.visible = true;
} else {
buttonSubmit.visible = false;
};
morpleeLines.gotoAndStop((Math.floor((Math.random() * ((1 + 19) - 1))) + 1));
morpleeBubble.width = (morpleeLines.width + 20);
morpleeBubble.height = (morpleeLines.height + 20);
morpleeBubble.x = morpleeLines.x;
morpleeBubble.y = (morpleeLines.y - 2);
finalScore = (score + bonus);
scoreText.text = ("SCORE: " + score);
bonusText.text = ("TIME BONUS: " + bonus);
finalScoreText.text = ("FINAL SCORE: " + finalScore);
if (gameWon){
applause.play();
noisemaker.play();
i = 0;
while (i < 5) {
this[("balloon" + i)].visible = true;
i++;
};
} else {
i = 0;
while (i < 5) {
this[("balloon" + i)].visible = false;
i++;
};
};
stage.removeEventListener(Event.ENTER_FRAME, myEnterFrame);
buttonMenu.addEventListener(MouseEvent.CLICK, onMenuClick);
buttonSubmit.addEventListener(MouseEvent.CLICK, onSubmitClick);
buttonLink.addEventListener(MouseEvent.MOUSE_DOWN, onLinkClick);
stage.addEventListener(Event.ENTER_FRAME, gameOverScreen);
}
function frame255(){
stop();
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
stage.removeEventListener(Event.ENTER_FRAME, myEnterFrame);
buttonMenu.addEventListener(MouseEvent.CLICK, onMenuClick);
stage.addEventListener(Event.ENTER_FRAME, helpScreen);
}
function frame256(){
stop();
if (sound){
fg.speaker.gotoAndStop("on");
} else {
fg.speaker.gotoAndStop("off");
};
stage.removeEventListener(Event.ENTER_FRAME, myEnterFrame);
buttonMenu.addEventListener(MouseEvent.CLICK, onMenuClick);
stage.addEventListener(Event.ENTER_FRAME, creditsScreen);
}
function frame257(){
stop();
stage.quality = "high";
addChild(agi);
agi.showScoreboardList();
agi.initAGUI(obj);
}
function frame258(){
stop();
stage.quality = "high";
addChild(agi);
agi.showScoreboardSubmit(finalScore);
agi.initAGUI(obj);
}
}
}//package morplee_fla
Section 22
//monsterEye_58 (morplee_fla.monsterEye_58)
package morplee_fla {
import flash.display.*;
public dynamic class monsterEye_58 extends MovieClip {
public function monsterEye_58(){
addFrameScript(0, frame1, 1, frame2, 3, frame4, 4, frame5);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame4(){
stop();
}
function frame5(){
play();
}
}
}//package morplee_fla
Section 23
//monsters_133 (morplee_fla.monsters_133)
package morplee_fla {
import flash.display.*;
public dynamic class monsters_133 extends MovieClip {
public function monsters_133(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package morplee_fla
Section 24
//morpleeLines_172 (morplee_fla.morpleeLines_172)
package morplee_fla {
import flash.display.*;
public dynamic class morpleeLines_172 extends MovieClip {
public function morpleeLines_172(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
function frame10(){
stop();
}
function frame11(){
stop();
}
function frame12(){
stop();
}
function frame13(){
stop();
}
function frame14(){
stop();
}
function frame15(){
stop();
}
function frame16(){
stop();
}
function frame17(){
stop();
}
function frame18(){
stop();
}
function frame19(){
stop();
}
function frame20(){
stop();
}
}
}//package morplee_fla
Section 25
//ninja_87 (morplee_fla.ninja_87)
package morplee_fla {
import flash.display.*;
public dynamic class ninja_87 extends MovieClip {
public function ninja_87(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package morplee_fla
Section 26
//ninjaFront_121 (morplee_fla.ninjaFront_121)
package morplee_fla {
import flash.display.*;
public dynamic class ninjaFront_121 extends MovieClip {
public function ninjaFront_121(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package morplee_fla
Section 27
//passAnim_159 (morplee_fla.passAnim_159)
package morplee_fla {
import flash.display.*;
public dynamic class passAnim_159 extends MovieClip {
public function passAnim_159(){
addFrameScript(0, frame1, 1, frame2, 140, frame141);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame141(){
stop();
}
}
}//package morplee_fla
Section 28
//pauseAnim_161 (morplee_fla.pauseAnim_161)
package morplee_fla {
import flash.display.*;
public dynamic class pauseAnim_161 extends MovieClip {
public var pauseMenu:MovieClip;
public function pauseAnim_161(){
addFrameScript(0, frame1, 9, frame10, 10, frame11);
}
function frame1(){
stop();
}
function frame10(){
stop();
}
function frame11(){
play();
}
}
}//package morplee_fla
Section 29
//pauseGame_156 (morplee_fla.pauseGame_156)
package morplee_fla {
import flash.display.*;
public dynamic class pauseGame_156 extends MovieClip {
public function pauseGame_156(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 30
//pig_71 (morplee_fla.pig_71)
package morplee_fla {
import flash.display.*;
public dynamic class pig_71 extends MovieClip {
public function pig_71(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
play();
}
}
}//package morplee_fla
Section 31
//plumber_94 (morplee_fla.plumber_94)
package morplee_fla {
import flash.display.*;
public dynamic class plumber_94 extends MovieClip {
public function plumber_94(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package morplee_fla
Section 32
//situations_65 (morplee_fla.situations_65)
package morplee_fla {
import flash.display.*;
public dynamic class situations_65 extends MovieClip {
public function situations_65(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package morplee_fla
Section 33
//soundAction_73 (morplee_fla.soundAction_73)
package morplee_fla {
import flash.display.*;
public dynamic class soundAction_73 extends MovieClip {
public function soundAction_73(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package morplee_fla
Section 34
//speaker_25 (morplee_fla.speaker_25)
package morplee_fla {
import flash.display.*;
public dynamic class speaker_25 extends MovieClip {
public function speaker_25(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 35
//sunAnim_51 (morplee_fla.sunAnim_51)
package morplee_fla {
import flash.display.*;
public dynamic class sunAnim_51 extends MovieClip {
public function sunAnim_51(){
addFrameScript(0, frame1, 1, frame2, 29, frame30);
}
function frame1(){
stop();
}
function frame2(){
play();
}
function frame30(){
stop();
}
}
}//package morplee_fla
Section 36
//window_33 (morplee_fla.window_33)
package morplee_fla {
import flash.display.*;
public dynamic class window_33 extends MovieClip {
public function window_33(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 37
//windowPattern_34 (morplee_fla.windowPattern_34)
package morplee_fla {
import flash.display.*;
public dynamic class windowPattern_34 extends MovieClip {
public function windowPattern_34(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package morplee_fla
Section 38
//Action (org.flintparticles.common.actions.Action)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.behaviours.*;
public interface Action extends Behaviour {
function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void;
}
}//package org.flintparticles.common.actions
Section 39
//ActionBase (org.flintparticles.common.actions.ActionBase)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class ActionBase implements Action {
protected var _priority:int;// = 0
public function set priority(_arg1:int):void{
_priority = _arg1;
}
public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
}
public function removedFromEmitter(_arg1:Emitter):void{
}
public function addedToEmitter(_arg1:Emitter):void{
}
public function get priority():int{
return (_priority);
}
}
}//package org.flintparticles.common.actions
Section 40
//Age (org.flintparticles.common.actions.Age)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.energyEasing.*;
public class Age extends ActionBase {
private var _easing:Function;
public function Age(_arg1:Function=null){
if (_arg1 == null){
_easing = Linear.easeNone;
} else {
_easing = _arg1;
};
}
public function set easing(_arg1:Function):void{
_easing = _arg1;
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
_arg2.age = (_arg2.age + _arg3);
if (_arg2.age >= _arg2.lifetime){
_arg2.energy = 0;
_arg2.isDead = true;
} else {
_arg2.energy = _easing(_arg2.age, _arg2.lifetime);
};
}
public function get easing():Function{
return (_easing);
}
}
}//package org.flintparticles.common.actions
Section 41
//Fade (org.flintparticles.common.actions.Fade)
package org.flintparticles.common.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class Fade extends ActionBase {
private var _endAlpha:Number;
private var _diffAlpha:Number;
public function Fade(_arg1:Number=1, _arg2:Number=0){
priority = -5;
_diffAlpha = (_arg1 - _arg2);
_endAlpha = _arg2;
}
public function get endAlpha():Number{
return (_endAlpha);
}
public function set endAlpha(_arg1:Number):void{
_diffAlpha = ((_endAlpha + _diffAlpha) - _arg1);
_endAlpha = _arg1;
}
public function set startAlpha(_arg1:Number):void{
_diffAlpha = (_arg1 - _endAlpha);
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Number = (_endAlpha + (_diffAlpha * _arg2.energy));
_arg2.color = ((_arg2.color & 0xFFFFFF) | (Math.round((_local4 * 0xFF)) << 24));
}
public function get startAlpha():Number{
return ((_endAlpha + _diffAlpha));
}
}
}//package org.flintparticles.common.actions
Section 42
//Activity (org.flintparticles.common.activities.Activity)
package org.flintparticles.common.activities {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.behaviours.*;
public interface Activity extends Behaviour {
function initialize(_arg1:Emitter):void;
function update(_arg1:Emitter, _arg2:Number):void;
}
}//package org.flintparticles.common.activities
Section 43
//Behaviour (org.flintparticles.common.behaviours.Behaviour)
package org.flintparticles.common.behaviours {
import org.flintparticles.common.emitters.*;
public interface Behaviour {
function set priority(_arg1:int):void;
function addedToEmitter(_arg1:Emitter):void;
function get priority():int;
function removedFromEmitter(_arg1:Emitter):void;
}
}//package org.flintparticles.common.behaviours
Section 44
//BehaviourArrayUtils (org.flintparticles.common.behaviours.BehaviourArrayUtils)
package org.flintparticles.common.behaviours {
public class BehaviourArrayUtils {
public static function add(_arg1:Array, _arg2:Behaviour):uint{
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
if (Behaviour(_arg1[_local4]).priority < _arg2.priority){
break;
};
_local4++;
};
_arg1.splice(_local4, 0, _arg2);
return ((_local3 + 1));
}
public static function remove(_arg1:Array, _arg2:Behaviour):Boolean{
var _local3:int = _arg1.indexOf(_arg2);
if (_local3 != -1){
_arg1.splice(_local3, 1);
return (true);
};
return (false);
}
public static function removeAt(_arg1:Array, _arg2:uint):Behaviour{
var _local3:Behaviour = (_arg1[_arg2] as Behaviour);
_arg1.splice(_arg2, 1);
return (_local3);
}
public static function containsType(_arg1:Array, _arg2:Class):Boolean{
var _local3:uint = _arg1.length;
var _local4:uint;
while (_local4 < _local3) {
if ((_arg1[_local4] is _arg2)){
return (true);
};
_local4++;
};
return (false);
}
public static function sortArray(_arg1:Array):void{
_arg1.sortOn("priority", Array.NUMERIC);
}
public static function clear(_arg1:Array):void{
_arg1.length = 0;
}
public static function contains(_arg1:Array, _arg2:Behaviour):Boolean{
return (!((_arg1.indexOf(_arg2) == -1)));
}
}
}//package org.flintparticles.common.behaviours
Section 45
//Blast (org.flintparticles.common.counters.Blast)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public class Blast implements Counter {
private var _done:Boolean;// = false
private var _startCount:uint;
public function Blast(_arg1:uint=0){
_startCount = _arg1;
}
public function updateEmitter(_arg1:Emitter, _arg2:Number):uint{
return (0);
}
public function startEmitter(_arg1:Emitter):uint{
_done = true;
_arg1.dispatchCounterComplete();
return (_startCount);
}
public function resume():void{
}
public function stop():void{
}
public function get startCount():Number{
return (_startCount);
}
public function get complete():Boolean{
return (_done);
}
public function set startCount(_arg1:Number):void{
_startCount = _arg1;
}
}
}//package org.flintparticles.common.counters
Section 46
//Counter (org.flintparticles.common.counters.Counter)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public interface Counter {
function stop():void;
function updateEmitter(_arg1:Emitter, _arg2:Number):uint;
function get complete():Boolean;
function startEmitter(_arg1:Emitter):uint;
function resume():void;
}
}//package org.flintparticles.common.counters
Section 47
//ZeroCounter (org.flintparticles.common.counters.ZeroCounter)
package org.flintparticles.common.counters {
import org.flintparticles.common.emitters.*;
public class ZeroCounter implements Counter {
public function get complete():Boolean{
return (true);
}
public function stop():void{
}
public function updateEmitter(_arg1:Emitter, _arg2:Number):uint{
return (0);
}
public function startEmitter(_arg1:Emitter):uint{
return (0);
}
public function resume():void{
}
}
}//package org.flintparticles.common.counters
Section 48
//Emitter (org.flintparticles.common.emitters.Emitter)
package org.flintparticles.common.emitters {
import org.flintparticles.common.particles.*;
import org.flintparticles.common.behaviours.*;
import flash.events.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.activities.*;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.events.*;
import org.flintparticles.common.utils.*;
public class Emitter extends EventDispatcher {
protected var _running:Boolean;// = false
protected var _activities:Array;
protected var _particles:Array;
protected var _initializers:Array;
protected var _dispatchCounterComplete:Boolean;// = false
protected var _counter:Counter;
protected var _started:Boolean;// = false
protected var _actions:Array;
protected var _useInternalTick:Boolean;// = true
protected var _particleFactory:ParticleFactory;
protected var _fixedFrameTime:Number;// = 0
protected var _maximumFrameTime:Number;// = 0.1
public function Emitter(){
_particles = new Array();
_actions = new Array();
_initializers = new Array();
_activities = new Array();
_counter = new ZeroCounter();
}
public function addInitializer(_arg1:Initializer):void{
BehaviourArrayUtils.add(_initializers, _arg1);
_arg1.addedToEmitter(this);
}
public function stop():void{
if (_useInternalTick){
FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, updateEventListener);
};
_started = false;
killAllParticles();
}
public function pause():void{
_running = false;
}
public function killAllParticles():void{
var _local1:int = _particles.length;
var _local2:int;
while (_local2 < _local1) {
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _particles[_local2]));
_particleFactory.disposeParticle(_particles[_local2]);
_local2++;
};
_particles.length = 0;
}
public function runAhead(_arg1:Number, _arg2:Number=10):void{
var _local3:Number = _maximumFrameTime;
var _local4:Number = (1 / _arg2);
_maximumFrameTime = _local4;
while (_arg1 > 0) {
_arg1 = (_arg1 - _local4);
update(_local4);
};
_maximumFrameTime = _local3;
}
public function set fixedFrameTime(_arg1:Number):void{
_fixedFrameTime = _arg1;
}
public function get maximumFrameTime():Number{
return (_maximumFrameTime);
}
public function set particles(_arg1:Array):void{
killAllParticles();
addExistingParticles(_arg1, false);
}
public function get useInternalTick():Boolean{
return (_useInternalTick);
}
public function set initializers(_arg1:Array):void{
var _local2:Initializer;
for each (_local2 in _initializers) {
_local2.removedFromEmitter(this);
};
_initializers = _arg1.slice();
BehaviourArrayUtils.sortArray(_initializers);
for each (_local2 in _arg1) {
_local2.addedToEmitter(this);
};
}
public function get particleFactory():ParticleFactory{
return (_particleFactory);
}
private function updateEventListener(_arg1:UpdateEvent):void{
if (_fixedFrameTime){
update(_fixedFrameTime);
} else {
update(_arg1.time);
};
}
protected function createParticle():Particle{
var _local1:Particle = _particleFactory.createParticle();
var _local2:int = _initializers.length;
initParticle(_local1);
var _local3:int;
while (_local3 < _local2) {
Initializer(_initializers[_local3]).initialize(this, _local1);
_local3++;
};
_particles.push(_local1);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_CREATED, _local1));
return (_local1);
}
public function get particles():Array{
return (_particles);
}
protected function sortParticles():void{
}
public function removeActivity(_arg1:Activity):void{
if (BehaviourArrayUtils.remove(_activities, _arg1)){
_arg1.removedFromEmitter(this);
};
}
public function set maximumFrameTime(_arg1:Number):void{
_maximumFrameTime = _arg1;
}
protected function initParticle(_arg1:Particle):void{
}
public function addAction(_arg1:Action):void{
BehaviourArrayUtils.add(_actions, _arg1);
_arg1.addedToEmitter(this);
}
public function hasInitializerOfType(_arg1:Class):Boolean{
return (BehaviourArrayUtils.containsType(_initializers, _arg1));
}
public function removeInitializer(_arg1:Initializer):void{
if (BehaviourArrayUtils.remove(_initializers, _arg1)){
_arg1.removedFromEmitter(this);
};
}
public function get running():Boolean{
return (_running);
}
public function hasActionOfType(_arg1:Class):Boolean{
return (BehaviourArrayUtils.containsType(_actions, _arg1));
}
public function get fixedFrameTime():Number{
return (_fixedFrameTime);
}
public function set particleFactory(_arg1:ParticleFactory):void{
_particleFactory = _arg1;
}
public function set useInternalTick(_arg1:Boolean):void{
if (_useInternalTick != _arg1){
_useInternalTick = _arg1;
if (_started){
if (_useInternalTick){
FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, updateEventListener, false, 0, true);
} else {
FrameUpdater.instance.removeEventListener(UpdateEvent.UPDATE, updateEventListener);
};
};
};
}
public function resume():void{
_running = true;
}
public function addActivity(_arg1:Activity):void{
BehaviourArrayUtils.add(_activities, _arg1);
_arg1.addedToEmitter(this);
}
public function get initializers():Array{
return (_initializers);
}
public function addExistingParticles(_arg1:Array, _arg2:Boolean=false):void{
var _local4:int;
var _local5:int;
var _local6:int;
var _local3:int = _arg1.length;
if (_arg2){
_local5 = _initializers.length;
_local6 = 0;
while (_local6 < _local5) {
_local4 = 0;
while (_local4 < _local3) {
Initializer(_initializers[_local6]).initialize(this, _arg1[_local4]);
_local4++;
};
_local6++;
};
};
_local4 = 0;
while (_local4 < _local3) {
_particles.push(_arg1[_local4]);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_ADDED, _arg1[_local4]));
_local4++;
};
}
public function hasActivityOfType(_arg1:Class):Boolean{
return (BehaviourArrayUtils.containsType(_activities, _arg1));
}
public function set activities(_arg1:Array):void{
var _local2:Activity;
for each (_local2 in _activities) {
_local2.removedFromEmitter(this);
};
_activities = _arg1.slice();
BehaviourArrayUtils.sortArray(_activities);
for each (_local2 in _activities) {
_local2.addedToEmitter(this);
};
}
public function hasInitializer(_arg1:Initializer):Boolean{
return (BehaviourArrayUtils.contains(_initializers, _arg1));
}
public function removeAction(_arg1:Action):void{
if (BehaviourArrayUtils.remove(_actions, _arg1)){
_arg1.removedFromEmitter(this);
};
}
public function hasActivity(_arg1:Activity):Boolean{
return (BehaviourArrayUtils.contains(_activities, _arg1));
}
public function get activities():Array{
return (_activities);
}
public function hasAction(_arg1:Action):Boolean{
return (BehaviourArrayUtils.contains(_actions, _arg1));
}
public function start():void{
if (_useInternalTick){
FrameUpdater.instance.addEventListener(UpdateEvent.UPDATE, updateEventListener, false, 0, true);
};
_started = true;
_running = true;
var _local1:int = _activities.length;
var _local2:int;
while (_local2 < _local1) {
Activity(_activities[_local2]).initialize(this);
_local2++;
};
_local1 = _counter.startEmitter(this);
_local2 = 0;
while (_local2 < _local1) {
createParticle();
_local2++;
};
}
public function update(_arg1:Number):void{
var _local2:int;
var _local3:Particle;
var _local5:Action;
var _local6:int;
var _local7:int;
if (!_running){
return;
};
if (_arg1 > _maximumFrameTime){
_arg1 = _maximumFrameTime;
};
var _local4:int = _counter.updateEmitter(this, _arg1);
_local2 = 0;
while (_local2 < _local4) {
createParticle();
_local2++;
};
sortParticles();
_local4 = _activities.length;
_local2 = 0;
while (_local2 < _local4) {
Activity(_activities[_local2]).update(this, _arg1);
_local2++;
};
if (_particles.length > 0){
_local4 = _actions.length;
_local6 = _particles.length;
_local7 = 0;
while (_local7 < _local4) {
_local5 = _actions[_local7];
_local2 = 0;
while (_local2 < _local6) {
_local3 = _particles[_local2];
_local5.update(this, _local3, _arg1);
_local2++;
};
_local7++;
};
_local2 = _local6;
while (_local2--) {
_local3 = _particles[_local2];
if (_local3.isDead){
_particles.splice(_local2, 1);
dispatchEvent(new ParticleEvent(ParticleEvent.PARTICLE_DEAD, _local3));
if (_local3.isDead){
_particleFactory.disposeParticle(_local3);
};
};
};
} else {
dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_EMPTY));
};
dispatchEvent(new EmitterEvent(EmitterEvent.EMITTER_UPDATED));
if (_dispatchCounterComplete){
_dispatchCounterComplete = false;
dispatchEvent(new EmitterEvent(EmitterEvent.COUNTER_COMPLETE));
};
}
public function set counter(_arg1:Counter):void{
_counter = _arg1;
if (running){
_counter.startEmitter(this);
};
}
public function set actions(_arg1:Array):void{
var _local2:Action;
for each (_local2 in _actions) {
_local2.removedFromEmitter(this);
};
_actions = _arg1.slice();
BehaviourArrayUtils.sortArray(_actions);
for each (_local2 in _arg1) {
_local2.addedToEmitter(this);
};
}
public function dispatchCounterComplete():void{
_dispatchCounterComplete = true;
}
public function get counter():Counter{
return (_counter);
}
public function get actions():Array{
return (_actions);
}
}
}//package org.flintparticles.common.emitters
Section 49
//Linear (org.flintparticles.common.energyEasing.Linear)
package org.flintparticles.common.energyEasing {
public class Linear {
public static function easeOut(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
public static function easeIn(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
public static function easeInOut(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
public static function easeNone(_arg1:Number, _arg2:Number):Number{
return ((1 - (_arg1 / _arg2)));
}
}
}//package org.flintparticles.common.energyEasing
Section 50
//Quadratic (org.flintparticles.common.energyEasing.Quadratic)
package org.flintparticles.common.energyEasing {
public class Quadratic {
public static function easeOut(_arg1:Number, _arg2:Number):Number{
_arg1 = (1 - (_arg1 / _arg2));
return ((_arg1 * _arg1));
}
public static function easeIn(_arg1:Number, _arg2:Number):Number{
_arg1 = (_arg1 / _arg2);
return ((1 - (_arg1 * _arg1)));
}
public static function easeInOut(_arg1:Number, _arg2:Number):Number{
_arg1 = (_arg1 / (_arg2 * 0.5));
if (_arg1 < 1){
return ((1 - ((_arg1 * _arg1) * 0.5)));
};
_arg1 = (_arg1 - 2);
return (((_arg1 * _arg1) * 0.5));
}
}
}//package org.flintparticles.common.energyEasing
Section 51
//EmitterEvent (org.flintparticles.common.events.EmitterEvent)
package org.flintparticles.common.events {
import flash.events.*;
public class EmitterEvent extends Event {
public static var COUNTER_COMPLETE:String = "counterComplete";
public static var EMITTER_UPDATED:String = "emitterUpdated";
public static var EMITTER_EMPTY:String = "emitterEmpty";
public function EmitterEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
}
}//package org.flintparticles.common.events
Section 52
//ParticleEvent (org.flintparticles.common.events.ParticleEvent)
package org.flintparticles.common.events {
import org.flintparticles.common.particles.*;
import flash.events.*;
public class ParticleEvent extends Event {
public var particle:Particle;
public var otherObject;
public static var PARTICLES_COLLISION:String = "particlesCollision";
public static var BOUNDING_BOX_COLLISION:String = "boundingBoxCollision";
public static var PARTICLE_ADDED:String = "particleAdded";
public static var PARTICLE_DEAD:String = "particleDead";
public static var PARTICLE_CREATED:String = "particleCreated";
public function ParticleEvent(_arg1:String, _arg2:Particle=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.particle = _arg2;
}
override public function clone():Event{
var _local1:ParticleEvent = new ParticleEvent(type, particle, bubbles, cancelable);
_local1.otherObject = otherObject;
return (_local1);
}
}
}//package org.flintparticles.common.events
Section 53
//UpdateEvent (org.flintparticles.common.events.UpdateEvent)
package org.flintparticles.common.events {
import flash.events.*;
public class UpdateEvent extends Event {
public var time:Number;
public static var UPDATE:String = "update";
public function UpdateEvent(_arg1:String, _arg2:Number=NaN, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.time = _arg2;
}
override public function clone():Event{
return (new UpdateEvent(type, time, bubbles, cancelable));
}
}
}//package org.flintparticles.common.events
Section 54
//ColorInit (org.flintparticles.common.initializers.ColorInit)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.utils.*;
public class ColorInit extends InitializerBase {
private var _max:uint;
private var _min:uint;
public function ColorInit(_arg1:uint=0xFFFFFF, _arg2:uint=0xFFFFFF){
_min = _arg1;
_max = _arg2;
}
public function set minColor(_arg1:uint):void{
_min = _arg1;
}
public function get color():uint{
return (((_min == _max)) ? _min : interpolateColors(_max, _min, 0.5));
}
public function set color(_arg1:uint):void{
_max = (_min = _arg1);
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
if (_max == _min){
_arg2.color = _min;
} else {
_arg2.color = interpolateColors(_min, _max, Math.random());
};
}
public function get minColor():uint{
return (_min);
}
public function set maxColor(_arg1:uint):void{
_max = _arg1;
}
public function get maxColor():uint{
return (_max);
}
}
}//package org.flintparticles.common.initializers
Section 55
//ImageClass (org.flintparticles.common.initializers.ImageClass)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.utils.*;
public class ImageClass extends InitializerBase {
private var _parameters:Array;
private var _imageClass:Class;
public function ImageClass(_arg1:Class=null, ... _args){
_imageClass = _arg1;
_parameters = _args;
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
_arg2.image = construct(_imageClass, _parameters);
}
public function get parameters():Array{
return (_parameters);
}
public function set parameters(_arg1:Array):void{
_parameters = _arg1;
}
public function set imageClass(_arg1:Class):void{
_imageClass = _arg1;
}
public function get imageClass():Class{
return (_imageClass);
}
}
}//package org.flintparticles.common.initializers
Section 56
//Initializer (org.flintparticles.common.initializers.Initializer)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.behaviours.*;
public interface Initializer extends Behaviour {
function initialize(_arg1:Emitter, _arg2:Particle):void;
}
}//package org.flintparticles.common.initializers
Section 57
//InitializerBase (org.flintparticles.common.initializers.InitializerBase)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class InitializerBase implements Initializer {
protected var _priority:int;// = 0
public function set priority(_arg1:int):void{
_priority = _arg1;
}
public function initialize(_arg1:Emitter, _arg2:Particle):void{
}
public function removedFromEmitter(_arg1:Emitter):void{
}
public function addedToEmitter(_arg1:Emitter):void{
}
public function get priority():int{
return (_priority);
}
}
}//package org.flintparticles.common.initializers
Section 58
//Lifetime (org.flintparticles.common.initializers.Lifetime)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class Lifetime extends InitializerBase {
private var _max:Number;
private var _min:Number;
public function Lifetime(_arg1:Number=1.79769313486232E308, _arg2:Number=NaN){
_max = _arg2;
_min = _arg1;
}
public function get lifetime():Number{
return (((_min == _max)) ? _min : ((_max + _min) * 0.5));
}
public function get maxLifetime():Number{
return (_max);
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
if (isNaN(_max)){
_arg2.lifetime = _min;
} else {
_arg2.lifetime = (_min + (Math.random() * (_max - _min)));
};
}
public function set lifetime(_arg1:Number):void{
_max = (_min = _arg1);
}
public function set minLifetime(_arg1:Number):void{
_min = _arg1;
}
public function set maxLifetime(_arg1:Number):void{
_max = _arg1;
}
public function get minLifetime():Number{
return (_min);
}
}
}//package org.flintparticles.common.initializers
Section 59
//ScaleImageInit (org.flintparticles.common.initializers.ScaleImageInit)
package org.flintparticles.common.initializers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
public class ScaleImageInit extends InitializerBase {
private var _max:Number;
private var _min:Number;
public function ScaleImageInit(_arg1:Number=1, _arg2:Number=NaN){
_min = _arg1;
if (isNaN(_arg2)){
_max = _min;
} else {
_max = _arg2;
};
}
public function get scale():Number{
return (((_min == _max)) ? _min : ((_max + _min) / 2));
}
public function set maxScale(_arg1:Number):void{
_max = _arg1;
}
public function get maxScale():Number{
return (_max);
}
public function set minScale(_arg1:Number):void{
_min = _arg1;
}
public function set scale(_arg1:Number):void{
_max = (_min = _arg1);
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
if (_max == _min){
_arg2.scale = _min;
} else {
_arg2.scale = (_min + (Math.random() * (_max - _min)));
};
}
public function get minScale():Number{
return (_min);
}
}
}//package org.flintparticles.common.initializers
Section 60
//Particle (org.flintparticles.common.particles.Particle)
package org.flintparticles.common.particles {
import flash.geom.*;
import flash.utils.*;
public class Particle {
public var energy:Number;// = 1
public var lifetime:Number;// = 0
public var scale:Number;// = 1
public var image;// = null
public var color:uint;// = 4294967295
public var collisionRadius:Number;// = 1
private var _colorTransform:ColorTransform;// = null
private var _previousColor:uint;
public var isDead:Boolean;// = false
public var mass:Number;// = 1
private var _dictionary:Dictionary;// = null
public var age:Number;// = 0
public function revive():void{
lifetime = 0;
age = 0;
energy = 1;
isDead = false;
}
public function get dictionary():Dictionary{
if (_dictionary == null){
_dictionary = new Dictionary(true);
};
return (_dictionary);
}
public function get colorTransform():ColorTransform{
if (((!(_colorTransform)) || (!((_previousColor == color))))){
_colorTransform = new ColorTransform((((color >>> 16) & 0xFF) / 0xFF), (((color >>> 8) & 0xFF) / 0xFF), ((color & 0xFF) / 0xFF), (((color >>> 24) & 0xFF) / 0xFF), 0, 0, 0, 0);
_previousColor = color;
};
return (_colorTransform);
}
protected function cloneInto(_arg1:Particle):Particle{
var _local2:Object;
_arg1.color = color;
_arg1.scale = scale;
_arg1.mass = mass;
_arg1.collisionRadius = collisionRadius;
_arg1.lifetime = lifetime;
_arg1.age = age;
_arg1.energy = energy;
_arg1.isDead = isDead;
_arg1.image = image;
if (_dictionary){
_arg1._dictionary = new Dictionary(true);
for (_local2 in _dictionary) {
_arg1._dictionary[_local2] = _dictionary[_local2];
};
};
return (_arg1);
}
public function get alpha():Number{
return ((((color & 4278190080) >>> 24) / 0xFF));
}
public function initialize():void{
color = 4294967295;
scale = 1;
mass = 1;
collisionRadius = 1;
lifetime = 0;
age = 0;
energy = 1;
isDead = false;
image = null;
_dictionary = null;
_colorTransform = null;
}
public function clone(_arg1:ParticleFactory=null):Particle{
var _local2:Particle;
if (_arg1){
_local2 = _arg1.createParticle();
} else {
_local2 = new Particle();
};
return (cloneInto(_local2));
}
}
}//package org.flintparticles.common.particles
Section 61
//ParticleFactory (org.flintparticles.common.particles.ParticleFactory)
package org.flintparticles.common.particles {
public interface ParticleFactory {
function clearAllParticles():void;
function createParticle():Particle;
function disposeParticle(_arg1:Particle):void;
}
}//package org.flintparticles.common.particles
Section 62
//Renderer (org.flintparticles.common.renderers.Renderer)
package org.flintparticles.common.renderers {
import org.flintparticles.common.emitters.*;
public interface Renderer {
function removeEmitter(_arg1:Emitter):void;
function addEmitter(_arg1:Emitter):void;
}
}//package org.flintparticles.common.renderers
Section 63
//SpriteRendererBase (org.flintparticles.common.renderers.SpriteRendererBase)
package org.flintparticles.common.renderers {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import flash.events.*;
import org.flintparticles.common.events.*;
import flash.display.*;
public class SpriteRendererBase extends Sprite implements Renderer {
protected var _emitters:Array;
public function SpriteRendererBase(){
_emitters = new Array();
mouseEnabled = false;
mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, addedToStage, false, 0, true);
}
private function particleAdded(_arg1:ParticleEvent):void{
addParticle(_arg1.particle);
if (stage){
stage.invalidate();
};
}
public function set emitters(_arg1:Array):void{
var _local2:Emitter;
for each (_local2 in _emitters) {
removeEmitter(_local2);
};
for each (_local2 in _arg1) {
addEmitter(_local2);
};
}
private function addedToStage(_arg1:Event):void{
if (stage){
stage.invalidate();
};
}
public function get emitters():Array{
return (_emitters);
}
protected function addParticle(_arg1:Particle):void{
}
protected function updateParticles(_arg1:Event):void{
var _local2:Array = new Array();
var _local3:int;
while (_local3 < _emitters.length) {
_local2 = _local2.concat(Emitter(_emitters[_local3]).particles);
_local3++;
};
renderParticles(_local2);
}
protected function emitterUpdated(_arg1:EmitterEvent):void{
if (stage){
stage.invalidate();
};
}
public function removeEmitter(_arg1:Emitter):void{
var _local3:Particle;
var _local2:int;
while (_local2 < _emitters.length) {
if (_emitters[_local2] == _arg1){
_emitters.splice(_local2, 1);
_arg1.removeEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated);
_arg1.removeEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded);
_arg1.removeEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded);
_arg1.removeEventListener(ParticleEvent.PARTICLE_DEAD, particleRemoved);
for each (_local3 in _arg1.particles) {
removeParticle(_local3);
};
if (_emitters.length == 0){
removeEventListener(Event.RENDER, updateParticles);
renderParticles([]);
} else {
if (stage){
stage.invalidate();
};
};
return;
};
_local2++;
};
}
protected function renderParticles(_arg1:Array):void{
}
protected function removeParticle(_arg1:Particle):void{
}
private function particleRemoved(_arg1:ParticleEvent):void{
removeParticle(_arg1.particle);
if (stage){
stage.invalidate();
};
}
public function addEmitter(_arg1:Emitter):void{
var _local2:Particle;
_emitters.push(_arg1);
if (stage){
stage.invalidate();
};
_arg1.addEventListener(EmitterEvent.EMITTER_UPDATED, emitterUpdated, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_CREATED, particleAdded, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_ADDED, particleAdded, false, 0, true);
_arg1.addEventListener(ParticleEvent.PARTICLE_DEAD, particleRemoved, false, 0, true);
for each (_local2 in _arg1.particles) {
addParticle(_local2);
};
if (_emitters.length == 1){
addEventListener(Event.RENDER, updateParticles, false, 0, true);
};
}
}
}//package org.flintparticles.common.renderers
Section 64
//construct (org.flintparticles.common.utils.construct)
package org.flintparticles.common.utils {
public function construct(_arg1:Class, _arg2:Array){
switch (_arg2.length){
case 0:
return (new (_arg1));
case 1:
return (new _arg1(_arg2[0]));
case 2:
return (new _arg1(_arg2[0], _arg2[1]));
case 3:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2]));
case 4:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3]));
case 5:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4]));
case 6:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5]));
case 7:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5], _arg2[6]));
case 8:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5], _arg2[6], _arg2[7]));
case 9:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5], _arg2[6], _arg2[7], _arg2[8]));
case 10:
return (new _arg1(_arg2[0], _arg2[1], _arg2[2], _arg2[3], _arg2[4], _arg2[5], _arg2[6], _arg2[7], _arg2[8], _arg2[9]));
default:
return (null);
};
}
}//package org.flintparticles.common.utils
Section 65
//FrameUpdater (org.flintparticles.common.utils.FrameUpdater)
package org.flintparticles.common.utils {
import flash.utils.*;
import flash.events.*;
import org.flintparticles.common.events.*;
import flash.display.*;
public class FrameUpdater extends EventDispatcher {
private var _shape:Shape;
private var _running:Boolean;// = false
private var _time:Number;
private static var _instance:FrameUpdater;
public function FrameUpdater(){
_shape = new Shape();
}
private function startTimer():void{
_shape.addEventListener(Event.ENTER_FRAME, frameUpdate, false, 0, true);
_time = getTimer();
_running = true;
}
private function stopTimer():void{
_shape.removeEventListener(Event.ENTER_FRAME, frameUpdate);
_running = false;
}
override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
super.removeEventListener(_arg1, _arg2, _arg3);
if (((_running) && (!(hasEventListener(UpdateEvent.UPDATE))))){
stopTimer();
};
}
override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
if (((!(_running)) && (hasEventListener(UpdateEvent.UPDATE)))){
startTimer();
};
}
private function frameUpdate(_arg1:Event):void{
var _local2:int = _time;
_time = getTimer();
var _local3:Number = ((_time - _local2) * 0.001);
dispatchEvent(new UpdateEvent(UpdateEvent.UPDATE, _local3));
}
public static function get instance():FrameUpdater{
if (_instance == null){
_instance = new (FrameUpdater);
};
return (_instance);
}
}
}//package org.flintparticles.common.utils
Section 66
//interpolateColors (org.flintparticles.common.utils.interpolateColors)
package org.flintparticles.common.utils {
public function interpolateColors(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number = (1 - _arg3);
var _local5:uint = Math.round(((((_arg1 >>> 16) & 0xFF) * _arg3) + (((_arg2 >>> 16) & 0xFF) * _local4)));
var _local6:uint = Math.round(((((_arg1 >>> 8) & 0xFF) * _arg3) + (((_arg2 >>> 8) & 0xFF) * _local4)));
var _local7:uint = Math.round((((_arg1 & 0xFF) * _arg3) + ((_arg2 & 0xFF) * _local4)));
var _local8:uint = Math.round(((((_arg1 >>> 24) & 0xFF) * _arg3) + (((_arg2 >>> 24) & 0xFF) * _local4)));
return (((((_local8 << 24) | (_local5 << 16)) | (_local6 << 8)) | _local7));
}
}//package org.flintparticles.common.utils
Section 67
//Maths (org.flintparticles.common.utils.Maths)
package org.flintparticles.common.utils {
public class Maths {
private static const DEGTORAD:Number = (Math.PI / 180);
private static const RADTODEG:Number = (180 / Math.PI);
public static function asRadians(_arg1:Number):Number{
return ((_arg1 * DEGTORAD));
}
public static function asDegrees(_arg1:Number):Number{
return ((_arg1 * RADTODEG));
}
}
}//package org.flintparticles.common.utils
Section 68
//Accelerate (org.flintparticles.twoD.actions.Accelerate)
package org.flintparticles.twoD.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.twoD.particles.*;
public class Accelerate extends ActionBase {
private var _x:Number;
private var _y:Number;
public function Accelerate(_arg1:Number=0, _arg2:Number=0){
this.x = _arg1;
this.y = _arg2;
}
public function set x(_arg1:Number):void{
_x = _arg1;
}
public function get y():Number{
return (_y);
}
public function get x():Number{
return (_x);
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D;
_local4 = Particle2D(_arg2);
Particle2D(_arg2).velX = (_local4.velX + (_x * _arg3));
_local4.velY = (_local4.velY + (_y * _arg3));
}
public function set y(_arg1:Number):void{
_y = _arg1;
}
}
}//package org.flintparticles.twoD.actions
Section 69
//LinearDrag (org.flintparticles.twoD.actions.LinearDrag)
package org.flintparticles.twoD.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.twoD.particles.*;
public class LinearDrag extends ActionBase {
private var _drag:Number;
public function LinearDrag(_arg1:Number=0){
this.drag = _arg1;
}
public function get drag():Number{
return (_drag);
}
public function set drag(_arg1:Number):void{
_drag = _arg1;
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D = Particle2D(_arg2);
var _local5:Number = (1 - ((_drag * _arg3) / _local4.mass));
if (_local5 < 0){
_local4.velX = 0;
_local4.velY = 0;
} else {
_local4.velX = (_local4.velX * _local5);
_local4.velY = (_local4.velY * _local5);
};
}
}
}//package org.flintparticles.twoD.actions
Section 70
//Move (org.flintparticles.twoD.actions.Move)
package org.flintparticles.twoD.actions {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.actions.*;
import org.flintparticles.twoD.particles.*;
public class Move extends ActionBase {
public function Move(){
priority = -10;
}
override public function update(_arg1:Emitter, _arg2:Particle, _arg3:Number):void{
var _local4:Particle2D = Particle2D(_arg2);
Particle2D(_arg2).previousX = _local4.x;
_local4.previousY = _local4.y;
_local4.x = (_local4.x + (_local4.velX * _arg3));
_local4.y = (_local4.y + (_local4.velY * _arg3));
}
}
}//package org.flintparticles.twoD.actions
Section 71
//Emitter2D (org.flintparticles.twoD.emitters.Emitter2D)
package org.flintparticles.twoD.emitters {
import org.flintparticles.common.emitters.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.utils.*;
import org.flintparticles.twoD.particles.*;
public class Emitter2D extends Emitter {
protected var _y:Number;// = 0
public var spaceSort:Boolean;// = false
public var spaceSortedX:Array;
protected var _x:Number;// = 0
protected var _rotation:Number;// = 0
protected static var _creator:ParticleCreator2D = new ParticleCreator2D();
public function Emitter2D(){
_particleFactory = _creator;
}
public function get y():Number{
return (_y);
}
override protected function initParticle(_arg1:Particle):void{
var _local2:Particle2D = Particle2D(_arg1);
_local2.x = _x;
_local2.y = _y;
_local2.previousX = _x;
_local2.previousY = _y;
_local2.rotation = _rotation;
}
override protected function sortParticles():void{
var _local1:int;
var _local2:int;
if (spaceSort){
spaceSortedX = _particles.sortOn("x", (Array.NUMERIC | Array.RETURNINDEXEDARRAY));
_local1 = _particles.length;
_local2 = 0;
while (_local2 < _local1) {
Particle2D(_particles[spaceSortedX[_local2]]).sortID = _local2;
_local2++;
};
};
}
public function set x(_arg1:Number):void{
_x = _arg1;
}
public function set rotRadians(_arg1:Number):void{
_rotation = _arg1;
}
public function get x():Number{
return (_x);
}
public function get rotRadians():Number{
return (_rotation);
}
public function set rotation(_arg1:Number):void{
_rotation = Maths.asRadians(_arg1);
}
public function get rotation():Number{
return (Maths.asDegrees(_rotation));
}
public function set y(_arg1:Number):void{
_y = _arg1;
}
public static function get defaultParticleFactory():ParticleFactory{
return (_creator);
}
}
}//package org.flintparticles.twoD.emitters
Section 72
//Velocity (org.flintparticles.twoD.initializers.Velocity)
package org.flintparticles.twoD.initializers {
import org.flintparticles.common.emitters.*;
import flash.geom.*;
import org.flintparticles.common.particles.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.twoD.zones.*;
import org.flintparticles.twoD.particles.*;
public class Velocity extends InitializerBase {
private var _zone:Zone2D;
public function Velocity(_arg1:Zone2D=null){
this.zone = _arg1;
}
override public function initialize(_arg1:Emitter, _arg2:Particle):void{
var _local5:Number;
var _local6:Number;
var _local3:Particle2D = Particle2D(_arg2);
var _local4:Point = _zone.getLocation();
if (_local3.rotation == 0){
_local3.velX = _local4.x;
_local3.velY = _local4.y;
} else {
_local5 = Math.sin(_local3.rotation);
_local6 = Math.cos(_local3.rotation);
_local3.velX = ((_local6 * _local4.x) - (_local5 * _local4.y));
_local3.velY = ((_local6 * _local4.y) + (_local5 * _local4.x));
};
}
public function set zone(_arg1:Zone2D):void{
_zone = _arg1;
}
public function get zone():Zone2D{
return (_zone);
}
}
}//package org.flintparticles.twoD.initializers
Section 73
//Particle2D (org.flintparticles.twoD.particles.Particle2D)
package org.flintparticles.twoD.particles {
import flash.geom.*;
import org.flintparticles.common.particles.*;
public class Particle2D extends Particle {
public var y:Number;// = 0
public var previousX:Number;// = 0
public var previousY:Number;// = 0
private var _previousRadius:Number;
public var angVelocity:Number;// = 0
public var velX:Number;// = 0
public var velY:Number;// = 0
private var _previousMass:Number;
public var x:Number;// = 0
public var sortID:int;// = -1
private var _inertia:Number;
public var rotation:Number;// = 0
override public function clone(_arg1:ParticleFactory=null):Particle{
var _local2:Particle2D;
if (_arg1){
_local2 = (_arg1.createParticle() as Particle2D);
} else {
_local2 = new Particle2D();
};
cloneInto(_local2);
_local2.x = x;
_local2.y = y;
_local2.velX = velX;
_local2.velY = velY;
_local2.rotation = rotation;
_local2.angVelocity = angVelocity;
return (_local2);
}
override public function initialize():void{
super.initialize();
x = 0;
y = 0;
previousX = 0;
previousY = 0;
velX = 0;
velY = 0;
rotation = 0;
angVelocity = 0;
sortID = -1;
}
public function get matrixTransform():Matrix{
var _local1:Number = (scale * Math.cos(rotation));
var _local2:Number = (scale * Math.sin(rotation));
return (new Matrix(_local1, _local2, -(_local2), _local1, x, y));
}
public function get inertia():Number{
if (((!((mass == _previousMass))) || (!((collisionRadius == _previousRadius))))){
_inertia = (((mass * collisionRadius) * collisionRadius) * 0.5);
_previousMass = mass;
_previousRadius = collisionRadius;
};
return (_inertia);
}
}
}//package org.flintparticles.twoD.particles
Section 74
//ParticleCreator2D (org.flintparticles.twoD.particles.ParticleCreator2D)
package org.flintparticles.twoD.particles {
import org.flintparticles.common.particles.*;
public class ParticleCreator2D implements ParticleFactory {
private var _particles:Array;
public function ParticleCreator2D(){
_particles = new Array();
}
public function clearAllParticles():void{
_particles = new Array();
}
public function disposeParticle(_arg1:Particle):void{
if ((_arg1 is Particle2D)){
_arg1.initialize();
_particles.push(_arg1);
};
}
public function createParticle():Particle{
if (_particles.length){
return (_particles.pop());
};
return (new Particle2D());
}
}
}//package org.flintparticles.twoD.particles
Section 75
//BitmapRenderer (org.flintparticles.twoD.renderers.BitmapRenderer)
package org.flintparticles.twoD.renderers {
import flash.geom.*;
import flash.filters.*;
import org.flintparticles.twoD.particles.*;
import flash.display.*;
import org.flintparticles.common.renderers.*;
public class BitmapRenderer extends SpriteRendererBase {
protected var _bitmap:Bitmap;
protected var _bitmapData:BitmapData;
protected var _clearBetweenFrames:Boolean;
protected var _colorMap:Array;
protected var _smoothing:Boolean;
protected var _canvas:Rectangle;
protected var _postFilters:Array;
protected var _preFilters:Array;
protected static var ZERO_POINT:Point = new Point(0, 0);
public function BitmapRenderer(_arg1:Rectangle, _arg2:Boolean=false){
mouseEnabled = false;
mouseChildren = false;
_smoothing = _arg2;
_preFilters = new Array();
_postFilters = new Array();
_canvas = _arg1;
createBitmap();
_clearBetweenFrames = true;
}
public function get clearBetweenFrames():Boolean{
return (_clearBetweenFrames);
}
public function set clearBetweenFrames(_arg1:Boolean):void{
_clearBetweenFrames = _arg1;
}
override protected function renderParticles(_arg1:Array):void{
var _local2:int;
var _local3:int;
if (!_bitmap){
return;
};
_bitmapData.lock();
_local3 = _preFilters.length;
_local2 = 0;
while (_local2 < _local3) {
_bitmapData.applyFilter(_bitmapData, _bitmapData.rect, BitmapRenderer.ZERO_POINT, _preFilters[_local2]);
_local2++;
};
if (((_clearBetweenFrames) && ((_local3 == 0)))){
_bitmapData.fillRect(_bitmap.bitmapData.rect, 0);
};
_local3 = _arg1.length;
if (_local3){
_local2 = _local3;
while (_local2--) {
drawParticle(_arg1[_local2]);
};
};
_local3 = _postFilters.length;
_local2 = 0;
while (_local2 < _local3) {
_bitmapData.applyFilter(_bitmapData, _bitmapData.rect, BitmapRenderer.ZERO_POINT, _postFilters[_local2]);
_local2++;
};
if (_colorMap){
_bitmapData.paletteMap(_bitmapData, _bitmapData.rect, ZERO_POINT, _colorMap[1], _colorMap[2], _colorMap[3], _colorMap[0]);
};
_bitmapData.unlock();
}
protected function createBitmap():void{
if (!_canvas){
return;
};
if (((_bitmap) && (_bitmapData))){
_bitmapData.dispose();
_bitmapData = null;
};
if (_bitmap){
removeChild(_bitmap);
_bitmap = null;
};
_bitmap = new Bitmap(null, "auto", _smoothing);
_bitmapData = new BitmapData(Math.ceil(_canvas.width), Math.ceil(_canvas.height), true, 0);
_bitmap.bitmapData = _bitmapData;
addChild(_bitmap);
_bitmap.x = _canvas.x;
_bitmap.y = _canvas.y;
}
public function get bitmapData():BitmapData{
return (_bitmapData);
}
public function set canvas(_arg1:Rectangle):void{
_canvas = _arg1;
createBitmap();
}
public function clearPaletteMap():void{
_colorMap = null;
}
public function get preFilters():Array{
return (_preFilters.slice());
}
public function removeFilter(_arg1:BitmapFilter):void{
var _local2:int;
while (_local2 < _preFilters.length) {
if (_preFilters[_local2] == _arg1){
_preFilters.splice(_local2, 1);
return;
};
_local2++;
};
_local2 = 0;
while (_local2 < _postFilters.length) {
if (_postFilters[_local2] == _arg1){
_postFilters.splice(_local2, 1);
return;
};
_local2++;
};
}
public function set smoothing(_arg1:Boolean):void{
_smoothing = _arg1;
if (_bitmap){
_bitmap.smoothing = _arg1;
};
}
public function set preFilters(_arg1:Array):void{
var _local2:BitmapFilter;
for each (_local2 in _preFilters) {
removeFilter(_local2);
};
for each (_local2 in _arg1) {
addFilter(_local2, false);
};
}
protected function drawParticle(_arg1:Particle2D):void{
var _local2:Matrix;
_local2 = _arg1.matrixTransform;
_local2.translate(-(_canvas.x), -(_canvas.y));
_bitmapData.draw(_arg1.image, _local2, _arg1.colorTransform, DisplayObject(_arg1.image).blendMode, null, _smoothing);
}
public function setPaletteMap(_arg1:Array=null, _arg2:Array=null, _arg3:Array=null, _arg4:Array=null):void{
_colorMap = new Array(4);
_colorMap[0] = _arg4;
_colorMap[1] = _arg1;
_colorMap[2] = _arg2;
_colorMap[3] = _arg3;
}
public function get smoothing():Boolean{
return (_smoothing);
}
public function set postFilters(_arg1:Array):void{
var _local2:BitmapFilter;
for each (_local2 in _postFilters) {
removeFilter(_local2);
};
for each (_local2 in _arg1) {
addFilter(_local2, true);
};
}
public function addFilter(_arg1:BitmapFilter, _arg2:Boolean=false):void{
if (_arg2){
_postFilters.push(_arg1);
} else {
_preFilters.push(_arg1);
};
}
public function get canvas():Rectangle{
return (_canvas);
}
public function get postFilters():Array{
return (_postFilters.slice());
}
}
}//package org.flintparticles.twoD.renderers
Section 76
//DiscZone (org.flintparticles.twoD.zones.DiscZone)
package org.flintparticles.twoD.zones {
import flash.geom.*;
public class DiscZone implements Zone2D {
private var _innerRadius:Number;
private var _innerSq:Number;
private var _outerRadius:Number;
private var _center:Point;
private var _outerSq:Number;
private static const TWOPI:Number = 6.28318530717959;
public function DiscZone(_arg1:Point=null, _arg2:Number=0, _arg3:Number=0){
if (_arg2 < _arg3){
throw (new Error((((("The outerRadius (" + _arg2) + ") can't be smaller than the innerRadius (") + _arg3) + ") in your DiscZone. N.B. the outerRadius is the second argument in the constructor and the innerRadius is the third argument.")));
};
if (_arg1 == null){
_center = new Point(0, 0);
} else {
_center = _arg1;
};
_innerRadius = _arg3;
_outerRadius = _arg2;
_innerSq = (_innerRadius * _innerRadius);
_outerSq = (_outerRadius * _outerRadius);
}
public function getArea():Number{
return ((Math.PI * (_outerSq - _innerSq)));
}
public function set centerX(_arg1:Number):void{
_center.x = _arg1;
}
public function set centerY(_arg1:Number):void{
_center.y = _arg1;
}
public function get innerRadius():Number{
return (_innerRadius);
}
public function set innerRadius(_arg1:Number):void{
_innerRadius = _arg1;
_innerSq = (_innerRadius * _innerRadius);
}
public function get center():Point{
return (_center);
}
public function set outerRadius(_arg1:Number):void{
_outerRadius = _arg1;
_outerSq = (_outerRadius * _outerRadius);
}
public function get centerX():Number{
return (_center.x);
}
public function get centerY():Number{
return (_center.y);
}
public function contains(_arg1:Number, _arg2:Number):Boolean{
_arg1 = (_arg1 - _center.x);
_arg2 = (_arg2 - _center.y);
var _local3:Number = ((_arg1 * _arg1) + (_arg2 * _arg2));
return ((((_local3 <= _outerSq)) && ((_local3 >= _innerSq))));
}
public function getLocation():Point{
var _local1:Number = Math.random();
var _local2:Point = Point.polar((_innerRadius + ((1 - (_local1 * _local1)) * (_outerRadius - _innerRadius))), (Math.random() * TWOPI));
_local2.x = (_local2.x + _center.x);
_local2.y = (_local2.y + _center.y);
return (_local2);
}
public function get outerRadius():Number{
return (_outerRadius);
}
public function set center(_arg1:Point):void{
_center = _arg1;
}
}
}//package org.flintparticles.twoD.zones
Section 77
//Zone2D (org.flintparticles.twoD.zones.Zone2D)
package org.flintparticles.twoD.zones {
import flash.geom.*;
public interface Zone2D {
function getArea():Number;
function getLocation():Point;
function contains(_arg1:Number, _arg2:Number):Boolean;
}
}//package org.flintparticles.twoD.zones
Section 78
//abductWav (abductWav)
package {
import flash.media.*;
public dynamic class abductWav extends Sound {
}
}//package
Section 79
//alertWav (alertWav)
package {
import flash.media.*;
public dynamic class alertWav extends Sound {
}
}//package
Section 80
//applauseWav (applauseWav)
package {
import flash.media.*;
public dynamic class applauseWav extends Sound {
}
}//package
Section 81
//barkWav (barkWav)
package {
import flash.media.*;
public dynamic class barkWav extends Sound {
}
}//package
Section 82
//bassWav (bassWav)
package {
import flash.media.*;
public dynamic class bassWav extends Sound {
}
}//package
Section 83
//blipWav (blipWav)
package {
import flash.media.*;
public dynamic class blipWav extends Sound {
}
}//package
Section 84
//bossExplosionWav (bossExplosionWav)
package {
import flash.media.*;
public dynamic class bossExplosionWav extends Sound {
}
}//package
Section 85
//carStartWav (carStartWav)
package {
import flash.media.*;
public dynamic class carStartWav extends Sound {
}
}//package
Section 86
//crunchWav (crunchWav)
package {
import flash.media.*;
public dynamic class crunchWav extends Sound {
}
}//package
Section 87
//dingWav (dingWav)
package {
import flash.media.*;
public dynamic class dingWav extends Sound {
}
}//package
Section 88
//explosionWav (explosionWav)
package {
import flash.media.*;
public dynamic class explosionWav extends Sound {
}
}//package
Section 89
//jumpWav (jumpWav)
package {
import flash.media.*;
public dynamic class jumpWav extends Sound {
}
}//package
Section 90
//laserWav (laserWav)
package {
import flash.media.*;
public dynamic class laserWav extends Sound {
}
}//package
Section 91
//meawWav (meawWav)
package {
import flash.media.*;
public dynamic class meawWav extends Sound {
}
}//package
Section 92
//noisemakerWav (noisemakerWav)
package {
import flash.media.*;
public dynamic class noisemakerWav extends Sound {
}
}//package
Section 93
//pickupWav (pickupWav)
package {
import flash.media.*;
public dynamic class pickupWav extends Sound {
}
}//package
Section 94
//popWav (popWav)
package {
import flash.media.*;
public dynamic class popWav extends Sound {
}
}//package
Section 95
//runWav (runWav)
package {
import flash.media.*;
public dynamic class runWav extends Sound {
}
}//package
Section 96
//shatterWav (shatterWav)
package {
import flash.media.*;
public dynamic class shatterWav extends Sound {
}
}//package
Section 97
//square (square)
package {
import flash.display.*;
public dynamic class square extends MovieClip {
}
}//package
Section 98
//squashWav (squashWav)
package {
import flash.media.*;
public dynamic class squashWav extends Sound {
}
}//package
Section 99
//squealWav (squealWav)
package {
import flash.media.*;
public dynamic class squealWav extends Sound {
}
}//package
Section 100
//successWav (successWav)
package {
import flash.media.*;
public dynamic class successWav extends Sound {
}
}//package
Section 101
//themeWav (themeWav)
package {
import flash.media.*;
public dynamic class themeWav extends Sound {
}
}//package
Section 102
//whoopsWav (whoopsWav)
package {
import flash.media.*;
public dynamic class whoopsWav extends Sound {
}
}//package
Section 103
//zapWav (zapWav)
package {
import flash.media.*;
public dynamic class zapWav extends Sound {
}
}//package