Frame 1
function itemHandler(obj, item) {
getURL ("http://www.xenwars.com", "_blank");
}
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Xenwars", itemHandler));
_root.menu = root_cm;
stop();
Frame 2
_root.gameover = 1;
stop();
Instance of Symbol 144 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.easycompleted == 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 144 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.mediumcompleted == 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 144 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.hardcompleted == 1) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 144 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_root.insanecompleted == 1) {
_visible = true;
} else {
_visible = false;
}
}
Frame 3
function moveStuff() {
if (Key.isDown(37) && (_root.paused == 0)) {
this._x = this._x - _root.speed;
}
if (Key.isDown(39) && (_root.paused == 0)) {
this._x = this._x + _root.speed;
}
if (Key.isDown(38) && (_root.paused == 0)) {
this._y = this._y - _root.speed;
}
if (Key.isDown(40) && (_root.paused == 0)) {
this._y = this._y + _root.speed;
}
if (((Key.isDown(83) && (_root.paused == 0)) && (_root.canuseshockwave == 1)) && (_root.shockcharges > 0)) {
_root.attachMovie("shockwave", "shock", 1);
x1 = _root.hero._x + (_root.hero._width / 2);
x2 = _root.hero._y + (_root.hero._height / 2);
_root.shock._x = x1;
_root.shock._y = x2;
}
if (Key.isDown(80)) {
if (_root.paused == 0) {
_root.paused = 1;
_root.pausedpanel._x = 0;
_root.pausedpanel._visible = true;
}
}
num1 = 500 - _root.hero._width;
if (hero._x > num1) {
hero._x = num1;
}
if (hero._x < 1) {
hero._x = 1;
}
num3 = 440 - _root.hero._height;
if (hero._y > num3) {
hero._y = num3;
}
if (hero._y < 41) {
hero._y = 41;
}
if (_root.hero._width > 99.9999) {
gotoAndStop (8);
}
}
_root.speed = 5;
_root.points = 0;
_root.level = 1;
_root.gameover = 0;
_root.difficulty = "EASY";
_root.paused = 0;
_root.canuseshockwave = 1;
_root.shockcharges = 0;
_root.med = 0;
_root.invin = 0;
enemies = new Array();
hero.onEnterFrame = moveStuff;
level = 1;
i = 1;
j = 1;
refreshRate = 100;
refreshRate2 = 1000;
depthNumber = 1;
maxNumberOfEnemies = 15;
maxNumberOfPowerups = 2;
numberOfEnemies = 0;
numberOfPowerups = 0;
lastTime = 0;
newTime = 0;
frames = 0;
showFPS = "";
_root.lolzor = 0;
onEnterFrame = function () {
if (((_root.invin == 1) && (_root.lolzor < 500)) && (_root.paused == 0)) {
_root.lolzor = _root.lolzor + 1;
_root.invinbar._x = 20;
_root.invinbar.gotoAndStop(_root.lolzor);
} else if (_root.paused == 0) {
_root.invinbar._x = -125;
_root.lolzor = 0;
_root.invin = 0;
}
frames = frames + 1;
newTime = new Date().getSeconds();
if (lastTime == newTime) {
} else {
showFPS = frames + " fps";
if ((frames < 35) && (_root.med == 0)) {
_quality = "MEDIUM";
_root.med = 1;
} else if ((frames > 45) && (_root.med == 1)) {
_quality = "HIGH";
_root.med = 0;
}
frames = 0;
lastTime = newTime;
}
if (_root.paused == 0) {
i++;
if (i > refreshRate) {
i = 0;
if (numberOfEnemies < maxNumberOfEnemies) {
_root.enemy.duplicateMovieClip("enemy" + depthNumber, 100 + depthNumber);
depthNumber++;
numberOfEnemies++;
}
}
}
if (_root.paused == 0) {
j++;
if (j > refreshRate2) {
j = 0;
if (numberOfPowerups < maxNumberOfPowerups) {
lolrandom = Math.round(Math.random() * 2);
if (lolrandom == 0) {
_root.powerups.duplicateMovieClip("powerups" + powerNumber, 100 + depthNumber);
} else if (lolrandom == 1) {
_root.powerupsp.duplicateMovieClip("powerupsp" + powerNumber, 100 + depthNumber);
} else if (lolrandom == 2) {
_root.powerupin.duplicateMovieClip("powerupin" + powerNumber, 100 + depthNumber);
}
depthNumber++;
numberOfPowerups++;
}
}
}
};
hitsHero = function (testingEnemy) {
distance = Math.sqrt(((testingEnemy._x - hero._x) * (testingEnemy._x - hero._x)) + ((testingEnemy._y - hero._y) * (testingEnemy._y - hero._y)));
if (distance < ((testingEnemy._width / 2) + (hero._width / 2))) {
return(true);
}
return(false);
};
stop();
Instance of Symbol 64 MovieClip [enemy] "enemy" in Frame 3
onClipEvent (load) {
num1 = (_root.hero._width + (Math.random() * _root.hero._width)) - (_root.hero._width / 2);
this._width = num1;
this._height = num1;
if (this._height < 5) {
this._height = 5;
}
if (this._width < 5) {
this._width = 5;
}
k1 = 199 - (this._width / 2);
k2 = 180 - (this._width / 2);
centerX = (Math.random() * 120) + k1;
centerY = (Math.random() * 120) + k2;
this._x = centerX;
this._y = centerY;
f = (Math.random() * 2) + 1;
speed = f;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
}
if (this._width < _root.hero._width) {
this.center.gotoAndStop(2);
} else {
this.center.gotoAndStop(1);
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "enemy") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
if ((this._width < _root.hero._width) && (canbehit != false)) {
_root.eat = new Sound();
_root.eat.attachSound("eat");
_root.eat.start();
_root.points = _root.points + Math.floor(_width / 2);
calc1 = this._width / 10;
calc2 = this._height / 10;
_root.hero._width = _root.hero._width + calc1;
_root.hero._height = _root.hero._width + calc2;
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
} else if (((this._width >= _root.hero._width) && (canbehit != false)) && (_root.invin == 0)) {
_root.dead = new Sound();
_root.dead.attachSound("dead");
_root.dead.start();
_level0.gotoAndStop(7);
}
}
}
}
Instance of Symbol 180 MovieClip "hero" in Frame 3
onClipEvent (enterFrame) {
_root.sizes = this._width;
}
Instance of Symbol 28 MovieClip "powerups" in Frame 3
onClipEvent (load) {
num1 = (Math.random() * 10) + 20;
this._width = num1;
this._height = num1;
k1 = 199 - (this._width / 2);
k2 = 180 - (this._width / 2);
centerX = (Math.random() * 120) + k1;
centerY = (Math.random() * 120) + k2;
this._x = centerX;
this._y = centerY;
num2 = (Math.random() * 5) + 5;
speed = num2;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "powerups") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
_root.gotpower = new Sound();
_root.gotpower.attachSound("powerupgot");
_root.gotpower.start();
_root.points = _root.points + 25;
removeMovieClip(_root[_name]);
_root.shockcharges = _root.shockcharges + 1;
_root.numberOfPowerups--;
canbehit = false;
}
}
}
Instance of Symbol 185 MovieClip "pausedpanel" in Frame 3
on (release) {
_root.paused = 0;
this.removeMovieClip();
_visible = false;
}
Instance of Symbol 28 MovieClip "powerupsp" in Frame 3
onClipEvent (load) {
num1 = (Math.random() * 10) + 20;
this._width = num1;
this._height = num1;
k1 = 199 - (this._width / 2);
k2 = 180 - (this._width / 2);
centerX = (Math.random() * 120) + k1;
centerY = (Math.random() * 120) + k2;
this._x = centerX;
this._y = centerY;
num2 = (Math.random() * 5) + 5;
speed = num2;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "powerupsp") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
_root.gotpower = new Sound();
_root.gotpower.attachSound("powerupgot");
_root.gotpower.start();
_root.points = _root.points + 25;
removeMovieClip(_root[_name]);
_root.speed = _root.speed + 5;
_root.numberOfPowerups--;
canbehit = false;
}
}
}
Instance of Symbol 28 MovieClip "powerupin" in Frame 3
onClipEvent (load) {
num1 = (Math.random() * 10) + 20;
this._width = num1;
this._height = num1;
k1 = 199 - (this._width / 2);
k2 = 180 - (this._width / 2);
centerX = (Math.random() * 120) + k1;
centerY = (Math.random() * 120) + k2;
this._x = centerX;
this._y = centerY;
num2 = (Math.random() * 5) + 5;
speed = num2;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "powerupin") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
_root.gotpower = new Sound();
_root.gotpower.attachSound("powerupgot");
_root.gotpower.start();
_root.points = _root.points + 25;
removeMovieClip(_root[_name]);
_root.invin = 1;
_root.numberOfPowerups--;
canbehit = false;
}
}
}
Frame 4
function moveStuff() {
if (Key.isDown(37) && (_root.paused == 0)) {
this._x = this._x - _root.speed;
}
if (Key.isDown(39) && (_root.paused == 0)) {
this._x = this._x + _root.speed;
}
if (Key.isDown(38) && (_root.paused == 0)) {
this._y = this._y - _root.speed;
}
if (Key.isDown(40) && (_root.paused == 0)) {
this._y = this._y + _root.speed;
}
if (((Key.isDown(83) && (_root.paused == 0)) && (_root.canuseshockwave == 1)) && (_root.shockcharges > 0)) {
_root.attachMovie("shockwave", "shock", 1);
x1 = _root.hero._x + (_root.hero._width / 2);
x2 = _root.hero._y + (_root.hero._height / 2);
_root.shock._x = x1;
_root.shock._y = x2;
}
if (Key.isDown(80)) {
if (_root.paused == 0) {
_root.paused = 1;
_root.pausedpanel._x = 0;
_root.pausedpanel._visible = true;
}
}
num1 = 500 - _root.hero._width;
if (hero._x > num1) {
hero._x = num1;
}
if (hero._x < 1) {
hero._x = 1;
}
num3 = 440 - _root.hero._height;
if (hero._y > num3) {
hero._y = num3;
}
if (hero._y < 41) {
hero._y = 41;
}
if (_root.hero._width > 99.9999) {
gotoAndStop (8);
}
}
_root.speed = 5;
_root.points = 0;
_root.level = 1;
_root.gameover = 0;
_root.difficulty = "MEDIUM";
_root.paused = 0;
_root.canuseshockwave = 1;
_root.shockcharges = 0;
_root.med = 0;
_root.invin = 0;
enemies = new Array();
hero.onEnterFrame = moveStuff;
level = 1;
i = 1;
j = 1;
refreshRate = 80;
refreshRate2 = 750;
depthNumber = 1;
maxNumberOfEnemies = 15;
maxNumberOfPowerups = 2;
numberOfEnemies = 0;
numberOfPowerups = 0;
lastTime = 0;
newTime = 0;
frames = 0;
showFPS = "";
_root.lolzor = 0;
onEnterFrame = function () {
if (((_root.invin == 1) && (_root.lolzor < 500)) && (_root.paused == 0)) {
_root.lolzor = _root.lolzor + 1;
_root.invinbar._x = 20;
_root.invinbar.gotoAndStop(_root.lolzor);
} else if (_root.paused == 0) {
_root.invinbar._x = -125;
_root.lolzor = 0;
_root.invin = 0;
}
frames = frames + 1;
newTime = new Date().getSeconds();
if (lastTime == newTime) {
} else {
showFPS = frames + " fps";
if ((frames < 35) && (_root.med == 0)) {
_quality = "MEDIUM";
_root.med = 1;
} else if ((frames > 45) && (_root.med == 1)) {
_quality = "HIGH";
_root.med = 0;
}
frames = 0;
lastTime = newTime;
}
if (_root.paused == 0) {
i++;
if (i > refreshRate) {
i = 0;
if (numberOfEnemies < maxNumberOfEnemies) {
_root.enemy.duplicateMovieClip("enemy" + depthNumber, 100 + depthNumber);
depthNumber++;
numberOfEnemies++;
}
}
}
if (_root.paused == 0) {
j++;
if (j > refreshRate2) {
j = 0;
if (numberOfPowerups < maxNumberOfPowerups) {
lolrandom = Math.round(Math.random() * 2);
if (lolrandom == 0) {
_root.powerups.duplicateMovieClip("powerups" + powerNumber, 100 + depthNumber);
} else if (lolrandom == 1) {
_root.powerupsp.duplicateMovieClip("powerupsp" + powerNumber, 100 + depthNumber);
} else if (lolrandom == 2) {
_root.powerupin.duplicateMovieClip("powerupin" + powerNumber, 100 + depthNumber);
}
depthNumber++;
numberOfPowerups++;
}
}
}
};
hitsHero = function (testingEnemy) {
distance = Math.sqrt(((testingEnemy._x - hero._x) * (testingEnemy._x - hero._x)) + ((testingEnemy._y - hero._y) * (testingEnemy._y - hero._y)));
if (distance < ((testingEnemy._width / 2) + (hero._width / 2))) {
return(true);
}
return(false);
};
stop();
Instance of Symbol 64 MovieClip [enemy] "enemy" in Frame 4
onClipEvent (load) {
num1 = (_root.hero._width + (Math.random() * _root.hero._width)) - (_root.hero._width / 3);
this._width = num1;
this._height = num1;
if (this._height < 5) {
this._height = 5;
}
if (this._width < 5) {
this._width = 5;
}
k1 = 180 - (this._width / 2);
k2 = 160 - (this._width / 2);
centerX = (Math.random() * 160) + k1;
centerY = (Math.random() * 160) + k2;
this._x = centerX;
this._y = centerY;
f = (Math.random() * 2) + 1;
speed = f;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
}
if (this._width < _root.hero._width) {
this.center.gotoAndStop(2);
} else {
this.center.gotoAndStop(1);
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "enemy") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
if ((this._width < _root.hero._width) && (canbehit != false)) {
_root.eat = new Sound();
_root.eat.attachSound("eat");
_root.eat.start();
_root.points = _root.points + Math.floor(_width / 1.5);
calc1 = this._width / 20;
calc2 = this._height / 20;
_root.hero._width = _root.hero._width + calc1;
_root.hero._height = _root.hero._width + calc2;
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
} else if (((this._width >= _root.hero._width) && (canbehit != false)) && (_root.invin == 0)) {
_root.dead = new Sound();
_root.dead.attachSound("dead");
_root.dead.start();
_level0.gotoAndStop(7);
}
}
}
}
Instance of Symbol 180 MovieClip "hero" in Frame 4
onClipEvent (enterFrame) {
_root.sizes = this._width;
}
Instance of Symbol 185 MovieClip "pausedpanel" in Frame 4
on (release) {
_root.paused = 0;
this.removeMovieClip();
_visible = false;
}
Frame 5
function moveStuff() {
if (Key.isDown(37) && (_root.paused == 0)) {
this._x = this._x - _root.speed;
}
if (Key.isDown(39) && (_root.paused == 0)) {
this._x = this._x + _root.speed;
}
if (Key.isDown(38) && (_root.paused == 0)) {
this._y = this._y - _root.speed;
}
if (Key.isDown(40) && (_root.paused == 0)) {
this._y = this._y + _root.speed;
}
if (((Key.isDown(83) && (_root.paused == 0)) && (_root.canuseshockwave == 1)) && (_root.shockcharges > 0)) {
_root.attachMovie("shockwave", "shock", 1);
x1 = _root.hero._x + (_root.hero._width / 2);
x2 = _root.hero._y + (_root.hero._height / 2);
_root.shock._x = x1;
_root.shock._y = x2;
}
if (Key.isDown(80)) {
if (_root.paused == 0) {
_root.paused = 1;
_root.pausedpanel._x = 0;
_root.pausedpanel._visible = true;
}
}
num1 = 500 - _root.hero._width;
if (hero._x > num1) {
hero._x = num1;
}
if (hero._x < 1) {
hero._x = 1;
}
num3 = 440 - _root.hero._height;
if (hero._y > num3) {
hero._y = num3;
}
if (hero._y < 41) {
hero._y = 41;
}
if (_root.hero._width > 99.9999) {
gotoAndStop (8);
}
}
_root.speed = 5;
_root.points = 0;
_root.level = 1;
_root.gameover = 0;
_root.difficulty = "HARD";
_root.paused = 0;
_root.canuseshockwave = 1;
_root.shockcharges = 0;
_root.med = 0;
_root.invin = 0;
enemies = new Array();
hero.onEnterFrame = moveStuff;
level = 1;
i = 1;
j = 1;
refreshRate = 60;
refreshRate2 = 750;
depthNumber = 1;
maxNumberOfEnemies = 15;
maxNumberOfPowerups = 2;
numberOfEnemies = 0;
numberOfPowerups = 0;
lastTime = 0;
newTime = 0;
frames = 0;
showFPS = "";
_root.lolzor = 0;
onEnterFrame = function () {
if (((_root.invin == 1) && (_root.lolzor < 500)) && (_root.paused == 0)) {
_root.lolzor = _root.lolzor + 1;
_root.invinbar._x = 20;
_root.invinbar.gotoAndStop(_root.lolzor);
} else if (_root.paused == 0) {
_root.invinbar._x = -125;
_root.lolzor = 0;
_root.invin = 0;
}
frames = frames + 1;
newTime = new Date().getSeconds();
if (lastTime == newTime) {
} else {
showFPS = frames + " fps";
if ((frames < 35) && (_root.med == 0)) {
_quality = "MEDIUM";
_root.med = 1;
} else if ((frames > 45) && (_root.med == 1)) {
_quality = "HIGH";
_root.med = 0;
}
frames = 0;
lastTime = newTime;
}
if (_root.paused == 0) {
i++;
if (i > refreshRate) {
i = 0;
if (numberOfEnemies < maxNumberOfEnemies) {
_root.enemy.duplicateMovieClip("enemy" + depthNumber, 100 + depthNumber);
depthNumber++;
numberOfEnemies++;
}
}
}
if (_root.paused == 0) {
j++;
if (j > refreshRate2) {
j = 0;
if (numberOfPowerups < maxNumberOfPowerups) {
lolrandom = Math.round(Math.random() * 2);
if (lolrandom == 0) {
_root.powerups.duplicateMovieClip("powerups" + powerNumber, 100 + depthNumber);
} else if (lolrandom == 1) {
_root.powerupsp.duplicateMovieClip("powerupsp" + powerNumber, 100 + depthNumber);
} else if (lolrandom == 2) {
_root.powerupin.duplicateMovieClip("powerupin" + powerNumber, 100 + depthNumber);
}
depthNumber++;
numberOfPowerups++;
}
}
}
};
hitsHero = function (testingEnemy) {
distance = Math.sqrt(((testingEnemy._x - hero._x) * (testingEnemy._x - hero._x)) + ((testingEnemy._y - hero._y) * (testingEnemy._y - hero._y)));
if (distance < ((testingEnemy._width / 2) + (hero._width / 2))) {
return(true);
}
return(false);
};
stop();
Instance of Symbol 64 MovieClip [enemy] "enemy" in Frame 5
onClipEvent (load) {
num1 = (_root.hero._width + (Math.random() * _root.hero._width)) - (_root.hero._width / 4);
this._width = num1;
this._height = num1;
if (this._height < 5) {
this._height = 5;
}
if (this._width < 5) {
this._width = 5;
}
k1 = 160 - (this._width / 2);
k2 = 139 - (this._width / 2);
centerX = (Math.random() * 200) + k1;
centerY = (Math.random() * 200) + k2;
this._x = centerX;
this._y = centerY;
f = (Math.random() * 2) + 1;
speed = f;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
}
if (this._width < _root.hero._width) {
this.center.gotoAndStop(2);
} else {
this.center.gotoAndStop(1);
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "enemy") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
if ((this._width < _root.hero._width) && (canbehit != false)) {
_root.eat = new Sound();
_root.eat.attachSound("eat");
_root.eat.start();
_root.points = _root.points + Math.floor(_width);
calc1 = this._width / 30;
calc2 = this._height / 30;
_root.hero._width = _root.hero._width + calc1;
_root.hero._height = _root.hero._width + calc2;
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
} else if (((this._width >= _root.hero._width) && (canbehit != false)) && (_root.invin == 0)) {
_root.dead = new Sound();
_root.dead.attachSound("dead");
_root.dead.start();
_level0.gotoAndStop(7);
}
}
}
}
Instance of Symbol 28 MovieClip "powerups" in Frame 5
onClipEvent (load) {
num1 = (Math.random() * 10) + 20;
this._width = num1;
this._height = num1;
k1 = 199 - (this._width / 2);
k2 = 180 - (this._width / 2);
centerX = (Math.random() * 120) + k1;
centerY = (Math.random() * 120) + k2;
this._x = centerX;
this._y = centerY;
num2 = (Math.random() * 5) + 5;
speed = num2;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "powerups") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
_root.gotpower = new Sound();
_root.gotpower.attachSound("powerupgot");
_root.gotpower.start();
_root.points = _root.points + 25;
removeMovieClip(_root[_name]);
_root.shockcharges = _root.shockcharges + 1;
_root.numberOfPowerups--;
canbehit = false;
}
}
}
Instance of Symbol 28 MovieClip "powerupsp" in Frame 5
onClipEvent (load) {
num1 = (Math.random() * 10) + 20;
this._width = num1;
this._height = num1;
k1 = 199 - (this._width / 2);
k2 = 180 - (this._width / 2);
centerX = (Math.random() * 120) + k1;
centerY = (Math.random() * 120) + k2;
this._x = centerX;
this._y = centerY;
num2 = (Math.random() * 5) + 5;
speed = num2;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "powerupsp") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
_root.gotpower = new Sound();
_root.gotpower.attachSound("powerupgot");
_root.gotpower.start();
_root.points = _root.points + 25;
removeMovieClip(_root[_name]);
_root.speed = _root.speed + 5;
_root.numberOfPowerups--;
canbehit = false;
}
}
}
Instance of Symbol 28 MovieClip "powerupin" in Frame 5
onClipEvent (load) {
num1 = (Math.random() * 10) + 20;
this._width = num1;
this._height = num1;
k1 = 199 - (this._width / 2);
k2 = 180 - (this._width / 2);
centerX = (Math.random() * 120) + k1;
centerY = (Math.random() * 120) + k2;
this._x = centerX;
this._y = centerY;
num2 = (Math.random() * 5) + 5;
speed = num2;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "powerupin") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfPowerups--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
_root.gotpower = new Sound();
_root.gotpower.attachSound("powerupgot");
_root.gotpower.start();
_root.points = _root.points + 25;
removeMovieClip(_root[_name]);
_root.invin = 1;
_root.numberOfPowerups--;
canbehit = false;
}
}
}
Frame 6
function moveStuff() {
if (Key.isDown(37) && (_root.paused == 0)) {
this._x = this._x - _root.speed;
}
if (Key.isDown(39) && (_root.paused == 0)) {
this._x = this._x + _root.speed;
}
if (Key.isDown(38) && (_root.paused == 0)) {
this._y = this._y - _root.speed;
}
if (Key.isDown(40) && (_root.paused == 0)) {
this._y = this._y + _root.speed;
}
if (((Key.isDown(83) && (_root.paused == 0)) && (_root.canuseshockwave == 1)) && (_root.shockcharges > 0)) {
_root.attachMovie("shockwave", "shock", 1);
x1 = _root.hero._x + (_root.hero._width / 2);
x2 = _root.hero._y + (_root.hero._height / 2);
_root.shock._x = x1;
_root.shock._y = x2;
}
if (Key.isDown(80)) {
if (_root.paused == 0) {
_root.paused = 1;
_root.pausedpanel._x = 0;
_root.pausedpanel._visible = true;
}
}
num1 = 500 - _root.hero._width;
if (hero._x > num1) {
hero._x = num1;
}
if (hero._x < 1) {
hero._x = 1;
}
num3 = 440 - _root.hero._height;
if (hero._y > num3) {
hero._y = num3;
}
if (hero._y < 41) {
hero._y = 41;
}
if (_root.hero._width > 99.9999) {
gotoAndStop (8);
}
}
_root.speed = 5;
_root.points = 0;
_root.level = 1;
_root.gameover = 0;
_root.difficulty = "INSANE";
_root.paused = 0;
_root.canuseshockwave = 1;
_root.shockcharges = 0;
_root.med = 0;
_root.invin = 0;
enemies = new Array();
hero.onEnterFrame = moveStuff;
level = 1;
i = 1;
j = 1;
refreshRate = 40;
refreshRate2 = 500;
depthNumber = 1;
maxNumberOfEnemies = 15;
maxNumberOfPowerups = 2;
numberOfEnemies = 0;
numberOfPowerups = 0;
lastTime = 0;
newTime = 0;
frames = 0;
showFPS = "";
_root.lolzor = 0;
onEnterFrame = function () {
if (((_root.invin == 1) && (_root.lolzor < 500)) && (_root.paused == 0)) {
_root.lolzor = _root.lolzor + 1;
_root.invinbar._x = 20;
_root.invinbar.gotoAndStop(_root.lolzor);
} else if (_root.paused == 0) {
_root.invinbar._x = -125;
_root.lolzor = 0;
_root.invin = 0;
}
frames = frames + 1;
newTime = new Date().getSeconds();
if (lastTime == newTime) {
} else {
showFPS = frames + " fps";
if ((frames < 35) && (_root.med == 0)) {
_quality = "MEDIUM";
_root.med = 1;
} else if ((frames > 45) && (_root.med == 1)) {
_quality = "HIGH";
_root.med = 0;
}
frames = 0;
lastTime = newTime;
}
if (_root.paused == 0) {
i++;
if (i > refreshRate) {
i = 0;
if (numberOfEnemies < maxNumberOfEnemies) {
_root.enemy.duplicateMovieClip("enemy" + depthNumber, 100 + depthNumber);
depthNumber++;
numberOfEnemies++;
}
}
}
if (_root.paused == 0) {
j++;
if (j > refreshRate2) {
j = 0;
if (numberOfPowerups < maxNumberOfPowerups) {
lolrandom = Math.round(Math.random() * 2);
if (lolrandom == 0) {
_root.powerups.duplicateMovieClip("powerups" + powerNumber, 100 + depthNumber);
} else if (lolrandom == 1) {
_root.powerupsp.duplicateMovieClip("powerupsp" + powerNumber, 100 + depthNumber);
} else if (lolrandom == 2) {
_root.powerupin.duplicateMovieClip("powerupin" + powerNumber, 100 + depthNumber);
}
depthNumber++;
numberOfPowerups++;
}
}
}
};
hitsHero = function (testingEnemy) {
distance = Math.sqrt(((testingEnemy._x - hero._x) * (testingEnemy._x - hero._x)) + ((testingEnemy._y - hero._y) * (testingEnemy._y - hero._y)));
if (distance < ((testingEnemy._width / 2) + (hero._width / 2))) {
return(true);
}
return(false);
};
stop();
Instance of Symbol 64 MovieClip [enemy] "enemy" in Frame 6
onClipEvent (load) {
num1 = (_root.hero._width + (Math.random() * _root.hero._width)) - (_root.hero._width / 4);
this._width = num1;
this._height = num1;
if (this._height < 5) {
this._height = 5;
}
if (this._width < 5) {
this._width = 5;
}
k1 = 140 - (this._width / 2);
k2 = 120 - (this._width / 2);
centerX = (Math.random() * 240) + k1;
centerY = (Math.random() * 240) + k2;
this._x = centerX;
this._y = centerY;
f = (Math.random() * 2) + 1;
speed = f;
dir = (Math.random() * Math.PI) * 2;
rotationSpeed = 5;
minX = 0;
numz1 = 500 - this._width;
maxX = numz1;
minY = 40;
numz2 = 440 - this._width;
maxY = numz2;
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (_root.gameover == 1) {
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
}
if (this._width < _root.hero._width) {
this.center.gotoAndStop(2);
} else {
this.center.gotoAndStop(1);
}
rotation = ((Math.random() * rotationSpeed) - (rotationSpeed / 2)) / 10;
dir = dir + rotation;
_x = (_x + (Math.cos(dir) * speed));
_y = (_y + (Math.sin(dir) * speed));
if (_x > maxX) {
_x = maxX;
dir = dir + Math.PI;
}
if (_x < minX) {
_x = minX;
dir = dir + Math.PI;
}
if (_y > maxY) {
_y = maxY;
dir = dir + Math.PI;
}
if (_y < minY) {
_y = minY;
dir = dir + Math.PI;
}
if (_name == "enemy") {
this._x = 1000;
}
if (this.hitTest(_root.shock) == true) {
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
}
if (_root.hitsHero(this) == true) {
if ((this._width < _root.hero._width) && (canbehit != false)) {
_root.eat = new Sound();
_root.eat.attachSound("eat");
_root.eat.start();
_root.points = _root.points + Math.floor(_width * 2);
calc1 = this._width / 40;
calc2 = this._height / 40;
_root.hero._width = _root.hero._width + calc1;
_root.hero._height = _root.hero._width + calc2;
removeMovieClip(_root[_name]);
_root.numberOfEnemies--;
canbehit = false;
} else if (((this._width >= _root.hero._width) && (canbehit != false)) && (_root.invin == 0)) {
_root.dead = new Sound();
_root.dead.attachSound("dead");
_root.dead.start();
_level0.gotoAndStop(7);
}
}
}
}
Frame 7
_root.gameover = 1;
onEnterFrame = function () {
if (Key.isDown(13)) {
stopAllSounds();
if (_root.difficulty == "EASY") {
gotoAndStop (3);
} else if (_root.difficulty == "MEDIUM") {
gotoAndStop (4);
} else if (_root.difficulty == "HARD") {
gotoAndStop (5);
} else if (_root.difficulty == "INSANE") {
gotoAndStop (6);
}
}
};
stop();
Frame 8
_root.gameover = 1;
if (_root.difficulty == "EASY") {
_root.points = _root.points + 100;
_root.easycompleted = 1;
} else if (_root.difficulty == "MEDIUM") {
_root.points = _root.points + 200;
_root.mediumcompleted = 1;
} else if (_root.difficulty == "HARD") {
_root.points = _root.points + 400;
_root.hardcompleted = 1;
} else if (_root.difficulty == "INSANE") {
_root.points = _root.points + 800;
_root.insanecompleted = 1;
}
stop();
Frame 10
stop();
Instance of Symbol 306 MovieClip "hs" in Frame 10
onClipEvent (load) {
loadVariables ("http://www.xenwars.com/games/engulfer/nghs.php?nocache=" add random(99999999), this, "GET");
}
Symbol 13 Button
on (release) {
this.removeMovieClip();
}
Symbol 26 Button
on (release) {
this.attachMovie("xionpic", "x", 1);
this.x._x = 170;
this.x._y = 120;
}
Symbol 34 Button
on (release) {
this.removeMovieClip();
}
Symbol 38 MovieClip [shockwave] Frame 1
_root.canuseshockwave = 0;
Symbol 38 MovieClip [shockwave] Frame 30
_root.canuseshockwave = 1;
_root.shockcharges = _root.shockcharges - 1;
this.removeMovieClip();
Symbol 46 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay(6);
this.removeMovieClip();
}
Symbol 48 Button
on (release) {
this.removeMovieClip();
}
Symbol 49 MovieClip [name4] Frame 1
onEnterFrame = function () {
if (Key.isDown(13)) {
stopAllSounds();
_root.gotoAndStop(6);
this.removeMovieClip();
}
};
Symbol 51 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay(5);
this.removeMovieClip();
}
Symbol 52 MovieClip [name3] Frame 1
onEnterFrame = function () {
if (Key.isDown(13)) {
stopAllSounds();
_root.gotoAndStop(5);
this.removeMovieClip();
}
};
Symbol 54 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay(4);
this.removeMovieClip();
}
Symbol 55 MovieClip [name2] Frame 1
onEnterFrame = function () {
if (Key.isDown(13)) {
stopAllSounds();
_root.gotoAndStop(4);
this.removeMovieClip();
}
};
Symbol 57 Button
on (release) {
stopAllSounds();
_root.gotoAndStop(3);
this.removeMovieClip();
}
Symbol 58 MovieClip [name1] Frame 1
onEnterFrame = function () {
if (Key.isDown(13)) {
stopAllSounds();
_root.gotoAndStop(3);
this.removeMovieClip();
}
};
Symbol 64 MovieClip [enemy] Frame 20
stop();
Symbol 75 MovieClip Frame 1
if (percent_done == 100) {
_root.gotoAndStop(2);
}
Symbol 75 MovieClip Frame 2
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
kBytesLoaded = loaded_bytes / 1024;
kBytesTotal = total_bytes / 1024;
kBytesRemaining = kBytesTotal - kBytesLoaded;
kBytesSec = kBytesLoaded / (getTimer() / 1000);
timeRemaining = kBytesRemaining / kBytesSec;
left = Math.floor(timeRemaining);
percent_done = int((loaded_bytes / total_bytes) * 100);
Symbol 87 Button
on (rollOver) {
panel.gotoAndStop(2);
}
on (release) {
removeMovieClip(inst);
removeMovieClip(creds);
_root.attachMovie("name1", "yourname1", 1);
_root.yourname1._x = 160;
_root.yourname1._y = 150;
}
on (rollOut) {
panel.gotoAndStop(1);
}
Symbol 91 Button
on (rollOver) {
panel.gotoAndStop(3);
}
on (release) {
removeMovieClip(inst);
removeMovieClip(creds);
_root.attachMovie("name2", "yourname2", 1);
_root.yourname2._x = 160;
_root.yourname2._y = 150;
}
on (rollOut) {
panel.gotoAndStop(1);
}
Symbol 95 Button
on (rollOver) {
panel.gotoAndStop(4);
}
on (release) {
removeMovieClip(inst);
removeMovieClip(creds);
_root.attachMovie("name3", "yourname3", 1);
_root.yourname3._x = 160;
_root.yourname3._y = 150;
}
on (rollOut) {
panel.gotoAndStop(1);
}
Symbol 99 Button
on (rollOver) {
panel.gotoAndStop(5);
}
on (release) {
removeMovieClip(inst);
removeMovieClip(creds);
_root.attachMovie("name4", "yourname4", 1);
_root.yourname4._x = 160;
_root.yourname4._y = 150;
}
on (rollOut) {
panel.gotoAndStop(1);
}
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 2
stop();
Symbol 123 MovieClip Frame 3
stop();
Symbol 123 MovieClip Frame 4
stop();
Symbol 123 MovieClip Frame 5
stop();
Symbol 127 Button
on (release) {
_root.attachMovie("instructions", "inst", 1);
}
Symbol 129 Button
on (release) {
_root.attachMovie("credits", "creds", 1);
}
Symbol 134 Button
on (release) {
_quality = "LOW";
}
Symbol 137 Button
on (release) {
_quality = "MEDIUM";
}
Symbol 140 Button
on (release) {
_quality = "HIGH";
}
Symbol 154 Button
on (release) {
stopAllSounds();
gotoAndStop (2);
}
Symbol 156 Button
on (release) {
stopAllSounds();
gotoAndStop (3);
}
Symbol 157 Button
on (release) {
stopAllSounds();
gotoAndStop (1);
}
Symbol 160 Button
on (release) {
stopAllSounds();
gotoAndStop (4);
}
Symbol 163 Button
on (release) {
stopAllSounds();
gotoAndStop (5);
}
Symbol 168 MovieClip Frame 1
_root.ingameframe = 2;
stop();
Symbol 168 MovieClip Frame 2
_root.ingameframe = 3;
stop();
Symbol 168 MovieClip Frame 3
_root.ingameframe = 4;
stop();
Symbol 168 MovieClip Frame 4
_root.ingameframe = 5;
stop();
Symbol 168 MovieClip Frame 5
_root.ingameframe = 6;
stop();
Symbol 178 Button
on (release) {
stopAllSounds();
gotoAndStop (2);
}
Symbol 189 Button
on (release) {
this.gotoAndStop(2);
}
Symbol 191 Button
on (release) {
_parent.gotoAndStop(1);
this.gotoAndStop(1);
}
Symbol 192 MovieClip Frame 1
stop();
Symbol 192 MovieClip Frame 2
stopAllSounds();
stop();
Symbol 193 MovieClip Frame 1
this.gotoAndStop(_root.ingameframe);
Symbol 193 MovieClip Frame 2
stop();
Symbol 193 MovieClip Frame 3
stop();
Symbol 193 MovieClip Frame 4
stop();
Symbol 193 MovieClip Frame 5
stop();
Symbol 193 MovieClip Frame 6
stop();
Symbol 203 MovieClip Frame 1
stop();
Symbol 236 Button
on (release) {
stopAllSounds();
gotoAndStop (1);
}
Symbol 240 Button
on (release) {
System.security.allowDomain("http://www.xenwars.com");
loadVariablesNum ("http://www.xenwars.com/games/engulfer/ngupdate.php", 0, "POST");
stopAllSounds();
_root.gotoAndPlay(9);
}
Symbol 247 Button
on (release) {
stopAllSounds();
gotoAndStop (1);
}
Symbol 306 MovieClip Frame 1
System.security.allowDomain("http://www.xenwars.com/");
Symbol 309 Button
on (release) {
stopAllSounds();
gotoAndStop (2);
}
Symbol 313 Button
on (release) {
System.security.allowDomain("http://www.xenwars.com/");
loadVariables ("http://www.xenwars.com/games/engulfer/nghs.php?nocache=" add random(99999999), _root.hs, "GET");
stopAllSounds();
gotoAndPlay (9);
}