Frame 1
stop();
Frame 2
stop();
score.text = 0;
health.text = 100;
Instance of Symbol 51 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
if (_root.health.text <= 0) {
_root.dead = true;
}
if (!_root.dead) {
_root._x = 0;
_root.health.text = _root.health.text - 5;
_root.char._x = _root.char.startX;
_root.char._y = _root.char.startY + (Stage.height / 2);
_root.char.speed = 0;
}
}
}
Instance of Symbol 54 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.gotgun = true;
unloadMovie (this);
}
}
Instance of Symbol 57 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.score.text++;
unloadMovie (this);
}
}
Instance of Symbol 57 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.score.text++;
unloadMovie (this);
}
}
Instance of Symbol 57 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.score.text++;
unloadMovie (this);
}
}
Instance of Symbol 57 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.score.text++;
unloadMovie (this);
}
}
Instance of Symbol 57 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.score.text++;
unloadMovie (this);
}
}
Instance of Symbol 57 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.score.text++;
unloadMovie (this);
}
}
Instance of Symbol 57 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.score.text++;
unloadMovie (this);
}
}
Instance of Symbol 57 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.score.text++;
unloadMovie (this);
}
}
Instance of Symbol 64 MovieClip in Frame 2
onClipEvent (load) {
enemyspeed = 2;
enemystepsright = 0;
enemystepsleft = 0;
enemydir = "left";
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.char.attackpoint)) {
enemyspeed = 0;
enemystepsright = 0;
enemystepsleft = 0;
dead = true;
this.gotoAndStop("dead");
}
if (this.hitTest(_root.bulleter)) {
enemyspeed = 0;
enemystepsright = 0;
enemystepsleft = 0;
dead = true;
this.gotoAndStop("dead");
}
if (this.hitTest(_root.char) && (!dead)) {
_root.char.jumping = false;
_root.dead = true;
}
if (!dead) {
if (enemydir == "right") {
enemystepsright = enemystepsright + 1;
this._xscale = -100;
this._x = this._x + enemyspeed;
} else if (enemydir == "left") {
enemystepsleft = enemystepsleft + 1;
this._xscale = 100;
this._x = this._x - enemyspeed;
}
if (enemystepsright == 100) {
enemystepsright = 0;
enemydir = "left";
} else if (enemystepsleft == 100) {
enemystepsleft = 0;
enemydir = "right";
}
}
}
Instance of Symbol 74 MovieClip "char" in Frame 2
onClipEvent (load) {
jumping = false;
speed = 0;
healthX = _root.health._x;
scoreX = _root.score._x;
Xpos = this._x;
Ypos = this._y;
maxmove = 15;
_root.maxshoottime = 100;
}
onClipEvent (enterFrame) {
_x = (Xpos - _root._x);
_root.score._x = scoreX - _root._x;
_root.health._x = healthX - _root._x;
if ((!_root.ground.hitTest(this._x, this._y, true)) && (!jumping)) {
this._y = this._y + 6;
}
if (!_root.shooting) {
_root.timer = 0;
_root.mvsp = _xscale / 20;
}
if (_root.dead) {
this.gotoAndStop("dead");
} else {
speed = speed * 0.85;
if ((dir == "right") && (!_root.leftblock.hitTest(this._x + 20, this._y, true))) {
_root.health._x = _root.health._x + speed;
_root.score._x = _root.score._x + speed;
this._x = this._x + speed;
_root._x = _root._x - speed;
}
if (speed > 0) {
dir = "right";
} else if (speed < 0) {
dir = "left";
}
if ((dir == "left") && (!_root.rightblock.hitTest(this._x - 20, this._y, true))) {
_root.health._x = _root.health._x + speed;
_root.score._x = _root.score._x + speed;
this._x = this._x + speed;
_root._x = _root._x - speed;
}
if (Key.isDown(37)) {
if (speed > (-maxmove)) {
speed--;
}
this.gotoAndStop("run");
this._xscale = -100;
} else if (Key.isDown(39)) {
if (speed < maxmove) {
speed++;
}
this._xscale = 100;
this.gotoAndStop("run");
} else if (Key.isDown(17)) {
this.gotoAndStop("attack");
attacking = true;
speed = 0;
} else if (Key.isDown(32)) {
if ((_root.gotgun == true) && (!_root.shooting)) {
_root.attachMovie("bullet", "bulleter", 1, {_x:_root.char._x, _y:_root.char._y - 25});
_root.shooting = true;
with (_root.bulleter) {
onEnterFrame = function () {
if (_root.timer > _root.maxshoottime) {
_root.shooting = false;
unloadMovie(this);
}
_root.timer++;
_x = _x + _root.mvsp;
};
}
attacking = true;
speed = 0;
this.gotoAndStop("shoot");
}
} else if (((speed < 1) && (speed > -1)) && (!attacking)) {
speed = 0;
this.gotoAndStop("idle");
}
if (Key.isDown(38) && (!jumping)) {
jumping = true;
}
if (jumping) {
this.gotoAndStop("jump");
this._y = this._y - jump;
jump = jump - 0.5;
if (jump < 0) {
falling = true;
}
if (jump < -15) {
jump = -15;
}
}
if (_root.ground.hitTest(this._x, this._y, true) && (falling)) {
jump = 12;
jumping = false;
falling = false;
}
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 17) {
attacking = false;
}
}
Symbol 20 MovieClip Frame 40
stop();
Symbol 34 Button
on (press) {
tellTarget (_root) {
nextFrame();
};
}
Symbol 35 Button
on (press) {
gotoAndStop ("end");
_root.play();
}
Instance of Symbol 10 MovieClip in Symbol 36 MovieClip Frame 1
onClipEvent (load) {
_root.stop();
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop("lastframe");
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndPlay("loaded");
}
}
Symbol 36 MovieClip Frame 101
play();
Symbol 36 MovieClip Frame 165
stop();
Symbol 37 MovieClip Frame 1
function startAd(ngad_url) {
trace("opening " + ngad_url);
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var _local1 = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("[NEWGROUNDS FLASH ADS] :: You may get a 'Security Sandbox Violation' ... this is normal, do not freak out!");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function (ad_url) {
startAd(ad_url);
};
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 2
stop();
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 2
stop();
Symbol 74 MovieClip Frame 3
stop();
Symbol 74 MovieClip Frame 4
stop();
Symbol 74 MovieClip Frame 5
stop();
Symbol 74 MovieClip Frame 6
stop();