Section 1
//AlarmClock (GREENHERMIT.GHDurationControl.AlarmClock)
package GREENHERMIT.GHDurationControl {
public class AlarmClock extends TimerBase {
public var timecount:Number;
public var stoptimer:Boolean;
public var timearray:Object;
public var getupfn:Function;
public function AlarmClock(_arg1:Function, _arg2:Array){
this.getupfn = _arg1;
this.timearray = _arg2;
timecount = 0;
stoptimer = false;
}
public function stop(){
stoptimer = true;
}
public function resume(){
stoptimer = false;
}
override public function process(){
if (stoptimer){
return;
};
if (timearray[timecount] != null){
getupfn(timearray[timecount], objectduration);
};
timecount++;
}
}
}//package GREENHERMIT.GHDurationControl
Section 2
//Duration (GREENHERMIT.GHDurationControl.Duration)
package GREENHERMIT.GHDurationControl {
public class Duration extends TimerBase {
public var durationEvent:Function;
public var countdown:Number;
public var duration:Number;
public function Duration(_arg1:Number, _arg2:Function){
this.duration = _arg1;
this.countdown = _arg1;
this.durationEvent = _arg2;
}
override public function process(){
if (this.duration <= 0){
return;
};
if (this.countdown > 0){
this.countdown--;
if (this.countdown == 0){
if (durationEvent != null){
durationEvent(objectduration);
};
};
};
}
}
}//package GREENHERMIT.GHDurationControl
Section 3
//TimerBase (GREENHERMIT.GHDurationControl.TimerBase)
package GREENHERMIT.GHDurationControl {
public class TimerBase {
public var objectduration:Object;
public function process(){
}
}
}//package GREENHERMIT.GHDurationControl
Section 4
//GunDesc (GREENHERMIT.GHGun.GunDesc)
package GREENHERMIT.GHGun {
public class GunDesc {
public var gun:String;
public var shootEvent:Function;
public var cooldowncount:Number;
public var reloadEvent:Function;
public var fullEvent:Function;
public var workEvent:Function;
public var mag:Number;
public var reloadcount:Number;
public var shootClass:Object;
public var savefqc:Number;
public var frequency:Number;
public var reload:Number;
public var magcount:Number;
public var cooldown:Number;
public var frequencycount:Number;
public var gageframe:Number;
public var pause:Boolean;
public var currentmag:Number;
public function GunDesc(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0){
this.mag = _arg2;
this.currentmag = _arg2;
this.magcount = _arg2;
this.reload = _arg3;
this.reloadcount = 0;
this.frequency = _arg4;
this.savefqc = _arg4;
this.frequencycount = 0;
this.pause = false;
this.gun = _arg1;
this.cooldown = _arg5;
this.cooldowncount = 0;
gageframe = int(((magcount / _arg2) * 100));
}
public function fullMag(){
reloadcount = 0;
magcount = mag;
frequencycount = 0;
gageframe = int(((magcount / mag) * 100));
}
public function process(){
if (mag <= 0){
return;
};
if (frequency <= 0){
return;
};
if (reload < 0){
return;
};
if (workEvent != null){
workEvent();
};
if (cooldown != 0){
cooldowncount++;
if (cooldowncount == cooldown){
if ((((reloadcount == 0)) && ((magcount < mag)))){
magcount++;
gageframe = int(((magcount / mag) * 100));
};
cooldowncount = 0;
};
};
if (frequencycount > 50000000){
frequencycount = 0;
};
if (reloadcount > 0){
reloadcount--;
gageframe = int((((reload - reloadcount) / (reload + 1)) * 100));
if (reloadcount == 0){
if (fullEvent != null){
gageframe = 100;
fullEvent();
};
magcount = mag;
gageframe = int(((magcount / mag) * 100));
frequencycount = 0;
};
};
if (pause){
return;
};
frequencycount++;
if (frequencycount == frequency){
if (magcount > 0){
shootClass.process(this);
if (shootEvent != null){
shootEvent(shootClass.bulletlist);
};
frequencycount = 0;
gageframe = int(((magcount / mag) * 100));
magcount--;
if (magcount == 0){
reloadcount = reload;
if (reloadEvent != null){
reloadEvent();
};
};
};
};
}
public function pauseToggle(_arg1:Object=null){
if (_arg1 != null){
this.pause = _arg1;
} else {
this.pause = !(this.pause);
};
}
public function shootNow(){
if (magcount > 0){
shootClass.process(this);
if (shootEvent != null){
shootEvent(shootClass.bulletlist);
};
gageframe = int(((magcount / mag) * 100));
magcount--;
if (magcount == 0){
if (reloadEvent != null){
reloadEvent();
};
reloadcount = reload;
};
};
}
}
}//package GREENHERMIT.GHGun
Section 5
//AngleDropMove (GREENHERMIT.GHMovement.AngleDropMove)
package GREENHERMIT.GHMovement {
import flash.display.*;
public class AngleDropMove extends MoveBaseClass {
var speed:Number;
var speedy:Number;
var angle:Number;
var rot:Boolean;
var speedx:Number;
var gravity:Number;
var accy:Number;
var speedy2:Number;
public function AngleDropMove(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Boolean=true, _arg5:Number=0.5){
control = _arg1;
this.angle = _arg2;
this.speed = _arg3;
this.speedx = (_arg3 * Math.cos(((_arg2 * Math.PI) / 180)));
this.speedy = (_arg3 * Math.sin(((_arg2 * Math.PI) / 180)));
this.rot = _arg4;
this.accy = 0;
this.gravity = _arg5;
this.speedy2 = 0;
}
override public function setSpeed(_arg1:Number){
this.speed = _arg1;
this.speedx = (_arg1 * Math.cos(((angle * Math.PI) / 180)));
this.speedy = (_arg1 * Math.sin(((angle * Math.PI) / 180)));
}
override public function getSpeed():Number{
return (speed);
}
override public function process(){
accy = (accy + gravity);
speedy2 = (speedy + accy);
if (rot){
control.rotation = ((Math.atan2(speedy2, speedx) * 180) / Math.PI);
};
control.y = (control.y + speedy2);
control.x = (control.x + speedx);
}
}
}//package GREENHERMIT.GHMovement
Section 6
//AngleMove (GREENHERMIT.GHMovement.AngleMove)
package GREENHERMIT.GHMovement {
import flash.display.*;
public class AngleMove extends LineMove {
public function AngleMove(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Boolean=true){
this.angle = _arg2;
this.speed = _arg3;
super(_arg1, (_arg3 * Math.cos(((_arg2 * Math.PI) / 180))), (_arg3 * Math.sin(((_arg2 * Math.PI) / 180))), _arg4);
}
}
}//package GREENHERMIT.GHMovement
Section 7
//HomingMove (GREENHERMIT.GHMovement.HomingMove)
package GREENHERMIT.GHMovement {
import flash.display.*;
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHShootingStyle.*;
import GREENHERMIT.GHUtils.*;
import GREENHERMIT.GHDurationControl.*;
import GREENHERMIT.GHBulletCollection.*;
public class HomingMove extends MoveBaseClass {
var dir:Number;
var speed:Number;
var target:Object;
var angle:Number;
var lock:Boolean;
var lastcheck:Number;
var lastdir;
var pdegree:Number;
var rotation;
public function HomingMove(_arg1:MovieClip, _arg2:Object, _arg3:Number, _arg4:Number, _arg5:Boolean=true, _arg6:Function=null){
control = _arg1;
this.target = _arg2;
pdegree = ((_arg1.rotation + 360) % 360);
this.angle = _arg4;
this.speed = _arg3;
this.rotation = _arg5;
lock = false;
dir = 1;
lastdir = 0;
lastcheck = 0;
this.ai = _arg6;
}
override public function setSpeed(_arg1:Number){
this.speed = _arg1;
}
override public function getSpeed():Number{
return (speed);
}
override public function process(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local1 = API.findAngle(control, target);
_local2 = Math.abs((control.x - target.x));
_local3 = Math.abs((control.y - target.y));
_local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
if (ai != null){
ai(this, target);
};
_local5 = 0;
if (!lock){
_local6 = (((_local1 + 360) % 360) - ((pdegree + 360) % 360));
if (dir == 1){
if (_local6 > 0){
pdegree = ((pdegree + angle) % 360);
_local5 = 1;
} else {
if (_local6 < 0){
pdegree = ((pdegree - angle) % 360);
_local5 = -1;
} else {
lock = true;
};
};
} else {
if (dir == -1){
if (_local6 > 0){
pdegree = (((pdegree + angle) + 360) % 360);
_local5 = -1;
} else {
if (_local6 < 0){
pdegree = (((pdegree - angle) - 360) % 360);
_local5 = 1;
} else {
lock = true;
};
};
};
};
};
control.x = (control.x + (speed * Math.cos(((pdegree * Math.PI) / 180))));
control.y = (control.y + (speed * Math.sin(((pdegree * Math.PI) / 180))));
if (((((!((_local5 == lastdir))) && (!((lastdir == 0))))) || (lock))){
lock = true;
if (lastcheck > 5){
_local1 = ((API.findAngle(control, target) + 360) % 360);
_local7 = Math.abs((_local1 - ((pdegree + 360) % 360)));
if ((((_local7 < 90)) && ((_local7 > 270)))){
pdegree = _local1;
} else {
lock = false;
};
lastcheck = 0;
};
lastcheck++;
};
lastdir = _local5;
if (rotation){
control.rotation = pdegree;
};
}
}
}//package GREENHERMIT.GHMovement
Section 8
//LineMove (GREENHERMIT.GHMovement.LineMove)
package GREENHERMIT.GHMovement {
import flash.display.*;
public class LineMove extends MoveBaseClass {
public var speed:Number;
public var speedx:Number;
public var speedy:Number;
public var angle:Number;
public var rotation:Boolean;
public function LineMove(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Boolean=true){
control = _arg1;
this.speedx = _arg2;
this.speedy = _arg3;
angle = ((Math.atan2(_arg3, _arg2) * 180) / Math.PI);
speed = Math.sqrt(((_arg2 * _arg2) + (_arg3 * _arg3)));
this.rotation = _arg4;
}
override public function setSpeed(_arg1:Number){
this.speed = _arg1;
this.speedx = (this.speed * Math.cos(((angle * Math.PI) / 180)));
this.speedy = (this.speed * Math.sin(((angle * Math.PI) / 180)));
}
override public function process(){
control.x = (control.x + speedx);
control.y = (control.y + speedy);
if (rotation){
control.rotation = ((((Math.atan2(speedy, speedx) * 180) / Math.PI) + 360) % 360);
};
}
override public function getSpeed():Number{
return (speed);
}
}
}//package GREENHERMIT.GHMovement
Section 9
//MapMove (GREENHERMIT.GHMovement.MapMove)
package GREENHERMIT.GHMovement {
import flash.display.*;
public class MapMove extends MoveBaseClass {
public var dashdirect:Number;
private var speedx:Number;
private var SLOPELEFT:Number;// = 0xFF0000
public var ground:Boolean;
private var SLOPEB:Number;// = 0x800000
private var speedy:Number;
public var right:Number;
public var left:Number;
public var dashground:Boolean;
public var dash:Number;
private var CLOSEALL:Number;// = 0xFF
private var speed:Number;
public var jumplimit:Number;
private var SLOPERIGHT:Number;// = 0xFFFF00
private var CLOSETOP:Number;// = 0xFF00
private var map:BitmapData;
public var isjump:Boolean;
public var outAreaWalk:Function;
public var cannotWalk:Function;
private var mapscale:Number;
private var FREE:Number;// = 0
private var SLOPEB2:Number;// = 0x808000
public var jumpfactor:Number;
public var jumpbase:Number;
public function MapMove(_arg1:MovieClip, _arg2:BitmapData, _arg3:Number, _arg4:Number=40){
CLOSEALL = 0xFF;
CLOSETOP = 0xFF00;
SLOPELEFT = 0xFF0000;
SLOPERIGHT = 0xFFFF00;
SLOPEB = 0x800000;
SLOPEB2 = 0x808000;
FREE = 0;
super();
control = _arg1;
if (control.gravity == null){
control.gravity = 3;
control.movegravity = control.gravity;
} else {
control.movegravity = control.gravity;
};
if (control.direct == null){
control.direct = 0;
control.movedirect = control.direct;
} else {
control.movedirect = control.direct;
};
this.speedy = 0;
this.speedx = 0;
this.speed = _arg3;
this.map = _arg2;
this.mapscale = _arg4;
this.ground = false;
this.jumpfactor = 0;
this.jumplimit = 0;
isjump = false;
jumpbase = 0;
dash = 0;
dashground = false;
}
override public function setSpeed(_arg1:Number){
this.speed = _arg1;
}
override public function getSpeed():Number{
return (speed);
}
public function setZone(_arg1:Number, _arg2:Number){
this.left = _arg1;
this.right = _arg2;
}
public function jumpNow(_arg1:Number=10, _arg2:Number=81):Boolean{
if (((ground) && ((dash == 0)))){
ground = false;
isjump = !(ground);
speedy = control.movegravity;
speedy = (speedy - (_arg1 * control.movegravity));
jumpbase = control.y;
this.jumplimit = _arg2;
return (true);
};
return (false);
}
public function getDirect():Number{
return (control.direct);
}
override public function process(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
dash--;
if (dash > 0){
_local2 = dash;
} else {
_local2 = 1;
dash = 0;
};
_local1 = 0;
while (_local1 < _local2) {
_local3 = control.x;
_local4 = control.y;
speedx = speed;
if (speed > mapscale){
speedx = mapscale;
};
speedx = (control.movedirect * speedx);
if (dash > 0){
speedx = ((dash / 2) * dashdirect);
};
speedy = (speedy + control.movegravity);
if (speedy > mapscale){
speedy = mapscale;
};
if (speedy < -(mapscale)){
speedy = -(mapscale);
};
if (dash > 0){
if (!dashground){
speedy = 1;
} else {
_local10 = int((_local3 / mapscale));
_local11 = int(((_local4 + 10) / mapscale));
_local12 = map.getPixel(_local7, _local8);
if (_local12 == FREE){
dashground = false;
};
};
};
_local5 = (_local4 + speedy);
_local6 = (_local3 + speedx);
_local7 = int((_local6 / mapscale));
_local8 = int((_local4 / mapscale));
_local9 = map.getPixel(_local7, _local8);
if ((((_local9 == SLOPEB)) || ((_local9 == SLOPEB2)))){
_local5 = ((_local8 * mapscale) - 1);
_local4 = _local5;
_local3 = _local6;
ground = true;
isjump = !(ground);
speedy = 0;
} else {
if (_local9 == CLOSEALL){
if (cannotWalk != null){
cannotWalk(control);
};
} else {
_local3 = _local6;
};
};
control.x = _local3;
if (speedy >= 0){
_local7 = int((_local3 / mapscale));
_local8 = int((_local5 / mapscale));
_local9 = map.getPixel(_local7, _local8);
_local13 = int((_local4 / mapscale));
_local14 = map.getPixel(_local7, _local13);
if ((((_local14 == SLOPEB)) || ((_local14 == SLOPEB2)))){
_local5 = ((_local13 * mapscale) - 1);
_local4 = _local5;
ground = true;
isjump = !(ground);
speedy = 0;
};
if (_local14 == SLOPERIGHT){
_local15 = ((((_local13 + 1) * mapscale) - 1) - (mapscale - (_local3 % mapscale)));
if (_local5 > _local15){
_local5 = _local15;
_local4 = _local5;
ground = true;
isjump = !(ground);
} else {
_local4 = _local5;
};
} else {
if (_local14 == SLOPELEFT){
_local15 = ((((_local13 + 1) * mapscale) - 1) - (_local3 % mapscale));
if (_local5 > _local15){
_local5 = _local15;
_local4 = _local5;
ground = true;
isjump = !(ground);
} else {
_local4 = _local5;
};
} else {
if ((((_local14 == FREE)) || ((_local14 == CLOSETOP)))){
if (_local9 == FREE){
_local4 = _local5;
} else {
if (_local9 == CLOSEALL){
_local5 = ((_local8 * mapscale) - 1);
_local4 = _local5;
speedy = 0;
ground = true;
isjump = !(ground);
} else {
if (_local9 == CLOSETOP){
_local16 = ((_local8 * mapscale) - 1);
if ((jumpbase - jumplimit) < _local16){
_local4 = _local16;
speedy = 0;
ground = true;
isjump = !(ground);
} else {
_local4 = _local5;
};
} else {
if (_local9 == SLOPELEFT){
_local15 = ((((_local8 + 1) * mapscale) - 1) - (_local3 % mapscale));
if (_local5 > _local15){
_local5 = _local15;
_local4 = _local5;
ground = true;
isjump = !(ground);
} else {
_local4 = _local5;
};
} else {
if (_local9 == SLOPERIGHT){
_local15 = ((((_local8 + 1) * mapscale) - 1) - (mapscale - (_local3 % mapscale)));
if (_local5 > _local15){
_local5 = _local15;
_local4 = _local5;
ground = true;
isjump = !(ground);
} else {
_local4 = _local5;
};
} else {
if ((((_local9 == SLOPEB)) || ((_local9 == SLOPEB2)))){
_local5 = ((_local8 * mapscale) - 1);
_local4 = _local5;
ground = true;
isjump = !(ground);
speedy = 0;
};
};
};
};
};
};
};
};
};
} else {
if (speedy < 0){
_local7 = int((_local3 / mapscale));
_local8 = int((_local5 / mapscale));
_local9 = map.getPixel(_local7, _local8);
if (_local9 == CLOSEALL){
speedy = control.movegravity;
} else {
_local4 = _local5;
};
};
};
if (!isjump){
jumpbase = 0;
};
control.y = _local4;
_local1++;
};
if (control.x > right){
if (outAreaWalk != null){
outAreaWalk(control);
};
};
if (control.x < left){
if (outAreaWalk != null){
outAreaWalk(control);
};
};
if (ai != null){
ai(control);
};
}
public function setDirect(_arg1:Number){
control.movedirect = _arg1;
control.direct = _arg1;
}
public function dashNow(_arg1:Number, _arg2:Number=10){
this.dashdirect = _arg1;
this.dash = _arg2;
if (ground){
dashground = true;
} else {
dashground = false;
};
}
}
}//package GREENHERMIT.GHMovement
Section 10
//MoveBaseClass (GREENHERMIT.GHMovement.MoveBaseClass)
package GREENHERMIT.GHMovement {
import flash.display.*;
public class MoveBaseClass {
public var ai:Function;
private var testcounter:Number;
public var control:MovieClip;
public function setSpeed(_arg1:Number){
trace(("Not impliment" + this));
}
public function process(){
trace(("Not impliment" + this));
}
public function getSpeed():Number{
trace(("Not impliment" + this));
return (0);
}
}
}//package GREENHERMIT.GHMovement
Section 11
//PositionMove (GREENHERMIT.GHMovement.PositionMove)
package GREENHERMIT.GHMovement {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public class PositionMove extends LineMove {
public function PositionMove(_arg1:MovieClip, _arg2:Object, _arg3:Number, _arg4:Boolean=true){
this.angle = API.findAngle(_arg1, _arg2);
this.speed = _arg3;
super(_arg1, (_arg3 * Math.cos(((angle * Math.PI) / 180))), (_arg3 * Math.sin(((angle * Math.PI) / 180))), _arg4);
}
}
}//package GREENHERMIT.GHMovement
Section 12
//RandomShoot (GREENHERMIT.GHShootingStyle.RandomShoot)
package GREENHERMIT.GHShootingStyle {
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHMovement.*;
import GREENHERMIT.GHUtils.*;
public dynamic final class RandomShoot extends ShootBaseMethod {
var bullet:Object;
public function RandomShoot(_arg1:Object, _arg2:Object){
this.bullet = _arg1;
}
override public function process(_arg1:GunDesc){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = getGunObject(_arg1);
_local3 = getGunPoint(_local2);
_local4 = API.createMovieFromBase(_local2.parent.objectin, bullet);
bulletlist = new Array();
bulletlist.push(_local4);
if (_local3 != null){
_local4.x = _local3.x;
_local4.y = _local3.y;
} else {
_local4.x = shooter.x;
_local4.y = shooter.y;
};
API.setMotion(_local4, new AngleMove(_local4, (Math.random() * 360), _local4.speed));
}
}
}//package GREENHERMIT.GHShootingStyle
Section 13
//RandomShootEx (GREENHERMIT.GHShootingStyle.RandomShootEx)
package GREENHERMIT.GHShootingStyle {
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHMovement.*;
import GREENHERMIT.GHUtils.*;
public dynamic final class RandomShootEx extends ShootBaseMethod {
var bullet:Object;
var info:Object;
public function RandomShootEx(_arg1:Object, _arg2:Object){
this.bullet = _arg1;
this.info = _arg2;
}
override public function process(_arg1:GunDesc){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = getGunObject(_arg1);
_local3 = getGunPoint(_local2);
_local4 = (Math.random() * 360);
bulletlist = new Array();
_local5 = 0;
while (_local5 < info.way) {
_local6 = API.createMovieFromBase(_local2.parent.objectin, bullet);
bulletlist.push(_local6);
if (_local3 != null){
_local6.x = _local3.x;
_local6.y = _local3.y;
} else {
_local6.x = shooter.x;
_local6.y = shooter.y;
};
_local6.rotation = (_local4 - ((_local5 - ((info.way - 1) * 0.5)) * info.angle));
API.setMotion(_local6, new AngleMove(_local6, (_local4 - ((_local5 - ((info.way - 1) * 0.5)) * info.angle)), _local6.speed));
_local5++;
};
}
}
}//package GREENHERMIT.GHShootingStyle
Section 14
//ShootBaseMethod (GREENHERMIT.GHShootingStyle.ShootBaseMethod)
package GREENHERMIT.GHShootingStyle {
import flash.display.*;
import GREENHERMIT.GHGun.*;
import flash.geom.*;
public dynamic class ShootBaseMethod {
var bulletlist:Array;
public var shooter:Object;
public var game:Object;
public var world:MovieClip;
public function getGunPoint(_arg1:MovieClip):Point{
var _local2:*;
if (_arg1 != null){
_local2 = new Point(_arg1.x, _arg1.y);
_local2 = _arg1.parent.localToGlobal(_local2);
_local2 = MovieClip(_arg1.parent).objectin.globalToLocal(_local2);
return (_local2);
};
return (null);
}
public function getGunObject(_arg1:GunDesc):MovieClip{
if (shooter[_arg1.gun] == null){
throw (Error(((("Error: " + shooter) + " need") + _arg1.gun)));
};
return (shooter[_arg1.gun]);
}
public function clear(){
}
public function getWorldPoint(_arg1:MovieClip):Point{
var gp:*;
var object = _arg1;
if (object != null){
try {
gp = new Point(object.x, object.y);
gp = object.parent.localToGlobal(gp);
gp = MovieClip(object.parent).objectin.globalToLocal(gp);
} catch(e) {
gp = null;
};
return (gp);
//unresolved jump
};
return (null);
}
public function process(_arg1:GunDesc){
}
}
}//package GREENHERMIT.GHShootingStyle
Section 15
//ShootLookingObject (GREENHERMIT.GHShootingStyle.ShootLookingObject)
package GREENHERMIT.GHShootingStyle {
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHMovement.*;
import flash.geom.*;
import GREENHERMIT.GHUtils.*;
public dynamic final class ShootLookingObject extends ShootBaseMethod {
var bullet:Object;
var info:Object;
public function ShootLookingObject(_arg1:Object, _arg2:Object){
this.bullet = _arg1;
this.info = _arg2;
}
override public function process(_arg1:GunDesc){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if (shooter.looking == null){
return;
};
if (!shooter.looking.visible){
return;
};
_local2 = getGunObject(_arg1);
_local3 = getGunPoint(_local2);
_local4 = new Point(shooter.looking.x, shooter.looking.y);
if (shooter.looking.hit != null){
_local4 = getWorldPoint(shooter.looking.hit);
};
bulletlist = new Array();
_local5 = 0;
while (_local5 < info.way) {
_local6 = API.createMovieFromBase(_local2.parent.objectin, bullet);
bulletlist.push(_local6);
if (_local3 != null){
_local6.x = _local3.x;
_local6.y = _local3.y;
} else {
_local6.x = shooter.x;
_local6.y = shooter.y;
};
_local7 = API.findAngle(_local3, _local4);
if (info.err != null){
_local7 = (_local7 + ((Math.random() * info.err) - (info.err / 2)));
};
_local6.rotation = (_local7 - ((_local5 - ((info.way - 1) * 0.5)) * info.angle));
API.setMotion(_local6, new AngleMove(_local6, (_local7 - ((_local5 - ((info.way - 1) * 0.5)) * info.angle)), _local6.speed));
_local5++;
};
_local4 = null;
}
}
}//package GREENHERMIT.GHShootingStyle
Section 16
//ShootMouse (GREENHERMIT.GHShootingStyle.ShootMouse)
package GREENHERMIT.GHShootingStyle {
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHMovement.*;
import flash.geom.*;
import GREENHERMIT.GHUtils.*;
public dynamic final class ShootMouse extends ShootBaseMethod {
var bullet:Object;
var info:Object;
public function ShootMouse(_arg1:Object, _arg2:Object){
this.bullet = _arg1;
this.info = _arg2;
}
override public function process(_arg1:GunDesc){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = super.game;
_local3 = getGunObject(_arg1);
_local4 = getGunPoint(_local3);
_local5 = new Point(_local3.parent.objectin.mouseX, _local3.parent.objectin.mouseY);
bulletlist = new Array();
_local6 = 0;
while (_local6 < info.way) {
_local7 = API.createMovieFromBase(_local3.parent.objectin, bullet);
bulletlist.push(_local7);
if (_local4 != null){
_local7.x = _local4.x;
_local7.y = _local4.y;
} else {
_local7.x = shooter.x;
_local7.y = shooter.y;
};
_local8 = API.findAngle(_local4, _local5);
if (info.err != null){
_local8 = (_local8 + ((Math.random() * info.err) - (info.err / 2)));
};
API.setMotion(_local7, new AngleMove(_local7, (_local8 - ((_local6 - ((info.way - 1) * 0.5)) * info.angle)), _local7.speed));
_local6++;
};
_local5 = null;
}
}
}//package GREENHERMIT.GHShootingStyle
Section 17
//ShootOwnerAngle (GREENHERMIT.GHShootingStyle.ShootOwnerAngle)
package GREENHERMIT.GHShootingStyle {
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHMovement.*;
import GREENHERMIT.GHUtils.*;
public dynamic final class ShootOwnerAngle extends ShootBaseMethod {
var bullet:Object;
var info:Object;
public function ShootOwnerAngle(_arg1:Object, _arg2:Object){
this.bullet = _arg1;
this.info = _arg2;
}
override public function process(_arg1:GunDesc){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = getGunObject(_arg1);
_local3 = getGunPoint(_local2);
bulletlist = new Array();
_local4 = 0;
while (_local4 < info.way) {
_local5 = API.createMovieFromBase(_local2.parent.objectin, bullet);
bulletlist.push(_local5);
if (_local3 != null){
_local5.x = _local3.x;
_local5.y = _local3.y;
} else {
_local5.x = shooter.x;
_local5.y = shooter.y;
};
_local6 = _local2.parent.rotation;
if (info.err != null){
_local6 = (_local6 + ((Math.random() * info.err) - (info.err / 2)));
};
_local5.rotation = (_local6 - ((_local4 - ((info.way - 1) * 0.5)) * info.angle));
API.setMotion(_local5, new AngleMove(_local5, (_local6 - ((_local4 - ((info.way - 1) * 0.5)) * info.angle)), _local5.speed));
_local4++;
};
}
}
}//package GREENHERMIT.GHShootingStyle
Section 18
//ShootOwnerAngleLoop (GREENHERMIT.GHShootingStyle.ShootOwnerAngleLoop)
package GREENHERMIT.GHShootingStyle {
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHMovement.*;
import GREENHERMIT.GHUtils.*;
public dynamic final class ShootOwnerAngleLoop extends ShootBaseMethod {
var bullet:Object;
var info:Object;
var shootorder:Number;
public function ShootOwnerAngleLoop(_arg1:Object, _arg2:Object){
this.bullet = _arg1;
this.info = _arg2;
shootorder = 0;
}
override public function process(_arg1:GunDesc){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = getGunObject(_arg1);
_local3 = getGunPoint(_local2);
bulletlist = new Array();
_local4 = API.createMovieFromBase(_local2.parent.objectin, bullet);
bulletlist.push(_local4);
_local5 = (shootorder % info.way);
if (_local3 != null){
_local4.x = _local3.x;
_local4.y = _local3.y;
} else {
_local4.x = shooter.x;
_local4.y = shooter.y;
};
_local6 = _local2.parent.rotation;
if (info.err != null){
_local6 = (_local6 + ((Math.random() * info.err) - (info.err / 2)));
};
_local4.rotation = (_local6 - ((_local5 - ((info.way - 1) * 0.5)) * info.angle));
API.setMotion(_local4, new AngleMove(_local4, (_local6 - ((_local5 - ((info.way - 1) * 0.5)) * info.angle)), _local4.speed));
shootorder++;
}
}
}//package GREENHERMIT.GHShootingStyle
Section 19
//KeyframeTemplate (GREENHERMIT.GHTemplate.KeyframeTemplate)
package GREENHERMIT.GHTemplate {
import flash.events.*;
public class KeyframeTemplate extends TemplateBaseClass {
public var keyFrameStyleEnterFrame:Function;
public var EventKBRelease:Function;
public var EventKBPress:Function;
override public function keyboardRelease(_arg1:Number){
if (EventKBRelease != null){
EventKBRelease(_arg1);
};
}
override public function EnterFrame(_arg1:Event){
var e = _arg1;
try {
super.EnterFrame(e);
if (this.keyFrameStyleEnterFrame != null){
this.keyFrameStyleEnterFrame(e);
};
} catch(e) {
trace(e);
};
}
override public function keyboardPress(_arg1:Number){
if (EventKBPress != null){
EventKBPress(_arg1);
};
}
}
}//package GREENHERMIT.GHTemplate
Section 20
//TemplateBaseClass (GREENHERMIT.GHTemplate.TemplateBaseClass)
package GREENHERMIT.GHTemplate {
import flash.display.*;
import GREENHERMIT.GHShootingStyle.*;
import flash.events.*;
import GREENHERMIT.GHUtils.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public class TemplateBaseClass extends MovieClip {
public var space:Object;
public var css:Object;
public var gamewidth:Number;
public var worldlist:Array;
public var gamepause:Boolean;
public var GHLINK:DisplayObject;
public var key:Array;
public var processfn:Array;
public var world:Object;
public var gameheight:Number;
public var processlist:Array;
public var spacelist:Array;
public var spaceprocesslist:Array;
public var cam:Object;
public var GHDESIGNCSS:StyleSheet;
public var keyfocus:MovieClip;
public var game:Object;
public function TemplateBaseClass(){
var _local1:RandomShoot;
var _local2:RandomShootEx;
var _local3:ShootLookingObject;
var _local4:ShootMouse;
var _local5:ShootOwnerAngle;
var _local6:ShootOwnerAngleLoop;
super();
game = this;
gamepause = false;
GHDESIGNCSS = MovieClip(parent).designCSS;
GHLINK = MovieClip(parent).llink;
css = CSSToVar.createVariable(this);
worldlist = new Array();
spacelist = new Array();
spaceprocesslist = new Array();
processlist = new Array();
processfn = new Array();
gamewidth = 640;
gameheight = 480;
key = new Array();
API.setLibrary(GHLINK);
cam = {x:0, y:0, focusobject:{x:(gamewidth / 2), y:(gameheight / 2)}, round:{x1:0, y1:0, x2:640, y2:480}};
keyfocus = new MovieClip();
keyfocus.addEventListener(KeyboardEvent.KEY_DOWN, keydown);
keyfocus.addEventListener(KeyboardEvent.KEY_UP, keyup);
this.addEventListener(Event.ENTER_FRAME, EnterFrame);
stop();
}
public function releaseFocus(){
try {
stage.focus = keyfocus;
} catch(e) {
};
}
public function keyboardRelease(_arg1:Number){
}
public function keydown(_arg1:KeyboardEvent){
keyboardPress(_arg1.keyCode);
key[_arg1.keyCode] = true;
}
public function keyup(_arg1:KeyboardEvent){
key[_arg1.keyCode] = false;
keyboardRelease(_arg1.keyCode);
delete key[_arg1.keyCode];
}
public function camProcess(){
if (cam.focusobject != null){
cam.smoothx = (cam.focusobject.x - (gamewidth / 2));
cam.smoothy = (cam.focusobject.y - (gameheight / 2));
if (cam.round != null){
if (cam.smoothx > (cam.round.x2 - gamewidth)){
cam.smoothx = (cam.round.x2 - gamewidth);
};
if (cam.smoothx < cam.round.x1){
cam.smoothx = cam.round.x1;
};
if (cam.smoothy > (cam.round.y2 - gameheight)){
cam.smoothy = (cam.round.y2 - gameheight);
};
if (cam.smoothy < cam.round.y1){
cam.smoothy = cam.round.y1;
};
};
API.smoothCamY(cam);
API.smoothCamX(cam);
API.updateWorld(world, cam);
};
}
public function freeSystemListener(){
this.removeEventListener(Event.ENTER_FRAME, EnterFrame);
keyfocus.removeEventListener(KeyboardEvent.KEY_DOWN, keydown);
keyfocus.removeEventListener(KeyboardEvent.KEY_UP, keyup);
}
public function createLayer(){
LayerCore.addGroup(this, "world", 0, 0);
LayerCore.addGroup(this, "space", 0, 0);
LayerCore.createLayerFromList(world, worldlist);
LayerCore.createLayerFromList(space, spacelist);
}
public function EnterFrame(_arg1:Event){
var e = _arg1;
if (gamepause){
return;
};
try {
stage.focus = keyfocus;
} catch(e) {
};
if (world != null){
try {
camProcess();
LayerCore.processListGroup(world, processlist, processfn);
LayerCore.processListGroup(space, spaceprocesslist, processfn);
} catch(e) {
trace(e);
};
};
}
public function keyboardPress(_arg1:Number){
}
public function readDesignDoc(_arg1:String):Object{
var _local2:*;
var _local3:*;
_local2 = GHDESIGNCSS.getStyle(_arg1);
for (_local3 in _local2) {
if (isNaN(Number(_local2[_local3]))){
} else {
_local2[_local3] = Number(_local2[_local3]);
};
};
return (_local2);
}
public function createWorld(){
createLayer();
}
}
}//package GREENHERMIT.GHTemplate
Section 21
//API (GREENHERMIT.GHUtils.API)
package GREENHERMIT.GHUtils {
import flash.display.*;
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHShootingStyle.*;
import GREENHERMIT.GHMovement.*;
import GREENHERMIT.GHTemplate.*;
import GREENHERMIT.GHDurationControl.*;
import flash.utils.*;
public class API {
private static var createcount:Number = 0;
private static var camspeed:Number = 40;
private static var library:DisplayObject = null;
public static function setTimeCount(_arg1:MovieClip, _arg2:Number){
if (_arg1.durationclass != null){
_arg1.durationclass.timecount = _arg2;
};
}
public static function getClass(_arg1:String):Class{
if (library != null){
return (MovieClip(library).getClass(_arg1));
};
return ((getDefinitionByName(_arg1) as Class));
}
public static function setSpeed(_arg1:MovieClip, _arg2:Number){
if (_arg1.motclass == null){
return (0);
};
_arg1.motclass.setSpeed(_arg2);
}
public static function smoothCamY(_arg1:Object){
var _local2:*;
var _local3:*;
_local2 = (_arg1.y - _arg1.smoothy);
_local3 = int((Math.abs((_arg1.y - _arg1.smoothy)) / 3));
if (_local3 > camspeed){
_local3 = camspeed;
};
if (_local2 < 0){
_arg1.y = (_arg1.y + _local3);
} else {
if (_local2 > 0){
_arg1.y = (_arg1.y - _local3);
};
};
}
public static function updateWorld(_arg1:Object, _arg2:Object){
_arg1.x = -(_arg2.x);
_arg1.y = -(_arg2.y);
}
public static function getDuration(_arg1:MovieClip){
return (_arg1.durationclass);
}
public static function getTimeCount(_arg1:MovieClip):Number{
if (_arg1.durationclass != null){
return (_arg1.durationclass.timecount);
};
return (0);
}
public static function createMovieFromBase(_arg1:Object, _arg2:Object, _arg3:Object=null, _arg4:String=null){
var world:*;
var imgclass:*;
var newclip:*;
var backup:*;
var field:*;
var worldobj = _arg1;
var base = _arg2;
var addition = _arg3;
var name = _arg4;
world = MovieClip(worldobj);
imgclass = null;
newclip = null;
backup = new Object();
if (base.editfrom != null){
for (field in base) {
backup[field] = base[field];
};
base = TemplateBaseClass(world.parent).css[base.editfrom];
};
if (backup.linkage != null){
try {
newclip = new (getClass(backup.linkage));
} catch(e) {
try {
newclip = new (getClass("cerror"));
} catch(e) {
trace("Create cerror::linkage in library to Show Error Object");
return (base);
};
};
} else {
try {
newclip = new (getClass(base.linkage));
} catch(e) {
try {
newclip = new (getClass("cerror"));
} catch(e) {
trace("Create cerror::linkage in library to Show Error Object");
return (base);
};
};
};
for (field in base) {
newclip[field] = base[field];
};
if (backup != null){
for (field in backup) {
newclip[field] = backup[field];
};
};
if (addition != null){
for (field in addition) {
newclip[field] = addition[field];
};
};
if (name == null){
createcount++;
newclip.name = (((((((base.layer + "/") + "[css:") + newclip.__ghbasename) + "]/") + newclip) + ".") + createcount);
} else {
newclip.name = name;
};
if (newclip.createMovieFinish != null){
newclip.createMovieFinish(newclip, base);
};
newclip.objectin = world;
world[base.layer].addChild(newclip);
return (newclip);
}
public static function getSpeed(_arg1:MovieClip):Number{
if (_arg1.motclass == null){
return (0);
};
return (_arg1.motclass.getSpeed());
}
public static function setDuration(_arg1:MovieClip, _arg2:Number, _arg3:Function){
_arg1.durationclass = new Duration(_arg2, _arg3);
_arg1.durationclass.objectduration = _arg1;
}
public static function removeMotion(_arg1:MovieClip){
_arg1.motclass = null;
}
public static function resumeTime(_arg1:MovieClip){
if (_arg1.durationclass != null){
_arg1.durationclass.resume();
};
}
public static function setShooterType(_arg1:MovieClip){
_arg1.gunclasslist = new Array();
}
public static function setDurationEx(_arg1:MovieClip, _arg2:Array, _arg3:Function){
_arg1.durationclass = new AlarmClock(_arg3, _arg2);
_arg1.durationclass.objectduration = _arg1;
}
public static function getMotion(_arg1:MovieClip):MoveBaseClass{
return (_arg1.motclass);
}
public static function stopTime(_arg1:MovieClip){
if (_arg1.durationclass != null){
_arg1.durationclass.stop();
};
}
public static function findAngle(_arg1:Object, _arg2:Object):Number{
var dx:*;
var dy:*;
var red:*;
var p1 = _arg1;
var p2 = _arg2;
try {
dx = (p2.x - p1.x);
dy = (p2.y - p1.y);
red = Math.atan2(dy, dx);
} catch(e) {
red = ((Math.random() * 2) * Math.PI);
};
return (((red * 180) / Math.PI));
}
public static function smoothCamX(_arg1:Object){
var _local2:*;
var _local3:*;
_local2 = (_arg1.x - _arg1.smoothx);
_local3 = int((Math.abs((_arg1.x - _arg1.smoothx)) / 3));
if (_local3 > camspeed){
_local3 = camspeed;
};
if (_local2 < 0){
_arg1.x = (_arg1.x + _local3);
} else {
if (_local2 > 0){
_arg1.x = (_arg1.x - _local3);
};
};
}
public static function setMotion(_arg1:MovieClip, _arg2:MoveBaseClass){
_arg2.control = _arg1;
_arg1.motclass = _arg2;
}
public static function setLibrary(_arg1:DisplayObject){
library = _arg1;
}
public static function setCamSpeed(_arg1:Number){
camspeed = _arg1;
}
public static function setAlarmTime(_arg1:MovieClip, _arg2:Number){
if (_arg1.durationclass != null){
_arg1.durationclass.timecount = _arg2;
};
}
public static function removeAllCompositClass(_arg1:MovieClip){
var _local2:*;
var _local3:*;
_local2 = 0;
if (_arg1.motclass != null){
delete _arg1.motclass;
};
if (_arg1.gunclasslist != null){
_local2 = (_arg1.gunclasslist.length - 1);
while (_local2 >= 0) {
_arg1.gunclasslist[_local2].shootClass.clear();
delete _arg1.gunclasslist[_local2].shootClass;
delete _arg1.gunclasslist[_local2];
_local2--;
};
delete _arg1.gunclasslist;
};
if (_arg1.durationclass != null){
delete _arg1.durationclass;
};
for (_local3 in _arg1) {
if (_arg1[_local3] != null){
delete _arg1[_local3];
};
};
}
public static function addShootMethod(_arg1:Object, _arg2:Object, _arg3:MovieClip, _arg4:GunDesc, _arg5:ShootBaseMethod){
if (_arg3.gunclasslist == null){
trace(("setShooterType First " + _arg3.name));
return;
};
_arg5.game = MovieClip(_arg1);
_arg5.world = MovieClip(_arg2);
_arg5.shooter = _arg3;
_arg4.shootClass = _arg5;
_arg3.gunclasslist.push(_arg4);
}
}
}//package GREENHERMIT.GHUtils
Section 22
//CSSToVar (GREENHERMIT.GHUtils.CSSToVar)
package GREENHERMIT.GHUtils {
import flash.display.*;
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHTemplate.*;
import flash.utils.*;
import GREENHERMIT.GHDataType.*;
public class CSSToVar {
public static function CSSCreateShootSet(_arg1:Object, _arg2:Object, _arg3:MovieClip, _arg4:Object){
var shootclass:Class;
var gun:GunDesc;
var shoot:*;
var game = _arg1;
var world = _arg2;
var obj = _arg3;
var css = _arg4;
try {
shootclass = (getDefinitionByName(("GREENHERMIT.GHShootingStyle." + css.shoot)) as Class);
gun = new GunDesc(css.gun, css.mag, css.reload, css.frq, css.cooldown);
shoot = new shootclass(game.css[css.bullet], css);
API.addShootMethod(game, world, obj, gun, shoot);
} catch(e) {
trace(((((("GREENHERMIT.GHShootingStyle." + css.shoot) + " not found\n") + "\t 1.ปัญหาอาจเกิดจาก เขียนชื่อ Class ผิดลองสะกดดู\n") + "\t 2.ไม่ได้ประกาศไว้ใน registerClass.as\n") + "\t 3.ไม่มี Class อยู่ใน package GREENHERMIT.GHShootingStyle ควร impliment ก่อน"));
};
}
public static function importCSSObject(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Function){
var _local5:*;
_local5 = 0;
while (_local5 < _arg3) {
if (_arg1[(_arg2 + _local5)] != null){
_arg1[(_arg2 + _local5)].createMovieFinish = _arg4;
};
_local5++;
};
}
public static function CSSEvent(_arg1:Object):Array{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = new Array();
for (_local3 in _arg1) {
_local4 = String(_local3).substr(0, 5);
if (_local4 == "frame"){
_local5 = String(_local3).substr(5, 500);
_local2[Number(_local5)] = _arg1[_local3];
};
};
return (_local2);
}
public static function createVariable(_arg1:TemplateBaseClass):Object{
var _local2:*;
var _local3:*;
_local2 = new Object();
_local3 = 0;
while (_local3 < _arg1.GHDESIGNCSS.styleNames.length) {
_local2[_arg1.GHDESIGNCSS.styleNames[_local3]] = _arg1.readDesignDoc(_arg1.GHDESIGNCSS.styleNames[_local3]);
_local2[_arg1.GHDESIGNCSS.styleNames[_local3]].__ghbasename = _arg1.GHDESIGNCSS.styleNames[_local3];
_local3++;
};
return (_local2);
}
public static function CSSApplyObject(_arg1:Object, _arg2:Object, _arg3:MovieClip, _arg4:Object){
if (_arg4.process != null){
_arg3.process = _arg1[_arg4.process];
};
if (_arg4.initobject != null){
_arg3.initobject = _arg1[_arg4.initobject];
};
if (_arg4.gun != null){
CSSCreateShootSet(_arg1, _arg2, _arg3, _arg1.css[_arg4.gun]);
};
if (_arg4.clock != null){
API.setDurationEx(_arg3, CSSEvent(_arg1.css[_arg4.clock]), _arg1[_arg4.clockfunction]);
};
if (_arg3.initobject != null){
_arg3.initobject(_arg3);
};
}
public static function CSSGun(_arg1:Object){
return (new GunDesc(_arg1.gun, _arg1.mag, _arg1.reload, _arg1.frq, _arg1.cooldown));
}
public static function createGlobal(_arg1:TemplateBaseClass):Object{
var _local2:*;
_local2 = 0;
while (_local2 < _arg1.GHDESIGNCSS.styleNames.length) {
_arg1[_arg1.GHDESIGNCSS.styleNames[_local2]] = _arg1.readDesignDoc(_arg1.GHDESIGNCSS.styleNames[_local2]);
_local2++;
};
return (_arg1);
}
}
}//package GREENHERMIT.GHUtils
Section 23
//LayerCore (GREENHERMIT.GHUtils.LayerCore)
package GREENHERMIT.GHUtils {
import flash.display.*;
import flash.utils.*;
public class LayerCore {
public static function processGroup(_arg1:Object, _arg2:Array){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local3 = (_arg1.numChildren - 1);
for (;_local3 >= 0;_local3--) {
_local4 = _arg1.getChildAt(_local3);
if ((_local4 is MovieClip)){
} else {
continue;
};
_local5 = 0;
while (_local5 < _arg2.length) {
if ((_local4[_arg2[_local5]] as Function)){
var _local7 = _local4;
_local7[_arg2[_local5]](_local4);
};
_local5++;
};
if (_local4.motclass != null){
_local4.motclass.process();
};
if (_local4.gunclasslist != null){
_local6 = 0;
while (_local6 < _local4.gunclasslist.length) {
_local4.gunclasslist[_local6].process();
_local6++;
};
};
if (_local4.durationclass != null){
_local4.durationclass.process();
};
};
}
public static function processListGroup(_arg1:Object, _arg2:Array, _arg3:Array){
var _local4:*;
_local4 = 0;
while (_local4 < _arg2.length) {
processGroup(_arg1[_arg2[_local4]], _arg3);
_local4++;
};
}
public static function createLayerFromList(_arg1:Object, _arg2:Array, _arg3:Object=null){
var _local4:*;
if (_arg3 == null){
_arg3 = _arg1;
};
_local4 = 0;
while (_local4 < _arg2.length) {
if (_arg2[_local4].movieclip == null){
addGroup(_arg1, _arg2[_local4].layername, 0, 0, _arg3);
} else {
addGroupByClip(_arg1, _arg2[_local4].layername, 0, 0, _arg2[_local4].movieclip, _arg3);
};
_local4++;
};
}
public static function addGroupByClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Object){
var _local7:*;
if (_arg6 == null){
_arg6 = _arg1;
};
_local7 = new ((getDefinitionByName(_arg5) as Class));
_local7.x = _arg3;
_local7.y = _arg4;
_arg6[_arg2] = _arg1.addChild(_local7);
return (_arg6[_arg2]);
}
public static function addGroup(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Object=null){
var _local6:*;
if (_arg5 == null){
_arg5 = _arg1;
};
_local6 = new MovieClip();
_local6.x = _arg3;
_local6.y = _arg4;
_arg5[_arg2] = _arg1.addChild(_local6);
return (_arg5[_arg2]);
}
}
}//package GREENHERMIT.GHUtils
Section 24
//bar_root_18 (TankAttack_fla.bar_root_18)
package TankAttack_fla {
import flash.display.*;
public dynamic class bar_root_18 extends MovieClip {
public var barmask:MovieClip;
}
}//package TankAttack_fla
Section 25
//BG_2 (TankAttack_fla.BG_2)
package TankAttack_fla {
import flash.display.*;
public dynamic class BG_2 extends MovieClip {
public function BG_2(){
addFrameScript(10, frame11);
}
function frame11(){
MovieClip(parent).gotoAndStop(2);
}
}
}//package TankAttack_fla
Section 26
//c1_158 (TankAttack_fla.c1_158)
package TankAttack_fla {
import flash.display.*;
public dynamic class c1_158 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 27
//c2_159 (TankAttack_fla.c2_159)
package TankAttack_fla {
import flash.display.*;
public dynamic class c2_159 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 28
//c3_160 (TankAttack_fla.c3_160)
package TankAttack_fla {
import flash.display.*;
public dynamic class c3_160 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 29
//c4_161 (TankAttack_fla.c4_161)
package TankAttack_fla {
import flash.display.*;
public dynamic class c4_161 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 30
//dia_shop_182 (TankAttack_fla.dia_shop_182)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class dia_shop_182 extends MovieClip {
public var csl;
public var iv11:MovieClip;
public var iv10:MovieClip;
public var s1:MovieClip;
public var s3:MovieClip;
public var s4:MovieClip;
public var s5:MovieClip;
public var s6:MovieClip;
public var s7:MovieClip;
public var s8:MovieClip;
public var s2:MovieClip;
public var s9:MovieClip;
public var hptext:TextField;
public var scorepoint;
public var btnslot:SimpleButton;
public var so:SharedObject;
public var btnhp:SimpleButton;
public var a;
public var sl:Array;
public var cspd;
public var sg:Array;
public var iv0:MovieClip;
public var iv1:MovieClip;
public var iv3:MovieClip;
public var iv4:MovieClip;
public var iv6:MovieClip;
public var iv2:MovieClip;
public var es:Array;
public var iv5:MovieClip;
public var iv7:MovieClip;
public var iv9:MovieClip;
public var iv8:MovieClip;
public var chp;
public var money;
public var showmfz2:SimpleButton;
public var esa10:MovieClip;
public var esa11:MovieClip;
public var esa12:MovieClip;
public var gamelevel;
public var btnrepair:SimpleButton;
public var shop;
public var sl0:MovieClip;
public var sl2:MovieClip;
public var sl3:MovieClip;
public var sl1:MovieClip;
public var detailtext:TextField;
public var sltext:TextField;
public var esa1:MovieClip;
public var esa3:MovieClip;
public var esa5:MovieClip;
public var esa6:MovieClip;
public var esa8:MovieClip;
public var esa2:MovieClip;
public var esa7:MovieClip;
public var esa9:MovieClip;
public var esa4:MovieClip;
public var iv:Array;
public var es1:MovieClip;
public var es2:MovieClip;
public var es3:MovieClip;
public var es5:MovieClip;
public var es6:MovieClip;
public var es7:MovieClip;
public var es4:MovieClip;
public var es11:MovieClip;
public var es9:MovieClip;
public var spdtext:TextField;
public var es12:MovieClip;
public var es8:MovieClip;
public var es10:MovieClip;
public var btnspeed:SimpleButton;
public var dragobject;
public var sell:Array;
public var memgui;
public var bok:SimpleButton;
public var s11:MovieClip;
public var s12:MovieClip;
public var bok_click;
public var s10:MovieClip;
public var showmfz:SimpleButton;
public var moneytext:TextField;
public var inv:Array;
public var game;
public var memlist;
public function dia_shop_182(){
addFrameScript(0, frame1);
}
public function setList(_arg1:Number){
shop[("es" + iv[(_arg1 - 1)])].x = shop[("iv" + (_arg1 - 1))].x;
shop[("es" + iv[(_arg1 - 1)])].y = shop[("iv" + (_arg1 - 1))].y;
}
public function addSlot(_arg1:MouseEvent){
if (game.css[("skill4" + csl)] != null){
if (money >= game.css[("skill4" + csl)].money){
money = (money - game.css[("skill4" + csl)].money);
updateMoney();
sl[(csl + 2)].visible = true;
game.parent[("gslot" + (csl + 2))].visible = true;
csl++;
so.data.csl = csl;
if (game.css[("skill4" + csl)] != null){
detailtext.text = game.css[("skill4" + csl)].detail;
};
if (csl >= 2){
sltext.text = "MAX";
detailtext.text = "can not upgrade ";
} else {
sltext.text = ("lv" + (csl + 1));
};
} else {
detailtext.text = "you don't have enough money.";
};
};
}
public function addSpeed(_arg1:MouseEvent){
if (game.css[("skill3" + cspd)] != null){
if (money >= game.css[("skill3" + cspd)].money){
game.css[("enemy" + 99)].speed = (game.css[("enemy" + 99)].speed + 1);
game.player.speed = (game.player.speed + 1);
money = (money - game.css[("skill3" + cspd)].money);
updateMoney();
cspd++;
so.data.cspd = cspd;
if (game.css[("skill3" + cspd)] != null){
detailtext.text = game.css[("skill3" + cspd)].detail;
};
if (cspd >= 5){
spdtext.text = "MAX";
detailtext.text = "can not upgrade ";
} else {
spdtext.text = ("lv" + (cspd + 1));
};
} else {
detailtext.text = "you don't have enough money.";
};
};
}
public function openShop(){
var _local1:*;
so = SharedObject.getLocal("TA");
if (so.data.money == undefined){
so.data.money = 0;
};
if (so.data.gamelevel == undefined){
so.data.gamelevel = 0;
};
if (so.data.scorepoint == undefined){
so.data.scorepoint = 0;
};
if (so.data.cspd == null){
so.data.cspd = 0;
};
if (so.data.chp == null){
so.data.chp = 0;
};
if (so.data.csl == null){
so.data.csl = 0;
};
chp = so.data.chp;
cspd = so.data.cspd;
csl = so.data.csl;
scorepoint = so.data.scorepoint;
money = so.data.money;
moneytext.text = money;
gamelevel = so.data.gamelevel;
if (csl >= 1){
_local1 = 0;
while (_local1 < csl) {
if (game.css[("skill4" + _local1)] != null){
sl[(_local1 + 2)].visible = true;
if ((_local1 + 1) >= 2){
sltext.text = "MAX";
} else {
sltext.text = ("lv" + (_local1 + 2));
};
};
_local1++;
};
};
if (cspd >= 1){
_local1 = 0;
while (_local1 < cspd) {
if (game.css[("skill3" + _local1)] != null){
if ((_local1 + 1) >= 5){
spdtext.text = "MAX";
} else {
spdtext.text = ("lv" + (_local1 + 2));
};
};
_local1++;
};
};
if (chp >= 1){
_local1 = 0;
while (_local1 < chp) {
if (game.css[("skill2" + _local1)] != null){
if ((_local1 + 1) >= 5){
hptext.text = "MAX";
} else {
hptext.text = ("lv" + (_local1 + 2));
};
};
_local1++;
};
};
_local1 = 0;
while (_local1 < 50) {
if ((((_local1 > 0)) && ((_local1 < 13)))){
if (money >= game.css[("skill" + _local1)].money){
shop[("s" + _local1)].alpha = 1;
} else {
shop[("s" + _local1)].alpha = 0;
};
};
if (so.data[("sl" + 2)] == true){
shop[("sl" + 2)].visible = true;
};
if (so.data[("sl" + 3)] == true){
shop[("sl" + 3)].visible = true;
};
if (so.data[("s" + _local1)] == true){
shop[("s" + _local1)].visible = false;
};
if (so.data[("iv" + _local1)] != null){
if (iv[(_local1 - 1)] == null){
iv.push(so.data[("iv" + _local1)]);
setList(iv.length);
};
};
if (so.data[("sl" + _local1)] != null){
memlist[_local1] = shop[("esa" + so.data[("sl" + _local1)])];
memlist[_local1].alpha = 1;
memlist[_local1].scaleX = 1;
memlist[_local1].scaleY = 1;
memlist[_local1].x = sl[_local1].x;
memlist[_local1].y = sl[_local1].y;
so.data[("slotgun" + _local1)] = memlist[_local1];
};
if (so.data[("slotgun" + game.slotgun[_local1])] != null){
};
if (shop[("s" + _local1)] != null){
shop[("s" + _local1)].addEventListener("click", setShop);
shop[("s" + _local1)].addEventListener(MouseEvent.MOUSE_OVER, detailItem);
};
if (shop[("es" + _local1)] != null){
shop[("es" + _local1)].addEventListener(MouseEvent.MOUSE_DOWN, clickDrag);
shop[("es" + _local1)].addEventListener(MouseEvent.MOUSE_OVER, detailItem2);
};
if (shop[("esa" + _local1)] != null){
shop[("esa" + _local1)].addEventListener(MouseEvent.MOUSE_UP, clickDrop);
shop[("esa" + _local1)].addEventListener(MouseEvent.MOUSE_OVER, detailItem3);
};
if (memlist[_local1] != null){
game.parent[("ic" + memlist[_local1].name.substr(3))].x = -999;
game.parent[("ic" + memlist[_local1].name.substr(3))].y = -999;
};
if (game.parent[("gagegun" + _local1)] != null){
game.parent[("gagegun" + _local1)].x = -1000;
game.parent[("gagegun" + _local1)].y = -1000;
};
_local1++;
};
btnslot.addEventListener(MouseEvent.CLICK, addSlot);
btnslot.addEventListener(MouseEvent.MOUSE_OVER, detailSlot);
btnspeed.addEventListener(MouseEvent.CLICK, addSpeed);
btnspeed.addEventListener(MouseEvent.MOUSE_OVER, detailSpeed);
btnhp.addEventListener(MouseEvent.CLICK, addHP);
btnhp.addEventListener(MouseEvent.MOUSE_OVER, detailHP);
btnrepair.addEventListener(MouseEvent.CLICK, addRepair);
btnrepair.addEventListener(MouseEvent.MOUSE_OVER, detailRepair);
}
public function setShop(_arg1){
var _local2:*;
_local2 = _arg1.target.name.substr(1);
if (shop[("s" + _local2)] != null){
if (game.css[("skill" + _local2)] != null){
if (money >= game.css[("skill" + _local2)].money){
money = (money - game.css[("skill" + _local2)].money);
updateMoney();
iv.push(_local2);
so.data[("s" + _local2)] = true;
so.data[("iv" + iv.length)] = _local2;
setList(iv.length);
_arg1.target.visible = false;
_arg1.target.removeEventListener("click", setShop);
} else {
detailtext.text = "you don't have enough money.";
};
};
};
}
function frame1(){
shop = this;
showmfz.addEventListener("click", linkmfz);
showmfz2.addEventListener("click", linkmfz);
game = MovieClip(this.parent).game;
a = 0;
sell = new Array();
es = new Array();
iv = new Array();
inv = new Array();
sl = new Array();
sg = new Array();
sell = [0, 1, 2, 3];
sl = [shop[("sl" + 0)], shop[("sl" + 1)], shop[("sl" + 2)], shop[("sl" + 3)]];
sl[2].visible = false;
sl[3].visible = false;
memlist = new Array();
memgui = new Array();
dragobject = null;
game.parent.flashatt.visible = false;
bok_click = function (){
var _local1:*;
so.data.money = money;
so.data.gamelevel = gamelevel;
so.data.sorepoint = scorepoint;
game.money = so.data.money;
game.scorepoint = so.data.scorepoint;
game.gamelevel = so.data.gamelevel;
game.gamepause = false;
shop.visible = false;
game.visible = true;
so.flush();
so.close();
_local1 = 1;
while (_local1 < 4) {
if (memlist[_local1] != null){
game.slotgun[_local1] = memlist[_local1].name.substr(3);
} else {
game.slotgun[_local1] = null;
};
_local1++;
};
};
bok.addEventListener("click", bok_click);
}
public function clickDrop(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
_local2 = false;
_local3 = 1;
while (_local3 < 4) {
if (shop[("sl" + _local3)].hitTestObject(dragobject.hit)){
if (shop[("sl" + _local3)].visible == false){
return;
};
dragobject.stopDrag();
if (memlist[_local3] != null){
memlist[_local3].x = -1000;
};
memlist[_local3] = dragobject;
memlist[_local3].alpha = 1;
memlist[_local3].scaleX = 1;
memlist[_local3].scaleY = 1;
memlist[_local3].x = shop[("sl" + _local3)].x;
memlist[_local3].y = shop[("sl" + _local3)].y;
_local2 = true;
so.data[("sl" + _local3)] = memlist[_local3].name.substr(3);
slotList(_local3);
};
_local3++;
};
if (!_local2){
dragobject.stopDrag();
dragobject.x = -1000;
};
}
public function detailSpeed(_arg1:MouseEvent){
if (game.css[("skill3" + cspd)] != null){
detailtext.text = game.css[("skill3" + cspd)].detail;
};
}
public function clickDrag(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
_local2 = _arg1.target.name.substr(2);
if (shop[("esa" + _local2)] == null){
return;
};
shop[("esa" + _local2)].x = (shop.mouseX - 20);
shop[("esa" + _local2)].y = (shop.mouseY - 20);
shop[("esa" + _local2)].startDrag();
dragobject = shop[("esa" + _local2)];
_local3 = 1;
while (_local3 < 4) {
if (memlist[_local3] != null){
if (memlist[_local3].name.substr(3) == dragobject.name.substr(3)){
memlist[_local3] = null;
};
};
_local3++;
};
}
public function detailItem(_arg1:MouseEvent){
var _local2:*;
_local2 = _arg1.target.name.substr(1);
if (game.css[("skill" + _local2)] == null){
return;
};
if (game.css[("skill" + _local2)].detail != null){
detailtext.text = game.css[("skill" + _local2)].detail;
};
}
public function detailHP(_arg1:MouseEvent){
if (game.css[("skill2" + chp)] != null){
detailtext.text = game.css[("skill2" + chp)].detail;
};
}
public function detailRepair(_arg1:MouseEvent){
if (game.css["skill45"] != null){
detailtext.text = game.css["skill45"].detail;
};
}
public function addHP(_arg1:MouseEvent){
if (game.css[("skill2" + chp)] != null){
if (money >= game.css[("skill2" + chp)].money){
game.css[("enemy" + 99)].maxhp = (game.css[("enemy" + 99)].maxhp + game.css[("skill2" + chp)].hp);
game.player.maxhp = (game.player.maxhp + game.css[("skill2" + chp)].hp);
game.player.hp = (game.player.hp + game.css[("skill2" + chp)].hp);
game.parent.hpgage.gotoAndStop(int(((game.player.hp * 100) / game.player.maxhp)));
trace(game.player.maxhp);
money = (money - game.css[("skill2" + chp)].money);
updateMoney();
chp++;
so.data.chp = chp;
if (game.css[("skill2" + chp)] != null){
detailtext.text = game.css[("skill2" + chp)].detail;
};
if (chp >= 5){
hptext.text = "MAX";
detailtext.text = "can not upgrade ";
} else {
hptext.text = ("lv" + (chp + 1));
};
} else {
detailtext.text = "you don't have enough money.";
};
};
}
public function addRepair(_arg1:MouseEvent){
if (game.player.hp >= game.player.maxhp){
detailtext.text = "Your hit point is fully restore";
return;
};
if (game.css["skill45"] != null){
if (money >= game.css["skill45"].money){
if (game.player.hp != null){
game.player.hp = (game.player.hp + game.css["skill45"].hp);
game.parent.hpgage.gotoAndStop(int(((game.player.hp * 100) / game.player.maxhp)));
if (game.player.hp > game.player.maxhp){
game.player.hp = game.player.maxhp;
};
money = (money - game.css["skill45"].money);
updateMoney();
};
} else {
detailtext.text = "you don't have enough money.";
};
};
}
public function setSlot(_arg1){
var _local2:*;
_local2 = _arg1.target.name.substr(2);
if (shop[("es" + _local2)] != null){
sl.push(shop[("sl" + _local2)]);
};
}
public function updateMoney(){
var _local1:*;
moneytext.text = money;
_local1 = 0;
while (_local1 < 13) {
if ((((_local1 > 0)) && ((_local1 < 13)))){
if (money >= game.css[("skill" + _local1)].money){
shop[("s" + _local1)].alpha = 1;
} else {
shop[("s" + _local1)].alpha = 0;
};
};
_local1++;
};
}
public function detailItem2(_arg1:MouseEvent){
var _local2:*;
_local2 = _arg1.target.name.substr(2);
if (game.css[("skill" + _local2)] == null){
return;
};
if (game.css[("skill" + _local2)].detail != null){
detailtext.text = game.css[("skill" + _local2)].detail;
};
}
public function detailItem3(_arg1:MouseEvent){
var _local2:*;
_local2 = _arg1.target.name.substr(3);
if (game.css[("skill" + _local2)] == null){
return;
};
if (game.css[("skill" + _local2)].detail != null){
detailtext.text = game.css[("skill" + _local2)].detail;
};
}
public function slotList(_arg1){
game.slotgun[_arg1] = null;
game.slotgun[_arg1] = dragobject.name.substr(3);
}
public function linkmfz(_arg1){
shop.parent.getURL("http://www.mofunzone.com/", "_blank");
}
public function detailSlot(_arg1:MouseEvent){
if (game.css[("skill4" + csl)] != null){
detailtext.text = game.css[("skill4" + csl)].detail;
};
}
}
}//package TankAttack_fla
Section 31
//e1_166 (TankAttack_fla.e1_166)
package TankAttack_fla {
import flash.display.*;
public dynamic class e1_166 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 32
//e2_167 (TankAttack_fla.e2_167)
package TankAttack_fla {
import flash.display.*;
public dynamic class e2_167 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 33
//e3_168 (TankAttack_fla.e3_168)
package TankAttack_fla {
import flash.display.*;
public dynamic class e3_168 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 34
//e4_169 (TankAttack_fla.e4_169)
package TankAttack_fla {
import flash.display.*;
public dynamic class e4_169 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 35
//l1_162 (TankAttack_fla.l1_162)
package TankAttack_fla {
import flash.display.*;
public dynamic class l1_162 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 36
//l2_163 (TankAttack_fla.l2_163)
package TankAttack_fla {
import flash.display.*;
public dynamic class l2_163 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 37
//l3_164 (TankAttack_fla.l3_164)
package TankAttack_fla {
import flash.display.*;
public dynamic class l3_164 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 38
//l4_165 (TankAttack_fla.l4_165)
package TankAttack_fla {
import flash.display.*;
public dynamic class l4_165 extends MovieClip {
public var hit:hittemp;
}
}//package TankAttack_fla
Section 39
//LOGOEND_43 (TankAttack_fla.LOGOEND_43)
package TankAttack_fla {
import flash.display.*;
public dynamic class LOGOEND_43 extends MovieClip {
public function LOGOEND_43(){
addFrameScript(132, frame133);
}
function frame133(){
MovieClip(root).play();
stop();
}
}
}//package TankAttack_fla
Section 40
//LOGOPRELOAD_0_23 (TankAttack_fla.LOGOPRELOAD_0_23)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LOGOPRELOAD_0_23 extends MovieClip {
public var thenextframe;
public function LOGOPRELOAD_0_23(){
addFrameScript(0, frame1, 89, frame90);
}
function frame90(){
if (MovieClip(parent).isloaded){
MovieClip(parent).gotoAndStop(10);
} else {
thenextframe = (Math.ceil((Math.random() * 8)) + 1);
if (thenextframe == MovieClip(parent).currentFrame){
MovieClip(parent).nextFrame();
} else {
MovieClip(parent).gotoAndStop(thenextframe);
};
};
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
x = (x - MovieClip(parent).shiftamt);
};
}
}
}//package TankAttack_fla
Section 41
//LOGOPRELOAD_1_27 (TankAttack_fla.LOGOPRELOAD_1_27)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LOGOPRELOAD_1_27 extends MovieClip {
public var thenextframe;
public function LOGOPRELOAD_1_27(){
addFrameScript(0, frame1, 89, frame90);
}
function frame90(){
if (MovieClip(parent).isloaded){
MovieClip(parent).gotoAndStop(10);
} else {
thenextframe = (Math.ceil((Math.random() * 8)) + 1);
if (thenextframe == MovieClip(parent).currentFrame){
MovieClip(parent).nextFrame();
} else {
MovieClip(parent).gotoAndStop(thenextframe);
};
};
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
x = (x - MovieClip(parent).shiftamt);
};
}
}
}//package TankAttack_fla
Section 42
//LOGOPRELOAD_2_30 (TankAttack_fla.LOGOPRELOAD_2_30)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LOGOPRELOAD_2_30 extends MovieClip {
public var thenextframe;
public function LOGOPRELOAD_2_30(){
addFrameScript(0, frame1, 89, frame90);
}
function frame90(){
if (MovieClip(parent).isloaded){
MovieClip(parent).gotoAndStop(10);
} else {
thenextframe = (Math.ceil((Math.random() * 8)) + 1);
if (thenextframe == MovieClip(parent).currentFrame){
MovieClip(parent).nextFrame();
} else {
MovieClip(parent).gotoAndStop(thenextframe);
};
};
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
x = (x - MovieClip(parent).shiftamt);
};
}
}
}//package TankAttack_fla
Section 43
//LOGOPRELOAD_3_32 (TankAttack_fla.LOGOPRELOAD_3_32)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LOGOPRELOAD_3_32 extends MovieClip {
public var thenextframe;
public function LOGOPRELOAD_3_32(){
addFrameScript(0, frame1, 89, frame90);
}
function frame90(){
if (MovieClip(parent).isloaded){
MovieClip(parent).gotoAndStop(10);
} else {
thenextframe = (Math.ceil((Math.random() * 8)) + 1);
if (thenextframe == MovieClip(parent).currentFrame){
MovieClip(parent).nextFrame();
} else {
MovieClip(parent).gotoAndStop(thenextframe);
};
};
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
x = (x - MovieClip(parent).shiftamt);
};
}
}
}//package TankAttack_fla
Section 44
//LOGOPRELOAD_4_34 (TankAttack_fla.LOGOPRELOAD_4_34)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LOGOPRELOAD_4_34 extends MovieClip {
public var thenextframe;
public function LOGOPRELOAD_4_34(){
addFrameScript(0, frame1, 89, frame90);
}
function frame90(){
if (MovieClip(parent).isloaded){
MovieClip(parent).gotoAndStop(10);
} else {
thenextframe = (Math.ceil((Math.random() * 8)) + 1);
if (thenextframe == MovieClip(parent).currentFrame){
MovieClip(parent).nextFrame();
} else {
MovieClip(parent).gotoAndStop(thenextframe);
};
};
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
x = (x - MovieClip(parent).shiftamt);
};
}
}
}//package TankAttack_fla
Section 45
//LOGOPRELOAD_5_36 (TankAttack_fla.LOGOPRELOAD_5_36)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LOGOPRELOAD_5_36 extends MovieClip {
public var thenextframe;
public function LOGOPRELOAD_5_36(){
addFrameScript(0, frame1, 89, frame90);
}
function frame90(){
if (MovieClip(parent).isloaded){
MovieClip(parent).gotoAndStop(10);
} else {
thenextframe = (Math.ceil((Math.random() * 8)) + 1);
if (thenextframe == MovieClip(parent).currentFrame){
MovieClip(parent).nextFrame();
} else {
MovieClip(parent).gotoAndStop(thenextframe);
};
};
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
x = (x - MovieClip(parent).shiftamt);
};
}
}
}//package TankAttack_fla
Section 46
//LOGOPRELOAD_6_38 (TankAttack_fla.LOGOPRELOAD_6_38)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LOGOPRELOAD_6_38 extends MovieClip {
public var thenextframe;
public function LOGOPRELOAD_6_38(){
addFrameScript(0, frame1, 89, frame90);
}
function frame90(){
if (MovieClip(parent).isloaded){
MovieClip(parent).gotoAndStop(10);
} else {
thenextframe = (Math.ceil((Math.random() * 8)) + 1);
if (thenextframe == MovieClip(parent).currentFrame){
MovieClip(parent).nextFrame();
} else {
MovieClip(parent).gotoAndStop(thenextframe);
};
};
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
x = (x - MovieClip(parent).shiftamt);
};
}
}
}//package TankAttack_fla
Section 47
//LOGOPRELOAD_7_40 (TankAttack_fla.LOGOPRELOAD_7_40)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LOGOPRELOAD_7_40 extends MovieClip {
public var thenextframe;
public function LOGOPRELOAD_7_40(){
addFrameScript(0, frame1, 89, frame90);
}
function frame90(){
if (MovieClip(parent).isloaded){
MovieClip(parent).gotoAndStop(10);
} else {
thenextframe = (Math.ceil((Math.random() * 8)) + 1);
if (thenextframe == MovieClip(parent).currentFrame){
MovieClip(parent).nextFrame();
} else {
MovieClip(parent).gotoAndStop(thenextframe);
};
};
}
function frame1(){
if (Math.random() > 0.5){
scaleX = -(scaleX);
x = (x - MovieClip(parent).shiftamt);
};
}
}
}//package TankAttack_fla
Section 48
//MainTimeline (TankAttack_fla.MainTimeline)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var playMoreGameSub;
public var outcss;
public var stageclear:MovieClip;
public var urlCSS;
public var crosshair:MovieClip;
public var bossgage:MovieClip;
public var gagegun1:MovieClip;
public var gagegun3:MovieClip;
public var gagegun4:MovieClip;
public var gagegun5:MovieClip;
public var gagegun6:MovieClip;
public var gagegun8:MovieClip;
public var gagegun2:MovieClip;
public var breset:SimpleButton;
public var gagegun7:MovieClip;
public var gagegun9:MovieClip;
public var ic1:MovieClip;
public var lgo:SimpleButton;
public var ic9:MovieClip;
public var b_highscores:SimpleButton;
public var ic8:MovieClip;
public var bshop:SimpleButton;
public var ic3:MovieClip;
public var ic5:MovieClip;
public var hpgage:MovieClip;
public var playat:SimpleButton;
public var ic2:MovieClip;
public var ic6:MovieClip;
public var ic7:MovieClip;
public var textlevel:TextField;
public var ic4:MovieClip;
public var so:SharedObject;
public var ic0:MovieClip;
public var bmenu_click;
public var bmoregames:SimpleButton;
public var i;
public var score;
public var rep:TextField;
public var submitClick;
public var hightScore;
public var b_moregame1:SimpleButton;
public var flashatt:MovieClip;
public var enemytext:TextField;
public var b_next:SimpleButton;
public var ic10:MovieClip;
public var ic11:MovieClip;
public var ic12:MovieClip;
public var bmenu:SimpleButton;
public var playMoreGameSub2;
public var now;
public var gamelevel;
public var playMoreGameTitle;
public var bcontinue_click;
public var bshop_click;
public var btnrepair:SimpleButton;
public var EPOCH_TIME;
public var playername:TextField;
public var shop:MovieClip;
public var breset_click;
public var bsubmit:SimpleButton;
public var bcontinue:SimpleButton;
public var bmenu_backclick;
public var gagegun12:MovieClip;
public var b_preload:SimpleButton;
public var gagegun10:MovieClip;
public var gagegun11:MovieClip;
public var b_preloadRelease;
public var allcssfile;
public var bstart:SimpleButton;
public var designCSS;
public var tot;
public var b_nextPress;
public var timetext:TextField;
public var completecount;
public var textscore:TextField;
public var reload:MovieClip;
public var loadCSSComplete;
public var ldrCSS;
public var cpr:SimpleButton;
public var csstext;
public var g_root;
public var bstart_click;
public var cssstring;
public var finishscore:TextField;
public var gslot0:MovieClip;
public var gslot1:MovieClip;
public var gslot2:MovieClip;
public var gslot3:MovieClip;
public var game:gameinline;
public var ldr:URLLoader;
public var moneytext:TextField;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 15, frame16, 104, frame105, 108, frame109, 109, frame110, 118, frame119, 128, frame129, 138, frame139, 144, frame145, 153, frame154, 160, frame161, 163, frame164, 363, frame364);
}
public function relesefocus2(_arg1){
stage.focus = playername;
}
function frame161(){
game.visible = true;
flashatt.visible = false;
reload.visible = false;
stageclear.visible = false;
shop.visible = false;
textscore.text = "545435435";
timetext.text = "5435435435";
bshop_click = function (){
var _local1:*;
Mouse.show();
game.visible = false;
flashatt.visible = false;
game.gamepause = true;
shop.visible = true;
_local1 = SharedObject.getLocal("TA");
if (_local1.data.money == undefined){
_local1.data.money = 0;
};
if (_local1.data.gamelevel == undefined){
_local1.data.gamelevel = 0;
};
if (_local1.data.scorepoint == undefined){
_local1.data.scorepoint = 0;
};
_local1.data.gamelevel = game.gamelevel;
_local1.data.scorepoint = game.scorepoint;
_local1.data.money = game.money;
_local1.flush();
_local1.close();
trace("shop + data shareobject");
trace(("money" + _local1.data.money));
trace(("gamelevel" + _local1.data.gamelevel));
trace(("score" + _local1.data.scorepoint));
shop.openShop();
};
bshop.addEventListener("click", bshop_click);
stop();
SoundMixer.stopAll();
}
function frame154(){
Mouse.show();
tot.removeEventListener(Event.ENTER_FRAME, relesefocus);
tot.removeEventListener("keyDown", onKeySkip);
}
public function getURL(_arg1:String, _arg2:String){
var web:String;
var request:URLRequest;
var url = _arg1;
var method = _arg2;
web = url;
request = new URLRequest(web);
try {
navigateToURL(request, method);
} catch(e:Error) {
};
}
function frame11(){
}
function frame1(){
outcss = false;
designCSS = new StyleSheet();
allcssfile = new Array("design.css");
ldrCSS = new Array();
loadCSSComplete = new Array();
urlCSS = new Array();
completecount = 0;
cssstring = "";
if (outcss){
i = 0;
while (i < allcssfile.length) {
ldrCSS[i] = new URLLoader();
loadCSSComplete[i] = function (_arg1){
ldr = _arg1.target;
cssstring = (cssstring + ldr.data);
completecount++;
if (completecount >= allcssfile.length){
trace(cssstring);
designCSS.parseCSS(cssstring);
play();
};
};
trace(allcssfile[i]);
urlCSS[i] = new URLRequest(("project/css/" + allcssfile[i]));
ldrCSS[i].addEventListener(Event.COMPLETE, loadCSSComplete[i]);
ldrCSS[i].load(urlCSS[i]);
stop();
i++;
};
} else {
csstext = "gun4{way:1;angle:45;shoot:ShootLookingObject;mag:1;frq:0;reload:50;cooldown:0;gun:gun1;bullet:bullet4;}creator11{frame950:createobject,enemy6;frame150:createObjectRandom,enemy,6,3;frame850:createObjectRandom,enemy,4,3;frame650:createObject,enemy7;frame800:createobject,enemy6;frame1:createObject,enemy99;clockfunction:functionMap;frame600:createObject,enemy7;frame100:createObjectRandom,enemy,6,3;frame50:createObjectRandom,enemy,6,2;frame550:createObjectRandom,enemy,6,4;frame750:createObject,enemy5;frame200:createObjectRandom,enemy,6,0;frame1000:createObjectRandom,enemy,4,3;linkage:?????;frame450:createObjectRandom,enemy,4,3;clock:creator11;frame500:createObject,enemy5;frame2:createObject,enemy0;frame350:createObject,enemy5;frame700:createObjectRandom,enemy,6,3;frame250:createObject,enemy7;frame400:createobject,enemy6;layer:door_layer;frame900:createObject,enemy5;frame300:createObjectRandom,enemy,6,3;}creator7{frame770:createObjectRandom,enemy,6,0;clock:creator7;frame560:createObjectRandom,enemy,6,0;frame420:createObject,enemy9;frame1100:createObjectRandom,enemy,6,0;frame910:createObjectRandom,enemy,6,0;frame1:createObject,enemy99;layer:door_layer;frame2:createObjectRandom,enemy,6,0;frame280:createObjectRandom,enemy,6,0;frame490:createObjectRandom,enemy,6,0;frame700:createObjectRandom,enemy,6,0;frame140:createObjectRandom,enemy,6,0;clockfunction:functionMap;frame1050:createObjectRandom,enemy,6,0;frame350:createObjectRandom,enemy,5,0;frame70:createObjectRandom,enemy,5,0;frame840:createObjectRandom,enemy,6,0;frame980:createObjectRandom,enemy,6,0;frame630:createObjectRandom,enemy,6,0;frame210:createObjectRandom,enemy,5,0;linkage:?????;}skill40{detail:add more weapon slots Price : 5000 ;money:5000;}enemy7{walknum:1;speed:2;gfx:gfxdie03;army:5;hp:120;layer:enemy_layer;timemove:250;linkage:em8;}creator6{clock:creator6;clockfunction:functionMap;frame130:goto,1;frame100:createObjectRandom,enemy,5,0;frame50:createObjectRandom,enemy,5,0;frame1:createObject,enemy99;layer:door_layer;frame2:createObjectRandom,enemy,5,0;linkage:?????;}bullet14{scaleY:2;style:14;damage:120;timestatus:30;speed:30;scaleX:2;hp:1;layer:playerbullet_layer;linkage:exo_c;}enemy4{speed:2;gun:gun7;gfx:gfxdie03;way:8;walknum:1;hp:200;layer:enemy_layer;timemove:250;linkage:em5;}bullet16{scaleY:0.5;style:16;damage:10;timestatus:30;speed:10;scaleX:0.5;hp:1;layer:playerbullet_layer;linkage:????;}bullet4{scaleY:0.3;style:4;damage:15;timestatus:200;speed:6;scaleX:0.3;hp:1;layer:enemybullet2_layer;linkage:lasermao;}creator2{clock:creator2;clockfunction:functionMap;frame1:createObject,enemy99;layer:door_layer;frame75:goto,1;frame3:createObject,enemy0;linkage:?????;}bullet22{gfx:gfxbomb2;scaleY:1;style:22;damage:360;timestatus:50;speed:9;scaleX:1;hp:1;layer:playerbullet_layer;linkage:cannon_b;}skill23{detail:Increase your HP (health) Price : 5000 ;money:5000;hp:200;}bullet19{scaleY:0.5;style:19;damage:1;timestatus:30;speed:10;scaleX:0.5;hp:1;layer:playerbullet_layer;linkage:????;}bullet26{gfx:gfxbomb3;scaleY:1;style:26;damage:650;timestatus:50;speed:9;scaleX:1;hp:1;layer:playerbullet_layer;linkage:cannon_d;}bullet98{clock:bullet98;gfx:gfxbomb4;scaleY:1;style:98;damage:50;speed:2;scaleX:1;hp:1;layer:enemybullet_layer;frame200:destroy;clockfunction:functionMap;linkage:bulletboss4;}bullet13{clock:bullet13;frame200:destroy;timedamage:1.25;hp:1;layer:playerbullet_layer;style:13;damage:25;timestatus:100;speed:10;scaleX:1;scaleY:1;clockfunction:functionMap;linkage:exo_b;}bullet10{clock:bullet10;scaleY:0.3;style:10;damage:12;timestatus:50;speed:15;scaleX:0.3;hp:1;layer:playerbullet_layer;frame200:destroy;clockfunction:functionMap;linkage:mainbullet;}bullet3{clock:bullet3;scaleY:1;style:3;damage:25;speed:6;scaleX:1;hp:1;layer:enemybullet_layer;clockfunction:functionMap;frame500:destroy;linkage:mine;}creator16{frame5:createObjectRandom,enemy,6,0;clock:creator16;frame8:createObjectRandom,enemy,6,0;frame2:createObjectRandom,enemy,6,0;frame300:goto,1;frame7:createObjectRandom,enemy,6,0;frame1:createObject,enemy99;frame12:createObject,enemy7;layer:door_layer;frame4:createObjectRandom,enemy,6,0;frame6:createObjectRandom,enemy,6,0;frame11:createObject,enemy7;clockfunction:functionMap;frame9:createObjectRandom,enemy,6,0;frame10:createObjectRandom,enemy,6,0;frame3:createObjectRandom,enemy,6,0;linkage:?????;}skill41{detail:add more weapon slots Price : 10000 ;money:10000;}enemy99{linkage:em11;gfx:gfxherodie;maxhp:500;armor:30;player:true;initobject:initPlayer;layer:player_layer;speed:3;}skill22{detail:Increase your HP (health) Price : 3000 ;money:3000;hp:150;}bullet18{scaleY:0.5;style:18;damage:15;timestatus:30;speed:10;scaleX:0.5;hp:1;layer:playerbullet_layer;linkage:laser_b;}bullet5{scaleY:1;style:5;speed:0;scaleX:1;hp:1;layer:enemybullet_layer;linkage:coin;}creator3{frame180:createObject,enemy1;clock:creator3;frame340:goto,1;clockfunction:functionMap;frame90:createObject,enemy0;frame45:createObject,enemy0;frame1:createObject,enemy99;layer:door_layer;frame135:createObject,enemy1;frame2:createObject,enemy0;frame270:createObject,enemy1;linkage:?????;}bullet1{gfx:gfxenemybomb;scaleY:1;style:1;damage:90;speed:6;scaleX:1;hp:1;layer:enemybullet_layer;linkage:bulletembomb;}creator14{frame502:createObject,enemy3;frame304:createObject,enemy2;frame1105:createObject,enemy6;frame501:createObject,enemy3;frame101:createObject,enemy1;frame6:createObject,enemy0;frame1:createObject,enemy99;frame1104:createObject,enemy6;frame702:createObject,enemy4;frame303:createObject,enemy2;frame503:createObject,enemy3;frame305:createObject,enemy2;frame105:createObject,enemy1;frame1102:createObject,enemy6;frame1101:createObject,enemy6;frame102:createObject,enemy1;clockfunction:functionMap;frame903:createObject,enemy5;frame905:createObject,enemy5;frame302:createObject,enemy2;frame104:createObject,enemy1;frame504:createObject,enemy3;linkage:?????;frame5:createObject,enemy0;clock:creator14;frame904:createObject,enemy5;frame2:createObject,enemy0;frame706:createObject,enemy9;frame704:createObject,enemy4;frame4:createObject,enemy0;frame103:createObject,enemy1;layer:door_layer;frame902:createObject,enemy5;frame301:createObject,enemy2;frame703:createObject,enemy4;frame701:createObject,enemy4;frame901:createObject,enemy5;frame705:createObject,enemy4;frame1103:createObject,enemy6;frame505:createObject,enemy3;frame3:createObject,enemy0;}skill32{detail:Increse your speed Price : 3000 ;money:3000;speed:1;}bullet24{gfx:gfxbomb4;scaleY:1;style:24;damage:1000;timestatus:50;speed:9;scaleX:1;hp:1;layer:playerbullet_layer;linkage:cannon_d;}enemy3{angle:45;gun:gun6;speed:2;way:4;walknum:1;hp:190;layer:enemy_layer;gfx:gfxdie01;timemove:250;linkage:em4;}creator1{frame5:createObject,enemy0;clock:creator1;clockfunction:functionMap;frame100:goto,1;frame1:createObject,enemy99;layer:door_layer;linkage:?????;}enemy6{gun:gun2;initobject:initEnemy6;charge:100;lasernum:2;speed:1;gfx:gfxdie02;walknum:2;namenum:2;hp:150;layer:enemy_layer;timemove:250;linkage:em6;}config{mag4:10;mag1:8;aoebomb3:9;mag3:20;gfxconfuse:gfxconfuse;reload5:50;chain:6;fqc5:10;regun5:0.18;reload0:10;emgfxdamage:20;stage:17;gfxdamage:0.4;reload2:1;freemoney:100;gametime:1125;goldarea:200;minidamage:1.5;powermax:100;lasercount:2;firestand:3;fqc1:15;gfxacid:gfxacid;regun11:0.2;enemybaaoe:0;mag0:20;reload3:1;gfxenemyhit:gfxenemyhit;regun4:0.2;regun10:0.36;fqc0:0;timelaser:200;scorepoint:300;regun3:0.32;regun7:0.12;reload4:50;dropmoney:40;firestand3:3;showgage:25;fqc4:10;gfxherohit:gfxherohit;baaoe:5;mag5:10;fqc2:25;regun6:0.15;babomb:3;reload1:1;regun12:0.16;regun2:0.4;fqc3:10;mag2:10;regun9:0.42;enemyminidamage:10;regun1:0.48;money:200;regun8:0.08;countem:15;}gun3{way:1;angle:45;shoot:ShootLookingObject;mag:3;frq:50;reload:50;cooldown:0;gun:gun1;bullet:bullet3;}gun98{way:1;angle:45;shoot:ShootLookingObject;mag:10;frq:50;reload:100;cooldown:0;gun:gun1;bullet:bullet98;}bullet12{clock:bullet12;scaleY:0.3;style:12;damage:25;timestatus:150;speed:10;scaleX:0.3;hp:1;layer:playerbullet_layer;frame200:destroy;clockfunction:functionMap;linkage:exo_a;}bullet9{scaleY:0.5;style:9;damage:25;speed:10;scaleX:0.5;hp:1;layer:enemybullet_layer;linkage:bulletboss3;}enemy11{linkage:boss3;initobject:initEnemy11;hp:450;gun:gun9;speed:7;gfx:gfxboss3die;walknum:2;terbo:10;layer:enemy_layer;timemove:50;armor:20;}enemy9{linkage:boss1;setcount:0;gun:gun99;speed:3;gfx:gfxboss1die;walknum:1;hp:500;layer:enemy_layer;timemove:50;armor:70;}enemy12{namenum:8;walknum:2;gfx:gfxboss4die;speed:8;hp:1750;layer:enemy_layer;timemove:50;terbo:10;charge:25;lasernum:4;armor:70;initobject:initEnemy12;gun:gun3;linkage:boss4;}skill12{detail:Exotic tier 4 Price : 24000 Detail : Propeller;money:24000;}creator15{frame5:createObjectRandom,enemy,6,0;clock:creator15;frame8:createObjectRandom,enemy,6,0;frame2:createObjectrandom,enemy,6,0;frame300:goto,1;frame7:createObjectRandom,enemy,6,0;frame1:createObject,enemy99;layer:door_layer;frame4:createObjectRandom,enemy,6,0;frame6:createObjectRandom,enemy,6,0;frame11:createObjectRandom,enemy,6,0;clockfunction:functionMap;frame9:createObject,enemy7;frame10:createObjectRandom,enemy,6,0;frame3:createObjectRandom,enemy,6,0;linkage:?????;}enemy5{gun:gun1;speed:2;gfx:gfxdie01;walknum:1;hp:250;layer:enemy_layer;timemove:250;linkage:em7;}gun6{way:4;angle:90;shoot:ShootLookingObject;mag:10;frq:70;reload:50;cooldown:0;gun:gun1;bullet:bullet0;}skill31{detail:Increse your speed Price : 1500 ;money:1500;speed:1;}enemy2{angle:45;gun:gun8;speed:2;way:3;walknum:1;hp:80;layer:enemy_layer;gfx:gfxdie02;timemove:250;linkage:em3;}gun1{way:1;angle:0;shoot:ShootLookingObject;mag:1;frq:100;reload:100;cooldown:0;gun:gun1;bullet:bullet1;}gun8{way:3;angle:45;shoot:ShootLookingObject;mag:10;frq:80;reload:50;cooldown:0;gun:gun1;bullet:bullet0;}bullet21{scaleY:0.5;style:21;damage:10;timestatus:30;speed:10;scaleX:0.5;hp:1;layer:playerbullet_layer;linkage:????;}gun5{way:2;angle:45;shoot:ShootLookingObject;mag:10;frq:60;reload:50;cooldown:0;gun:gun1;bullet:bullet0;}enemy8{godarmy:true;gun:gun0;speed:3;timemove:250;hp:70;layer:enemy_layer;walknum:1;linkage:em10;}bullet2{scaleY:0.5;style:2;damage:10;speed:6;scaleX:0.5;hp:1;layer:enemybullet2_layer;linkage:emlaser;}skill9{detail:Exotic tier 1 Price : 1300 Detail : 8 ways;money:1300;}enemy10{namenum:6;walknum:2;gfx:gfxboss2die;hp:1200;layer:enemy_layer;timemove:150;linkage:boss2;charge:100;lasernum:4;speed:2;initobject:initEnemy10;gun:gun3;armor:10;}skill33{detail:Increse your speed Price : 5000 ;money:5000;speed:1;}skill7{detail:Laser tier 3 Price : 11400 Detail : Causes beam fragments when hit on enemy.;money:11400;}bullet17{scaleY:0.5;style:17;damage:5;timestatus:30;speed:10;scaleX:0.5;hp:1;layer:playerbullet_layer;linkage:laser_a;}creator12{frame950:createObject,enemy2;frame225:createOject,enemy1;frame150:createObject,enemy4;frame850:createObject,enemy4;frame650:createObject,enemy4;frame800:createOject,enemy1;frame1:createObject,enemy99;clockfunction:functionMap;frame600:createObject,enemy8;frame350:createObject,enemy4;frame50:createObject,enemy4;frame550:createObject,enemy6;frame750:createObject,enemy2;frame200:createObject,enemy2;frame75:createObject,enemy5;frame1000:createOject,enemy1;frame100:createObject,enemy6;frame450:createObject,enemy9;clock:creator12;frame25:createObject,enemy3;frame250:createObject,enemy0;frame125:createObject,enemy8;frame1100:createOject,enemy1;frame700:createObject,enemy8;layer:door_layer;linkage:?????;frame175:createObject,enemy8;frame1050:createObject,enemy2;frame900:createObject,enemy8;frame300:createObject,enemy3;}bullet20{clock:bullet20;scaleY:0.5;style:20;damage:25;timestatus:30;speed:10;scaleX:0.5;hp:1;layer:playerbullet_layer;frame200:destroy;clockfunction:functionMap;linkage:laser_mini;}skill11{detail:Exotic tier 3 Price : 11400 Detail : Morning star ;money:11400;}skill2{detail:Cannon tier 2 Price : 4500 Detail : Causes area damage and fire fragments.;money:4500;}bullet11{gfx:gfxbomb1;scaleY:1;style:11;damage:130;timestatus:50;speed:9;scaleX:1;hp:1;layer:playerbullet_layer;linkage:cannon_a;}skill5{detail:Laser tier 1 Price : 1300 Detail : Simple laser.;money:1300;}skill1{detail:Cannon tier 1 Price : 1300 Detail : Causes area damage.;money:1300;}skill0{detail:ฺBomb 1 price 800;money:800;}bullet23{gfx:gfxbomb3;scaleY:1;style:23;damage:650;timestatus:50;speed:9;scaleX:1;hp:1;layer:playerbullet_layer;linkage:cannon_c;}creator10{frame950:createObject,enemy5;frame150:createObject,enemy6;frame850:createObjectRandom,enemy,6,4;frame650:createObject,enemy5;frame800:createObject,enemy5;frame1:createObject,enemy99;clockfunction:functionMap;frame600:createObject,enemy7;frame100:createObject,enemy4;frame50:createObject,enemy6;frame550:createObjectRandom,enemy,6,4;frame750:createObjectRandom,enemy,4,3;frame200:createObject,enemy5;frame1000:createObjectRandom,enemy,6,4;linkage:?????;frame450:createObjectRandom,enemy,4,3;clock:creator10;frame500:createObject,enemy5;frame2:createObject,enemy5;frame350:createObject,enemy5;frame700:createobject,enemy6;frame250:createObject,enemy7;frame400:createobject,enemy6;layer:door_layer;frame900:createObject,enemy2;frame300:createObjectRandom,enemy,6,3;}creator4{clock:creator4;frame250:createObject,enemy3;frame80:createObject,enemy2;frame2:createObject,enemy0;frame1:createObject,enemy99;layer:door_layer;frame420:goto,1;frame40:createObject,enemy1;clockfunction:functionMap;frame350:createObject,enemy4;frame120:createObject,enemy2;frame200:createObject,enemy3;linkage:?????;}skill10{detail:Exotic tier 2 Price : 4500 Detail : Acid;money:4500;}enemy0{angle:45;gun:gun0;speed:2;way:1;walknum:0;hp:100;layer:enemy_layer;gfx:gfxdie01;timemove:50;linkage:em1;}bullet25{scaleY:1;style:25;damage:0;speed:6;scaleX:1;hp:1;layer:chain_layer;linkage:chain;}gun2{way:1;angle:45;shoot:ShootLookingObject;mag:1;frq:0;reload:50;cooldown:0;gun:gun1;bullet:bullet2;}gun7{way:8;angle:45;shoot:ShootLookingObject;mag:10;frq:90;reload:50;cooldown:0;gun:gun1;bullet:bullet0;}gun99{way:1;angle:45;shoot:ShootLookingObject;mag:10;frq:50;reload:100;cooldown:0;gun:gun1;bullet:bullet99;}skill24{detail:Increase your HP (health) Price : 7500 ;money:7500;hp:250;}skill34{detail:Increse your speed Price : 2500 ;money:2500;speed:1;}skill4{detail:Cannon tier 4 Price : 24000 Detail : Causes chain explosions.;money:24000;}creator0{clock:creator0;frame200:goto,1;clockfunction:functionMap;frame9:createObject,enemy0;frame1:createObject,enemy99;layer:door_layer;linkage:?????;}enemy1{angle:45;gun:gun5;speed:2;way:2;walknum:1;hp:120;layer:enemy_layer;gfx:gfxdie01;timemove:250;linkage:em2;}bullet99{gfx:gfxbomb4;scaleY:1;style:99;damage:50;speed:12;scaleX:1;hp:1;layer:enemybullet_layer;linkage:bulletboss1;}creator13{clock:creator13;frame25:createObject,enemy8;clockfunction:functionMap;frame100:goto,1;frame60:createObjectRandom,enemy,8,0;frame1:createObject,enemy99;layer:door_layer;linkage:?????;}bullet15{clock:bullet15;frame200:destroy;timestatus:10;round:3;layer:playerbullet_layer;anglecount:0;hp:1;style:15;damage:160;range:120;speed:10;scaleX:2;scaleY:2;clockfunction:functionMap;anglespeed:20;linkage:exo_d;}skill3{detail:Cannon tier 3 Price : 11400 Detail : Causes more fire fragments.;money:11400;}gun0{way:1;angle:45;shoot:ShootLookingObject;mag:10;frq:50;reload:50;cooldown:0;gun:gun1;bullet:bullet0;}skill30{detail:Increse your speed Price : 500 ;money:500;speed:1;}skill8{detail:Laser tier 4 Price : 24000 Detail : Automatically jumps through multiple enemies.;money:24000;}creator17{clock:creator17;frame1:createObject,enemy99;layer:door_layer;clockfunction:functionMap;frame2:createObject,enemy12;linkage:?????;}creator8{clock:creator8;clockfunction:functionMap;frame50:goto,1;frame1:createObject,enemy99;layer:door_layer;frame2:createObjectRandom,enemy,6,1;linkage:?????;}gun9{way:1;angle:45;shoot:ShootLookingObject;mag:30;frq:2;reload:35;cooldown:0;gun:gun1;bullet:bullet9;}skill6{detail:Laser tier 2 Price : 4500 Detail : 3 ways laser.;money:4500;}creator9{frame30:goto,1;clockfunction:functionMap;clock:creator9;frame1:createObject,enemy99;layer:door_layer;frame2:createObject,enemy0;linkage:?????;}bullet0{clock:bullet0;scaleY:0.7;style:0;damage:13;speed:6;scaleX:0.7;hp:1;layer:enemybullet_layer;frame200:destroy;clockfunction:functionMap;linkage:mainembullet;}skill45{detail:Restore your hit point by 50. Price : 150 ;money:150;hp:50;}skill20{detail:Increase your HP (health) \t\t\t\t Price : 500 ;money:500;hp:50;}skill21{detail:Increase your HP (health) Price : 1500 ;money:1500;hp:100;}creator5{clock:creator5;frame2:createObjectRandom,enemy,5,0;clockfunction:functionMap;frame1:createObject,enemy99;layer:door_layer;frame65:goto,1;linkage:?????;}";
designCSS.parseCSS(csstext);
};
}
function frame16(){
gotoAndPlay("go");
}
public function loadVariablesNum(_arg1:String){
var _local2:*;
var _local3:*;
_local2 = new URLRequest(_arg1);
_local3 = new URLLoader();
_local3.load(_local2);
}
function frame164(){
Mouse.show();
SoundMixer.stopAll();
}
function frame2(){
now = new Date();
EPOCH_TIME = now.getTime();
b_preloadRelease = function (){
getURL("http://www.mofunzone.com/", "_blank");
};
b_preload.addEventListener("mouseUp", b_preloadRelease);
stop();
}
public function relesefocus(_arg1){
stage.focus = tot;
}
function frame109(){
breset_click = function (_arg1){
breset.removeEventListener("click", bstart_click);
so = SharedObject.getLocal("TA");
so.clear();
so.close();
g_root.con = true;
g_root.play();
};
bmenu_backclick = function (_arg1){
g_root.gotoAndStop(1);
};
breset.addEventListener("click", breset_click);
bmenu.addEventListener("click", bmenu_backclick);
}
function frame105(){
SoundMixer.stopAll();
Mouse.show();
g_root = this;
g_root.con = false;
score = 0;
gamelevel = 0;
so = SharedObject.getLocal("TA");
if ((((so.data.gamelevel <= 0)) && ((so.data.money <= 0)))){
bcontinue.alpha = 0.5;
};
SoundMixer.stopAll();
bstart_click = function (){
so = SharedObject.getLocal("TA");
if (so.data.gamelevel != null){
g_root.con = true;
bstart.removeEventListener("click", bstart_click);
g_root.gotoAndStop(5);
} else {
g_root.gotoAndStop(1, "tutorial");
};
};
bcontinue_click = function (){
if (bcontinue.alpha == 0.5){
return;
};
trace("begin");
so = SharedObject.getLocal("TA");
if (so.data.money == undefined){
so.data.money = 0;
};
if (so.data.gamelevel == undefined){
so.data.gamelevel = 1;
};
so.data.scorepoint = 0;
score = so.data.money;
gamelevel = so.data.gamelevel;
so.data.money = score;
so.data.gamelevel = gamelevel;
g_root.con = true;
bstart.removeEventListener("click", bstart_click);
g_root.gotoAndStop(1, "game");
trace("end");
};
playMoreGameTitle = function (){
getURL("http://www.mofunzone.com/", "_blank");
};
b_moregame1.addEventListener("click", playMoreGameTitle);
hightScore = function (){
getURL("http://www.mofunzone.com/game_scores/tank_attack/highscores.shtml", "_blank");
};
b_highscores.addEventListener("click", hightScore);
cpr.addEventListener("click", playMoreGameTitle);
lgo.addEventListener("click", playMoreGameTitle);
stop();
bstart.addEventListener("click", bstart_click);
bcontinue.addEventListener("click", bcontinue_click);
stop();
}
function frame110(){
Mouse.show();
stop();
SoundMixer.stopAll();
b_nextPress = function (){
play();
};
b_next.addEventListener("click", b_nextPress);
tot = this;
tot.addEventListener(Event.ENTER_FRAME, relesefocus);
tot.addEventListener("keyDown", onKeySkip);
}
function frame119(){
stop();
}
public function onKeySkip(_arg1){
if (_arg1.keyCode == 75){
tot.gotoAndPlay("skip");
tot.removeEventListener(Event.ENTER_FRAME, relesefocus);
tot.removeEventListener("keyDown", onKeySkip);
};
}
function frame129(){
stop();
}
function frame139(){
stop();
}
function frame364(){
this.addEventListener(Event.ENTER_FRAME, relesefocus2);
SoundMixer.stopAll();
stage.focus = playername;
Mouse.show();
finishscore.text = ("" + int(g_root.scoresubmit));
bmenu_click = function (){
bmenu.removeEventListener("click", bmenu_click);
g_root.removeEventListener(Event.ENTER_FRAME, relesefocus2);
g_root.gotoAndStop(1, "title");
};
bmenu.addEventListener("click", bmenu_click);
submitClick = function (_arg1):void{
};
bsubmit.addEventListener("click", submitClick);
playMoreGameSub = function (_arg1):void{
getURL("http://www.mofunzone.com/", "_blank");
g_root.removeEventListener(Event.ENTER_FRAME, relesefocus2);
g_root.gotoAndStop(1, "title");
};
playMoreGameSub2 = function (_arg1):void{
getURL("http://www.mofunzone.com/online_games/tank_attack.shtml", "_blank");
g_root.removeEventListener(Event.ENTER_FRAME, relesefocus2);
g_root.gotoAndStop(1, "title");
};
bmoregames.addEventListener("click", playMoreGameSub);
playat.addEventListener("click", playMoreGameSub2);
stop();
Mouse.show();
SoundMixer.stopAll();
}
function frame145(){
b_next.removeEventListener("click", b_nextPress);
}
}
}//package TankAttack_fla
Section 49
//mdia_stage_clear_204 (TankAttack_fla.mdia_stage_clear_204)
package TankAttack_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class mdia_stage_clear_204 extends MovieClip {
public var stageclear;
public var g_root;
public var bok:SimpleButton;
public var bok_click;
public var game;
public function mdia_stage_clear_204(){
addFrameScript(49, frame50);
}
function frame50(){
stageclear = this;
game = MovieClip(this.parent).game;
g_root = MovieClip(this.parent);
bok_click = function (_arg1){
if (game.gamelevel == 17){
game.removeEventListener(Event.ENTER_FRAME, game.EnterFrame);
game.removeEventListener(MouseEvent.MOUSE_DOWN, game.mouseDown);
game.removeEventListener(MouseEvent.MOUSE_UP, game.mouseUp);
game.keyfocus.removeEventListener(KeyboardEvent.KEY_DOWN, game.keydown);
game.keyfocus.removeEventListener(KeyboardEvent.KEY_UP, game.keyup);
game.gamepause = true;
g_root.gotoAndPlay(1, "ending");
return;
};
game.levelUp();
game.pass = false;
game.gamepause = false;
visible = false;
};
bok.addEventListener("click", bok_click);
stop();
}
}
}//package TankAttack_fla
Section 50
//reload_181 (TankAttack_fla.reload_181)
package TankAttack_fla {
import flash.display.*;
public dynamic class reload_181 extends MovieClip {
public function reload_181(){
addFrameScript(9, frame10);
}
function frame10(){
gotoAndPlay(1);
}
}
}//package TankAttack_fla
Section 51
//THEPRELOADER_1 (TankAttack_fla.THEPRELOADER_1)
package TankAttack_fla {
import flash.display.*;
import flash.events.*;
public dynamic class THEPRELOADER_1 extends MovieClip {
public var shiftamt;
public var bar:MovieClip;
public var onRelease;
public var isloaded;
public function THEPRELOADER_1(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stage.removeEventListener(MouseEvent.CLICK, onRelease);
}
function frame1(){
stop();
shiftamt = 17;
isloaded = false;
parent.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING);
onRelease = function (){
};
stage.addEventListener(MouseEvent.CLICK, onRelease);
if (parent.loaderInfo.bytesLoaded >= parent.loaderInfo.bytesTotal){
parent.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, PL_LOADING);
gotoAndStop(10);
};
}
public function PL_LOADING(_arg1:ProgressEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = Math.round(_arg1.bytesLoaded);
_local3 = Math.round(_arg1.bytesTotal);
_local4 = (_local2 / _local3);
MovieClip(MovieClip(getChildByName("bar")).getChildByName("barmask")).scaleX = _local4;
if (_local2 == _local3){
isloaded = true;
};
}
}
}//package TankAttack_fla
Section 52
//bg (bg)
package {
import flash.display.*;
public dynamic class bg extends MovieClip {
public function bg(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 53
//bgm1 (bgm1)
package {
import flash.media.*;
public dynamic class bgm1 extends Sound {
}
}//package
Section 54
//boss1 (boss1)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class boss1 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function boss1(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 55
//boss2 (boss2)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class boss2 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function boss2(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 56
//boss3 (boss3)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class boss3 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function boss3(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 57
//boss4 (boss4)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class boss4 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function boss4(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 58
//bulletboss1 (bulletboss1)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class bulletboss1 extends MovieClip {
public var hit:hittemp;
public function bulletboss1(){
addFrameScript(3, frame4, 10, frame11);
}
function frame4(){
gotoAndPlay(1);
}
function frame11(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 59
//bulletboss3 (bulletboss3)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class bulletboss3 extends MovieClip {
public var hit:hittemp;
public function bulletboss3(){
addFrameScript(19, frame20, 26, frame27);
}
function frame20(){
gotoAndPlay(1);
}
function frame27(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 60
//bulletboss4 (bulletboss4)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class bulletboss4 extends MovieClip {
public var hit:hittemp;
public function bulletboss4(){
addFrameScript(14, frame15, 21, frame22);
}
function frame15(){
gotoAndPlay(1);
}
function frame22(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 61
//bulletembomb (bulletembomb)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class bulletembomb extends MovieClip {
public var hit:hittemp;
public function bulletembomb(){
addFrameScript(3, frame4, 10, frame11);
}
function frame4(){
gotoAndPlay(1);
}
function frame11(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 62
//bulletsoilder (bulletsoilder)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class bulletsoilder extends MovieClip {
public var hit:hittemp;
public function bulletsoilder(){
addFrameScript(3, frame4, 10, frame11);
}
function frame4(){
gotoAndPlay(1);
}
function frame11(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 63
//cannon_a (cannon_a)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class cannon_a extends MovieClip {
public var hit:hittemp;
public function cannon_a(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 64
//cannon_b (cannon_b)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class cannon_b extends MovieClip {
public var hit:hittemp;
public function cannon_b(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 65
//cannon_c (cannon_c)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class cannon_c extends MovieClip {
public var hit:hittemp;
public function cannon_c(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 66
//cannon_d (cannon_d)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class cannon_d extends MovieClip {
public var hit:hittemp;
public function cannon_d(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 67
//cbazuka (cbazuka)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class cbazuka extends MovieClip {
public var hit:hittemp;
public function cbazuka(){
addFrameScript(7, frame8, 29, frame30);
}
function frame8(){
stop();
}
function frame30(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 68
//cerror (cerror)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
import flash.text.*;
public dynamic class cerror extends MovieClip {
public var gun1:hittemp;
public var gun5:hittemp;
public var gun3:hittemp;
public var gun4:hittemp;
public var nametext:TextField;
public var hit:hittemp;
public var gun2:hittemp;
public function cerror(){
addFrameScript(15, frame16, 17, frame18);
}
function frame18(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
function frame16(){
gotoAndPlay(1);
}
}
}//package
Section 69
//chain (chain)
package {
import flash.display.*;
public dynamic class chain extends MovieClip {
}
}//package
Section 70
//coin (coin)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class coin extends MovieClip {
public var hit:hittemp;
public function coin(){
addFrameScript(25, frame26, 30, frame31);
}
function frame26(){
gotoAndPlay("stand");
}
function frame31(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 71
//daterror (daterror)
package {
import flash.display.*;
public dynamic class daterror extends BitmapData {
public function daterror(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 72
//em1 (em1)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em1 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function em1(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 73
//em10 (em10)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em10 extends MovieClip {
public var hit:hittemp;
public var gun1:hittemp;
public function em10(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 74
//em11 (em11)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em11 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function em11(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 75
//em2 (em2)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em2 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function em2(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 76
//em3 (em3)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em3 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function em3(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 77
//em4 (em4)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em4 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function em4(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 78
//em5 (em5)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em5 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function em5(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 79
//em6 (em6)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em6 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function em6(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 80
//em7 (em7)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em7 extends MovieClip {
public var hit:hittemp;
public var gun1:MovieClip;
public function em7(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 81
//em8 (em8)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em8 extends MovieClip {
public var hit:hittemp;
public var gun1:hittemp;
public function em8(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 82
//em9 (em9)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class em9 extends MovieClip {
public var hit:hittemp;
public var gun1:hittemp;
public function em9(){
addFrameScript(5, frame6, 11, frame12, 17, frame18, 23, frame24, 29, frame30, 39, frame40);
}
function frame18(){
gotoAndPlay("attack");
}
function frame12(){
gotoAndPlay("walk");
}
function frame6(){
gotoAndPlay("stand");
}
function frame24(){
gotoAndPlay("hurt");
}
function frame30(){
gotoAndPlay("jump");
}
function frame40(){
API.removeAllCompositClass(this);
this.visible = false;
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
stop();
}
}
}//package
Section 83
//emlaser (emlaser)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class emlaser extends MovieClip {
public function emlaser(){
addFrameScript(3, frame4, 10, frame11);
}
function frame4(){
gotoAndPlay(1);
}
function frame11(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 84
//enemy_gage (enemy_gage)
package {
import flash.display.*;
public dynamic class enemy_gage extends MovieClip {
}
}//package
Section 85
//exo_a (exo_a)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class exo_a extends MovieClip {
public var hit:hittemp;
public function exo_a(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 86
//exo_b (exo_b)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class exo_b extends MovieClip {
public var hit:hittemp;
public function exo_b(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 87
//exo_c (exo_c)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class exo_c extends MovieClip {
public var hit:hittemp;
public function exo_c(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 88
//exo_d (exo_d)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class exo_d extends MovieClip {
public var hit:hittemp;
public function exo_d(){
addFrameScript(9, frame10, 16, frame17);
}
function frame10(){
gotoAndPlay(1);
}
function frame17(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 89
//gameinline (gameinline)
package {
import flash.display.*;
import GREENHERMIT.GHGun.*;
import GREENHERMIT.GHShootingStyle.*;
import GREENHERMIT.GHMovement.*;
import GREENHERMIT.GHTemplate.*;
import flash.geom.*;
import flash.events.*;
import GREENHERMIT.GHUtils.*;
import GREENHERMIT.GHDurationControl.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import GREENHERMIT.GHBulletCollection.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class gameinline extends KeyframeTemplate {
public var drawlaser;
public var soundgfx;
public var countenemy;
public var dashdirect;
public var powergun;
public var ag;
public var pass;
public var playerwalk;
public var scorepoint;
public var powermax;
public var arrowDown:Boolean;
public var hpfactor;
public var so:SharedObject;
public var i;
public var p;
public var arrowUp:Boolean;
public var slotgun:Array;
public var area:BitmapData;
public var timemousedown;
public var z;
public var switchkey;
public var playergun:GunDesc;
public var chain:Boolean;
public var laser:Boolean;
public var mousepress;
public var money;
public var gamelevel;
public var superclass:KeyframeTemplate;
public var player:MovieClip;
public var powerlaser;
public var pausegame;
public var enemy_list:MovieClip;
public var gd4:GunDesc;
public var gd6:GunDesc;
public var gd3:GunDesc;
public var gd5:GunDesc;
public var gd7:GunDesc;
public var gd2:GunDesc;
public var shop;
public var gagegun;
public var gd0:GunDesc;
public var z2;
public var shake;
public var soundchannel;
public var gd9:GunDesc;
public var gd1:GunDesc;
public var thispower;
public var getlaser;
public var carboss;
public var slotgd:Array;
public var sbgm1;
public var sfxindex;
public var gd8:GunDesc;
public var egage;
public var gunindex;
public var arrowRight:Boolean;
public var boss;
public var gameend;
public var arrowLeft:Boolean;
public var gd10:GunDesc;
public var gd11:GunDesc;
public var gd12:GunDesc;
public var g_root;
public var gameover;
public var gametime;
public var soundgun;
public var switchnum;
public var firelist;
public var ratemoney;
public var temphp;
public var csl;
public function gameinline(){
addFrameScript(0, frame1);
}
public function walktoPlayer(_arg1:MovieClip){
if (_arg1.lasernum != null){
return;
};
if (_arg1.timetomove > 0){
_arg1.timetomove--;
} else {
if (_arg1.walknum == 0){
_arg1.targetX = player.x;
_arg1.targetY = player.y;
_arg1.p = new Point(_arg1.targetX, _arg1.targetY);
_arg1.fa = int(API.findAngle(_arg1, _arg1.p));
_arg1.walkList = setWalk;
};
if (_arg1.walknum == 1){
_arg1.targetX = int((Math.random() * 600));
_arg1.targetY = int((Math.random() * 440));
_arg1.p = new Point(_arg1.targetX, _arg1.targetY);
_arg1.fa = int(API.findAngle(_arg1, _arg1.p));
_arg1.walkList = setWalk;
};
if (_arg1.walknum == 2){
if (_arg1.pointwalk == null){
return;
};
_arg1.targetX = _arg1.pointwalk[int((Math.random() * 2))];
_arg1.targetY = _arg1.pointwalk[int(((Math.random() * 2) + 2))];
_arg1.p = new Point(_arg1.targetX, _arg1.targetY);
_arg1.fa = int(API.findAngle(_arg1, _arg1.p));
_arg1.walkList = setWalk;
};
if (_arg1.walknum == 3){
if (_arg1.pointwalk == null){
return;
};
_arg1.targetX = player.x;
_arg1.targetY = player.y;
_arg1.p = new Point(_arg1.targetX, _arg1.targetY);
_arg1.fa = int(API.findAngle(_arg1, _arg1.p));
_arg1.walkList = setWalk;
};
};
}
public function checkPlayer(_arg1:MovieClip){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (_arg1.gfxhit != null){
if (_arg1.timegfx > 0){
_arg1.timegfx--;
} else {
_arg1.gfxhit = null;
game.parent.flashatt.visible = false;
};
};
if (_arg1.confuse != null){
_arg1.confuse.x = _arg1.x;
_arg1.confuse.y = _arg1.y;
};
if (_arg1.status == true){
if (_arg1.confuse == null){
_local2 = API.getClass(css.config.gfxconfuse);
_local3 = new (_local2);
_local3.x = _arg1.x;
_local3.y = _arg1.y;
_arg1.confuse = _local3;
world.gfx_layer.addChild(_local3);
};
} else {
if (_arg1.confuse != null){
_arg1.confuse.visible = false;
_arg1.confuse = null;
world.gfx_layer.removeChildAt(_local3);
};
};
if (((!((_arg1.hp == null))) && (!((_arg1.currenthp == null))))){
if (_arg1.passgfx == false){
_arg1.passgfx = true;
return;
};
if (_arg1.hp != _arg1.currenthp){
if (game.parent.flashatt.visible == false){
game.parent.flashatt.visible = true;
};
_arg1.currenthp = _arg1.hp;
_local2 = API.getClass(css.config.gfxherohit);
_local4 = new (_local2);
_local4.x = _arg1.x;
_local4.y = _arg1.y;
_arg1.timegfx = 10;
world.gfx_layer.addChild(_local4);
_arg1.gfxhit = _local4;
};
};
if (((!((_arg1.status == null))) && ((_arg1.countstatus > 0)))){
_arg1.countstatus--;
};
if (((!((_arg1.countstatus == null))) && ((_arg1.countstatus <= 0)))){
_arg1.countstatus = null;
_arg1.status = null;
};
if ((((_arg1.hp <= 0)) && ((_arg1.die == null)))){
_arg1.die = true;
_local2 = API.getClass(_arg1.gfx);
_local5 = new (_local2);
_local5.x = _arg1.x;
_local5.y = _arg1.y;
world.gfx_layer.addChild(_local5);
destroy(_arg1);
gamepause = true;
};
if (((((!((_arg1.hp == null))) && (!((_arg1.maxhp == null))))) && (!((_arg1.gage == null))))){
_arg1.gage.gotoAndStop(int(((_arg1.hp * 100) / _arg1.maxhp)));
};
if ((((((((_arg1.x >= 0)) && ((_arg1.x <= 640)))) && ((_arg1.y >= 0)))) && ((_arg1.y <= 480)))){
_arg1.zone = false;
};
if (_arg1.hp <= 0){
_arg1.gage.visible = false;
};
_arg1.gage.visible = false;
}
public function initPlayer(_arg1:MovieClip){
var so:SharedObject;
var shoot:*;
var normalShoot:Function;
var enemy = _arg1;
normalShoot = function (_arg1){
soundgun[gunindex].play();
};
so = SharedObject.getLocal("TA");
gd0 = new GunDesc("gun1", css.config.mag0, css.config.reload0, css.config.fqc0);
shoot = new ShootMouse(css["bullet10"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd0, shoot);
gd0.pauseToggle(true);
gd0.shootEvent = normalShoot;
gd1 = new GunDesc("gun1", css.config.mag1, css.config.reload1, css.config.fqc1);
shoot = new ShootMouse(css["bullet11"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd1, shoot);
gd1.pauseToggle(true);
gd1.shootEvent = normalShoot;
gd2 = new GunDesc("gun1", css.config.mag1, css.config.reload1, css.config.fqc1);
shoot = new ShootMouse(css["bullet22"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd2, shoot);
gd2.pauseToggle(true);
gd2.shootEvent = normalShoot;
gd3 = new GunDesc("gun1", css.config.mag1, css.config.reload1, css.config.fqc1);
shoot = new ShootMouse(css["bullet23"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd3, shoot);
gd3.pauseToggle(true);
gd3.shootEvent = normalShoot;
gd4 = new GunDesc("gun1", css.config.mag1, css.config.reload1, css.config.fqc1);
shoot = new ShootMouse(css["bullet24"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd4, shoot);
gd4.pauseToggle(true);
gd4.shootEvent = normalShoot;
gd5 = new GunDesc("gun1", 0, 0, 0);
shoot = new ShootMouse(css["bullet17"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd5, shoot);
gd5.pauseToggle(true);
gd5.shootEvent = normalShoot;
gd6 = new GunDesc("gun1", 0, 0, 0);
shoot = new ShootMouse(css["bullet16"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd6, shoot);
gd6.pauseToggle(true);
gd6.shootEvent = normalShoot;
gd7 = new GunDesc("gun1", 0, 0, 0);
shoot = new ShootMouse(css["bullet18"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd7, shoot);
gd7.pauseToggle(true);
gd7.shootEvent = normalShoot;
gd8 = new GunDesc("gun1", 0, 0, 0);
shoot = new ShootMouse(css["bullet18"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd8, shoot);
gd8.pauseToggle(true);
gd8.shootEvent = normalShoot;
gd9 = new GunDesc("gun1", css.config.mag2, css.config.reload2, css.config.fqc2);
shoot = new ShootMouse(css["bullet12"], {way:8, angle:45});
API.addShootMethod(game, world, enemy, gd9, shoot);
gd9.pauseToggle(true);
gd9.shootEvent = normalShoot;
gd10 = new GunDesc("gun1", css.config.mag3, css.config.reload3, css.config.fqc3);
shoot = new ShootMouse(css["bullet13"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd10, shoot);
gd10.pauseToggle(true);
gd10.shootEvent = normalShoot;
gd11 = new GunDesc("gun1", css.config.mag4, css.config.reload4, css.config.fqc4);
shoot = new ShootMouse(css["bullet14"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd11, shoot);
gd11.pauseToggle(true);
gd11.shootEvent = normalShoot;
gd12 = new GunDesc("gun1", css.config.mag5, css.config.reload5, css.config.fqc5);
shoot = new ShootMouse(css["bullet15"], {way:1, angle:0});
API.addShootMethod(game, world, enemy, gd12, shoot);
gd12.pauseToggle(true);
gd12.shootEvent = normalShoot;
playergun = gd0;
playergun.pauseToggle(true);
playergun.shootEvent = normalShoot;
enemy.x = 320;
enemy.y = 240;
enemy.walkList = null;
enemy.process = checkLine;
enemy.listenkey = keyProcess;
enemy.processplayer = checkPlayer;
enemy.passgfx = false;
player = enemy;
player.rotation = 270;
if (temphp != null){
player.hp = temphp;
player.currenthp = player.hp;
};
so.close();
}
public function keycontrol(_arg1:MovieClip){
if (playerwalk == null){
};
}
public function goRight(_arg1:MovieClip, _arg2){
var _local3:*;
_arg1.gotoAndPlay("walk");
_local3 = API.getMotion(_arg1);
if ((_local3 is MapMove)){
if (_arg2[1] == null){
MapMove(_local3).setDirect(1);
} else {
if ((Math.random() * 100) < int(_arg2[1])){
MapMove(_local3).setDirect(1);
};
};
};
}
public function mouseUp(_arg1:MouseEvent){
releaseFocus();
mousepress = false;
timemousedown = 0;
playergun.reload = 10;
if (((!((gunindex == 11))) && (!((gunindex == 12))))){
if (powergun[i] <= 0){
playergun.pauseToggle(true);
playergun.frequency = 0;
} else {
playergun.frequency = playergun.savefqc;
};
};
if (thispower != null){
if (((!((gunindex == 11))) && (!((gunindex == 12))))){
gagegun[gunindex] = false;
};
};
if (gamepause){
return;
};
laser = false;
playergun.pauseToggle(true);
gd0.pauseToggle(true);
gd1.pauseToggle(true);
gd2.pauseToggle(true);
gd3.pauseToggle(true);
gd4.pauseToggle(true);
gd5.pauseToggle(true);
gd6.pauseToggle(true);
gd7.pauseToggle(true);
gd8.pauseToggle(true);
gd9.pauseToggle(true);
gd10.pauseToggle(true);
gd11.pauseToggle(true);
gd12.pauseToggle(true);
}
public function checkhitplayer(_arg1:MovieClip){
var _local2:*;
_local2 = world.player_layer.getChildAt(0);
if (((_arg1.hitTestObject(_local2)) && (!((_arg1 == _local2))))){
};
}
public function jump(_arg1:MovieClip, _arg2){
var _local3:*;
_arg1.gotoAndPlay("jump");
_local3 = API.getMotion(_arg1);
if ((_local3 is MapMove)){
if (_arg2[1] == null){
MapMove(_local3).jumpNow();
} else {
if ((Math.random() * 100) < int(_arg2[1])){
MapMove(_local3).jumpNow();
};
};
};
}
public function initBullet(_arg1:MovieClip, _arg2:Object){
if ((((_arg1.style < 10)) || ((_arg1.style > 90)))){
if (_arg1.style == 1){
_arg1.nohit = true;
_arg1.p = new Point(player.x, player.y);
};
if ((((_arg1.style == 2)) || ((_arg1.style == 4)))){
_arg1.hit = null;
};
_arg1.process = enemyBullet;
} else {
if ((((((((((_arg1.style == 11)) || ((_arg1.style == 22)))) || ((_arg1.style == 23)))) || ((_arg1.style == 24)))) || ((_arg1.style == 26)))){
_arg1.nohit = true;
_arg1.targetX = int(mouseX);
_arg1.targetY = int(mouseY);
};
if (_arg1.style == 14){
_arg1.status = true;
playergun.frequency = 0;
};
if (_arg1.style == 15){
_arg1.status = true;
playergun.frequency = 0;
};
if (_arg1.style == 16){
_arg1.x = -1000;
_arg1.y = -1000;
};
if (_arg1.style == 17){
_arg1.targetX = mouseX;
_arg1.targetY = mouseY;
};
if (_arg1.style == 18){
_arg1.x = -1000;
_arg1.y = -1000;
};
if (_arg1.style == 20){
};
if (_arg1.style == 21){
_arg1.count = 0;
};
_arg1.process = playerBullet;
};
API.setShooterType(_arg1);
CSSToVar.CSSApplyObject(game, world, _arg1, _arg2);
}
public function initEnemy(_arg1:MovieClip, _arg2:Object){
var _local3:*;
var _local4:*;
var _local5:*;
_local3 = (Math.random() * 640);
_local4 = (Math.random() * 480);
if ((Math.random() * 100) < 25){
_local3 = -20;
_local4 = (Math.random() * 460);
} else {
if ((Math.random() * 100) < 25){
_local3 = 660;
_local4 = (Math.random() * 460);
} else {
if ((Math.random() * 100) < 25){
_local4 = -20;
_local3 = (Math.random() * 640);
} else {
_local4 = 500;
_local3 = (Math.random() * 640);
};
};
};
_arg1.x = _local3;
_arg1.y = _local4;
if (_arg1.timemove != null){
_arg1.timetomove = 0;
};
if (_arg1.maxhp == null){
_local5 = _arg1.hp;
_arg1.maxhp = _local5;
_arg1.currenthp = _arg1.maxhp;
} else {
_arg1.hp = _arg1.maxhp;
_arg1.currenthp = _arg1.maxhp;
};
if (_arg1.player == null){
_arg1.maxhp = (_arg1.maxhp * hpfactor[gamelevel]);
_arg1.currenthp = _arg1.maxhp;
_arg1.hp = _arg1.maxhp;
};
_arg1.count = 0;
_arg1.walkList = walktoPlayer;
_arg1.looking = player;
_arg1.bkwalk = null;
_arg1.movecheck = checkLine;
_arg1.hitsearch = checkhitplayer;
_arg1.processplayer = checkEnemy;
_arg1.zone = true;
API.setShooterType(_arg1);
CSSToVar.CSSApplyObject(game, world, _arg1, _arg2);
}
public function functionMap(_arg1:String, _arg2:MovieClip){
var _local3:*;
_local3 = _arg1.split(",");
if ((game[_local3[0]] is Function)){
var _local4 = game;
_local4[_local3[0]](_arg2, _local3);
};
}
function frame1(){
superclass = this;
soundgun = new Array();
gunindex = 0;
soundgun[0] = new sfxnormalgun();
soundgun[1] = new sfxcannon();
soundgun[2] = new sfxcannon();
soundgun[3] = new sfxcannon();
soundgun[4] = new sfxcannon();
soundgun[5] = new sfxlaser();
soundgun[6] = new sfxlaser();
soundgun[7] = new sfxlaser();
soundgun[8] = new sfxlaser();
soundgun[9] = new sfxdeng();
soundgun[10] = new sfxdeng();
soundgun[11] = new sfxdeng();
soundgun[12] = new sfxexcotic();
soundgfx = new Array();
sfxindex = 0;
soundgfx[0] = new sfxdead();
soundgfx[1] = new sfxlaserboss();
soundgfx[2] = new sfxgetmoney();
createGameStage();
firelist = new Array();
enemy_list = new MovieClip();
slotgd = new Array(gd0, gd1, "gd2", "gd3", "gd4", "gd5", "gd6", "gd7", "gd8", "gd9", "gd10", "gd11", "gd12");
hpfactor = new Array();
hpfactor[0] = 0.6;
hpfactor[1] = 0.6;
hpfactor[2] = 0.72;
hpfactor[3] = 0.9;
hpfactor[4] = 0.9;
hpfactor[5] = 1.2;
hpfactor[6] = 1.2;
hpfactor[7] = 1.5;
hpfactor[8] = 1.8;
hpfactor[9] = 2.1;
hpfactor[10] = 2.4;
hpfactor[11] = 3;
hpfactor[12] = 3.9;
hpfactor[13] = 4.5;
hpfactor[14] = 5.4;
hpfactor[15] = 6;
hpfactor[16] = 6.6;
hpfactor[17] = 7.2;
hpfactor[18] = 1;
hpfactor[19] = 1;
ratemoney = new Array();
ratemoney[1] = 0.7;
ratemoney[2] = 1;
ratemoney[3] = 1;
ratemoney[4] = 1;
ratemoney[5] = 2;
ratemoney[6] = 2;
ratemoney[7] = 3;
ratemoney[8] = 3;
ratemoney[9] = 5;
ratemoney[10] = 3.5;
ratemoney[11] = 3.5;
ratemoney[12] = 3.5;
ratemoney[13] = 3.5;
ratemoney[14] = 3.5;
ratemoney[15] = 3.5;
ratemoney[16] = 3.5;
ratemoney[17] = 3.5;
ratemoney[18] = 4;
CSSToVar.importCSSObject(css, "bullet", 100, initBullet);
CSSToVar.importCSSObject(css, "enemy", 100, initEnemy);
CSSToVar.importCSSObject(css, "creator", 100, initCreator);
CSSToVar.importCSSObject(css, "gold", 100, initGold);
CSSToVar.importCSSObject(css, "goldpoint", 100, initGoldPoint);
slotgun = new Array();
slotgun.length = 3;
so = SharedObject.getLocal("TA");
shop = MovieClip(this.parent).shop;
if (so.data.money == undefined){
so.data.money = 0;
};
if (so.data.scorepoint == undefined){
so.data.scorepoint = 0;
};
if ((((so.data.gamelevel == undefined)) || ((so.data.gamelevel < 1)))){
so.data.gamelevel = 1;
};
if (so.data.csl == null){
so.data.csl = 0;
};
i = 1;
while (i < 4) {
if (so.data[("sl" + i)] != null){
slotgun[i] = so.data[("sl" + i)];
};
i++;
};
if (so.data.chp == null){
so.data.chp = 0;
} else {
if (so.data.chp >= 1){
i = 0;
while (i < so.data.chp) {
if (css[("skill2" + i)] != null){
css[("enemy" + 99)].maxhp = (css[("enemy" + 99)].maxhp + css[("skill2" + i)].hp);
};
i++;
};
};
};
if (so.data.cspd == null){
so.data.cspd = 0;
} else {
if (so.data.cspd >= 1){
i = 0;
while (i < so.data.cspd) {
if (css[("skill3" + i)] != null){
css[("enemy" + 99)].speed = (css[("enemy" + 99)].speed + 1);
};
i++;
};
};
};
if (so.data.csl == null){
so.data.csl = 0;
};
game.parent.gslot2.visible = false;
game.parent.gslot3.visible = false;
csl = so.data.csl;
if (csl >= 1){
i = 0;
while (i < csl) {
game.parent[("gslot" + (i + 2))].visible = true;
i++;
};
};
i = 1;
while (i < 4) {
if (slotgun[i] != null){
game.parent[("ic" + slotgun[i])].x = game.parent[("gslot" + i)].x;
game.parent[("ic" + slotgun[i])].y = game.parent[("gslot" + i)].y;
};
i++;
};
gagegun = new Array();
powergun = new Array();
i = 1;
while (i < 13) {
gagegun[i] = false;
powergun[i] = 100;
i++;
};
gamelevel = (so.data.gamelevel - 1);
money = so.data.money;
area = null;
playerwalk = null;
getlaser = null;
drawlaser = null;
powerlaser = 0;
switchkey = true;
switchnum = 100;
powermax = css.config.powermax;
gametime = css.config.gametime;
gameend = 50;
scorepoint = so.data.scorepoint;
pausegame = false;
z = new Array();
z2 = new Array();
temphp = null;
sbgm1 = new bgm1();
countenemy = css.config.countem;
so.close();
soundchannel = null;
mousepress = false;
levelUp();
gameover = MovieClip(parent).gameover;
g_root = MovieClip(parent).g_root;
superclass.EventKBRelease = keyRelease;
superclass.EventKBPress = keyPress;
dashdirect = 0;
timemousedown = 0;
if (!stage.hasEventListener(MouseEvent.MOUSE_DOWN)){
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
};
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
pass = false;
shake = 0;
superclass.keyFrameStyleEnterFrame = function (_arg1){
stage.focus = keyfocus;
if (gamepause){
game.parent.bshop.visible = false;
if (world.player_layer.numChildren <= 0){
if (gameend > 0){
gameend--;
} else {
game.removeEventListener(Event.ENTER_FRAME, EnterFrame);
game.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
game.removeEventListener(MouseEvent.MOUSE_UP, mouseUp);
game.keyfocus.removeEventListener(KeyboardEvent.KEY_DOWN, keydown);
game.keyfocus.removeEventListener(KeyboardEvent.KEY_UP, keyup);
g_root.gotoAndStop(1, "submit");
};
};
return;
} else {
game.parent.bshop.visible = true;
};
if (switchnum <= 25){
switchnum++;
switchkey = false;
};
if (switchnum >= 25){
switchnum = 25;
switchkey = true;
};
Mouse.hide();
game.parent.crosshair.x = mouseX;
game.parent.crosshair.y = mouseY;
gametime--;
if (gametime <= 250){
if ((((boss == null)) && ((((((gamelevel == 4)) || ((gamelevel == 8)))) || ((gamelevel == 13)))))){
if (world.enemy_layer.numChildren < 7){
if (gamelevel == 4){
boss = API.createMovieFromBase(world, css["enemy9"]);
};
if (gamelevel == 8){
trace("บอสสมควรออก");
boss = API.createMovieFromBase(world, css["enemy10"]);
};
if (gamelevel == 13){
boss = API.createMovieFromBase(world, css["enemy11"]);
};
boss.timedieboss = 250;
boss.currenthp = boss.hp;
egage = new enemy_gage();
boss.addChild(egage);
boss.x = 0;
egage.y = 30;
boss.scaleX = 1;
egage.scaleY = 1;
boss.gage = egage;
boss.gage.visible = false;
game.parent.bossgage.visible = true;
game.parent.enemytext.visible = true;
game.parent.bossgage.gotoAndStop(int(((boss.hp * 100) / boss.maxhp)));
};
} else {
if (boss != null){
};
};
};
if (gamelevel == 17){
if (world.enemy_layer.numChildren > 0){
carboss = world.enemy_layer.getChildAt(0);
carboss.gage.visible = false;
game.parent.bossgage.visible = true;
game.parent.enemytext.visible = true;
game.parent.bossgage.gotoAndStop(int(((carboss.hp * 100) / carboss.maxhp)));
};
};
if (gametime <= 0){
gametime = 0;
if (world.enemy_layer.numChildren <= 0){
if (gameend > 0){
gameend--;
} else {
game.parent.bshop.visible = false;
gamepause = true;
boss = null;
temphp = player.hp;
player.currenthp = temphp;
g_root.stageclear.visible = true;
g_root.stageclear.gotoAndPlay(1);
Mouse.show();
};
};
};
if (boss){
game.parent.bossgage.gotoAndStop(int(((boss.hp * 100) / boss.maxhp)));
};
game.parent.timetext.text = ("" + int((gametime / 25)));
game.parent.textscore.text = int(scorepoint);
game.parent.textlevel.text = gamelevel;
if (world.player_layer <= 0){
};
if (player != null){
p = new Point(world.mouseX, world.mouseY);
player.fa = API.findAngle(player, p);
player.gun1.rotation = (player.fa - player.rotation);
};
if (game.parent.switchgage != null){
game.parent.switchgage.gotoAndStop(int(((switchnum * 100) / 50)));
};
if (player){
game.parent.hpgage.gotoAndStop(int(((player.hp * 100) / player.maxhp)));
};
game.parent.moneytext.text = money;
i = 1;
while (i < 4) {
if (slotgun[i] != null){
game.parent[("ic" + slotgun[i])].x = game.parent[("gslot" + i)].x;
game.parent[("ic" + slotgun[i])].y = game.parent[("gslot" + i)].y;
game.parent[("gagegun" + slotgun[i])].x = (game.parent[("gslot" + i)].x + 20);
game.parent[("gagegun" + slotgun[i])].y = (game.parent[("gslot" + i)].y - 10);
};
i++;
};
i = 1;
while (i < 13) {
if (gagegun[i] == false){
if ((((i > 4)) && ((i < 9)))){
getlaser = null;
drawlaser = null;
};
powergun[i] = (powergun[i] + css.config[("regun" + i)]);
game.parent[("gagegun" + i)].gotoAndStop(int(((powergun[i] * 100) / powermax)));
if (powergun[i] >= powermax){
powergun[i] = powermax;
};
};
if (gagegun[i] == true){
if ((((((((i == 5)) || ((i == 6)))) || ((i == 7)))) || ((i == 8)))){
if (laser == true){
if (powergun[i] > 0){
powergun[i] = (powergun[i] - 0.5);
};
if (powergun[i] <= 0){
game.parent.reload.visible = true;
powergun[i] = 0;
gagegun[i] = true;
laser = false;
getlaser = null;
drawlaser = null;
};
game.parent[("gagegun" + i)].gotoAndStop(int(((powergun[i] * 100) / powermax)));
};
} else {
if (((!((i == 11))) && (!((i == 12))))){
if (powergun[i] <= 0){
playergun.pauseToggle(true);
} else {
playergun.frequency = playergun.savefqc;
};
} else {
if (powergun[i] <= 0){
playergun.pauseToggle(true);
};
};
if (playergun.currentmag != playergun.magcount){
playergun.currentmag = playergun.magcount;
powergun[i] = (powergun[i] - (((100 / playergun.mag) * 100) / powermax));
};
game.parent[("gagegun" + i)].gotoAndStop(int(((powergun[i] * 100) / powermax)));
};
};
if (gunindex == i){
game.parent[("ic" + i)].alpha = 1;
} else {
if (gunindex == 0){
game.parent["ic0"].alpha = 1;
};
};
if (i != gunindex){
game.parent[("ic" + i)].alpha = 0.5;
} else {
if (gunindex != 0){
game.parent["ic0"].alpha = 0.5;
};
};
i++;
};
if (powergun[gunindex] <= 0){
game.parent.reload.visible = true;
} else {
game.parent.reload.visible = false;
};
if (shake > 0){
shake--;
game.x = (Math.random() * shake);
game.y = (Math.random() * shake);
} else {
game.x = 0;
game.y = 0;
};
g_root.scoresubmit = scorepoint;
};
stop();
}
public function initEnemy10(_arg1:MovieClip){
_arg1.player = player;
_arg1.pointwalk = new Array();
_arg1.pointwalk.push(30, 610, 30, 450);
_arg1.savecharge = 0;
_arg1.savetime = _arg1.timemove;
_arg1.laserprocess = shootLaser;
}
public function initEnemy11(_arg1:MovieClip){
_arg1.pointwalk = new Array();
_arg1.pointwalk.push(30, 610, 30, 450);
_arg1.walkList = walktoPlayer;
}
public function initEnemy12(_arg1:MovieClip){
_arg1.player = player;
_arg1.pointwalk = new Array();
_arg1.pointwalk.push(30, 610, 30, 450);
_arg1.gameend = false;
_arg1.savecharge = 0;
_arg1.savetime = _arg1.timemove;
_arg1.walkList = walktoPlayer;
_arg1.laserprocess = shootLaser;
CSSToVar.CSSCreateShootSet(game, world, _arg1, css["gun98"]);
}
public function createGameStage(){
superclass.worldlist.push({layername:"bg_layer", movieclip:"bg"});
superclass.worldlist.push({layername:"gold_layer", movieclip:null});
superclass.worldlist.push({layername:"door_layer", movieclip:null});
superclass.worldlist.push({layername:"player_layer", movieclip:null});
superclass.worldlist.push({layername:"playerbullet2_layer", movieclip:null});
superclass.worldlist.push({layername:"enemybullet_layer", movieclip:null});
superclass.worldlist.push({layername:"enemy_layer", movieclip:null});
superclass.worldlist.push({layername:"enemybullet2_layer", movieclip:null});
superclass.worldlist.push({layername:"chain_layer", movieclip:null});
superclass.worldlist.push({layername:"playerbullet_layer", movieclip:null});
superclass.worldlist.push({layername:"gfx_layer", movieclip:null});
superclass.processlist.push("player_layer");
superclass.processlist.push("enemy_layer");
superclass.processlist.push("door_layer");
superclass.processlist.push("chain_layer");
superclass.processlist.push("enemybullet_layer");
superclass.processlist.push("enemybullet2_layer");
superclass.processlist.push("playerbullet_layer");
superclass.processlist.push("playerbullet2_layer");
superclass.processfn.push("process", "laserprocess", "movecheck", "creBullet", "listenkey", "walkList", "hitsearch", "processplayer");
superclass.gamewidth = 640;
superclass.gameheight = 480;
superclass.cam = {x:0, y:0, focusobject:{x:(gamewidth / 2), y:(gameheight / 2)}, round:null};
gamepause = false;
}
public function keyRelease(_arg1:Number){
}
public function enemyBullet(_arg1:MovieClip){
var player:*;
var gfxclass:*;
var gfx:*;
var i:*;
var fire:*;
var mot:*;
var gfxhit:*;
var bullet = _arg1;
player = world.player_layer.getChildAt(0);
if (bullet.style == 1){
if (bullet.hitTestPoint(bullet.p.x, bullet.p.y)){
gfxclass = API.getClass(bullet.gfx);
gfx = new (gfxclass);
gfx.x = bullet.x;
gfx.y = bullet.y;
world.gfx_layer.addChild(gfx);
API.setSpeed(bullet, 0);
bullet.die = true;
bullet.nohit = null;
if (player.hit.hitTestObject(gfx)){
player.hp = (player.hp - css.config.emgfxdamage);
};
i = 0;
while (i < css.config.enemybaaoe) {
fire = new gfx3();
mot = new AngleDropMove(fire, ((-90 + (Math.random() * 30)) - 15), ((Math.random() * 5) + 15), false, 1);
API.setMotion(fire, mot);
fire.x = bullet.x;
fire.y = (bullet.y - 5);
fire.finishy = bullet.y;
fire.process = function (_arg1){
if (_arg1.y >= _arg1.finishy){
API.removeMotion(_arg1);
};
if (((!((player.hit == null))) && (!((_arg1.hit == null))))){
if (((player.hit.hitTestObject(_arg1.hit)) && (((Math.random() * 100) < 25)))){
player.hp = (player.hp - css.config.enemyminidamage);
};
};
};
world.enemybullet_layer.addChild(fire);
i = (i + 1);
};
};
};
if (bullet.style == 2){
if (bullet.hitTestPoint(player.x, player.y, true)){
player.hp = (player.hp - bullet.damage);
};
};
if (bullet.style == 3){
API.setSpeed(bullet, 0);
};
if (bullet.style == 4){
if (bullet.hitTestPoint(player.x, player.y, true)){
if (player.countstatus == null){
player.countstatus = bullet.timestatus;
};
player.status = true;
player.hp = (player.hp - bullet.damage);
gfxclass = API.getClass(css.config.gfxherohit);
gfxhit = new (gfxclass);
gfxhit.x = player.x;
gfxhit.y = player.y;
world.gfx_layer.addChild(gfxhit);
};
};
if (bullet.style == 98){
mot = new HomingMove(bullet, player, bullet.speed, 5);
API.setMotion(bullet, mot);
};
if (player.hit == null){
return;
};
if (bullet.hit == null){
return;
};
if (((bullet.hitTestObject(player.hit)) && ((bullet.nohit == null)))){
if ((((bullet.style == 99)) || ((bullet.style == 98)))){
gfxclass = API.getClass(bullet.gfx);
gfx = new (gfxclass);
gfx.x = bullet.x;
gfx.y = bullet.y;
world.gfx_layer.addChild(gfx);
bullet.getgfx = gfx;
player.hp = (player.hp - bullet.damage);
bullet.hp = -100;
bullet.visible = false;
bullet.die = true;
};
if ((((bullet.style == 4)) && ((bullet.style == 2)))){
return;
};
if (bullet.style != 5){
if (player.armor == null){
return;
};
if ((Math.random() * 100) > player.armor){
player.hp = (player.hp - bullet.damage);
if ((((bullet.style == 0)) || ((bullet.style == 9)))){
bullet.hp = -100;
bullet.visible = false;
bullet.die = true;
};
} else {
if (bullet.hitboss != null){
return;
};
bullet.hitboss = player;
if ((((bullet.style == 0)) || ((bullet.style == 9)))){
mot = new AngleMove(bullet, -(bullet.rotation), bullet.speed);
API.setMotion(bullet, mot);
};
if (bullet.style == 3){
bullet.die = true;
};
};
};
if (bullet.style == 5){
if (bullet.hitboss != null){
return;
};
soundgfx[2].play();
money = (money + int(((Math.random() * css.config.money) + (css.config.freemoney * ratemoney[gamelevel]))));
bullet.hitboss = player;
bullet.die = true;
};
};
if ((((((((bullet.x > 640)) || ((bullet.x < 0)))) || ((bullet.y > 480)))) || ((bullet.y < 0)))){
if (((!((bullet.style == 2))) || (!((bullet.style == 4))))){
bullet.die = true;
};
};
if (bullet.die != null){
bullet.visible = false;
destroy(bullet);
};
}
public function initEnemy6(_arg1:MovieClip){
_arg1.pointwalk = new Array();
_arg1.pointwalk.push(30, 610, 30, 450);
_arg1.savecharge = 0;
_arg1.savetime = _arg1.timemove;
_arg1.laserprocess = shootLaser;
}
public function mouseDown(_arg1:MouseEvent){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
releaseFocus();
if (gamepause){
mouseUp(_arg1);
return;
};
mousepress = true;
if (player.hp <= 0){
return;
};
gagegun[gunindex] = true;
if (powergun[gunindex] <= 0){
game.parent.reload.visible = true;
} else {
game.parent.reload.visible = false;
};
if (playergun == gd0){
if (timemousedown <= 0){
playergun.shootNow();
timemousedown = 10;
};
if (timemousedown != 0){
playergun.frequency = 8;
playergun.reload = 10;
};
};
if (gamepause){
return;
};
if (playergun == gd5){
if (getlaser == null){
laser = true;
};
soundgun[gunindex].play();
if (powerlaser > 0){
getlaser = true;
if (drawlaser == null){
_local2 = API.createMovieFromBase(world, css["bullet17"]);
_local2.scaleX = 1;
_local2.scaleY = 1;
_local2.x = player.x;
_local2.y = player.y;
_local3 = player.x;
_local4 = player.y;
_local7 = ((_local2.y - world.mouseY) / (_local2.x - world.mouseX));
_local8 = (_local2.y - (_local7 * _local2.x));
if (_local2.x < world.mouseX){
_local2.x = 800;
} else {
_local2.x = -100;
};
_local2.y = ((_local7 * _local2.x) + _local8);
_local2.fa = API.findAngle(player, _local2);
drawlaser = true;
};
};
};
if (playergun == gd6){
if (getlaser == null){
laser = true;
};
soundgun[gunindex].play();
if (powerlaser > 0){
getlaser = true;
if (drawlaser == null){
_local2 = API.createMovieFromBase(world, css["bullet18"]);
_local2.scaleX = 1;
_local2.scaleY = 1;
_local2.x = player.x;
_local2.y = player.y;
_local3 = player.x;
_local4 = player.y;
_local7 = ((_local2.y - world.mouseY) / (_local2.x - world.mouseX));
_local8 = (_local2.y - (_local7 * _local2.x));
if (_local2.x < world.mouseX){
_local2.x = 800;
} else {
_local2.x = -100;
};
_local2.y = ((_local7 * _local2.x) + _local8);
_local2.fa = API.findAngle(player, _local2);
_local5 = API.createMovieFromBase(world, css["bullet18"]);
_local5.scaleX = 1;
_local5.scaleY = 1;
_local5.x = player.x;
_local5.y = player.y;
_local5.fa = (API.findAngle(player, _local2) - 25);
_local5.fac = -25;
_local6 = API.createMovieFromBase(world, css["bullet18"]);
_local6.scaleX = 1;
_local6.scaleY = 1;
_local6.x = player.x;
_local6.y = player.y;
_local6.fa = (API.findAngle(player, _local2) + 25);
_local6.fac = 25;
drawlaser = true;
};
};
};
if ((((playergun == gd7)) || ((playergun == gd8)))){
if (getlaser == null){
laser = true;
};
soundgun[gunindex].play();
if (powerlaser > 0){
getlaser = true;
if (drawlaser == null){
_local2 = API.createMovieFromBase(world, css["bullet16"]);
_local2.x = player.x;
_local2.sy = _local2.y;
_local2.y = player.y;
_local7 = ((_local2.y - world.mouseY) / (_local2.x - world.mouseX));
_local8 = (_local2.y - (_local7 * _local2.x));
if (_local2.x < world.mouseX){
_local2.x = 800;
} else {
_local2.x = -100;
};
_local2.y = ((_local7 * _local2.x) + _local8);
drawlaser = true;
};
};
};
playergun.pauseToggle(false);
}
public function walkAround(_arg1:MovieClip){
var _local2:*;
if (_arg1.walktarget == null){
_arg1.targetX = _arg1.pointwalk[int((Math.random() * 2))];
_arg1.targetY = _arg1.pointwalk[int(((Math.random() * 2) + 2))];
_arg1.walktarget = true;
if (_arg1.targetX){
_local2 = new PositionMove(_arg1, {x:_arg1.targetX, y:_arg1.targetY}, _arg1.speed, false);
};
API.setMotion(_arg1, _local2);
};
if (_arg1.hitTestPoint(_arg1.targetX, _arg1.targetY)){
_arg1.walktarget = null;
};
if ((((_arg1.x <= 0)) || ((_arg1.x >= 640)))){
_arg1.walktarget = null;
};
if ((((_arg1.y <= 0)) || ((_arg1.y >= 480)))){
_arg1.walktarget = null;
};
}
public function active(_arg1:MovieClip, _arg2){
if (_arg1.active == null){
_arg1.gotoAndPlay("active");
_arg1.active = true;
} else {
if (_arg1.active == false){
_arg1.gotoAndPlay("active");
_arg1.active = true;
};
};
}
public function dashPlayer(_arg1:MovieClip){
var _local2:*;
if (_arg1.setdash != null){
if (_arg1.setdash == true){
_arg1.walktarget = null;
};
};
if (_arg1.walktarget == null){
_arg1.targetX = player.x;
_arg1.targetY = player.y;
if (_arg1.terbo != null){
_local2 = new PositionMove(_arg1, {x:_arg1.targetX, y:_arg1.targetY}, (_arg1.speed + _arg1.terbo), false);
} else {
_local2 = new PositionMove(_arg1, {x:_arg1.targetX, y:_arg1.targetY}, _arg1.speed, false);
};
API.setMotion(_arg1, _local2);
_arg1.walktarget = true;
};
if (_arg1.hitTestPoint(_arg1.targetX, _arg1.targetY)){
API.removeMotion(_arg1);
_arg1.walktarget = null;
if (_arg1.setdash != null){
_arg1.setdash = false;
_arg1.walkList = walktoPlayer;
};
};
}
public function checkLine(_arg1:MovieClip){
if (_arg1.zone == true){
} else {
if (_arg1.y >= 470){
_arg1.y = 470;
if (_arg1 != player){
_arg1.timetomove = -1;
};
};
if (_arg1.y <= 10){
_arg1.y = 10;
if (_arg1 != player){
_arg1.timetomove = -1;
};
};
if (_arg1.x >= 630){
_arg1.x = 630;
if (_arg1 != player){
_arg1.timetomove = -1;
};
};
if (_arg1.x <= 10){
_arg1.x = 10;
if (_arg1 != player){
_arg1.timetomove = -1;
};
};
if ((((_arg1.x <= 10)) && ((_arg1.y <= 10)))){
_arg1.x = 10;
_arg1.y = 10;
if (_arg1 != player){
_arg1.timetomove = -1;
};
};
if ((((_arg1.x >= 630)) && ((_arg1.y <= 10)))){
_arg1.x = 630;
_arg1.y = 10;
if (_arg1 != player){
_arg1.timetomove = -1;
};
};
if ((((_arg1.x <= 10)) && ((_arg1.y >= 470)))){
_arg1.x = 10;
_arg1.y = 470;
if (_arg1 != player){
_arg1.timetomove = -1;
};
};
if ((((_arg1.x >= 630)) && ((_arg1.y >= 470)))){
_arg1.x = 630;
_arg1.y = 470;
if (_arg1 != player){
_arg1.timetomove = -1;
};
};
};
}
public function initCreator(_arg1:MovieClip, _arg2:Object){
_arg1.x = -1000;
_arg1.y = -1000;
API.setShooterType(_arg1);
CSSToVar.CSSApplyObject(game, world, _arg1, _arg2);
}
public function goLeft(_arg1:MovieClip, _arg2){
var _local3:*;
_arg1.gotoAndPlay("walk");
_local3 = API.getMotion(_arg1);
if ((_local3 is MapMove)){
if (_arg2[1] == null){
MapMove(_local3).setDirect(-1);
} else {
if ((Math.random() * 100) < int(_arg2[1])){
MapMove(_local3).setDirect(-1);
};
};
};
}
public function keyPress(_arg1:Number){
var _local2:SharedObject;
if (switchkey == true){
if (_arg1 == 49){
playergun.pauseToggle(true);
laser = false;
getlaser = null;
drawlaser = null;
playergun = gd0;
gunindex = 0;
i = 1;
while (i < 13) {
gagegun[i] = false;
i++;
};
gagegun[1] = false;
switchkey = false;
switchnum = 0;
if (mousepress == true){
playergun.pauseToggle(false);
} else {
playergun.pauseToggle(true);
};
};
if (_arg1 == 50){
if (slotgun[1] != null){
playergun.pauseToggle(true);
laser = false;
getlaser = null;
drawlaser = null;
playergun = game[("gd" + slotgun[1])];
switchkey = false;
switchnum = 0;
gunindex = slotgun[1];
i = 1;
while (i < 13) {
gagegun[i] = false;
i++;
};
gagegun[1] = false;
gagegun[gunindex] = true;
thispower = gagegun[gunindex];
if (mousepress == true){
playergun.pauseToggle(false);
} else {
playergun.pauseToggle(true);
};
};
};
if (_arg1 == 51){
if (slotgun[2] != null){
playergun.pauseToggle(true);
laser = false;
getlaser = null;
drawlaser = null;
playergun = game[("gd" + slotgun[2])];
switchkey = false;
switchnum = 0;
gunindex = slotgun[2];
i = 1;
while (i < 13) {
gagegun[i] = false;
i++;
};
gagegun[1] = false;
gagegun[gunindex] = true;
thispower = gagegun[gunindex];
if (mousepress == true){
playergun.pauseToggle(false);
} else {
playergun.pauseToggle(true);
};
};
};
if (_arg1 == 52){
if (slotgun[3] != null){
playergun.pauseToggle(true);
laser = false;
getlaser = null;
drawlaser = null;
playergun = game[("gd" + slotgun[3])];
switchkey = false;
switchnum = 0;
gunindex = slotgun[3];
i = 1;
while (i < 13) {
gagegun[i] = false;
i++;
};
gagegun[1] = false;
gagegun[gunindex] = true;
thispower = gagegun[gunindex];
if (mousepress == true){
playergun.pauseToggle(false);
} else {
playergun.pauseToggle(true);
};
};
};
};
if (_arg1 == 32){
if (gamepause){
return;
};
Mouse.show();
game.visible = false;
game.parent.flashatt.visible = false;
gamepause = true;
game.parent.shop.visible = true;
_local2 = SharedObject.getLocal("TA");
if (_local2.data.money == undefined){
_local2.data.money = 0;
};
if (_local2.data.gamelevel == undefined){
_local2.data.gamelevel = 0;
};
if (_local2.data.scorepoint == undefined){
_local2.data.scorepoint = 0;
};
_local2.data.gamelevel = game.gamelevel;
_local2.data.scorepoint = game.scorepoint;
_local2.data.money = game.money;
_local2.flush();
_local2.close();
trace("shop + data shareobject");
trace(("money" + _local2.data.money));
trace(("gamelevel" + _local2.data.gamelevel));
trace(("score" + _local2.data.scorepoint));
game.parent.shop.openShop();
};
}
public function randomMove(_arg1:MovieClip){
var _local2:*;
var _local3:*;
if (_arg1.walktarget == null){
API.setSpeed(_arg1, 0);
_arg1.targetX = int((Math.random() * 640));
_arg1.targetY = int((Math.random() * 480));
_local2 = new Point(_arg1.targetX, _arg1.targetY);
_arg1.fa = API.findAngle(_local2, _arg1);
if (_arg1.rotation < _arg1.fa){
_arg1.rotation++;
} else {
if (_arg1.rotation > _arg1.fa){
_arg1.rotation--;
} else {
_local3 = new PositionMove(_arg1, {x:_arg1.targetX, y:_arg1.targetY}, _arg1.speed, false);
API.setMotion(_arg1, _local3);
_arg1.walktarget = true;
};
};
};
if (_arg1.hitTestPoint(_arg1.targetX, _arg1.targetY)){
API.setSpeed(_arg1, 0);
_arg1.walktarget = null;
};
}
public function keyProcess(_arg1:MovieClip){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (key[32]){
};
_local2 = 1;
_arg1.sy = 0;
_arg1.sx = 0;
if (_arg1.status){
_local2 = -1;
};
if (key[87]){
_arg1.sy = (-(_local2) * _arg1.speed);
};
if (key[65]){
_arg1.sx = (-(_local2) * _arg1.speed);
};
if (key[83]){
_arg1.sy = (_local2 * _arg1.speed);
};
if (key[68]){
_arg1.sx = (_arg1.sx + (_local2 * _arg1.speed));
};
_local3 = (int((((Math.atan2(_arg1.sy, _arg1.sx) * 180) / Math.PI) + 360)) % 360);
_local4 = (int((_arg1.rotation + 360)) % 360);
if ((((_local3 == 315)) && ((_local4 < 135)))){
_local4 = (_local4 + 360);
} else {
if ((((_local4 > 180)) && ((_local3 == 0)))){
_local3 = (_local3 + 360);
};
};
if ((((_local3 == 45)) && ((_local4 > 225)))){
_local4 = (_local4 - 360);
};
if (!(((_arg1.sx == 0)) && ((_arg1.sy == 0)))){
_local5 = ((_local3 + _local4) / 2);
if ((((Math.abs((_arg1.rotation - _local5)) > 30)) && ((Math.abs((_arg1.rotation - _local5)) < 180)))){
_arg1.rotation = (_arg1.rotation + (-(((_arg1.rotation - _local5) / Math.abs((_arg1.rotation - _local5)))) * 30));
} else {
_arg1.rotation = ((_local3 + _local4) / 2);
};
};
_arg1.x = (_arg1.x + _arg1.sx);
_arg1.y = (_arg1.y + _arg1.sy);
}
public function levelUp(){
var bit:*;
var i:*;
var creator:*;
var s:Sound;
var sv:*;
var transform:SoundTransform;
var soundCompleteHandler:*;
game.parent.bshop.visible = true;
game.parent.reload.visible = false;
game.parent.flashatt.visible = false;
game.parent.bossgage.visible = false;
game.parent.enemytext.visible = false;
gamelevel++;
countenemy = (css.config.countem + gamelevel);
mousepress = false;
gametime = css.config.gametime;
gameend = 100;
switchkey = true;
switchnum = 50;
powerlaser = powermax;
laser = false;
gunindex = 0;
so.data.gamelevel = gamelevel;
so.data.money = money;
if (soundchannel == null){
s = sbgm1;
SoundMixer.stopAll();
soundchannel = s.play(1, 1);
sv = soundchannel;
transform = sv.soundTransform;
transform.volume = 0.6;
sv.soundTransform = transform;
soundCompleteHandler = function (){
var _local1:Sound;
soundchannel.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
_local1 = sbgm1;
soundchannel = _local1.play(1, 1);
soundchannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
};
soundchannel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
};
if (superclass.world != null){
superclass.game.removeChild(world);
superclass.world = null;
};
area = new BitmapData(16, 12, false, 0);
bit = new Bitmap(area);
bit.scaleX = 40;
bit.scaleY = 40;
game.addChild(bit);
createWorld();
i = 0;
while (i < 20) {
z[i] = API.createMovieFromBase(world, css["bullet25"]);
z[i].x = 1000;
z[i].y = 2000;
z2[i] = API.createMovieFromBase(world, css["bullet25"]);
z2[i].x = -1000;
z2[i].y = -2000;
i = (i + 1);
};
i = 1;
while (i < 13) {
gagegun[i] = false;
i = (i + 1);
};
creator = API.createMovieFromBase(world, css[("creator" + gamelevel)]);
if (gamelevel == 14){
world.bg_layer.gotoAndStop(4);
} else {
if (gamelevel != 13){
world.bg_layer.gotoAndStop((int(((gamelevel - 1) / 4)) + 1));
} else {
world.bg_layer.gotoAndStop(3);
};
};
}
public function playerBullet(_arg1:MovieClip){
var bulletLoop2:Function;
var hideBullet2:Function;
var bulletLoop:Function;
var hideBullet:Function;
var i:*;
var gfxclass:*;
var gfx:*;
var fire:*;
var j:*;
var minibullet:*;
var mot:*;
var lastfire:*;
var angle:*;
var r:*;
var gl:MovieClip;
var range:*;
var ec:*;
var color:*;
var radince:*;
var p:*;
var p2:*;
var cx:*;
var cy:*;
var en:*;
var dx:*;
var dy:*;
var thisrange:*;
var minibull:*;
var a:*;
var car:*;
var enemy:*;
var bullet = _arg1;
bulletLoop2 = function (_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
i = 0;
while (i < 20) {
_local2 = API.findAngle(player, _arg1);
_local3 = (player.x - _arg1.x);
_local4 = (player.y - _arg1.y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local6 = ((i / 20) * _local5);
z2[i].x = ((_local6 * Math.cos(((_local2 * Math.PI) / 180))) + player.x);
z2[i].y = ((_local6 * Math.sin(((_local2 * Math.PI) / 180))) + player.y);
i++;
};
};
hideBullet2 = function (){
i = 0;
while (i < 20) {
z2[i].x = 1000;
z2[i].y = 1000;
i++;
};
};
bulletLoop = function (_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
i = 0;
while (i < 20) {
_local2 = API.findAngle(player, _arg1);
_local3 = (player.x - _arg1.x);
_local4 = (player.y - _arg1.y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
_local6 = ((i / 20) * _local5);
z[i].x = ((_local6 * Math.cos(((_local2 * Math.PI) / 180))) + player.x);
z[i].y = ((_local6 * Math.sin(((_local2 * Math.PI) / 180))) + player.y);
i++;
};
};
hideBullet = function (){
i = 0;
while (i < 20) {
z[i].x = -1000;
z[i].y = -1000;
i++;
};
};
if (bullet.style == 11){
if (bullet.hitTestPoint(bullet.targetX, bullet.targetY)){
bullet.nohit = null;
API.setSpeed(bullet, 0);
bullet.hp = -100;
if (bullet.getgfx == null){
gfxclass = API.getClass(bullet.gfx);
gfx = new (gfxclass);
gfx.x = bullet.x;
gfx.y = bullet.y;
world.gfx_layer.addChild(gfx);
bullet.getgfx = gfx;
} else {
destroy(bullet);
bullet.hp = -100;
bullet.die = true;
return;
};
};
};
if (bullet.style == 22){
if (bullet.hitTestPoint(bullet.targetX, bullet.targetY)){
bullet.nohit = null;
API.setSpeed(bullet, 0);
bullet.hp = -100;
if (bullet.getgfx == null){
gfxclass = API.getClass(bullet.gfx);
gfx = new (gfxclass);
gfx.x = bullet.x;
gfx.y = bullet.y;
world.gfx_layer.addChild(gfx);
bullet.getgfx = gfx;
} else {
destroy(bullet);
bullet.hp = -100;
bullet.die = true;
return;
};
i = 0;
while (i < css.config.baaoe) {
if (i > css.config.firestand){
return;
};
fire = new gfxfire();
fire.x = ((bullet.x + (Math.random() * 100)) - 50);
fire.y = ((bullet.y + (Math.random() * 100)) - 50);
fire.finishy = bullet.y;
fire.timeburn = 0;
fire.process = function (_arg1){
var _local2:*;
var _local3:*;
_arg1.timeburn++;
if ((_arg1.timeburn % 15) == 0){
_local2 = 0;
while (_local2 < world.enemy_layer.numChildren) {
_local3 = world.enemy_layer.getChildAt(_local2);
if (((!((_local3.hit == null))) && (!((_arg1.hit == null))))){
if (_local3.hit.hitTestObject(_arg1.hit)){
_local3.hp = (_local3.hp - css.config.minidamage);
};
};
_local2++;
};
};
};
world.playerbullet2_layer.addChild(fire);
i = (i + 1);
};
};
};
if (bullet.style == 23){
if (bullet.hitTestPoint(bullet.targetX, bullet.targetY)){
bullet.nohit = null;
API.setSpeed(bullet, 0);
bullet.hp = -100;
if (bullet.getgfx == null){
gfxclass = API.getClass(bullet.gfx);
gfx = new (gfxclass);
gfx.x = bullet.x;
gfx.y = bullet.y;
world.gfx_layer.addChild(gfx);
bullet.getgfx = gfx;
} else {
destroy(bullet);
bullet.hp = -100;
bullet.die = true;
return;
};
i = 0;
while (i < css.config.aoebomb3) {
if (i < css.config.firestand3){
fire = new gfxfire();
fire.x = ((bullet.x + (Math.random() * 100)) - 50);
fire.y = ((bullet.y + (Math.random() * 100)) - 50);
fire.timeburn = 0;
} else {
if (i > css.config.firestand){
fire = new gfxfire();
fire.x = bullet.x;
fire.y = (bullet.y - 5);
mot = new AngleDropMove(fire, (Math.random() * 360), ((Math.random() * 15) + 10), true, 0.1);
API.setMotion(fire, mot);
fire.timer = ((Math.random() * 5) + 3);
fire.finishy = bullet.y;
fire.timeburn = 0;
};
};
fire.process = function (_arg1){
var _local2:*;
var _local3:*;
if (_arg1.timer > 0){
_arg1.timer--;
} else {
API.removeMotion(_arg1);
};
_arg1.timeburn++;
if ((_arg1.timeburn % 15) == 0){
_local2 = 0;
while (_local2 < world.enemy_layer.numChildren) {
_local3 = world.enemy_layer.getChildAt(_local2);
if (((!((_local3.hit == null))) && (!((_arg1.hit == null))))){
if (_local3.hit.hitTestObject(_arg1.hit)){
_local3.hp = (_local3.hp - css.config.minidamage);
};
};
_local2++;
};
};
};
world.playerbullet2_layer.addChild(fire);
i = (i + 1);
};
};
};
if (bullet.style == 24){
if (bullet.hitTestPoint(bullet.targetX, bullet.targetY)){
bullet.nohit = null;
API.setSpeed(bullet, 0);
bullet.hp = -100;
if (bullet.getgfx == null){
gfxclass = API.getClass(bullet.gfx);
gfx = new (gfxclass);
gfx.x = bullet.x;
gfx.y = bullet.y;
world.gfx_layer.addChild(gfx);
bullet.getgfx = gfx;
} else {
destroy(bullet);
bullet.hp = -100;
bullet.die = true;
return;
};
j = -2;
while (j < 3) {
if (j == 0){
};
minibullet = API.createMovieFromBase(world, css["bullet26"]);
minibullet.x = bullet.x;
minibullet.y = bullet.y;
minibullet.targetX = (bullet.x + ((j * Math.random()) * 150));
minibullet.targetY = (bullet.y + ((j * Math.random()) * 150));
mot = new PositionMove(minibullet, {x:minibullet.targetX, y:minibullet.targetY}, minibullet.speed);
API.setMotion(minibullet, mot);
j = (j + 1);
};
i = 0;
while (i < css.config.baaoe) {
fire = new gfxfire();
fire.x = ((bullet.x + (Math.random() * 100)) - 50);
fire.y = ((bullet.y + (Math.random() * 100)) - 50);
fire.timeburn = 0;
fire.process = function (_arg1){
var _local2:*;
var _local3:*;
if (_arg1.y >= _arg1.finishy){
API.removeMotion(_arg1);
};
_arg1.timeburn++;
if ((_arg1.timeburn % 15) == 0){
_local2 = 0;
while (_local2 < world.enemy_layer.numChildren) {
_local3 = world.enemy_layer.getChildAt(_local2);
if (((!((_local3.hit == null))) && (!((_arg1.hit == null))))){
if (_local3.hit.hitTestObject(_arg1.hit)){
_local3.hp = (_local3.hp - css.config.minidamage);
};
};
_local2++;
};
};
};
world.playerbullet2_layer.addChild(fire);
i = (i + 1);
};
};
};
if (bullet.style == 26){
if (bullet.hitTestPoint(bullet.targetX, bullet.targetY)){
bullet.nohit = null;
API.setSpeed(bullet, 0);
bullet.hp = -100;
if (bullet.getgfx == null){
gfxclass = API.getClass(bullet.gfx);
gfx = new (gfxclass);
gfx.x = bullet.x;
gfx.y = bullet.y;
world.gfx_layer.addChild(gfx);
bullet.getgfx = gfx;
} else {
destroy(bullet);
bullet.hp = -100;
bullet.die = true;
return;
};
i = 0;
while (i < css.config.baaoe) {
if (i > css.config.firestand){
return;
};
fire = new gfxfire();
firelist.unshift(fire);
if (firelist.length > 12){
lastfire = firelist.pop();
lastfire.process = null;
lastfire.visible = false;
};
fire.x = ((bullet.x + (Math.random() * 100)) - 50);
fire.y = ((bullet.y + (Math.random() * 100)) - 50);
fire.finishy = bullet.y;
fire.timeburn = 0;
fire.process = function (_arg1){
var _local2:*;
var _local3:*;
_arg1.timeburn++;
if ((_arg1.timeburn % 15) == 0){
trace((_arg1.timeburn % 15));
_local2 = 0;
while (_local2 < world.enemy_layer.numChildren) {
_local3 = world.enemy_layer.getChildAt(_local2);
if (((!((_local3.hit == null))) && (!((_arg1.hit == null))))){
if (_local3.hit.hitTestObject(_arg1.hit)){
_local3.hp = (_local3.hp - css.config.minidamage);
};
};
_local2++;
};
};
};
world.playerbullet2_layer.addChild(fire);
i = (i + 1);
};
};
};
if (bullet.style == 12){
if (bullet.x <= 0){
if (bullet.y > 240){
mot = new AngleMove(bullet, 325, bullet.speed, true);
} else {
if (bullet.y < 240){
mot = new AngleMove(bullet, 45, bullet.speed, true);
};
};
API.setMotion(bullet, mot);
};
if (bullet.x >= 640){
if (bullet.y > 240){
mot = new AngleMove(bullet, 135, bullet.speed, true);
} else {
if (bullet.y < 240){
mot = new AngleMove(bullet, 225, bullet.speed, true);
};
};
API.setMotion(bullet, mot);
};
if (bullet.y <= 0){
if (bullet.x < 320){
mot = new AngleMove(bullet, 45, bullet.speed, true);
API.setMotion(bullet, mot);
} else {
mot = new AngleMove(bullet, 75, bullet.speed, true);
API.setMotion(bullet, mot);
};
};
if (bullet.y >= 480){
if (bullet.x < 320){
mot = new AngleMove(bullet, 225, bullet.speed, true);
API.setMotion(bullet, mot);
} else {
mot = new AngleMove(bullet, 225, bullet.speed, true);
API.setMotion(bullet, mot);
};
};
};
if (bullet.style == 14){
bulletLoop2(bullet);
if ((((((((bullet.x >= 640)) || ((bullet.x <= 0)))) || ((bullet.y <= 0)))) || ((bullet.y >= 480)))){
bullet.status = null;
bullet.nohit = true;
};
if (bullet.status == null){
API.setSpeed(bullet, 0);
mot = new PositionMove(bullet, {x:player.x, y:player.y}, bullet.speed, false);
API.setMotion(bullet, mot);
if (player.hit == null){
return;
};
if (bullet.hitTestObject(player.hit)){
gd11.frequency = css.config.fqc4;
bullet.hp = -100;
};
if (bullet.hp <= 0){
hideBullet2();
};
};
};
if (bullet.style == 15){
API.removeMotion(bullet);
if (bullet.r == null){
bullet.r = bullet.range;
bullet.aspeed = 10;
};
if (bullet.t == null){
bullet.t = 0;
};
if (bullet.t < 200){
bullet.t++;
} else {
gd12.frequency = css.config.fqc5;
};
bullet.aspeed = (bullet.aspeed + bullet.anglespeed);
bullet.x = ((bullet.r * Math.cos(((bullet.aspeed * Math.PI) / 180))) + player.x);
bullet.y = ((bullet.r * Math.sin(((bullet.aspeed * Math.PI) / 180))) + player.y);
bulletLoop(bullet);
if (bullet.die != null){
bullet.hp = -100;
gd12.frequency = css.config.fqc5;
};
} else {
if (bullet.style != 14){
hideBullet();
};
};
if (bullet.style == 16){
if (laser == false){
if (gl != null){
gl.graphics.clear();
};
bullet.visible = false;
bullet.hp = -100;
};
angle = API.findAngle(player, new Point(world.mouseX, world.mouseY));
r = 8000;
bullet.x = (r * Math.cos(((angle * Math.PI) / 180)));
bullet.y = (r * Math.sin(((angle * Math.PI) / 180)));
if (powerlaser > 0){
bullet.tg = null;
gl = bullet;
range = 10000;
ec = 0;
while (ec < world.enemy_layer.numChildren) {
en = world.enemy_layer.getChildAt(ec);
if (playergun != gd8){
if (bullet.hitTestPoint(en.x, en.y, true)){
dx = (en.x - player.x);
dy = (en.y - player.y);
thisrange = Math.sqrt(((dx * dx) + (dy * dy)));
if (range > thisrange){
range = thisrange;
bullet.tg = en;
};
};
} else {
if ((((bullet.tg == null)) || ((bullet.tg.parent == null)))){
if (bullet.hitTestPoint(en.x, en.y, true)){
dx = (en.x - player.x);
dy = (en.y - player.y);
thisrange = Math.sqrt(((dx * dx) + (dy * dy)));
if (range > thisrange){
range = thisrange;
bullet.tg = en;
};
};
};
};
ec = (ec + 1);
};
gl.graphics.clear();
if (bullet.tg == null){
bullet.tg = bullet;
} else {
if (playergun == gd7){
minibull = API.createMovieFromBase(world, css["bullet20"]);
minibull.x = bullet.tg.x;
minibull.y = bullet.tg.y;
mot = new AngleMove(minibull, (Math.random() * 360), bullet.speed);
API.setMotion(minibull, mot);
};
if (playergun == gd8){
if (bullet.countchain == null){
bullet.tg.chainlaser = true;
bullet.tg.numchain = css.config.chain;
bullet.countchain = css.config.chain;
};
};
};
if (bullet.circlecount == null){
bullet.circlecount = 0;
};
bullet.circlecount++;
color = int((Math.random() * 0xFFFFFF));
radince = 60;
p = new Point(player.gun1.x, player.gun1.y);
p = player.localToGlobal(p);
p = bullet.globalToLocal(p);
p.y = ((Math.sin((((player.gun1.rotation + player.rotation) * Math.PI) / 180)) * radince) + p.y);
p.x = ((Math.cos((((player.gun1.rotation + player.rotation) * Math.PI) / 180)) * radince) + p.x);
p2 = new Point(bullet.tg.x, bullet.tg.y);
p2 = bullet.globalToLocal(p2);
cx = ((p.x + p2.x) / 2);
cy = ((p.y + p2.y) / 2);
gl.graphics.lineStyle(10, color);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
gl.graphics.lineStyle(20, color, 0.5);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
gl.graphics.lineStyle(40, color, 0.25);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
gl.graphics.lineStyle(100, color, 0.25);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
gl.graphics.lineStyle(500, color, 0.01);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
gl.graphics.lineStyle(5, 0xFF00);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
} else {
bullet.visible = false;
bullet.graphics.clear();
bullet.hp = -100;
};
};
if (bullet.style == 17){
bullet.x = player.x;
bullet.y = player.y;
if (bullet.fac != null){
bullet.rotation = (bullet.fa + bullet.fac);
} else {
bullet.rotation = bullet.fa;
};
p = new Point(world.mouseX, world.mouseY);
player.fa = API.findAngle(player, p);
bullet.rotation = player.fa;
a = 0;
while (a < world.enemy_layer.numChildren) {
car = world.enemy_layer.getChildAt(a);
if (bullet.hitTestPoint(car.x, car.y, true)){
car.hp = (car.hp - bullet.damage);
};
a = (a + 1);
};
if (laser == false){
if (gl != null){
gl.graphics.clear();
};
bullet.hp = -100;
destroy(bullet);
bullet.die = true;
};
bullet.x = player.x;
bullet.y = player.y;
if (powerlaser <= 0){
bullet.hp = -10;
destroy(bullet);
bullet.die = true;
};
};
if (bullet.style == 18){
bullet.x = player.x;
bullet.y = player.y;
p = new Point(world.mouseX, world.mouseY);
player.fa = API.findAngle(player, p);
if (bullet.fac != null){
bullet.rotation = (player.fa + bullet.fac);
} else {
bullet.rotation = player.fa;
};
a = 0;
while (a < world.enemy_layer.numChildren) {
car = world.enemy_layer.getChildAt(a);
if (bullet.hitTestPoint(car.x, car.y, true)){
car.hp = (car.hp - bullet.damage);
};
a = (a + 1);
};
if (laser == false){
if (gl != null){
gl.graphics.clear();
};
bullet.hp = -100;
destroy(bullet);
bullet.die = true;
};
bullet.x = player.x;
bullet.y = player.y;
if (powerlaser <= 0){
bullet.hp = -10;
destroy(bullet);
bullet.die = true;
};
};
if (bullet.style == 21){
if (laser == false){
if (gl != null){
gl.graphics.clear();
};
bullet.visible = false;
bullet.hp = -100;
};
if (powerlaser > 0){
gl = bullet;
range = 100000;
if (bullet.tg == null){
ec = 0;
while (ec < world.enemy_layer.numChildren) {
en = world.enemy_layer.getChildAt(ec);
if (en != bullet.owner){
if (en.chainlaser == null){
dx = (en.x - bullet.owner.x);
dy = (en.y - bullet.owner.y);
thisrange = Math.sqrt(((dx * dx) + (dy * dy)));
if (range > thisrange){
range = thisrange;
bullet.tg = en;
bullet.count++;
};
};
};
ec = (ec + 1);
};
} else {
if (bullet.tg != null){
bullet.tg.chainlaser = true;
if (bullet.tg.numchain == null){
bullet.tg.numchain = (bullet.owner.numchain - 1);
};
};
};
if (bullet.circlecount == null){
bullet.circlecount = 0;
};
bullet.circlecount++;
gl.graphics.clear();
color = int((Math.random() * 0xFFFFFF));
p = new Point(bullet.owner.x, bullet.owner.y);
p = bullet.globalToLocal(p);
if (bullet.tg == null){
return;
};
p2 = new Point(bullet.tg.x, bullet.tg.y);
p2 = bullet.globalToLocal(p2);
cx = (((p.x + p2.x) / 2) + (Math.cos(bullet.circlecount) * 100));
cy = (((p.y + p2.y) / 2) + (Math.sin(bullet.circlecount) * 100));
gl.graphics.lineStyle(10, color);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
gl.graphics.lineStyle(20, color, 0.5);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
gl.graphics.lineStyle(40, color, 0.25);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
gl.graphics.lineStyle(100, color, 0.25);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo(cx, cy, p2.x, p2.y);
gl.graphics.lineStyle(5, 0xFF00);
gl.graphics.moveTo(p.x, p.y);
gl.graphics.curveTo((cx + (Math.random() * 200)), (cy + (Math.random() * 100)), p2.x, p2.y);
} else {
bullet.hp = -100;
};
};
i = 0;
while (i < world.enemy_layer.numChildren) {
enemy = world.enemy_layer.getChildAt(i);
if (enemy.hit == null){
return;
};
if (bullet.hit == null){
return;
};
if (((enemy.hit.hitTestObject(bullet.hit)) && ((bullet.nohit == null)))){
if (enemy.armor == null){
enemy.hitboss = null;
enemy.hp = (enemy.hp - bullet.damage);
};
if (enemy.armor != null){
if (bullet.hitboss != null){
return;
};
if ((Math.random() * 100) > enemy.armor){
enemy.hp = (enemy.hp - bullet.damage);
if (enemy.setdash != null){
if (enemy.setdash == false){
enemy.setdash = true;
};
};
} else {
bullet.hitboss = enemy;
if ((((((bullet.style == 10)) || ((bullet.style == 12)))) || ((bullet.style == 13)))){
mot = new AngleMove(bullet, (Math.random() * 360), bullet.speed);
API.setMotion(bullet, mot);
};
};
};
if (bullet.style == 10){
};
if (bullet.style == 13){
if (enemy.toxic == null){
enemy.toxic = bullet.timestatus;
enemy.getdamage = bullet.timedamage;
};
};
if (bullet.style == 14){
if (enemy.walkList != null){
if (bullet.status != null){
enemy.crash = bullet;
};
};
};
if (bullet.style == 15){
if (enemy.walkList != null){
if (bullet.status != null){
enemy.crash = bullet;
};
};
};
if (bullet.style == 20){
if (bullet.listem == null){
bullet.listem = enemy;
};
if (bullet.listem != null){
if (bullet.listem != enemy){
enemy.hp = (enemy.hp - bullet.damage);
bullet.hp = -100;
} else {
return;
};
};
};
if (((((((((!((bullet.style == 14))) && (!((bullet.style == 15))))) && (!((bullet.style == 19))))) && (!((bullet.style == 17))))) && (!((bullet.style == 18))))){
if (bullet.hitboss == null){
bullet.hp = -10;
};
if (enemy.setdash != null){
if (enemy.setdash == false){
enemy.setdash = true;
};
};
};
};
i = (i + 1);
};
if ((((bullet.hp <= 0)) && ((bullet.die == null)))){
destroy(bullet);
bullet.die = true;
bullet.visible = false;
};
}
public function setWalk(_arg1:MovieClip){
var _local2:*;
if (int(_arg1.rotation) != _arg1.fa){
API.removeMotion(_arg1);
_arg1.dang = (_arg1.fa - int(_arg1.rotation));
_arg1.rotation = (_arg1.rotation + (_arg1.dang / 4));
};
if (int(_arg1.rotation) == _arg1.fa){
_local2 = new AngleMove(_arg1, _arg1.fa, _arg1.speed);
API.setMotion(_arg1, _local2);
if (_arg1.hitTestPoint(int(_arg1.targetX), int(_arg1.targetY), true)){
_arg1.timetomove = _arg1.timemove;
_arg1.walkList = walktoPlayer;
};
};
}
public function createObject(_arg1:MovieClip, _arg2){
var _local3:*;
var _local4:*;
if (countenemy <= 0){
return;
};
if (gametime <= 0){
return;
};
_local3 = API.createMovieFromBase(world, css[_arg2[1]], {x:_arg1.x, y:_arg1.y});
_local4 = new enemy_gage();
_local3.addChild(_local4);
_local4.x = 0;
_local4.y = 30;
_local4.scaleX = 0.5;
_local4.scaleY = 0.5;
_local3.gage = _local4;
countenemy--;
trace(countenemy);
}
public function checkEnemy(_arg1:MovieClip){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
if ((((((((_arg1.x >= 0)) && ((_arg1.x <= 640)))) && ((_arg1.y >= 0)))) && ((_arg1.y <= 480)))){
_arg1.zone = false;
};
if (_arg1.gfxhit != null){
if (_arg1.timegfx > 0){
_arg1.timegfx--;
_arg1.transform.colorTransform = new ColorTransform(1, 0, 0, 1, 0, 0, 0, 0);
} else {
_arg1.gfxhit = null;
_arg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
};
if (((!((_arg1.gage == null))) && ((_arg1.armor == null)))){
if (_arg1.gagetime > 0){
_arg1.gagetime--;
_arg1.gage.visible = true;
} else {
_arg1.gage.visible = false;
};
};
if (((!((_arg1.hp == null))) && (!((_arg1.currenthp == null))))){
if (_arg1.hp != _arg1.currenthp){
if (((!((_arg1.gage == null))) && ((_arg1.armor == null)))){
_arg1.gagetime = css.config.showgage;
};
if (_arg1.toxic == null){
_arg1.currenthp = _arg1.hp;
if (_arg1.lasernum != null){
};
if (_arg1.gfxhit == null){
_local2 = API.getClass(css.config.gfxenemyhit);
_local3 = new (_local2);
_local3.x = _arg1.x;
_local3.y = _arg1.y;
world.gfx_layer.addChild(_local3);
_arg1.timegfx = 10;
_arg1.gfxhit = _local3;
};
};
};
};
if ((((((((_arg1.x > 640)) || ((_arg1.x < 0)))) || ((_arg1.y > 480)))) || ((_arg1.y < 0)))){
_arg1.linegame = false;
} else {
_arg1.linegame = true;
};
if (((!((_arg1.gun1 == null))) && ((_arg1.lasernum == null)))){
_arg1.af = API.findAngle(player, _arg1);
_arg1.gun1.rotation = (_arg1.af - _arg1.rotation);
};
if (API.getSpeed(_arg1) > 0){
if (((!((_arg1.targetX == null))) && (!((_arg1.targetY == null))))){
_local4 = new Point(_arg1.targetX, _arg1.targetY);
_arg1.tf = API.findAngle(_arg1, _local4);
_arg1.rotation = _arg1.tf;
};
};
if (_arg1.toxic != null){
if (_arg1.toxic >= 0){
if (_arg1.gfxacid == null){
_local2 = API.getClass(css.config.gfxacid);
_local6 = new (_local2);
_arg1.gfxacid = _local6;
world.gfx_layer.addChild(_arg1.gfxacid);
_local6.getenemy = _arg1;
} else {
_arg1.gfxacid.x = _arg1.x;
_arg1.gfxacid.y = _arg1.y;
};
_arg1.toxic--;
_arg1.hp = (_arg1.hp - _arg1.getdamage);
if ((((_arg1.hp <= 0)) && ((_arg1.die == null)))){
if (_arg1.lsbullet != null){
_arg1.lsbullet.hp = -100;
_arg1.lsbullet.die = true;
_arg1.lsbullet.visible = false;
destroy(_arg1.lsbullet);
_arg1.find = null;
_arg1.savetime = _arg1.timemove;
_arg1.lsbullet = null;
_arg1.drawlaser = null;
};
if (_arg1.godarmy == null){
soundgfx[0].play();
if (_arg1.armor != null){
shake = 20;
} else {
shake = 10;
};
};
_arg1.crash = null;
if (_arg1.gfx != null){
_local2 = API.getClass(_arg1.gfx);
_local7 = new (_local2);
_local7.x = _arg1.x;
_local7.y = _arg1.y;
world.gfx_layer.addChild(_local7);
};
_arg1.gage.visible = false;
_arg1.laserprocess = null;
if (_arg1.gfxacid != null){
_arg1.gfxacid.gotoAndPlay("die");
};
if (_arg1.army != null){
_local8 = 0;
while (_local8 < _arg1.army) {
_local9 = API.createMovieFromBase(world, css["enemy8"]);
_local10 = new enemy_gage();
_local9.addChild(_local10);
_local10.x = 0;
_local10.y = 30;
_local10.scaleX = 0.5;
_local10.scaleY = 0.5;
_local9.gage = _local10;
_local9.x = _arg1.x;
_local9.y = _arg1.y;
_local8++;
};
};
if ((Math.random() * 100) < 50){
_local11 = API.createMovieFromBase(world, css["bullet5"]);
_local11.x = _arg1.x;
_local11.y = _arg1.y;
};
if (_arg1.gameend != null){
gametime = 0;
};
scorepoint = (scorepoint + (Math.random() * css.config.scorepoint));
_arg1.die = true;
destroy(_arg1);
};
if (((!((_arg1.hp == null))) && (!((_arg1.maxhp == null))))){
_arg1.gage.gotoAndStop(int(((_arg1.hp * 100) / _arg1.maxhp)));
};
_local5 = 0;
while (_local5 < world.enemy_layer.numChildren) {
_local12 = world.enemy_layer.getChildAt(_local5);
if (_local12 != null){
if (_local12 != _arg1){
if (_arg1.hitTestObject(_local12)){
if (_local12.toxic == null){
_local12.toxic = css["bullet13"].timestatus;
_local12.getdamage = _arg1.getdamage;
};
};
} else {
return;
};
};
_local5++;
};
} else {
if (((!((_arg1.gfxacid == null))) || ((_arg1.hp <= 0)))){
_arg1.gfxacid.visible = false;
_arg1.gfxacid = null;
world.gfx_layer.removeChildAt(_arg1.gfxacid);
};
_arg1.toxic = null;
};
};
if ((((_arg1.hp <= 0)) && ((_arg1.die == null)))){
if (_arg1.godarmy == null){
soundgfx[0].play();
if (_arg1.armor != null){
shake = 20;
} else {
shake = 10;
};
};
API.setSpeed(_arg1, 0);
_arg1.crash = null;
if (_arg1.gfx != null){
_local2 = API.getClass(_arg1.gfx);
_local7 = new (_local2);
_local7.x = _arg1.x;
_local7.y = _arg1.y;
world.gfx_layer.addChild(_local7);
_arg1.laserprocess = null;
};
if (_arg1.army != null){
_local8 = 0;
while (_local8 < _arg1.army) {
_local9 = API.createMovieFromBase(world, css["enemy8"]);
_local10 = new enemy_gage();
_local9.addChild(_local10);
_local10.x = 0;
_local10.y = 30;
_local10.scaleX = 0.5;
_local10.scaleY = 0.5;
_local9.gage = _local10;
_local9.x = _arg1.x;
_local9.y = _arg1.y;
_local8++;
};
};
if ((Math.random() * 100) < 50){
_local11 = API.createMovieFromBase(world, css["bullet5"]);
_local11.x = _arg1.x;
_local11.y = _arg1.y;
};
if (_arg1.gameend != null){
gametime = 0;
};
scorepoint = (scorepoint + (Math.random() * css.config.scorepoint));
_arg1.die = true;
destroy(_arg1);
};
if (_arg1.crash != null){
if ((((_arg1.savex == null)) || ((_arg1.savey == null)))){
_arg1.savex = _arg1.crash.x;
_arg1.savey = _arg1.crash.y;
};
if (API.getSpeed(_arg1) <= 0){
};
if (_arg1.bkwalk == null){
_arg1.anglexx = 0;
_arg1.bkwalk = _arg1.walkList;
_local13 = (_arg1.savex - _arg1.y);
_local14 = (_arg1.savey - _arg1.y);
_local15 = Math.sqrt(((_local13 * _local13) + (_local14 * _local14)));
_local16 = (_local13 / _local15);
_local17 = (_local14 / _local15);
_local18 = (_arg1.speed + (5 * _local16));
_local19 = (_arg1.speed + (5 * _local17));
_local20 = new LineMove(_arg1, _local18, _local19, false);
API.setMotion(_arg1, _local20);
_arg1.walkList = knockback;
};
if ((((((((_arg1.x >= 620)) || ((_arg1.x <= 20)))) || ((_arg1.y <= 20)))) || ((_arg1.y >= 460)))){
_arg1.walkList = null;
_arg1.crash = null;
if (_arg1.walkList == null){
_arg1.walkList = walktoPlayer;
_arg1.walktarget = null;
_arg1.bkwalk = null;
};
};
knockback(_arg1);
};
if (powerlaser > 0){
if (_arg1.chainlaser != null){
if (_arg1.armor != null){
if ((Math.random() * 100) < _arg1.armor){
if (_arg1.setdash != null){
if (_arg1.setdash == false){
_arg1.setdash = true;
};
};
_arg1.hp = (_arg1.hp - 20);
};
} else {
_arg1.hp = (_arg1.hp - 20);
};
if (_arg1.numchain == null){
return;
};
if (_arg1.numchain > 0){
if (powerlaser > 0){
if (_arg1.bullet == null){
_arg1.bullet = API.createMovieFromBase(world, css["bullet21"]);
_arg1.bullet.owner = _arg1;
};
};
};
};
if (_arg1.hp <= 0){
if (_arg1.bullet != null){
_arg1.bullet.visible = false;
};
};
};
if ((((powerlaser <= 0)) || ((laser == false)))){
_arg1.numchain = null;
_arg1.bullet = null;
_arg1.chainlaser = null;
};
if (_arg1.setdash != null){
if (_arg1.setdash == true){
(_arg1.walktarget == null);
_arg1.walkList = dashPlayer;
};
};
if (((((!((_arg1.hp == null))) && (!((_arg1.maxhp == null))))) && (!((_arg1.gage == null))))){
_arg1.gage.gotoAndStop(int(((_arg1.hp * 100) / _arg1.maxhp)));
};
}
public function goto(_arg1:MovieClip, _arg2){
API.setTimeCount(_arg1, int(_arg2[1]));
}
public function initGold(_arg1:MovieClip, _arg2:Object){
_arg1.x = ((320 + (Math.random() * css.config.goldarea)) - (css.config.goldarea / 2));
_arg1.y = ((240 + (Math.random() * css.config.goldarea)) - (css.config.goldarea / 2));
API.setShooterType(_arg1);
CSSToVar.CSSApplyObject(game, world, _arg1, _arg2);
}
public function knockback(_arg1){
_arg1.anglexx = (_arg1.anglexx + 10);
_arg1.rotation = _arg1.anglexx;
}
public function stand(_arg1:MovieClip, _arg2){
var _local3:*;
_arg1.gotoAndPlay("stand");
_local3 = API.getMotion(_arg1);
if ((_local3 is MapMove)){
if (_arg2[1] == null){
MapMove(_local3).setDirect(0);
} else {
if ((Math.random() * 100) < int(_arg2[1])){
MapMove(_local3).setDirect(0);
};
};
};
}
public function initGoldPoint(_arg1:MovieClip, _arg2:Object){
_arg1.x = -1000;
_arg1.y = -1000;
API.setShooterType(_arg1);
CSSToVar.CSSApplyObject(game, world, _arg1, _arg2);
}
public function shootLaser(_arg1:MovieClip){
var _local2:*;
if (_arg1.crash != null){
return;
};
if (_arg1.savetime > 0){
if (_arg1.namenum == 2){
};
if ((((((_arg1.namenum == 6)) || ((_arg1.namenum == 8)))) || ((_arg1.namenum == 2)))){
_arg1.walkList = walkAround;
};
if (_arg1.namenum == 8){
};
API.setSpeed(_arg1, _arg1.speed);
_arg1.savetime--;
} else {
_arg1.walkList = null;
API.setSpeed(_arg1, 0);
if (_arg1.find == null){
_arg1.find = API.findAngle(_arg1, player);
_arg1.find2 = API.findAngle(player, _arg1);
_arg1.rotation = _arg1.find;
};
if (_arg1.savecharge < _arg1.charge){
if (_arg1.drawlaser == null){
_arg1.savecharge++;
};
};
if (_arg1.drawlaser != null){
_arg1.savecharge = (_arg1.savecharge - 2);
};
if (_arg1.savecharge >= _arg1.charge){
if (_arg1.lsbullet == null){
_local2 = API.createMovieFromBase(world, css[("bullet" + _arg1.lasernum)]);
_local2.scaleX = 2;
_local2.scaleY = 2;
_local2.x = _arg1.x;
_local2.y = _arg1.y;
_local2.rotation = _arg1.find;
_arg1.lsbullet = _local2;
_arg1.drawlaser = true;
soundgfx[1].play();
};
};
if (_arg1.toxic != null){
if ((((_arg1.savecharge <= 0)) || ((_arg1.hp <= 0)))){
if (_arg1.lsbullet != null){
_arg1.lsbullet.hp = -100;
_arg1.lsbullet.die = true;
_arg1.lsbullet.visible = false;
destroy(_arg1.lsbullet);
};
_arg1.find = null;
_arg1.savetime = _arg1.timemove;
_arg1.lsbullet = null;
_arg1.drawlaser = null;
};
};
if ((((_arg1.savecharge <= 0)) || ((_arg1.hp <= 0)))){
if (_arg1.lsbullet != null){
_arg1.lsbullet.hp = -100;
_arg1.lsbullet.die = true;
_arg1.lsbullet.visible = false;
destroy(_arg1.lsbullet);
};
_arg1.find = null;
_arg1.savetime = _arg1.timemove;
_arg1.lsbullet = null;
_arg1.drawlaser = null;
};
};
}
public function destroy(_arg1:MovieClip, _arg2=null){
_arg1.graphics.clear();
_arg1.gotoAndPlay("die");
}
public function createObjectRandom(_arg1:MovieClip, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
trace((_arg2[1] + (int(_arg2[3]) + int((Math.random() * _arg2[2])))));
if (countenemy <= 0){
return;
};
if (gametime <= 0){
return;
};
_local3 = (_arg2[1] + (int(_arg2[3]) + int((Math.random() * _arg2[2]))));
_local4 = API.createMovieFromBase(world, css[_local3], {x:_arg1.x, y:_arg1.y});
_local5 = new enemy_gage();
_local4.addChild(_local5);
_local5.x = 0;
_local5.y = 30;
_local5.scaleX = 0.5;
_local5.scaleY = 0.5;
_local4.gage = _local5;
_local4.gage.visible = false;
countenemy--;
trace(countenemy);
}
}
}//package
Section 90
//gfx (gfx)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfx extends MovieClip {
public function gfx(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 91
//gfx2 (gfx2)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfx2 extends MovieClip {
public function gfx2(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 92
//gfx3 (gfx3)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfx3 extends MovieClip {
public var hit:hittemp;
public function gfx3(){
addFrameScript(74, frame75);
}
function frame75(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 93
//gfxacid (gfxacid)
package {
import flash.display.*;
public dynamic class gfxacid extends MovieClip {
public function gfxacid(){
addFrameScript(106, frame107);
}
function frame107(){
stop();
}
}
}//package
Section 94
//gfxbomb1 (gfxbomb1)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxbomb1 extends MovieClip {
public function gfxbomb1(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 95
//gfxbomb2 (gfxbomb2)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxbomb2 extends MovieClip {
public function gfxbomb2(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 96
//gfxbomb3 (gfxbomb3)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxbomb3 extends MovieClip {
public function gfxbomb3(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 97
//gfxbomb4 (gfxbomb4)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxbomb4 extends MovieClip {
public function gfxbomb4(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 98
//gfxboss1die (gfxboss1die)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxboss1die extends MovieClip {
public function gfxboss1die(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 99
//gfxboss2die (gfxboss2die)
package {
import flash.display.*;
public dynamic class gfxboss2die extends MovieClip {
}
}//package
Section 100
//gfxboss3die (gfxboss3die)
package {
import flash.display.*;
public dynamic class gfxboss3die extends MovieClip {
}
}//package
Section 101
//gfxboss4die (gfxboss4die)
package {
import flash.display.*;
public dynamic class gfxboss4die extends MovieClip {
}
}//package
Section 102
//gfxconfuse (gfxconfuse)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxconfuse extends MovieClip {
public function gfxconfuse(){
addFrameScript(14, frame15, 19, frame20);
}
function frame15(){
gotoAndPlay("1");
}
function frame20(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 103
//gfxdie01 (gfxdie01)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxdie01 extends MovieClip {
public function gfxdie01(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 104
//gfxdie02 (gfxdie02)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxdie02 extends MovieClip {
public function gfxdie02(){
addFrameScript(33, frame34);
}
function frame34(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 105
//gfxdie03 (gfxdie03)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxdie03 extends MovieClip {
public function gfxdie03(){
addFrameScript(33, frame34);
}
function frame34(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 106
//gfxenemybomb (gfxenemybomb)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxenemybomb extends MovieClip {
public function gfxenemybomb(){
addFrameScript(36, frame37);
}
function frame37(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 107
//gfxenemyhit (gfxenemyhit)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxenemyhit extends MovieClip {
public function gfxenemyhit(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 108
//gfxfire (gfxfire)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxfire extends MovieClip {
public var hit:hittemp;
public function gfxfire(){
addFrameScript(72, frame73);
}
function frame73(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 109
//gfxherodie (gfxherodie)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxherodie extends MovieClip {
public function gfxherodie(){
addFrameScript(28, frame29);
}
function frame29(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 110
//gfxherohit (gfxherohit)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class gfxherohit extends MovieClip {
public function gfxherohit(){
addFrameScript(0, frame1, 13, frame14);
}
function frame14(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
function frame1(){
if (this.visible == false){
gotoAndPlay("die");
};
}
}
}//package
Section 111
//hittemp (hittemp)
package {
import flash.display.*;
public dynamic class hittemp extends MovieClip {
}
}//package
Section 112
//laser_a (laser_a)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class laser_a extends MovieClip {
public function laser_a(){
addFrameScript(12, frame13, 13, frame14);
}
function frame14(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
function frame13(){
gotoAndPlay(1);
}
}
}//package
Section 113
//laser_b (laser_b)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class laser_b extends MovieClip {
public function laser_b(){
addFrameScript(10, frame11, 11, frame12);
}
function frame12(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
function frame11(){
gotoAndPlay(1);
}
}
}//package
Section 114
//laser_c (laser_c)
package {
import flash.display.*;
public dynamic class laser_c extends MovieClip {
}
}//package
Section 115
//laser_d (laser_d)
package {
import flash.display.*;
public dynamic class laser_d extends MovieClip {
}
}//package
Section 116
//laser_mini (laser_mini)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class laser_mini extends MovieClip {
public var hit:hittemp;
public function laser_mini(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 117
//lasermao (lasermao)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class lasermao extends MovieClip {
public function lasermao(){
addFrameScript(3, frame4, 10, frame11);
}
function frame4(){
gotoAndPlay(1);
}
function frame11(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 118
//mainbullet (mainbullet)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class mainbullet extends MovieClip {
public var hit:hittemp;
public function mainbullet(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 119
//mainembullet (mainembullet)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class mainembullet extends MovieClip {
public var hit:hittemp;
public function mainembullet(){
addFrameScript(3, frame4, 10, frame11);
}
function frame4(){
gotoAndPlay(1);
}
function frame11(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 120
//mine (mine)
package {
import flash.display.*;
import GREENHERMIT.GHUtils.*;
public dynamic class mine extends MovieClip {
public var hit:hittemp;
public function mine(){
addFrameScript(9, frame10, 14, frame15);
}
function frame10(){
gotoAndPlay("stand");
}
function frame15(){
stop();
API.removeAllCompositClass(this);
MovieClip(this.parent).removeChild(this);
delete ??getglobalscope
[this];
}
}
}//package
Section 121
//sfxcannon (sfxcannon)
package {
import flash.media.*;
public dynamic class sfxcannon extends Sound {
}
}//package
Section 122
//sfxdead (sfxdead)
package {
import flash.media.*;
public dynamic class sfxdead extends Sound {
}
}//package
Section 123
//sfxdeng (sfxdeng)
package {
import flash.media.*;
public dynamic class sfxdeng extends Sound {
}
}//package
Section 124
//sfxexcotic (sfxexcotic)
package {
import flash.media.*;
public dynamic class sfxexcotic extends Sound {
}
}//package
Section 125
//sfxgetmoney (sfxgetmoney)
package {
import flash.media.*;
public dynamic class sfxgetmoney extends Sound {
}
}//package
Section 126
//sfxlaser (sfxlaser)
package {
import flash.media.*;
public dynamic class sfxlaser extends Sound {
}
}//package
Section 127
//sfxlaserboss (sfxlaserboss)
package {
import flash.media.*;
public dynamic class sfxlaserboss extends Sound {
}
}//package
Section 128
//sfxnormalgun (sfxnormalgun)
package {
import flash.media.*;
public dynamic class sfxnormalgun extends Sound {
}
}//package
Section 129
//tileerror (tileerror)
package {
import flash.display.*;
public dynamic class tileerror extends MovieClip {
}
}//package
Section 130
//tileerrorindex (tileerrorindex)
package {
import flash.display.*;
public dynamic class tileerrorindex extends BitmapData {
public function tileerrorindex(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package