Frame 2
stop();
_global.highscore = 0;
_global.dead = true;
_global.level = 0;
Instance of Symbol 28 MovieClip "enemy2" in Frame 3
onClipEvent (load) {
var transformer = (new flash.geom.Transform(this));
var colorTransformer = transformer.colorTransform;
colorTransformer.redMultiplier = Math.random() * 1.5;
colorTransformer.greenMultiplier = Math.random() * 1.5;
colorTransformer.blueMultiplier = Math.random() * 3;
transformer.colorTransform = colorTransformer;
this.mass = (Math.random() * 20) + 20;
this.corner = int((Math.random() * 4) + 1);
this.maxvelocity = 5 + _global.level;
this.minvelocity = -5 - _global.level;
if (_global.number < 1) {
this._x = 1000;
}
if (this.corner == 1) {
this._x = 80;
this._y = 80;
this.xvelocity = 2;
this.yvelocity = 2;
} else if (this.corner == 2) {
this._x = 470;
this._y = 80;
this.xvelocity = -2;
this.yvelocity = 2;
} else if (this.corner == 3) {
this._x = 470;
this._y = 470;
this.xvelocity = -2;
this.yvelocity = -2;
} else if (this.corner == 4) {
this._x = 80;
this._y = 470;
this.xvelocity = 2;
this.yvelocity = -2;
}
}
onClipEvent (enterFrame) {
if (_global.dead == true) {
removeMovieClip(this);
}
if (this._x > _root.char._x) {
this.xvelocity = this.xvelocity - 0.3;
}
if (this._x < _root.char._x) {
this.xvelocity = this.xvelocity + 0.3;
}
if (this._y > _root.char._y) {
this.yvelocity = this.yvelocity - 0.3;
}
if (this._y < _root.char._y) {
this.yvelocity = this.yvelocity + 0.3;
}
if (this.hitTest(_root.char)) {
_root.char.xvelocity = _root.char.xvelocity + ((this.mass * this.xvelocity) / _root.char.mass);
_root.char.yvelocity = _root.char.yvelocity + ((this.mass * this.yvelocity) / _root.char.mass);
_root.char.mass = _root.char.mass - (this.mass / 2);
removeMovieClip(this);
} else {
this._x = this._x + xvelocity;
this._y = this._y + yvelocity;
}
if (this.xvelocity >= this.maxvelocity) {
this.xvelocity = this.maxvelocity;
}
if (this.yvelocity >= this.maxvelocity) {
this.yvelocity = this.maxvelocity;
}
if (this.xvelocity <= this.minvelocity) {
this.xvelocity = this.minvelocity;
}
if (this.yvelocity <= this.minvelocity) {
this.yvelocity = this.minvelocity;
}
this._x = this._x + this.xvelocity;
this._y = this._y + this.yvelocity;
if (this._x >= 475) {
this.xvelocity = 10;
}
if (this._x >= 525) {
removeMovieClip(this);
}
if (this._y >= 475) {
this.yvelocity = 10;
}
if (this._y >= 525) {
removeMovieClip(this);
}
if (this._x <= 75) {
this.xvelocity = -10;
}
if (this._x <= 25) {
removeMovieClip(this);
}
if (this._y <= 75) {
this.yvelocity = -10;
}
if (this._y <= 25) {
removeMovieClip(this);
}
this._rotation = this._rotation + (this.xvelocity + this.yvelocity);
}
Frame 111
stop();
_global.dead = false;
Instance of Symbol 34 MovieClip "enemy" in Frame 111
onClipEvent (load) {
var transformer = (new flash.geom.Transform(this));
var colorTransformer = transformer.colorTransform;
colorTransformer.redMultiplier = Math.random() * 1.5;
colorTransformer.greenMultiplier = Math.random() * 3;
colorTransformer.blueMultiplier = Math.random() * 1.5;
transformer.colorTransform = colorTransformer;
this.mass = 5 + (20 * Math.random());
this._width = this.mass;
this._height = this.mass;
this.xvelocity = (this.yvelocity = 0);
this.side = int((Math.random() * 4) + 1);
if (this.side == 1) {
this._x = 510;
this._y = (Math.random() * 435) + 75;
} else if (this.side == 2) {
this._x = 75;
this._y = (Math.random() * 435) + 75;
} else if (this.side == 3) {
this._x = (Math.random() * 435) + 75;
this._y = 75;
} else if (this.side == 4) {
this._x = (Math.random() * 435) + 75;
this._y = 510;
}
this.velocity = (10 * Math.random()) + _global.level;
if (this.side == 1) {
this.xvelocity = -this.velocity;
} else if (this.side == 2) {
this.xvelocity = this.velocity;
} else if (this.side == 3) {
this.yvelocity = this.velocity;
} else if (this.side == 4) {
this.yvelocity = -this.velocity;
}
this.time = 0;
}
onClipEvent (enterFrame) {
if (_global.dead == true) {
removeMovieClip(this);
}
this.time = this.time + 1;
if (this.time >= (435 / this.velocity)) {
removeMovieClip(this);
}
if (this.hitTest(_root.char)) {
_root.char.xvelocity = _root.char.xvelocity + ((this.mass * this.xvelocity) / _root.char.mass);
_root.char.yvelocity = _root.char.yvelocity + ((this.mass * this.yvelocity) / _root.char.mass);
_root.char.mass = _root.char.mass - (this.mass / 2);
removeMovieClip(this);
} else {
this._x = this._x + xvelocity;
this._y = this._y + yvelocity;
}
}
Instance of Symbol 45 MovieClip "char" in Frame 111
onClipEvent (load) {
this.yvelocity = 0;
this.xvelocity = 0;
this.maxvelocity = 15;
this.minvelocity = -15;
this.mass = 20;
}
onClipEvent (enterFrame) {
if (this.mass < 1) {
_root.nextFrame();
}
this.mass = this.mass + 0.1;
this._height = this.mass;
this._width = this.mass;
if (Key.isDown(39)) {
this.xvelocity = this.xvelocity + 1;
}
if (Key.isDown(37)) {
this.xvelocity = this.xvelocity - 1;
}
if (Key.isDown(38)) {
this.yvelocity = this.yvelocity - 1;
}
if (Key.isDown(40)) {
this.yvelocity = this.yvelocity + 1;
}
if (this.xvelocity > this.maxvelocity) {
this.xvelocity = this.maxvelocity;
}
if (this.xvelocity < this.minvelocity) {
this.xvelocity = this.minvelocity;
}
if (this.yvelocity > this.maxvelocity) {
this.yvelocity = this.maxvelocity;
}
if (this.yvelocity < this.minvelocity) {
this.yvelocity = this.minvelocity;
}
if ((!Key.isDown(37)) && (!Key.isDown(39))) {
this.xvelocity = this.xvelocity * 0.95;
}
if ((!Key.isDown(38)) && (!Key.isDown(40))) {
this.yvelocity = this.yvelocity * 0.95;
}
this._x = this._x + this.xvelocity;
this._y = this._y + this.yvelocity;
if (this.hitTest(_root.bounds.r) || (this.hitTest(_root.bounds.l))) {
this._x = this._x - this.xvelocity;
this.mass = this.mass - Math.abs(this.xvelocity);
this.xvelocity = this.xvelocity * -0.9;
}
if (this._x < 85) {
this._x = 85;
}
if (this._x > 515) {
this._x = 515;
}
if (this.hitTest(_root.bounds.t) || (this.hitTest(_root.bounds.b))) {
this._y = this._y - this.yvelocity;
this.mass = this.mass - Math.abs(this.yvelocity);
this.yvelocity = this.yvelocity * -0.9;
}
if (this._y < 85) {
this._y = 85;
}
if (this._y > 515) {
this._y = 515;
}
this._rotation = this._rotation + (this.xvelocity + this.yvelocity);
}
Instance of Symbol 47 MovieClip "timer" in Frame 111
onClipEvent (load) {
this.create = 0;
this.createspeed = 32;
this.createamount = 0;
this.createamountmax = 0;
this.create2 = 0;
this.create2speed = 250;
this.levelup = 0;
this.levelspeed = 250;
_global.number = -1;
_global.level = 1;
_global.score = 0;
}
onClipEvent (enterFrame) {
_global.score = _global.score + int(_root.char.mass / 10);
this.create = this.create + 1;
this.create2 = this.create2 + 1;
_global.number = _global.number + 1;
this.levelup = this.levelup + 1;
if (this.levelup == this.levelspeed) {
_global.level = _global.level + 1;
_root.bg.nextFrame();
this.levelup = 0;
}
_root.level.text = "Level " + _global.level;
_root.score.text = "Score " + _global.score;
if (this.create == (this.createspeed - _global.level)) {
this.createamountmax = int((Math.random() * _global.level) + 1);
if (this.createamountmax > 5) {
this.createamountmax = 5;
}
this.createamount = 0;
while (this.createamount <= this.createamountmax) {
this.create = 0;
_global.number = _global.number + this.createamount;
duplicateMovieClip (_root.enemy, _global.number, _global.number);
this.createamount = this.createamount + 1;
}
}
if (this.create2 == (this.create2speed - _global.level)) {
this.create2 = 0;
duplicateMovieClip (_root.enemy2, -_global.number, _global.number);
}
}
Frame 112
stop();
_global.dead = true;
if (_global.highscore < _global.score) {
_global.highscore = _global.score;
}
finallevel.text = "You Were On Level " + _global.level;
finalscore.text = "Your Score Was " + _global.score;
highscore.text = "Your High Score Is " + _global.highscore;
Symbol 10 Button
on (release) {
_root.play();
}
Symbol 11 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 11 MovieClip Frame 2
gotoAndPlay (1);
Symbol 17 Button
on (release) {
gotoAndPlay (3);
}
Symbol 21 Button
on (release) {
_root.infotxt.text = "Move with the arrow keys. Hitting walls will shrink you based on your speed. Enemies will knock you back and shrink you, based on their size and speed. You will die if you shrink to nothing.";
}
Symbol 24 Button
on (release) {
_root.infotxt.text = "Made by:\nKillerbee333\nEmail:\nKillerbee333@comcast.net\nAIM:\ntheRandominator";
}
Symbol 53 Button
on (release) {
gotoAndPlay (3);
}