Frame 83
stop();
Frame 84
startDrag ("pointer", true);
Mouse.hide();
this._quality = "MEDIUM";
if (gameField.life == undefined) {
gameField.life = 175;
}
if (gameField.score == undefined) {
gameField.score = 0;
}
if (gameField.level == undefined) {
gameField.level = 1;
}
gameField.nextLevel = function (param) {
gameField.life = param.life;
gameField.level = param.levelId + 1;
gameField.score = gameField.score + gameField.lvl.score;
gameField.lvl.score = 0;
gotoAndPlay ("finLevel");
};
this.onEnterFrame = function () {
if (this.gameField.lvl != undefined) {
this.txt_mc.chps.text = this.gameField.score + this.gameField.lvl.score;
}
};
gameField.gameOver = function () {
gameField.score = gameField.score + gameField.lvl.score;
gameField.lvl.score = 0;
_global.finalscore = gameField.score;
gotoAndPlay ("GameOver");
};
var dis = this.getNextHighestDepth();
gameField.attachMovie("Engine", "lvl", dis);
gotoAndPlay ("Level1G");
Frame 92
gameField.lvl.loadLevel(gameField.level, gameField.life);
stop();
Frame 101
gotoAndPlay ("Level1");
removeMovieClip(gameField.lvl);
stop();
Frame 111
stop();
Frame 112
Mouse.show();
this._quality = "HIGH";
stop();
Frame 126
stop();
Frame 138
stop();
Frame 150
stop();
Frame 164
gotoAndPlay ("splash");
Symbol 4 MovieClip [arbre4] Frame 1
this.cacheAsBitmap = true;
Symbol 10 MovieClip [arbre3] Frame 1
this.cacheAsBitmap = true;
Symbol 14 MovieClip [arbre2] Frame 1
this.cacheAsBitmap = true;
Symbol 38 MovieClip [DragonBody] Frame 1
stop();
Symbol 46 MovieClip [DragonHead] Frame 1
stop();
Symbol 47 MovieClip [Dragon] Frame 1
this.rad2deg = 57.2957795130823;
this.playfield = _parent.getPlayfield();
this.speed = 28;
this.minspeed = 10;
this.maxspeed = 28;
this.accelerate = true;
this.moveGranular = 9;
this.moveGranularMouse = 30;
this.targetPos = null;
this.preparingAttack = false;
this.firePwr = 0;
this.life = 350;
this.sight = null;
this.fireOrigin = new org.cove.flade.util.Vector();
this.touchedByMissile = function (damage) {
if (damage == undefined) {
return(undefined);
}
this.life = this.life - damage;
if (life <= 0) {
gotoAndStop ("die");
}
};
this.flyTo = function (x, y) {
this.targetPos = new org.cove.flade.util.Vector(x, y);
};
this.getPos_pfRef = function (owner, x, y) {
var _local1 = new org.cove.flade.util.Vector(x, y);
owner.localToGlobal(_local1);
playfield.globalToLocal(_local1);
return(_local1);
};
this.getPos_ownRef = function (owner, x, y) {
var _local1 = new org.cove.flade.util.Vector(x, y);
playfield.localToGlobal(_local1);
owner.globalToLocal(_local1);
return(_local1);
};
this.getDragonPosInPlayfield = function () {
return(this.getPosInPlayfield("head"));
};
this.getPosInPlayfield = function (entity) {
var _local4 = null;
var _local5 = entity.indexOf(".");
var _local2 = null;
_local4 = null;
if (_local5 != -1) {
var _local6 = null;
_local6 = entity.slice(_local5 + 1);
entity = entity.slice(0, _local5);
_local2 = this[entity];
var _local7 = _local2[_local6];
_local4 = getPos_pfRef(_local2, _local7._x, _local7._y);
} else {
_local2 = this[entity];
_local4 = getPos_pfRef(this, _local2._x, _local2._y);
}
return(_local4);
};
this.movePosInPlayfield = function (entity, x, y) {
var _local4 = entity.indexOf(".");
if (_local4 == -1) {
var _local3 = this[entity];
_local3._x = _local3._x + x;
_local3._y = _local3._y + y;
return(this.getPosInPlayfield(entity));
}
var _local6 = entity;
var _local5 = null;
_local5 = entity.slice(_local4 + 1);
entity = entity.slice(0, _local4);
var _local3 = this[entity];
var _local7 = _local3[_local5];
_local3._x = _local3._x + x;
_local3._y = _local3._y + y;
return(this.getPosInPlayfield(_local6));
};
this.step_UpdateEntity_Move_Translate = function (entity, target) {
var _local7 = this.getPosInPlayfield(entity);
var _local5 = new org.cove.flade.util.Vector(target.x - _local7.x, target.y - _local7.y);
var _local11 = true;
var _local9 = this.moveGranularMouse;
var _local6 = this.getPosInPlayfield("head");
var _local8 = false;
if (_local6.y < 180) {
_local8 = true;
}
if (_local6.y < 205) {
_parent.frontier.gotoAndPlay("appear");
}
if (Key.isDown(17)) {
_local9 = 650;
}
if ((_local5.length() < _local9) && (entity == "head")) {
return(this.getPosInPlayfield(entity));
}
if (_local5.length() < this.moveGranular) {
return(this.getPosInPlayfield(entity));
}
var _local3 = new org.cove.flade.util.Vector(_local5.x, _local5.y);
_local3.normalize();
if ((_local8 && (_local3.y < 0)) && (entity == "head")) {
_local3.y = 0;
}
return(this.movePosInPlayfield(entity, this.speed * _local3.x, this.speed * _local3.y));
};
this.step_UpdateEntity_Move_Rotate = function (entity, target) {
var _local2 = this.getPosInPlayfield(entity);
var _local5 = new org.cove.flade.util.Vector(target.x - _local2.x, target.y - _local2.y);
var _local4 = _local5.getAngle();
this[entity]._rotation = _local4 * rad2deg;
return(this[entity]._rotation);
};
this.step_UpdateEntity_Move_SetPos = function (entity, target, angle, ratio) {
var _local9 = this.getPosInPlayfield(entity);
var _local8 = new org.cove.flade.util.Vector(target.x - _local9.x, target.y - _local9.y);
var _local2 = null;
this.movePosInPlayfield(entity, _local8.x, _local8.y);
var _local10 = entity.indexOf(".");
if (_local10 != -1) {
entity = entity.slice(0, _local10);
_local2 = this[entity];
var _local6 = _local2._rotation;
angle = ((angle < 0) ? (angle + 360) : (angle));
_local6 = ((_local6 < 0) ? (_local6 + 360) : (_local6));
var _local3 = (angle - _local6) / 2;
if (Math.abs(_local3) < 10) {
if (_local3 > 0) {
_local2._rotation = _local2._rotation + (0.1 * ratio);
} else {
_local2._rotation = _local2._rotation - (0.1 * ratio);
}
} else if (Math.abs(_local3) < 20) {
if (_local3 > 0) {
_local2._rotation = _local2._rotation + (0.5 * ratio);
} else {
_local2._rotation = _local2._rotation - (0.5 * ratio);
}
} else if (Math.abs(_local3) < 30) {
if (_local3 > 0) {
_local2._rotation = _local2._rotation + (1 * ratio);
} else {
_local2._rotation = _local2._rotation - (1 * ratio);
}
} else if (Math.abs(_local3) < 40) {
if (_local3 > 0) {
_local2._rotation = _local2._rotation + (2 * ratio);
} else {
_local2._rotation = _local2._rotation - (2 * ratio);
}
} else if (Math.abs(_local3) < 60) {
if (_local3 > 0) {
_local2._rotation = _local2._rotation + (4 * ratio);
} else {
_local2._rotation = _local2._rotation - (4 * ratio);
}
} else {
_local2._rotation = angle;
}
}
this.movePosInPlayfield(entity, _local8.x, _local8.y);
return(_local2._rotation);
};
this.hitTest = function (x, y) {
return(((((head.hitTest(x, y) || (neck1.hitTest(x, y))) || (neck2.hitTest(x, y))) || (neck3.hitTest(x, y))) || (neck4.hitTest(x, y))) || (body.corpse.hitTest(x, y)));
};
gotoAndStop ("process");
Symbol 47 MovieClip [Dragon] Frame 15
this.counter = 0;
this.fury = false;
onMouseMove = function () {
this.flyTo(playfield._xmouse, playfield._ymouse);
};
onMouseDown = function () {
preparingAttack = true;
this.counter = 0;
};
onMouseUp = function () {
this.accelerate = true;
preparingAttack = false;
if ((!fury) && (counter > 0)) {
var _local2 = Math.floor(this.counter / 6) + 1;
this.counter = 0;
if (_local2 >= 4) {
_local2 = 4;
} else {
_local2 = 2;
}
var _local4 = {name:"CREATE_FIREBALL", source:this.fireOrigin, direction:this.sight, power:_local2};
this.playfield.postEvent(_local4);
var _local3 = this.getNextHighestDepth();
this.attachMovie("DragonBreathIn", "sd" + _local3, _local3);
}
this.counter = 0;
fury = false;
};
onEnterFrame = function () {
if (this.accelerate) {
if (this.speed < this.maxspeed) {
this.speed = this.speed + 2;
}
} else if (this.speed > this.minspeed) {
this.speed = this.speed - 2;
}
var _local3 = this.targetPos;
var _local2 = null;
_local2 = _local3;
_local3 = this.step_UpdateEntity_Move_Translate("head", _local2);
this.sight = this.step_UpdateEntity_Move_Rotate("head", _local2);
this.fireOrigin = this.getPosInPlayfield("head.firesource");
_local2 = _local3;
_local3 = this.step_UpdateEntity_Move_Translate("neck1", _local2);
this.step_UpdateEntity_Move_Rotate("neck1", _local2);
_local2 = _local3;
_local3 = this.step_UpdateEntity_Move_Translate("neck2", _local2);
this.step_UpdateEntity_Move_Rotate("neck2", _local2);
_local2 = _local3;
_local3 = this.step_UpdateEntity_Move_Translate("neck3", _local2);
this.step_UpdateEntity_Move_Rotate("neck3", _local2);
_local2 = _local3;
_local3 = this.step_UpdateEntity_Move_Translate("neck4", _local2);
this.step_UpdateEntity_Move_Rotate("neck4", _local2);
var _local4 = 0;
_local2 = _local3;
this.step_UpdateEntity_Move_Translate("body.A", _local2);
_local4 = this.step_UpdateEntity_Move_Rotate("body", _local2);
_local3 = this.getPosInPlayfield("body.B");
_local2 = _local3;
_local4 = this.step_UpdateEntity_Move_SetPos("tail1.A", _local2, _local4, 8);
if (preparingAttack && (!fury)) {
this.counter = this.counter + 2;
}
if ((this.counter >= 60) && (!fury)) {
fury = true;
this.accelerate = false;
}
if ((this.counter <= 0) && (fury)) {
preparingAttack = false;
fury = false;
this.accelerate = true;
}
if (fury) {
this.counter = this.counter - 2;
var _local6 = new org.cove.flade.util.Vector(this._xmouse, this._ymouse);
this.localToGlobal(_local6);
var _local7 = {name:"CREATE_FIREBALL", source:this.fireOrigin, direction:this.sight, power:4, target:_local6, range:17};
this.playfield.postEvent(_local7);
var _local5 = this.getNextHighestDepth();
this.attachMovie("DragonBreathIn", "sd" + _local5, _local5);
}
};
stop();
Symbol 47 MovieClip [Dragon] Frame 25
this.onMouseMove = function () {
};
this.onMouseDown = function () {
};
this.onEnterFrame = function () {
if (_alpha <= 0) {
_parent.gameOver();
}
_alpha = (_alpha - 2);
};
stop();
Symbol 50 MovieClip [Frontier] Frame 1
stop();
Symbol 55 MovieClip [Carnage] Frame 1
this.levelId;
lvlname.text = this.levelId;
Symbol 55 MovieClip [Carnage] Frame 40
Symbol 55 MovieClip [Carnage] Frame 41
stop();
removeMovieClip(this);
Symbol 56 MovieClip [Engine] Frame 1
this.eventpool = new Array();
this.arenaEnnemy = new Array();
this.arenaProjectileFriendly = new Array();
this.arenaProjectileEnnemy = new Array();
this.score = 0;
this.getPlayfield = function () {
return(this);
};
this.getPlayer = function () {
return(player.getDragonPosInPlayfield());
};
this.loadLevel = function (levelName, initialLife) {
if (levelName > 11) {
levelName = 11;
}
player.swapDepths(this.attachMovie("LevelRndScroll", "currentLevel", this.getNextHighestDepth(), {_x:0, _y:0, chapter:levelName}));
player.life = initialLife;
};
this.notifyEndOfLevel = function (param) {
_parent.nextLevel({life:player.life, levelId:param.chapter});
};
this.gameOver = function () {
_parent.gameOver();
};
this.postEvent = function (gameEvent) {
eventpool.push(gameEvent);
};
this.createFireball = function (x, y, direction, power, range) {
var _local2 = {x:x, y:y};
this.localToGlobal(_local2);
this.currentLevel.lvl.globalToLocal(_local2);
var _local3 = this.currentLevel.lvl.getNextHighestDepth();
var _local4 = new org.cove.flade.util.Vector(-Math.cos((direction * Math.PI) / 180), -Math.sin((direction * Math.PI) / 180));
var _local13 = this.currentLevel.lvl.attachMovie("fireBall", "p" + _local3, _local3, {_x:_local2.x, _y:_local2.y, _rotation:direction, _velocity:_local4, _speed:8, _pwr:power, _range:range});
};
this.createArrow = function (x, y, direction, power) {
var _local2 = this.getNextHighestDepth();
var _local3 = new org.cove.flade.util.Vector(-Math.cos((direction * Math.PI) / 180), -Math.sin((direction * Math.PI) / 180));
var _local11 = this.attachMovie("Arrow", "a" + _local2, _local2, {_x:x, _y:y, _rotation:direction, _velocity:_local3, _speed:4, _pwr:power});
};
this.createArrowArcher = function (x, y, direction, power) {
var _local2 = this.getNextHighestDepth();
var _local3 = new org.cove.flade.util.Vector(-Math.cos((direction * Math.PI) / 180), -Math.sin((direction * Math.PI) / 180));
var _local11 = this.attachMovie("ArrowArcher", "ac" + _local2, _local2, {_x:x, _y:y, _rotation:direction, _velocity:_local3, _speed:7, _pwr:power});
};
this.createThrowingAxe = function (x, y, angle) {
var _local5 = this.attachMovie("Axe", "x", this.getNextHighestDepth(), {_x:x, _y:y, _rotation:angle});
};
this.touchEnemy = function (x, y, missile, target) {
var _local3 = missile._pwr;
this.attachMovie("FireExplosion", "fe", this.getNextHighestDepth(), {_x:x, _y:y});
if (missile._pwr > 3) {
createBloodSplash(x, y, missile, target);
if (target.bloodOrigin == undefined) {
missile.destroyProjectile();
}
missile.multi++;
} else {
missile.destroyProjectile();
}
target.touchedByMissile(_local3, missile.multi);
};
this.touchAllie = function (x, y, missile, target) {
var _local2 = missile._pwr;
this.attachMovie("Blood", "bl", this.getNextHighestDepth(), {_x:x, _y:y, _rotation:missile._rotation});
missile.destroyProjectile();
target.touchedByMissile(_local2);
};
this.createBloodSplash = function (x, y, missile, target) {
var _local2 = {x:target.bloodOrigin._x, y:target.bloodOrigin._y};
target.localToGlobal(_local2);
this.globalToLocal(_local2);
var _local3 = this.getNextHighestDepth();
this.attachMovie("BigBlood", "bl" + _local3, _local3, {_x:_local2.x, _y:_local2.y, _rotation:missile._rotation, _xscale:75, _yscale:75});
if (player.life < 40) {
player.life = player.life + 1;
}
};
gotoAndPlay ("play");
Symbol 56 MovieClip [Engine] Frame 10
titre.levelId = "Carnage " + currentLevel.chapter;
this.frame = 0;
this.frameClean = 0;
this.checkCollision = function () {
if ((this.frame == 0) || (this.frame == 2)) {
for (var _local10 in this.arenaEnnemy) {
if (this.arenaEnnemy[_local10] != undefined) {
for (var _local11 in this.arenaProjectileFriendly) {
if (this.arenaProjectileFriendly[_local11]._parent != undefined) {
var _local2 = {x:0, y:0};
this.arenaProjectileFriendly[_local11].localToGlobal(_local2);
if (this.arenaEnnemy[_local10].hitTest(_local2.x, _local2.y, true)) {
this.globalToLocal(_local2);
var _local3 = {name:"TRIGGER_ALLIE_MISSILETOUCH", collision:_local2, missile:this.arenaProjectileFriendly[_local11], target:this.arenaEnnemy[_local10]};
postEvent(_local3);
}
}
}
}
}
} else {
for (var _local11 in this.arenaProjectileEnnemy) {
if (this.arenaProjectileEnnemy[_local11]._parent != undefined) {
var _local2 = {x:0, y:0};
this.arenaProjectileEnnemy[_local11].localToGlobal(_local2);
if (this.player.hitTest(_local2.x, _local2.y, true)) {
this.globalToLocal(_local2);
var _local3 = {name:"TRIGGER_ENNEMY_MISSILETOUCH", collision:_local2, missile:this.arenaProjectileEnnemy[_local11], target:this.player};
postEvent(_local3);
}
}
}
}
};
this.cleanArena = function () {
var _local3 = new Array();
for (var _local5 in this.arenaProjectileEnnemy) {
var _local2 = this.arenaProjectileEnnemy[_local5];
if (_local2._parent != undefined) {
_local3[_local2._name] = _local2;
}
}
delete this.arenaProjectileEnnemy;
this.arenaProjectileEnnemy = _local3;
_local3 = new Array();
for (var _local5 in this.arenaProjectileFriendly) {
var _local2 = this.arenaProjectileFriendly[_local5];
if (_local2._parent != undefined) {
_local3[_local2._name] = _local2;
}
}
delete this.arenaProjectileFriendly;
this.arenaProjectileFriendly = _local3;
_local3 = new Array();
for (var _local4 in this.arenaEnnemy) {
var _local2 = this.arenaEnnemy[_local4];
if (_local2._parent != undefined) {
_local3[_local2._name] = _local2;
}
}
delete this.arenaEnnemy;
this.arenaEnnemy = _local3;
};
this.onEnterFrame = function () {
this.frame = (this.frame + 1) % 5;
this.frameClean = (this.frameClean + 1) % 600;
if (this.frameClean == 0) {
cleanArena();
}
checkCollision();
if ((this.frame == 0) || (this.frame == 3)) {
var _local5 = 0;
while (_local5 < 10) {
if (this.eventpool.length > 0) {
var _local2 = this.eventpool.shift();
switch (_local2.name) {
case "CREATE_FIREBALL" :
var _local4 = _local2.source;
var _local10 = _local2.direction;
var _local9 = _local2.power;
var _local6 = 60;
if (_local2.range) {
_local6 = _local2.range;
}
this.createFireball(_local4.x, _local4.y, _local10, _local9, _local6);
break;
case "CREATE_ARROW" :
_local4 = _local2.source;
_local10 = _local2.direction;
_local9 = _local2.power;
this.createArrow(_local4.x, _local4.y, _local10, _local9);
break;
case "CREATE_ARROW_ARCHER" :
_local4 = _local2.source;
_local10 = _local2.direction;
_local9 = _local2.power;
this.createArrowArcher(_local4.x, _local4.y, _local10, _local9);
break;
case "CREATE_THROWINGAXE" :
_local4 = _local2.source;
_local10 = _local2.orientation;
this.createThrowingAxe(_local4.x, _local4.y, _local10);
break;
case "TRIGGER_ALLIE_MISSILETOUCH" :
var _local3 = _local2.collision;
var _local8 = _local2.missile;
var _local7 = _local2.target;
this.touchEnemy(_local3.x, _local3.y, _local8, _local7);
break;
case "TRIGGER_ENNEMY_MISSILETOUCH" :
_local3 = _local2.collision;
_local8 = _local2.missile;
_local7 = _local2.target;
this.touchAllie(_local3.x, _local3.y, _local8, _local7);
}
}
_local5++;
}
}
};
stop();
Symbol 61 MovieClip [fireBall] Frame 1
this._velocity;
this._range;
this._speed;
this._pwr;
this.multi = 0;
this.cacheAsBitmap = true;
this._xscale = 50;
this._yscale = 50;
this.frame = 0;
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
this.playfield = this.getPlayfield();
this.playfield.arenaProjectileFriendly[this._name] = this;
this.onEnterFrame = function () {
_x = (_x + (this._velocity.x * _speed));
_y = (_y + (this._velocity.y * _speed));
this.frame++;
if (frame == this._range) {
this.destroyProjectile();
}
};
this.destroyProjectile = function () {
removeMovieClip(this);
delete this.playfield.arenaProjectileFriendly[this._name];
};
if (this._pwr == 1) {
stop();
}
Symbol 61 MovieClip [fireBall] Frame 5
if (this._pwr == 2) {
stop();
}
Symbol 61 MovieClip [fireBall] Frame 8
if (this._pwr == 3) {
stop();
}
Symbol 61 MovieClip [fireBall] Frame 11
stop();
Symbol 69 MovieClip Frame 1
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
var level = [[10, 3, 1, 0, 1, 0, 0, 0], [15, 5, 0, 0, 0, 0, 0, 0], [5, 3, 2, 2, 5, 2, 1, 1], [2, 2, 2, 5, 5, 2, 1, 1], [4, 2, 2, 1, 2, 1, 1, 4], [Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3)], [Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3)], [Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3)], [Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3)], [Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 5), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3), Math.round(Math.random() * 3)]];
var dispatchArcher1 = ["_1Archer_1", "_1Archer_2", "_1Archer_3", "_1Archer_4", "_1Archer_5"];
var dispatchArcher2 = ["_2Archer_1", "_2Archer_2", "_2Archer_3", "_2Archer_4", "_2Archer_5"];
var dispatchArcher3 = ["_3Archer_1", "_3Archer_2", "_3Archer_3", "_3Archer_4", "_3Archer_5"];
var dispatchArcher4 = ["_4Archer_1", "_4Archer_2", "_4Archer_3", "_4Archer_4", "_4Archer_5"];
var dispatchCatapult = ["_1Archer_1", "_1Archer_2", "_1Archer_3", "_1Archer_4", "_1Archer_5"];
this.loadLevel = function (lvl) {
var area = new Array();
var _local5 = 1;
while (_local5 <= 30) {
area[_local5 - 1] = "_" + _local5;
_local5++;
}
this.removeNorthPoint = function (point) {
var _local2 = point.substring(1);
_local2 = "_" + (parseInt(_local2, 10) - 3);
var _local1 = 0;
while (_local1 < area.length) {
if (area[_local1] == _local2) {
area.splice(_local1, 1);
return(undefined);
}
_local1++;
}
};
var _local23 = Math.round(Math.random() * 10);
_local5 = 0;
while (_local5 < _local23) {
var _local9 = this.getNextHighestDepth();
var _local10 = this.attachMovie("arbre2", "deco" + _local9, _local9, {_x:(Math.random() * this.fond._width) + this.fond._x, _y:(Math.random() * this.fond._height) + this.fond._y, _xscale:30, _yscale:30});
_local10.cacheAsBitmap = true;
_local5++;
}
_local23 = Math.round(Math.random() * 10);
_local5 = 0;
while (_local5 < _local23) {
var _local9 = this.getNextHighestDepth();
var _local10 = this.attachMovie("arbre3", "deco" + _local9, _local9, {_x:(Math.random() * this.fond._width) + this.fond._x, _y:(Math.random() * this.fond._height) + this.fond._y, _xscale:30, _yscale:30});
_local10.cacheAsBitmap = true;
_local5++;
}
_local23 = Math.round(Math.random() * 20);
_local5 = 0;
while (_local5 < _local23) {
var _local9 = this.getNextHighestDepth();
var _local10 = this.attachMovie("caillou1", "deco" + _local9, _local9, {_x:(Math.random() * this.fond._width) + this.fond._x, _y:(Math.random() * this.fond._height) + this.fond._y, _xscale:30, _yscale:30});
_local10.cacheAsBitmap = true;
_local5++;
}
_local23 = Math.round(Math.random() * 16);
_local5 = 0;
while (_local5 < _local23) {
var _local9 = this.getNextHighestDepth();
var _local10 = this.attachMovie("caillou2", "deco" + _local9, _local9, {_x:(Math.random() * this.fond._width) + this.fond._x, _y:(Math.random() * this.fond._height) + this.fond._y, _xscale:30, _yscale:30});
_local10.cacheAsBitmap = true;
_local5++;
}
_local23 = Math.round(Math.random() * 5);
_local5 = 0;
while (_local5 < _local23) {
var _local9 = this.getNextHighestDepth();
var _local10 = this.attachMovie("buisson", "deco" + _local9, _local9, {_x:(Math.random() * this.fond._width) + this.fond._x, _y:(Math.random() * this.fond._height) + this.fond._y, _xscale:30, _yscale:30});
_local10.cacheAsBitmap = true;
_local5++;
}
_local23 = Math.round(Math.random() * 5);
_local5 = 0;
while (_local5 < _local23) {
var _local9 = this.getNextHighestDepth();
var _local10 = this.attachMovie("arbre4", "deco" + _local9, _local9, {_x:(Math.random() * this.fond._width) + this.fond._x, _y:(Math.random() * this.fond._height) + this.fond._y});
_local10.cacheAsBitmap = true;
_local5++;
}
var _local25 = level[lvl - 1][5];
var _local14 = area.length;
_local5 = 0;
while (_local5 < _local25) {
_local14 = area.length;
var _local2 = Math.random() * _local14;
_local2 = Math.floor(_local2);
var _local7 = area[_local2];
area.splice(_local2, 1);
this.removeNorthPoint(_local7);
var _local9 = this.getNextHighestDepth();
var _local13 = this.attachMovie("ConcretTower", "dish" + _local9, _local9, {_x:this[_local7]._x, _y:this[_local7]._y});
_local9 = this.getNextHighestDepth();
var _local11 = _local13.attachMovie("TowerUnit", "unit" + _local9, _local9, {_x:0, _y:0});
var _local4 = {x:0, y:0};
_local11.unit.localToGlobal(_local4);
this.globalToLocal(_local4);
var _local6 = this.getNextHighestDepth();
var _local12 = this.attachMovie("ArcherDown", "ad" + _local6, _local6, {_x:_local4.x, _y:_local4.y});
_local12._rotation = _rotation + ((Math.random() * 30) - 15);
_local12.alwaysOnTop = true;
_local5++;
}
_local25 = level[lvl - 1][6];
_local14 = area.length;
_local5 = 0;
while (_local5 < _local25) {
_local14 = area.length;
var _local2 = Math.random() * _local14;
_local2 = Math.floor(_local2);
var _local7 = area[_local2];
area.splice(_local2, 1);
this.removeNorthPoint(_local7);
var _local9 = this.getNextHighestDepth();
var _local13 = this.attachMovie("ConcretTower", "dish" + _local9, _local9, {_x:this[_local7]._x, _y:this[_local7]._y});
_local9 = this.getNextHighestDepth();
var _local11 = _local13.attachMovie("DoubleTowerUnit", "unit" + _local9, _local9, {_x:0, _y:0});
var _local4 = {x:0, y:0};
_local11.unit1.localToGlobal(_local4);
this.globalToLocal(_local4);
var _local6 = this.getNextHighestDepth();
var _local12 = this.attachMovie("ArcherDown", "ad" + _local6, _local6, {_x:_local4.x, _y:_local4.y});
_local12._rotation = _rotation + ((Math.random() * 30) - 15);
_local12.alwaysOnTop = true;
_local4 = {x:0, y:0};
_local11.unit2.localToGlobal(_local4);
this.globalToLocal(_local4);
_local6 = this.getNextHighestDepth();
_local12 = this.attachMovie("ArcherDown", "ad" + _local6, _local6, {_x:_local4.x, _y:_local4.y});
_local12._rotation = _rotation + ((Math.random() * 30) - 15);
_local12.alwaysOnTop = true;
_local5++;
}
_local25 = level[lvl - 1][7];
_local14 = area.length;
_local5 = 0;
while (_local5 < _local25) {
_local14 = area.length;
var _local2 = Math.random() * _local14;
_local2 = Math.floor(_local2);
var _local7 = area[_local2];
area.splice(_local2, 1);
this.removeNorthPoint(_local7);
var _local9 = this.getNextHighestDepth();
var _local13 = this.attachMovie("ConcretTower", "dish" + _local9, _local9, {_x:this[_local7]._x, _y:this[_local7]._y});
_local9 = this.getNextHighestDepth();
var _local11 = _local13.attachMovie("TowerUnitCatapult", "unit" + _local9, _local9, {_x:0, _y:0});
var _local4 = {x:0, y:0};
_local11.unit.localToGlobal(_local4);
this.globalToLocal(_local4);
var _local6 = this.getNextHighestDepth();
var _local12 = this.attachMovie("TowerBaliste", "ad" + _local6, _local6, {_x:_local4.x, _y:_local4.y});
_local12._rotation = _rotation + ((Math.random() * 30) - 15);
_local12.alwaysOnTop = true;
_local5++;
}
_local25 = level[lvl - 1][0];
_local14 = area.length;
_local5 = 0;
while (_local5 < _local25) {
_local14 = area.length;
var _local2 = Math.random() * _local14;
_local2 = Math.floor(_local2);
var _local7 = area[_local2];
area.splice(_local2, 1);
var _local9 = this.getNextHighestDepth();
_local2 = Math.random() * dispatchArcher1.length;
_local2 = Math.floor(_local2);
var _local8 = this.attachMovie(dispatchArcher1[_local2], "dish" + _local9, _local9, {_x:this[_local7]._x, _y:this[_local7]._y});
_local8._rotation = _rotation + ((Math.random() * 30) - 15);
var _local4 = {x:0, y:0};
_local8.ref.localToGlobal(_local4);
this.globalToLocal(_local4);
var _local6 = this.getNextHighestDepth();
var _local12 = this.attachMovie("ArcherDown", "ad" + _local6, _local6, {_x:_local4.x, _y:_local4.y});
_local12._rotation = _rotation + ((Math.random() * 30) - 15);
_local5++;
}
_local25 = level[lvl - 1][1];
_local14 = area.length;
_local5 = 0;
while (_local5 < _local25) {
_local14 = area.length;
var _local2 = Math.random() * _local14;
_local2 = Math.floor(_local2);
var _local7 = area[_local2];
area.splice(_local2, 1);
var _local9 = this.getNextHighestDepth();
_local2 = Math.random() * dispatchArcher2.length;
_local2 = Math.floor(_local2);
var _local8 = this.attachMovie(dispatchArcher2[_local2], "dish" + _local9, _local9, {_x:this[_local7]._x, _y:this[_local7]._y});
_local8._rotation = _rotation + ((Math.random() * 30) - 15);
for (var _local26 in _local8) {
var _local4 = {x:0, y:0};
_local8[_local26].localToGlobal(_local4);
this.globalToLocal(_local4);
var _local6 = this.getNextHighestDepth();
var _local12 = this.attachMovie("ArcherDown", "ad" + _local6, _local6, {_x:_local4.x, _y:_local4.y});
_local12._rotation = _rotation + ((Math.random() * 30) - 15);
}
_local5++;
}
_local25 = level[lvl - 1][2];
_local14 = area.length;
_local5 = 0;
while (_local5 < _local25) {
_local14 = area.length;
var _local2 = Math.random() * _local14;
_local2 = Math.floor(_local2);
var _local7 = area[_local2];
area.splice(_local2, 1);
var _local9 = this.getNextHighestDepth();
_local2 = Math.random() * dispatchArcher3.length;
_local2 = Math.floor(_local2);
var _local8 = this.attachMovie(dispatchArcher3[_local2], "dish" + _local9, _local9, {_x:this[_local7]._x, _y:this[_local7]._y});
_local8._rotation = _rotation + ((Math.random() * 30) - 15);
for (var _local26 in _local8) {
var _local4 = {x:0, y:0};
_local8[_local26].localToGlobal(_local4);
this.globalToLocal(_local4);
var _local6 = this.getNextHighestDepth();
var _local12 = this.attachMovie("ArcherDown", "ad" + _local6, _local6, {_x:_local4.x, _y:_local4.y});
_local12._rotation = _rotation + ((Math.random() * 30) - 15);
}
_local5++;
}
_local25 = level[lvl - 1][3];
_local14 = area.length;
_local5 = 0;
while (_local5 < _local25) {
_local14 = area.length;
var _local2 = Math.random() * _local14;
_local2 = Math.floor(_local2);
var _local7 = area[_local2];
area.splice(_local2, 1);
var _local9 = this.getNextHighestDepth();
_local2 = Math.random() * dispatchArcher4.length;
_local2 = Math.floor(_local2);
var _local8 = this.attachMovie(dispatchArcher4[_local2], "dish" + _local9, _local9, {_x:this[_local7]._x, _y:this[_local7]._y});
_local8._rotation = _rotation + ((Math.random() * 30) - 15);
for (var _local26 in _local8) {
var _local4 = {x:0, y:0};
_local8[_local26].localToGlobal(_local4);
this.globalToLocal(_local4);
var _local6 = this.getNextHighestDepth();
var _local12 = this.attachMovie("ArcherDown", "ad" + _local6, _local6, {_x:_local4.x, _y:_local4.y});
_local12._rotation = _rotation + ((Math.random() * 30) - 15);
}
_local5++;
}
_local25 = level[lvl - 1][4];
_local14 = area.length;
_local5 = 0;
while (_local5 < _local25) {
_local14 = area.length;
var _local2 = Math.random() * _local14;
_local2 = Math.floor(_local2);
var _local7 = area[_local2];
area.splice(_local2, 1);
var _local9 = this.getNextHighestDepth();
_local2 = Math.random() * dispatchCatapult.length;
_local2 = Math.floor(_local2);
var _local8 = this.attachMovie(dispatchCatapult[_local2], "dish" + _local9, _local9, {_x:this[_local7]._x, _y:this[_local7]._y});
_local8._rotation = _rotation + ((Math.random() * 30) - 15);
var _local4 = {x:0, y:0};
_local8.ref.localToGlobal(_local4);
this.globalToLocal(_local4);
var _local6 = this.getNextHighestDepth();
var _local12 = this.attachMovie("TowerBaliste", "ad" + _local6, _local6, {_x:_local4.x, _y:_local4.y});
_local12._rotation = _rotation + ((Math.random() * 30) - 15);
_local5++;
}
var _local3 = new Array();
for (var _local26 in this) {
if ((typeof(this[_local26]) == "movieclip") && (this[_local26] != "fond")) {
_local3.push({name:_local26, z:this[_local26]._y});
}
}
_local3 = _local3.sortOn("z", Array.NUMERIC);
_local5 = 0;
while (_local5 < _local3.length) {
this[_local3[_local5].name].swapDepths(this.getNextHighestDepth());
_local5++;
}
_local5 = 0;
while (_local5 < _local3.length) {
if (this[_local3[_local5].name].alwaysOnTop == true) {
this[_local3[_local5].name].swapDepths(this.getNextHighestDepth());
}
_local5++;
}
};
Symbol 70 MovieClip [LevelRndScroll] Frame 1
this.chapter;
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
gotoAndPlay (2);
Symbol 70 MovieClip [LevelRndScroll] Frame 2
lvl.loadLevel(chapter);
Symbol 70 MovieClip [LevelRndScroll] Frame 1701
Symbol 70 MovieClip [LevelRndScroll] Frame 1705
_parent.notifyEndOfLevel({chapter:this.chapter});
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 106
stop();
Symbol 102 MovieClip [ArcherSK] Frame 1
this.playStand = function () {
for (var _local2 in this) {
this[_local2].gotoAndStop("stand");
}
};
this.playAttack = function () {
for (var _local2 in this) {
this[_local2].gotoAndPlay("attack");
}
};
this.playDie = function () {
for (var _local2 in this) {
this[_local2].gotoAndStop("die");
}
};
Symbol 103 MovieClip [ArcherDown] Frame 1
this.rad2deg = 57.2957795130823;
this.team = "Ennemy";
this.levelVersatile = true;
this.life = 2;
this.bonusCoef = 1;
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
this.playfield = this.getPlayfield();
this.playfield.arenaEnnemy[this._name] = this;
this.getPosInPlayfield = function (mc) {
var _local1 = new org.cove.flade.util.Vector(0, 0);
mc.localToGlobal(_local1);
playfield.globalToLocal(_local1);
return(_local1);
};
this.touchedByMissile = function (damage, multi) {
this.life = this.life - damage;
if (life <= 0) {
gotoAndPlay ("die");
if (multi != undefined) {
bonusCoef = multi;
}
}
};
this.destroyMe = function () {
removeMovieClip(this);
var _local3 = _parent.getMovieClipAtDepth(0);
this.swapDepths(0);
removeMovieClip(this);
delete this.playfield.arenaEnnemy[this._name];
};
stop();
this.currentFrame = 0;
this.onEnterFrame = function () {
var _local2 = this.playfield.getPlayer();
var _local3 = this.getPosInPlayfield(this);
var _local4 = Math.abs(_local3.y - _local2.y);
if (_local4 < 350) {
delete this.onEnterFrame;
skin.stop();
skin.play();
play();
}
};
Symbol 103 MovieClip [ArcherDown] Frame 2
this.skin.playStand();
Symbol 103 MovieClip [ArcherDown] Frame 20
this.skin.playAttack();
Symbol 103 MovieClip [ArcherDown] Frame 94
var v = this.playfield.getPlayer();
var current = this.getPosInPlayfield(this);
var axis = Math.abs(current.y - v.y);
if (axis < 360) {
var arrowOriginAbs = this.getPosInPlayfield(this.skin.arrowOrigin);
var evt = {name:"CREATE_ARROW_ARCHER", source:arrowOriginAbs, direction:(this._rotation - 90) + ((Math.random() * 30) - 15), power:10};
this.playfield.postEvent(evt);
} else {
stop();
}
gotoAndPlay ("stand");
Symbol 103 MovieClip [ArcherDown] Frame 107
this.onEnterFrame = function () {
};
if (bonusCoef == undefined) {
this.playfield.score++;
} else {
this.playfield.score = this.playfield.score + bonusCoef;
}
delete this.playfield.arenaEnnemy[this._name];
skin.playDie();
var d = this.getNextHighestDepth();
var mc = this.attachMovie("DeathArcherSfx" + (1 + Math.floor(Math.random() * 4)), "sfx" + d, d);
Symbol 103 MovieClip [ArcherDown] Frame 108
var point = this.getPosInPlayfield(this.skin.arrowOrigin);
var d = this.playfield.getNextHighestDepth();
var mc = this.playfield.attachMovie("smallTxt", "txt" + d, d, {_x:point.x, _y:point.y});
if (bonusCoef != undefined) {
mc.txt = "+" + bonusCoef;
} else {
mc.txt = "+1";
}
Symbol 103 MovieClip [ArcherDown] Frame 300
destroyMe();
Symbol 114 MovieClip [TowerBalisteSK] Frame 1
this.playStand = function () {
for (var _local2 in this) {
this[_local2].gotoAndStop("stand");
}
};
this.playAttack = function () {
for (var _local2 in this) {
this[_local2].gotoAndPlay("attack");
}
};
this.playDie = function () {
for (var _local2 in this) {
this[_local2].gotoAndStop("die");
}
};
Symbol 115 MovieClip [TowerBaliste] Frame 1
this.rad2deg = 57.2957795130823;
this.trigger = false;
this.team = "Ennemy";
this.levelVersatile = true;
this.life = 16;
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
this.playfield = this.getPlayfield();
this.playfield.arenaEnnemy[this._name] = this;
this.getPosInPlayfield = function (mc) {
var _local1 = new org.cove.flade.util.Vector(0, 0);
mc.localToGlobal(_local1);
playfield.globalToLocal(_local1);
return(_local1);
};
this.touchedByMissile = function (damage) {
if (damage == undefined) {
return(undefined);
}
if (damage >= 4) {
this.life = 0;
} else {
this.life = this.life - damage;
}
if (life <= 0) {
gotoAndPlay ("die");
}
};
this.destroyMe = function () {
removeMovieClip(this);
var _local3 = _parent.getMovieClipAtDepth(0);
this.swapDepths(0);
removeMovieClip(this);
delete this.playfield.arenaEnnemy[this._name];
};
Symbol 115 MovieClip [TowerBaliste] Frame 2
this.skin.playStand();
this.onEnterFrame = function () {
var _local3 = this.playfield.getPlayer();
var _local4 = this.getPosInPlayfield(this);
var _local5 = new org.cove.flade.util.Vector(_local4.x - _local3.x, _local4.y - _local3.y);
if (_local5.length() < 400) {
trigger = true;
} else {
trigger = false;
}
if (!trigger) {
return(undefined);
}
var _local6 = _local5.getAngle() * rad2deg;
var _local2 = _local6 - skin._rotation;
if (_local2 < 0) {
_local2 = _local2 + 360;
}
if (_local2 < 180) {
skin._rotation = skin._rotation - 1;
} else {
skin._rotation = skin._rotation + 1;
}
play();
};
stop();
Symbol 115 MovieClip [TowerBaliste] Frame 152
skin.playAttack();
Symbol 115 MovieClip [TowerBaliste] Frame 163
var arrowOriginAbs = this.getPosInPlayfield(this.skin.arrowOrigin);
var evt = {name:"CREATE_ARROW", source:arrowOriginAbs, direction:this.skin._rotation, power:30};
this.playfield.postEvent(evt);
Symbol 115 MovieClip [TowerBaliste] Frame 170
gotoAndPlay ("stand");
Symbol 115 MovieClip [TowerBaliste] Frame 188
var point = this.getPosInPlayfield(this.skin);
var d = this.playfield.getNextHighestDepth();
var mc = this.playfield.attachMovie("smallTxt", "txt" + d, d, {_x:point.x, _y:point.y});
mc.txt = "+2";
this.onEnterFrame = function () {
};
this.playfield.score = this.playfield.score + 2;
delete this.playfield.arenaEnnemy[this._name];
skin.playDie();
Symbol 115 MovieClip [TowerBaliste] Frame 305
destroyMe();
Symbol 117 MovieClip [TowerCollisionBox] Frame 1
this.cacheAsBitmap = true;
Symbol 120 MovieClip Frame 1
stop();
Symbol 121 MovieClip [ConcretTower] Frame 1
this.team = "Ennemy";
this.levelVersatile = true;
this.hitTest = function (x, y) {
return(collisionSurface.hitTest(x, y));
};
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
this.playfield = this.getPlayfield();
this.playfield.arenaEnnemy[this._name] = this;
this.getPosInPlayfield = function (mc) {
var _local1 = new Vector(0, 0);
mc.localToGlobal(_local1);
playfield.globalToLocal(_local1);
return(_local1);
};
this.destroyMe = function () {
removeMovieClip(this);
var _local3 = _parent.getMovieClipAtDepth(0);
this.swapDepths(0);
removeMovieClip(this);
delete this.playfield.arenaEnnemy[this._name];
};
this.cacheAsBitmap = true;
Symbol 121 MovieClip [ConcretTower] Frame 2
stop();
Symbol 122 MovieClip [Level1] Frame 1
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
Symbol 122 MovieClip [Level1] Frame 68
Symbol 125 MovieClip [Arrow] Frame 1
this._velocity;
this._speed;
this._pwr;
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
this.playfield = this.getPlayfield();
this.playfield.arenaProjectileEnnemy[this._name] = this;
this._xscale = 50;
this._yscale = 50;
this.onEnterFrame = function () {
_x = (_x + (this._velocity.x * _speed));
_y = (_y + (this._velocity.y * _speed));
};
this.destroyProjectile = function () {
removeMovieClip(this);
delete this.playfield.arenaProjectileEnnemy[this._name];
};
Symbol 125 MovieClip [Arrow] Frame 120
this.destroyProjectile();
Symbol 128 MovieClip [ArrowArcher] Frame 1
this._velocity;
this._speed;
this._pwr;
this._xscale = 50;
this._yscale = 50;
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
this.playfield = this.getPlayfield();
this.playfield.arenaProjectileEnnemy[this._name] = this;
this.onEnterFrame = function () {
_x = (_x + (this._velocity.x * _speed));
_y = (_y + (this._velocity.y * _speed));
};
this.destroyProjectile = function () {
removeMovieClip(this);
delete this.playfield.arenaProjectileEnnemy[this._name];
};
Symbol 128 MovieClip [ArrowArcher] Frame 62
this.destroyProjectile();
Symbol 131 MovieClip [Axe] Frame 90
removeMovieClip(this);
Symbol 134 MovieClip [AxeMan] Frame 1
this.rad2deg = 57.2957795130823;
this.trigger = false;
this.speed = 2;
this.cycle = -1;
this.team = "Ennemy";
this.getPlayfield = function () {
return(_parent.getPlayfield());
};
this.playfield = this.getPlayfield();
this.playfield.arenaEnnemy[this._name] = this;
this.getPosInPlayfield = function (mc) {
var _local1 = new org.cove.flade.util.Vector(0, 0);
mc.localToGlobal(_local1);
playfield.globalToLocal(_local1);
return(_local1);
};
Symbol 134 MovieClip [AxeMan] Frame 2
this.trigger = true;
this.onEnterFrame = function () {
if (!trigger) {
return(undefined);
}
play();
};
stop();
Symbol 134 MovieClip [AxeMan] Frame 53
this.cycle = (this.cycle + 1) % 4;
onEnterFrame = function () {
if (this.cycle < 2) {
this.skin._y = this.skin._y + speed;
} else {
this.skin._y = this.skin._y - speed;
}
};
Symbol 134 MovieClip [AxeMan] Frame 62
var axeOriginAbs = this.getPosInPlayfield(this.skin.axeOrigin);
var evt = {name:"CREATE_THROWINGAXE", source:axeOriginAbs, orientation:this._rotation};
this.playfield.postEvent(evt);
gotoAndPlay ("stand");
Symbol 135 MovieClip [ThrowingArrowArcher] Frame 1
this.cacheAsBitmap = true;
Symbol 141 MovieClip [FireExplosion] Frame 1
this.cacheAsBitmap = true;
Symbol 141 MovieClip [FireExplosion] Frame 11
removeMovieClip(this);
Symbol 147 MovieClip [Blood] Frame 14
removeMovieClip(this);
Symbol 148 MovieClip [DragonBreathIn] Frame 1
if (_parent.SfxBusy) {
gotoAndStop ("fin");
}
Symbol 148 MovieClip [DragonBreathIn] Frame 2
_parent.SfxBusy = true;
_sfxBall = new Sound(this);
_sfxBall.attachSound("4506__NoiseCollector__dragon3.wav");
_sfxBall.start();
Symbol 148 MovieClip [DragonBreathIn] Frame 25
_parent.SfxBusy = false;
Symbol 148 MovieClip [DragonBreathIn] Frame 80
this.removeMovieClip();
Symbol 185 MovieClip [BigBlood] Frame 4
removeMovieClip(this);
Symbol 189 MovieClip [smallTxt] Frame 14
removeMovieClip(this);
Symbol 199 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 1
stop();
list.setMask(mask);
score = _global.finalscore;
trace("score: " + score);
if (_url.split(":")[0] == "file") {
loadUrl = "highScores.xml";
submitUrl = "saveScore.xml";
userName = "Alphonse";
gameId = "1";
} else {
submitUrl = _level0.scoreScriptUrl + "?query=add";
loadUrl = _level0.scoreScriptUrl + "?query=get";
userName = _level0.login;
gameId = _level0.game;
}
submit = function () {
erase();
if ((userName == null) || (userName.length == 0)) {
load();
} else {
var _local2 = new LoadVars();
_local2.game = gameId;
_local2.score = score;
var _local1 = new XML();
_local1.ignoreWhite = true;
_local1.onLoad = function () {
load();
};
_local2.sendAndLoad(submitUrl, _local1, "POST");
}
};
load = function () {
trace("loading ");
erase();
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.onLoad = function (ok) {
if (!ok) {
return(undefined);
}
trace("loaded ");
setRows(this.firstChild.childNodes);
};
var _local3 = new LoadVars();
_local3.game = gameId;
_local3.sendAndLoad(loadUrl, _local2, "POST");
};
erase = function () {
bUp._visible = (bDown._visible = (cUp._visible = (cDown._visible = false)));
list.row._visible = false;
var _local1 = 0;
while (list["row" + _local1] != null) {
list["row" + _local1].removeMovieClip();
_local1++;
}
list._y = 0;
};
setRows = function (nodes) {
listy = 0;
var _local1 = 0;
while (_local1 < nodes.length) {
var _local2 = list.row.duplicateMovieClip("row" + _local1, _local1);
_local2._y = (_local1 * 17) + 10;
if ((_local1 % 2) == 1) {
_local2.gotoAndStop(2);
}
_local2.pos = _local1 + 1;
_local2.name = nodes[_local1].attributes.player;
_local2.score = nodes[_local1].attributes.score;
_local2.selected._visible = false;
if (((userName != null) && (userName == nodes[_local1].attributes.player)) && (listy == 0)) {
listy = (-_local1) * 17;
_local2.selected._visible = true;
}
_local1++;
}
if (list._height > mask._height) {
list._y = listy;
bUp._visible = (bDown._visible = (cUp._visible = (cDown._visible = true)));
}
};
bUp.onPress = function () {
onEnterFrame = function () {
list._y = list._y + 5;
if (list._y > 0) {
list._y = 0;
}
};
};
bDown.onPress = function () {
onEnterFrame = function () {
list._y = list._y - 5;
};
};
bUp.onRelease = (bUp.onReleaseOutside = (bDown.onRelease = (bDown.onReleaseOutside = function () {
delete onEnterFrame;
})));
trace("_global.submitScore " + _global.submitScore);
if (_global.submitScore) {
_global.submitScore = false;
submit();
} else {
load();
}
Symbol 214 Button
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_global.submitScore = true;
_parent._parent.gotoAndPlay("highscores");
}
Symbol 215 MovieClip Frame 1
prevFrame();
Symbol 215 MovieClip Frame 12
stop();
Symbol 218 Button
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_parent._parent.gotoAndPlay("menu");
}
Symbol 219 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 12
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 1
stop();
Instance of Symbol 236 MovieClip in Symbol 237 MovieClip [screenHighscores] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 237 MovieClip [screenHighscores] Frame 19
stop();
Symbol 237 MovieClip [screenHighscores] Frame 29
openNextPart();
stop();
Symbol 245 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 31
stop();
_parent._parent.gotoAndPlay(2);
_parent.removeMovieClip();
Symbol 249 MovieClip [TMPdkvqcoyxyt] Frame 1
function smoothContent(mc, destMC, forceWidth, forceHeight) {
if ((mc._width > 2800) || (mc._height > 2800)) {
return(false);
}
var _local3 = mc._width;
if (!isNaN(forceWidth)) {
_local3 = forceWidth;
}
var _local2 = mc._height;
if (!isNaN(forceHeight)) {
_local2 = forceHeight;
}
if (destMC == undefined) {
destMC = mc;
}
var _local5 = new flash.display.BitmapData(_local3, _local2, true, 0);
_local5.draw(mc, new flash.geom.Matrix(), null, "normal", new flash.geom.Rectangle(0, 0, _local3, _local2), true);
destMC.attachBitmap(_local5, destMC.getNextHighestDepth(), "auto", true);
return(true);
}
_visible = false;
if (forceWidth == 0) {
forceWidth = null;
}
if (forceHeight == 0) {
forceHeight = null;
}
setTimeout(this, "smoothContent", delay, _parent, _parent, forceWidth, forceHeight);
Instance of Symbol 249 MovieClip [TMPdkvqcoyxyt] in Symbol 250 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
delay = 0;
forceHeight = 0;
forceWidth = 0;
}
Symbol 265 MovieClip Frame 1
barre._xscale = 0;
onEnterFrame = function () {
var _local4 = _root.getBytesTotal();
if (_local4 <= 0) {
return(undefined);
}
var _local3 = _root.getBytesLoaded();
if (_local3 <= 0) {
return(undefined);
}
barre._xscale = (100 * _local3) / _local4;
if (_local4 == _local3) {
delete onEnterFrame;
_parent.play();
}
};
Symbol 266 MovieClip Frame 45
stop();
Symbol 266 MovieClip Frame 142
stop();
_parent.bg.gotoAndPlay(2);
Symbol 270 MovieClip Frame 1
_y = 0;
_x = 0;
_parent.stop();
_visible = false;
onEnterFrame = function () {
if (Stage.width > 0) {
_visible = true;
bg._width = Stage.width;
bg._height = Stage.height;
logo._x = Stage.width / 2;
logo._y = Stage.height / 2;
bg.onRelease = function () {
getURL ("http://www.whosegame.com", "_blank");
};
link._x = Stage.width - 10;
link._y = Stage.height - 10;
delete onEnterFrame;
}
};
snd = new Sound(this);
snd.attachSound("JingleGameCompleted1.mp3");
snd.start(0, 1);
Symbol 372 MovieClip [__Packages.org.cove.flade.util.Vector] Frame 0
class org.cove.flade.util.Vector
{
var x, y;
function Vector (px, py) {
x = px;
y = py;
}
function setTo(px, py) {
x = px;
y = py;
}
function copy(v) {
x = v.x;
y = v.y;
}
function dot(v) {
return((x * v.x) + (y * v.y));
}
function cross(v) {
return((x * v.y) - (y * v.x));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
return(this);
}
function plusNew(v) {
return(new org.cove.flade.util.Vector(x + v.x, y + v.y));
}
function minus(v) {
x = x - v.x;
y = y - v.y;
return(this);
}
function minusNew(v) {
return(new org.cove.flade.util.Vector(x - v.x, y - v.y));
}
function mult(s) {
x = x * s;
y = y * s;
return(this);
}
function multNew(s) {
return(new org.cove.flade.util.Vector(x * s, y * s));
}
function distance(v) {
var _local3 = x - v.x;
var _local2 = y - v.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function normalize() {
var _local2 = Math.sqrt((x * x) + (y * y));
x = x / _local2;
y = y / _local2;
return(this);
}
function magnitude() {
return(Math.sqrt((x * x) + (y * y)));
}
function project(b) {
var _local5 = dot(b);
var _local4 = (b.x * b.x) + (b.y * b.y);
var _local3 = new org.cove.flade.util.Vector(0, 0);
_local3.x = (_local5 / _local4) * b.x;
_local3.y = (_local5 / _local4) * b.y;
return(_local3);
}
function length() {
return(Math.sqrt((x * x) + (y * y)));
}
function getAngle() {
var _local6 = new org.cove.flade.util.Vector(x, y);
_local6.normalize();
var _local3 = _local6.x;
var _local4 = _local6.y;
var _local5 = Math.acos(_local3);
var _local2 = 0;
if ((_local3 >= 0) && (_local4 >= 0)) {
_local2 = _local5 + Math.PI;
}
if ((_local3 < 0) && (_local4 >= 0)) {
_local2 = _local5 + Math.PI;
}
if ((_local3 < 0) && (_local4 < 0)) {
_local2 = Math.PI - _local5;
}
if ((_local3 >= 0) && (_local4 < 0)) {
_local2 = Math.PI - _local5;
}
if (_local2 < 0) {
_local2 = _local2 + (Math.PI*2);
}
return(_local2);
}
}
Symbol 283 Button
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_parent._parent.gotoAndPlay("credits");
}
Symbol 284 MovieClip Frame 1
prevFrame();
Symbol 284 MovieClip Frame 12
stop();
Symbol 287 Button
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_parent._parent.gotoAndStop("highscores");
}
Symbol 288 MovieClip Frame 1
prevFrame();
Symbol 288 MovieClip Frame 12
stop();
Symbol 291 Button
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_parent._parent.gotoAndPlay("Level1");
}
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 12
stop();
Instance of Symbol 284 MovieClip in Symbol 293 MovieClip [screenHome] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 288 MovieClip in Symbol 293 MovieClip [screenHome] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 293 MovieClip [screenHome] Frame 27
stop();
Symbol 293 MovieClip [screenHome] Frame 55
openNextPart();
stop();
Instance of Symbol 295 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 295 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 297 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 299 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 300 MovieClip Frame 53
stop();
Symbol 305 MovieClip Frame 1
this.onRollOver = function () {
gotoAndStop ("highlight");
};
this.onRollOut = function () {
gotoAndStop ("stand");
};
this.onRelease = function () {
getURL ("http://www.whosegame.com/contests.php?contestfilter=open", "_blank");
};
stop();
Symbol 305 MovieClip Frame 13
stop();
Symbol 306 Button
on (release) {
gotoAndPlay ("shoot");
}
on (press) {
gotoAndPlay ("power");
}
Symbol 327 MovieClip Frame 8
stop();
Symbol 327 MovieClip Frame 18
gotoAndPlay ("fly");
Symbol 327 MovieClip Frame 96
gotoAndPlay ("fly");
Instance of Symbol 344 MovieClip in Symbol 347 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (20);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (5);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (15);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (3);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (8);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (12);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (18);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (6);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (13);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (5);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (20);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (2);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (10);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (15);
}
Instance of Symbol 342 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (10);
}
Instance of Symbol 347 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (5);
}
Instance of Symbol 347 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (10);
}
Instance of Symbol 347 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (5);
}
Instance of Symbol 347 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (20);
}
Instance of Symbol 347 MovieClip in Symbol 348 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (25);
}
Instance of Symbol 354 MovieClip in Symbol 355 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (5);
}
Instance of Symbol 354 MovieClip in Symbol 355 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (5);
}
Symbol 356 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
var _local2 = _parent.gameField.lvl.player.life;
if (_local2) {
if (_local2 > 0) {
gotoAndStop(175 - Math.floor(_local2));
} else {
gotoAndStop ("bloom");
}
}
};
Symbol 356 MovieClip Frame 176
play();
Symbol 356 MovieClip Frame 246
stop();
Instance of Symbol 363 MovieClip "msg" in Symbol 364 MovieClip [screenGameCompleted] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 364 MovieClip [screenGameCompleted] Frame 20
stop();
Symbol 364 MovieClip [screenGameCompleted] Frame 33
stop();
Symbol 369 Button
on (rollOver) {
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_parent._parent.gotoAndPlay("menu");
}
Symbol 370 MovieClip Frame 1
stop();
Symbol 370 MovieClip Frame 12
stop();
Symbol 371 MovieClip [screenCredits] Frame 19
stop();
Symbol 371 MovieClip [screenCredits] Frame 40
openNextPart();
stop();