Section 1
//Background_38 (PicoDay_fla.Background_38)
package PicoDay_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Background_38 extends MovieClip {
public function Background_38(){
addFrameScript(0, frame1, 68, frame69, 92, frame93, 116, frame117, 136, frame137, 303, frame304, 362, frame363, 1291, frame1292);
}
function frame93(){
gotoAndStop("plain");
}
function frame1(){
MovieClip(this.parent).bgUse = false;
stop();
}
function frame117(){
gotoAndStop("plain");
}
function frame363(){
gotoAndStop("plain");
}
function frame137(){
gotoAndStop("plain");
}
function frame1292(){
gotoAndStop("plain");
}
function frame304(){
gotoAndStop("plain");
}
function frame69(){
gotoAndStop("plain");
}
}
}//package PicoDay_fla
Section 2
//celebration_42 (PicoDay_fla.celebration_42)
package PicoDay_fla {
import flash.display.*;
public dynamic class celebration_42 extends MovieClip {
public function celebration_42(){
addFrameScript(0, frame1, 30, frame31, 64, frame65, 98, frame99, 133, frame134, 168, frame169, 203, frame204);
}
function frame65(){
stop();
}
function frame204(){
stop();
}
function frame169(){
stop();
}
function frame1(){
stop();
}
function frame31(){
stop();
}
function frame99(){
stop();
}
function frame134(){
stop();
}
}
}//package PicoDay_fla
Section 3
//CelebrationBack_43 (PicoDay_fla.CelebrationBack_43)
package PicoDay_fla {
import flash.display.*;
public dynamic class CelebrationBack_43 extends MovieClip {
public function CelebrationBack_43(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package PicoDay_fla
Section 4
//HelpDarnell_40 (PicoDay_fla.HelpDarnell_40)
package PicoDay_fla {
import flash.display.*;
public dynamic class HelpDarnell_40 extends MovieClip {
public function HelpDarnell_40(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PicoDay_fla
Section 5
//HelpNene_41 (PicoDay_fla.HelpNene_41)
package PicoDay_fla {
import flash.display.*;
public dynamic class HelpNene_41 extends MovieClip {
public function HelpNene_41(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package PicoDay_fla
Section 6
//Intro_36 (PicoDay_fla.Intro_36)
package PicoDay_fla {
import flash.display.*;
public dynamic class Intro_36 extends MovieClip {
public function Intro_36(){
addFrameScript(429, frame430);
}
function frame430(){
MovieClip(this.parent).gotoAndStop("game");
}
}
}//package PicoDay_fla
Section 7
//MainLoop_35 (PicoDay_fla.MainLoop_35)
package PicoDay_fla {
import flash.display.*;
public dynamic class MainLoop_35 extends MovieClip {
public function MainLoop_35(){
addFrameScript(861, frame862);
}
function frame862(){
gotoAndPlay("loophere");
}
}
}//package PicoDay_fla
Section 8
//MainTimeline (PicoDay_fla.MainTimeline)
package PicoDay_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var pHealth:Health;
public var tempa:Number;
public var bgPBUse:Boolean;
public var bgUse:Boolean;
public var myJohnny:Johnny;
public var d_txt:TextField;
public var PDL:MovieClip;
public var t_txt:TextField;
public var bossOn:Boolean;
public var bg:MovieClip;
public var jHealth:Health;
public var leveler:Number;
public var instructions_mc:MovieClip;
public var a_txt:TextField;
public var instructions:Boolean;
public var skip_btn:SimpleButton;
public var dHelp:MovieClip;
public var nHelp:MovieClip;
public var celebrator_mc:MovieClip;
public var tempa2:Number;
public var back_mc:MovieClip;
public var myPico:Pico;
public var start_btn:SimpleButton;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 10, frame11, 15, frame16, 20, frame21);
}
public function enterFrameHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Enemy;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
if (!bgUse){
_local2 = Math.floor((Math.random() * 1500));
switch (_local2){
case 0:
bg.gotoAndPlay("angry");
bgUse = true;
break;
case 1:
bg.gotoAndPlay("tankmen");
bgUse = true;
break;
case 2:
bg.gotoAndPlay("tankmen2");
bgUse = true;
break;
case 3:
bg.gotoAndPlay("tankmen3");
bgUse = true;
break;
case 4:
bg.gotoAndPlay("inverse");
bgUse = true;
break;
case 5:
bg.gotoAndPlay("robot");
bgUse = true;
break;
case 6:
bg.gotoAndPlay("tankmen");
bgUse = true;
break;
case 7:
bg.gotoAndPlay("tankmen2");
bgUse = true;
break;
case 8:
bg.gotoAndPlay("tankmen3");
bgUse = true;
break;
case 9:
if (!bgPBUse){
bg.gotoAndPlay("pbot");
bgUse = true;
bgPBUse = true;
};
break;
};
};
checkCelebrate();
if (leveler >= 15){
_local3 = (Math.random() * leveler);
if (_local3 < 1){
_local4 = ((Math.random() * (stage.stageWidth - 30)) + 15);
_local5 = new Enemy(_local4);
addChild(_local5);
if (leveler >= 25){
leveler = (leveler - 0.6);
} else {
leveler = (leveler - 0.1);
};
};
} else {
if (((!(bossOn)) && ((Enemy.enemies[0] == null)))){
celebrator_mc.gotoAndPlay("bosslevel");
launchBoss();
bossOn = true;
};
if (((bossOn) && (!(Johnny.BossAlive)))){
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
for (_local6 in Enemy.enemies) {
Enemy.enemies[_local6].removeIt();
};
for (_local7 in EBullet.ebullets) {
EBullet.ebullets[_local7].removeIt();
};
for (_local8 in Bullet.bullets) {
Bullet.bullets[_local8].removeIt();
};
myJohnny.die();
myPico.pDead();
this.removeChild(pHealth);
gotoAndStop("win");
};
};
if (myPico.getHealth() <= 0){
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
for (_local9 in Enemy.enemies) {
Enemy.enemies[_local9].removeIt();
};
for (_local10 in EBullet.ebullets) {
EBullet.ebullets[_local10].removeIt();
};
for (_local11 in Bullet.bullets) {
Bullet.bullets[_local11].removeIt();
};
myJohnny.die();
gotoAndStop("lose");
};
}
function frame1(){
stop();
}
function frame3(){
skip_btn.addEventListener(MouseEvent.CLICK, skipEventHandler);
}
public function skipEventHandler(_arg1:MouseEvent){
this.gotoAndStop("game");
}
function frame21(){
tempa2 = Math.floor(((Bullet.bulletHit / Bullet.bulletCount) * 100));
a_txt.text = (tempa2 + "%");
d_txt.text = (Pico.totalDamage + "%");
t_txt.text = Enemy.numEnemies.toString();
}
function frame16(){
tempa = Math.floor(((Bullet.bulletHit / Bullet.bulletCount) * 100));
a_txt.text = (tempa + "%");
d_txt.text = (Pico.totalDamage + "%");
t_txt.text = Enemy.numEnemies.toString();
trace((tempa * Enemy.numEnemies));
}
function frame2(){
stop();
start_btn.addEventListener(MouseEvent.CLICK, startEventHandler);
}
public function checkCelebrate():void{
if (((instructions) && ((leveler < 25)))){
instructions = false;
this.removeChild(instructions_mc);
};
if ((((leveler <= 40)) && ((celebrator_mc.currentFrame == 1)))){
celebrator_mc.gotoAndPlay("level1");
} else {
if ((((leveler <= 25)) && ((celebrator_mc.currentFrame == 31)))){
celebrator_mc.gotoAndPlay("level2");
} else {
if ((((leveler <= 22.5)) && ((celebrator_mc.currentFrame == 65)))){
celebrator_mc.gotoAndPlay("level3");
} else {
if ((((leveler <= 20)) && ((celebrator_mc.currentFrame == 99)))){
celebrator_mc.gotoAndPlay("level4");
} else {
if ((((leveler <= 17.5)) && ((celebrator_mc.currentFrame == 134)))){
celebrator_mc.gotoAndPlay("level5");
};
};
};
};
};
}
function frame11(){
myPico = new Pico((stage.stageWidth / 2), stage.stageHeight, this, 10);
this.addChild(myPico);
pHealth = new Health(15, 290, 100, myPico);
addChild(pHealth);
myJohnny = new Johnny(220, 500);
jHealth = new Health(425, 290, 100, myJohnny);
leveler = 40;
bossOn = false;
instructions = true;
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
bgUse = false;
bgPBUse = false;
}
public function startEventHandler(_arg1:MouseEvent){
back_mc.play();
stage.focus = stage;
start_btn.removeEventListener(MouseEvent.CLICK, startEventHandler);
removeChild(start_btn);
}
public function launchBoss(){
var _local1:DisplayObject;
_local1 = getChildByName("celebrator_mc");
addChildAt(myJohnny, (this.getChildIndex(_local1) - 1));
addChild(jHealth);
}
}
}//package PicoDay_fla
Section 9
//PDL_AD_11 (PicoDay_fla.PDL_AD_11)
package PicoDay_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class PDL_AD_11 extends MovieClip {
public var Pico_Button:SimpleButton;
public function PDL_AD_11(){
addFrameScript(0, frame1);
}
public function loadPicoCollection(_arg1:Event){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.newgrounds.com/collection/pico");
navigateToURL(_local2, "_blank");
}
function frame1(){
stop();
Pico_Button.addEventListener(MouseEvent.CLICK, loadPicoCollection);
}
}
}//package PicoDay_fla
Section 10
//PDL_BARFX_LOOP_7 (PicoDay_fla.PDL_BARFX_LOOP_7)
package PicoDay_fla {
import flash.display.*;
public dynamic class PDL_BARFX_LOOP_7 extends MovieClip {
public function PDL_BARFX_LOOP_7(){
addFrameScript(9, frame10);
}
function frame10(){
gotoAndPlay(1);
}
}
}//package PicoDay_fla
Section 11
//PDL_DONE_17 (PicoDay_fla.PDL_DONE_17)
package PicoDay_fla {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public dynamic class PDL_DONE_17 extends MovieClip {
public var Pico_Button:SimpleButton;
public function PDL_DONE_17(){
addFrameScript(0, frame1, 51, frame52, 224, frame225);
}
public function loadPicoCollection(_arg1:Event){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.newgrounds.com/collection/pico");
navigateToURL(_local2, "_blank");
}
function frame1(){
stage.quality = StageQuality.MEDIUM;
}
function frame225(){
stage.quality = StageQuality.HIGH;
MovieClip(root).play();
stop();
}
function frame52(){
Pico_Button.addEventListener(MouseEvent.CLICK, loadPicoCollection);
}
}
}//package PicoDay_fla
Section 12
//PDL_LOADBAR_6 (PicoDay_fla.PDL_LOADBAR_6)
package PicoDay_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class PDL_LOADBAR_6 extends MovieClip {
public function PDL_LOADBAR_6(){
addFrameScript(0, frame1);
}
public function onComplete(_arg1:Event):void{
MovieClip(parent).play();
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:int;
_local2 = Math.round(((_arg1.target.bytesLoaded / _arg1.target.bytesTotal) * 100));
gotoAndStop(_local2);
}
function frame1(){
MovieClip(root).stop();
if (root.loaderInfo.bytesLoaded == root.loaderInfo.bytesTotal){
MovieClip(parent).play();
};
root.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
root.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
}
}
}//package PicoDay_fla
Section 13
//PDL_LOADER_1 (PicoDay_fla.PDL_LOADER_1)
package PicoDay_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class PDL_LOADER_1 extends MovieClip {
public var ng_ad:MovieClip;
public var NG_Button:SimpleButton;
public var Play_Button:SimpleButton;
public function PDL_LOADER_1(){
addFrameScript(0, frame1, 8, frame9, 9, frame10);
}
public function loadNGSite(_arg1:Event){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.newgrounds.com");
navigateToURL(_local2, "_blank");
}
public function startAd(_arg1){
var _local2:URLLoader;
_local2 = new URLLoader(new URLRequest(_arg1));
_local2.addEventListener(Event.COMPLETE, ad_Loaded);
}
function frame10(){
stop();
}
public function playMovie(_arg1:Event){
play();
}
function frame1(){
Security.allowDomain("70.87.128.99");
Security.allowInsecureDomain("70.87.128.99");
Security.allowDomain("ads.shizmoo.com");
Security.allowInsecureDomain("ads.shizmoo.com");
Security.allowDomain("www.cpmstar.com");
Security.allowInsecureDomain("www.cpmstar.com");
Security.allowDomain("server.cpmstar.com");
Security.allowInsecureDomain("server.cpmstar.com");
NG_Button.addEventListener(MouseEvent.CLICK, loadNGSite);
stop();
}
function frame9(){
Play_Button.addEventListener(MouseEvent.CLICK, playMovie);
stop();
}
public function ad_Loaded(_arg1:Event){
var _local2:*;
var _local3:Loader;
_local2 = String(_arg1.target.data);
_local3 = new Loader();
_local3.load(new URLRequest(_local2));
ng_ad.addChild(_local3);
}
}
}//package PicoDay_fla
Section 14
//PDL_MASKANIM_21 (PicoDay_fla.PDL_MASKANIM_21)
package PicoDay_fla {
import flash.display.*;
public dynamic class PDL_MASKANIM_21 extends MovieClip {
public function PDL_MASKANIM_21(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package PicoDay_fla
Section 15
//PDL_SPARK_28 (PicoDay_fla.PDL_SPARK_28)
package PicoDay_fla {
import flash.display.*;
public dynamic class PDL_SPARK_28 extends MovieClip {
public function PDL_SPARK_28(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package PicoDay_fla
Section 16
//stripback_33 (PicoDay_fla.stripback_33)
package PicoDay_fla {
import flash.display.*;
public dynamic class stripback_33 extends MovieClip {
public function stripback_33(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
stop();
MovieClip(this.parent).nextFrame();
}
}
}//package PicoDay_fla
Section 17
//Bomb (Bomb)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Bomb extends MovieClip {
private var myTimeOut:uint;
private var speed:Number;
private var dist:Number;
private var exploded:Boolean;
public static var bombs:Array = [];
public function Bomb(_arg1:Number, _arg2:Number){
var _local3:int;
super();
addFrameScript(4, frame5, 11, frame12, 16, frame17, 39, frame40, 44, frame45, 59, frame60);
_local3 = Math.floor((Math.random() * 6));
switch (_local3){
case 0:
gotoAndPlay("bomb2");
break;
case 1:
gotoAndPlay("tank");
break;
case 2:
gotoAndStop("clock");
break;
case 3:
gotoAndPlay("bottle");
break;
default:
this.gotoAndPlay("bomb");
};
this.x = _arg1;
this.y = (_arg2 - 20);
speed = -3;
dist = (Math.round((Math.random() * 30)) - 15);
exploded = false;
bombs.push(this);
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(_arg1:Event){
if (this.y < (stage.stageHeight - speed)){
this.x = (this.x + dist);
if (dist < 0){
dist = (dist + 0.5);
};
if (dist > 0){
dist = (dist - 0.5);
};
this.y = (this.y + speed);
speed = (speed + 0.98);
} else {
exploded = true;
this.gotoAndStop("exploded");
removeIt();
};
}
function frame12(){
stop();
this.parent.removeChild(this);
}
function frame17(){
gotoAndPlay("bomb2");
}
function frame5(){
gotoAndPlay("bomb");
}
function frame40(){
gotoAndPlay("tank");
}
function frame45(){
stop();
}
private function removeIt(){
var _local1:int;
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
_local1 = 0;
while (_local1 < bombs.length) {
if (bombs[_local1] == this){
bombs.splice(_local1, 1);
};
_local1++;
};
}
public function explode(){
speed = 1;
exploded = true;
this.gotoAndPlay("explode");
removeIt();
}
function frame60(){
gotoAndPlay("bottle");
}
public static function checkHit(_arg1:MovieClip){
var _local2:int;
_local2 = 0;
while (_local2 < bombs.length) {
if (_arg1.hitTestPoint(bombs[_local2].x, bombs[_local2].y, true)){
_arg1.minusHealth(10);
bombs[_local2].explode();
};
_local2++;
};
}
}
}//package
Section 18
//Bullet (Bullet)
package {
import flash.display.*;
import flash.events.*;
public class Bullet extends MovieClip {
private var speed:Number;
private var vOrH:Boolean;
private var exploded:Boolean;
private var lOrR:Boolean;
public static var bulletHit:int;
public static var bullets:Array = [];
public static var bulletCount:int;
public function Bullet(_arg1:Boolean, _arg2:Boolean, _arg3:Number, _arg4:Number){
addFrameScript(5, frame6, 14, frame15);
bulletCount++;
vOrH = _arg1;
lOrR = _arg2;
speed = 20;
exploded = false;
if (vOrH){
this.x = _arg3;
this.y = (_arg4 - 65);
} else {
if (lOrR){
this.x = (_arg3 - 20);
this.y = (_arg4 - 38);
this.rotation = 270;
} else {
this.x = (_arg3 + 20);
this.y = (_arg4 - 38);
this.rotation = 90;
};
};
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(_arg1:Event){
if (exploded == false){
if (vOrH){
this.y = (this.y - speed);
} else {
if (lOrR){
this.x = (this.x - speed);
} else {
this.x = (this.x + speed);
};
};
speed = (speed + 1);
checkBounds();
};
}
function frame6(){
stop();
}
function frame15(){
stop();
this.parent.removeChild(this);
}
private function removeBullet():void{
var _local1:int;
_local1 = 0;
while (_local1 < bullets.length) {
if (bullets[_local1] == this){
bullets.splice(_local1, 1);
};
_local1++;
};
}
public function removeIt():void{
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
removeBullet();
}
private function checkBounds():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local1 = this.x;
_local2 = this.y;
_local3 = this.width;
_local4 = this.height;
if (((((((((_local1 - (_local3 / 2)) > stage.stageWidth)) || (((_local1 + (_local3 / 2)) < 0)))) || (((_local2 - (_local4 / 2)) > stage.stageHeight)))) || (((_local2 + (_local4 / 2)) < 0)))){
exploded = true;
removeIt();
this.parent.removeChild(this);
};
}
public static function checkHit(_arg1:MovieClip):void{
var _local2:int;
_local2 = 0;
while (_local2 < bullets.length) {
if (_arg1.hitTestPoint(bullets[_local2].x, bullets[_local2].y, true)){
_arg1.explode(bullets[_local2].x, bullets[_local2].y);
bulletHit++;
bullets[_local2].gotoAndPlay("explode");
bullets[_local2].exploded = true;
bullets[_local2].removeIt();
};
_local2++;
};
}
}
}//package
Section 19
//Darnell (Darnell)
package {
import flash.display.*;
import flash.events.*;
public class Darnell extends MovieClip {
private var healthUp:Number;
public function Darnell(){
addFrameScript(29, frame30);
this.x = 220;
this.y = 550;
healthUp = 1;
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(_arg1:Event){
this.x = Pico.myPicoA[0].x;
Pico.myPicoA[0].addHealth(healthUp);
healthUp = (healthUp + 0.05);
}
private function removeMe():void{
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
function frame30(){
stop();
this.removeMe();
this.parent.removeChild(this);
}
}
}//package
Section 20
//EBullet (EBullet)
package {
import flash.display.*;
import flash.events.*;
public class EBullet extends MovieClip {
private var speed:Number;
private var vOrH:Boolean;
private var exploded:Boolean;
private var lOrR:Boolean;
public static var ebullets:Array = [];
public function EBullet(_arg1:Boolean, _arg2:Boolean, _arg3:Number, _arg4:Number){
addFrameScript(0, frame1, 12, frame13);
vOrH = _arg1;
lOrR = _arg2;
speed = 15;
exploded = false;
if (vOrH){
this.x = _arg3;
this.y = (_arg4 - 40);
} else {
if (lOrR){
this.x = _arg3;
this.y = (_arg4 - 35);
this.rotation = 270;
} else {
this.x = _arg3;
this.y = (_arg4 - 35);
this.rotation = 90;
};
};
ebullets.push(this);
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(_arg1:Event){
if (exploded == false){
if (vOrH){
this.y = (this.y - speed);
} else {
if (lOrR){
this.x = (this.x - speed);
} else {
this.x = (this.x + speed);
};
};
speed = (speed + 1);
checkBounds();
};
}
function frame1(){
stop();
}
function frame13(){
stop();
this.parent.removeChild(this);
}
private function removeEBullet():void{
var _local1:int;
_local1 = 0;
while (_local1 < ebullets.length) {
if (ebullets[_local1] == this){
ebullets.splice(_local1, 1);
};
_local1++;
};
}
public function removeIt():void{
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
removeEBullet();
}
private function checkBounds():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local1 = this.x;
_local2 = this.y;
_local3 = this.width;
_local4 = this.height;
if (((((((((_local1 - (_local3 / 2)) > stage.stageWidth)) || (((_local1 + (_local3 / 2)) < 0)))) || (((_local2 - (_local4 / 2)) > stage.stageHeight)))) || (((_local2 + (_local4 / 2)) < 0)))){
exploded = true;
removeIt();
};
}
public static function checkHit(_arg1:MovieClip){
var _local2:int;
_local2 = 0;
while (_local2 < ebullets.length) {
if (_arg1.hitTestPoint(ebullets[_local2].x, ebullets[_local2].y, true)){
_arg1.minusHealth(5);
ebullets[_local2].gotoAndPlay("explode");
ebullets[_local2].removeIt();
};
_local2++;
};
}
}
}//package
Section 21
//Enemy (Enemy)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Enemy extends MovieClip {
private var myTimeOut:uint;
private var speed:Number;
private var dead:Boolean;
private var xSpeed:Number;
private var dir:Boolean;
public static var numEnemies:int;
public static var enemies:Array = [];
public static var nene:Boolean = false;
public function Enemy(_arg1:Number){
addFrameScript(0, frame1, 16, frame17, 28, frame29, 39, frame40);
dir = true;
dead = false;
numEnemies++;
this.x = _arg1;
this.y = -5;
speed = 1;
xSpeed = 0;
enemies.push(this);
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(_arg1:Event):void{
var _local2:int;
var _local3:Bomb;
var _local4:EBullet;
var _local5:Nene;
if (this.y <= (stage.stageHeight - speed)){
this.y = (this.y + speed);
speed = (speed + 0.05);
} else {
this.y = this.stage.stageHeight;
this.gotoAndStop("ground");
if (!Pico.orientToPico(this)){
this.scaleX = -1;
dir = true;
} else {
this.scaleX = 1;
dir = false;
};
};
this.x = (this.x + xSpeed);
Bullet.checkHit(this);
_local2 = Math.floor((Math.random() * 100));
if ((((((_local2 == 0)) && ((this.y < (stage.stageHeight / 2))))) && ((dead == false)))){
_local3 = new Bomb(this.x, this.y);
this.parent.addChild(_local3);
this.gotoAndPlay("chuck");
};
if ((((((_local2 == 1)) && ((this.y == stage.stageHeight)))) && ((dead == false)))){
_local4 = new EBullet(false, this.getDir(), this.x, this.y);
this.parent.addChild(_local4);
};
if ((((enemies.length > 12)) && ((nene == false)))){
nene = true;
_local5 = new Nene();
this.parent.addChild(_local5);
_local5.x = 215;
_local5.y = 300;
MovieClip(this.parent).nHelp.gotoAndStop("used");
};
}
private function getDir():Boolean{
return (dir);
}
function frame17(){
stop();
this.removeIt();
}
function frame29(){
stop();
this.removeIt();
}
function frame1(){
stop();
}
function frame40(){
gotoAndStop("fly");
}
public function removeIt(){
var _local1:int;
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
_local1 = 0;
while (_local1 < enemies.length) {
if (enemies[_local1] == this){
enemies.splice(_local1, 1);
};
_local1++;
};
this.parent.removeChild(this);
}
public function explode(_arg1:Number, _arg2:Number):void{
var _local3:int;
_local3 = Math.floor((Math.random() * 2));
if (_local3 == 0){
this.gotoAndPlay("ldead");
} else {
this.gotoAndPlay("rdead");
};
speed = -20;
if (_arg1 >= this.x){
xSpeed = -35;
} else {
xSpeed = 35;
};
dead = true;
}
public static function removeAllEnemies(){
var _local1:int;
while (_local1 < enemies.length) {
enemies[_local1].explode(220, 250);
_local1++;
};
trace(enemies);
}
}
}//package
Section 22
//Health (Health)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Health extends MovieClip {
private var size:Number;
private var follower:MovieClip;
public var health_mc:MovieClip;
public function Health(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:MovieClip){
addFrameScript(0, frame1, 1, frame2);
this.x = _arg1;
this.y = _arg2;
size = _arg3;
follower = _arg4;
if (this.x < 250){
this.gotoAndStop("pico");
} else {
this.gotoAndStop("johnny");
};
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function enterFrameHandler(_arg1:Event){
size = follower.getHealth();
this.health_mc.scaleY = (size / 100);
if (size <= 0){
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
this.parent.removeChild(this);
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 23
//Johnny (Johnny)
package {
import flash.display.*;
import flash.events.*;
public class Johnny extends MovieClip {
private var eWLevel:Number;
private var pHit:Boolean;
private var health:Number;
private var attacking:Boolean;
private var enemyWave:Boolean;
private var attackType:Number;
private var retreating:Boolean;
private var countTo:int;
public static var BossAlive:Boolean;
public static var myJohnnyA:Array = [];
public function Johnny(_arg1:Number, _arg2:Number){
addFrameScript(23, frame24, 76, frame77, 108, frame109, 139, frame140, 175, frame176, 194, frame195, 200, frame201, 234, frame235, 289, frame290);
this.x = _arg1;
this.y = _arg2;
health = 100;
attacking = false;
pHit = false;
enemyWave = false;
eWLevel = 30;
attackType = 0;
retreating = false;
BossAlive = true;
myJohnnyA.push(this);
this.gotoAndPlay("drop");
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
public function minusHealth(_arg1:Number):void{
health = (health - _arg1);
}
function frame77(){
gotoAndPlay("still");
}
private function enterFrameHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Enemy;
if ((((attacking == false)) && ((this.currentLabel == "still")))){
if ((Pico.myPicoA[0].x - 10) > this.x){
this.x = (this.x + 0.75);
} else {
if ((Pico.myPicoA[0].x + 10) < this.x){
this.x = (this.x - 0.75);
};
};
attack();
};
Bullet.checkHit(this);
if (((this.hitTestPoint(Pico.myPicoA[0].x, (Pico.myPicoA[0].y - 5), true)) && ((pHit == false)))){
trace("hit");
pHit = true;
Pico.myPicoA[0].minusHealth(10);
};
if ((((enemyWave == true)) && ((countTo > 0)))){
_local2 = (Math.random() * eWLevel);
if (_local2 < 1.5){
_local3 = ((Math.random() * (stage.stageWidth - 30)) + 15);
_local4 = new Enemy(_local3);
this.parent.addChild(_local4);
countTo--;
eWLevel = (eWLevel - 0.4);
};
} else {
if ((((enemyWave == true)) && ((countTo == 0)))){
enemyWave = false;
retreating = false;
this.gotoAndPlay("come");
};
};
}
function frame201(){
stop();
}
function frame290(){
gotoAndPlay("still");
}
function frame176(){
gotoAndPlay("still");
}
private function attack():void{
var _local1:Number;
_local1 = (Math.random() * 75);
if (_local1 <= 1){
attacking = true;
attackType = 1;
gotoAndPlay("attack1");
} else {
if (_local1 <= 2){
attacking = true;
attackType = 2;
gotoAndPlay("attack2");
} else {
if (_local1 <= 3){
attacking = true;
attackType = 3;
gotoAndPlay("attack3");
} else {
if (_local1 <= 4){
attacking = true;
attackType = 4;
gotoAndPlay("attack4");
} else {
if (_local1 <= 5){
attacking = true;
attackType = 5;
gotoAndPlay("attack5");
};
};
};
};
};
}
public function getHealth():Number{
return (health);
}
function frame109(){
gotoAndPlay("still");
}
public function die(){
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
function frame24(){
pHit = false;
attacking = false;
}
function frame195(){
stop();
BossAlive = false;
this.parent.removeChild(this);
}
function frame235(){
gotoAndPlay("still");
}
function frame140(){
gotoAndPlay("still");
}
public function explode(_arg1, _arg2):void{
if (retreating == false){
minusHealth(1);
if (health == 75){
this.gotoAndPlay("retreat");
countTo = 5;
enemyWave = true;
retreating = true;
};
if (health == 50){
this.gotoAndPlay("retreat");
countTo = 10;
enemyWave = true;
retreating = true;
};
if (health == 25){
this.gotoAndPlay("retreat");
countTo = 15;
enemyWave = true;
retreating = true;
};
if (health == 15){
this.gotoAndPlay("retreat");
countTo = 20;
enemyWave = true;
retreating = true;
};
if (health == 10){
this.gotoAndPlay("retreat");
countTo = 25;
enemyWave = true;
retreating = true;
};
if (health == 0){
this.gotoAndPlay("dead");
die();
};
};
}
}
}//package
Section 24
//Nene (Nene)
package {
import flash.display.*;
public dynamic class Nene extends MovieClip {
public function Nene(){
addFrameScript(18, frame19, 24, frame25);
}
function frame19(){
Enemy.removeAllEnemies();
}
function frame25(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 25
//Pico (Pico)
package {
import flash.display.*;
import flash.events.*;
public class Pico extends MovieClip {
private var pPoint:Boolean;
private var goRight:Boolean;
private var goLeft:Boolean;
private var multiFire:Boolean;
private var attackOn:Boolean;
private var health:Number;
private var accelerator:Number;
private var damageMover:Number;
private var darnell:Boolean;
private var velocity:Number;
private var pDir:Boolean;
public static var myPicoA:Array = [];
public static var totalDamage:int;
public function Pico(_arg1:Number, _arg2:Number, _arg3:Object, _arg4:Number=10){
addFrameScript(4, frame5, 9, frame10, 14, frame15, 19, frame20, 27, frame28);
this.x = _arg1;
this.y = _arg2;
health = 100;
goLeft = false;
goRight = false;
pDir = true;
pPoint = true;
attackOn = true;
multiFire = true;
velocity = _arg4;
accelerator = 0;
damageMover = 0;
darnell = true;
this.gotoAndStop("vleft");
myPicoA.push(this);
_arg3.parent.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
_arg3.parent.addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
this.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
private function changeWeapon():void{
if (attackOn){
if (pPoint == false){
pPoint = true;
} else {
pPoint = false;
};
if (pDir){
if (pPoint){
this.gotoAndStop("vleft");
} else {
this.gotoAndStop("hleft");
};
} else {
if (pPoint){
this.gotoAndStop("vright");
} else {
this.gotoAndStop("hright");
};
};
};
}
public function minusHealth(_arg1:Number):void{
health = (health - _arg1);
this.gotoAndPlay("hurt");
attackOn = false;
totalDamage = (totalDamage + _arg1);
if (health == 0){
pDead();
};
}
private function enterFrameHandler(_arg1:Event):void{
var _local2:*;
if (attackOn){
if (goLeft){
if (this.x > (velocity + accelerator)){
this.x = (this.x - (velocity + accelerator));
pDir = true;
if (pPoint){
if (this.currentLabel == "vleft"){
this.nextFrame();
} else {
this.gotoAndStop("vleft");
};
} else {
if (this.currentLabel == "hleft"){
this.nextFrame();
} else {
this.gotoAndStop("hleft");
};
};
};
accelerator = (accelerator + 0.75);
};
if (goRight){
if (this.x < ((stage.stageWidth - velocity) - accelerator)){
this.x = (this.x + (velocity + accelerator));
pDir = false;
if (pPoint){
if (this.currentLabel == "vright"){
this.nextFrame();
} else {
this.gotoAndStop("vright");
};
} else {
if (this.currentLabel == "hright"){
this.nextFrame();
} else {
this.gotoAndStop("hright");
};
};
};
accelerator = (accelerator + 0.75);
};
};
if ((((darnell == true)) && ((health < 50)))){
darnell = false;
_local2 = new Darnell();
this.parent.addChild(_local2);
MovieClip(this.parent).dHelp.gotoAndStop("used");
};
Bomb.checkHit(this);
EBullet.checkHit(this);
}
public function pDead():void{
this.removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
this.parent.removeChild(this);
}
function frame10(){
gotoAndStop("vright");
}
public function getDir():Boolean{
return (pDir);
}
public function addHealth(_arg1:Number):void{
health = (health + _arg1);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:Bullet;
_local2 = _arg1.keyCode;
if (_local2 == 37){
goLeft = true;
} else {
if (_local2 == 39){
goRight = true;
} else {
if ((((_local2 == 38)) || ((_local2 == 40)))){
changeWeapon();
} else {
if (_local2 == 32){
if (multiFire){
_local3 = new Bullet(getPoint(), getDir(), this.x, this.y);
this.parent.addChild(_local3);
Bullet.bullets.push(_local3);
multiFire = false;
};
};
};
};
};
}
public function getHealth():Number{
return (health);
}
function frame5(){
gotoAndStop("vleft");
}
function frame20(){
gotoAndStop("hright");
}
function frame15(){
gotoAndStop("hleft");
}
private function keyUpHandler(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = _arg1.keyCode;
if (_local2 == 37){
goLeft = false;
} else {
if (_local2 == 39){
goRight = false;
} else {
if (_local2 == 32){
multiFire = true;
};
};
};
accelerator = 0;
}
function frame28(){
stop();
attackOn = true;
trace(pDir, pPoint);
if (pDir){
if (pPoint){
this.gotoAndStop("vleft");
} else {
this.gotoAndStop("hleft");
};
} else {
if (pPoint){
this.gotoAndStop("vright");
} else {
this.gotoAndStop("hright");
};
};
}
public function getPoint():Boolean{
return (pPoint);
}
public static function orientToPico(_arg1:MovieClip):Boolean{
if (_arg1.x >= myPicoA[0].x){
return (false);
};
return (true);
}
}
}//package