Frame 1
stop();
Frame 2
stop();
var engine;
var ang;
var angDefault;
var wheelA;
var wheelB;
var p1;
var keySpeed = 0;
var currBike;
var varEnergia = 200;
var xOffset = 1;
var yOffset = 5;
var distanceOffset = 0;
var lastDistanceOffset = 0;
var lastRotation = 0;
var lastmodificador = 0;
var achieved360 = false;
var currState = "CARRETEAR";
var GAME_SCORE = 0;
var SCORE_MANUBRIO = 100;
var SCORE_CUADRO = 400;
var SCORE_WHEELIE = 200;
var SCORE_SUPERMAN = 300;
var SCORE_360 = 600;
var GAME_LEVEL = 1;
var CUSTOMIZ_POINTS = 0;
var CUSTOMWEIGHT = 0;
var CUSTOMACCEL = 0;
var CUSTOMSPEED = 0;
var MAXTORQUE = 2.5;
var ACCELERATION = 0.1;
var Y_GRAVITY = 0.7;
var isDead = false;
var xRamp1 = 980;
var jumpLenght = 0;
var wheelieStartTime = undefined;
var supermanStartTime = undefined;
var endStageInterval = undefined;
var FLOOR_ZERO = 380;
var startAguja = -130;
symAguja._rotation = startAguja;
var maxTorque = 3;
var xCenterOfMass = 13;
var yCenterOfMass = -16;
var DRAW = false;
Frame 3
function restart() {
_root.onEnterFrame = undefined;
engine.restartEngine();
_root._x = 0;
_root._y = 0;
wheelA = undefined;
wheelB = undefined;
p1 = undefined;
keySpeed = 0;
}
function init() {
isDead = false;
engine = new org.cove.flade.DynamicsEngine();
engine.setDamping(1);
engine.setGravity(0, Y_GRAVITY);
engine.setSurfaceBounce(0.1);
engine.setSurfaceFriction(0.1);
loadObjectLevel(GAME_LEVEL);
var _local8 = new org.cove.flade.surfaces.LineSurface(25, FLOOR_ZERO, (xRamp1 + 270) + 6000, FLOOR_ZERO);
engine.addSurface(_local8);
engine.addSurface(new org.cove.flade.surfaces.LineSurface(xRamp1, FLOOR_ZERO, xRamp1 + 90, FLOOR_ZERO - 35));
engine.addSurface(new org.cove.flade.surfaces.LineSurface(xRamp1 + 90, FLOOR_ZERO - 35, xRamp1 + 180, FLOOR_ZERO - 85));
engine.addSurface(new org.cove.flade.surfaces.LineSurface(xRamp1 + 180, FLOOR_ZERO - 85, xRamp1 + 270, FLOOR_ZERO - 150));
engine.addSurface(new org.cove.flade.surfaces.LineSurface(xRamp1 + 270, FLOOR_ZERO, xRamp1 + 270, FLOOR_ZERO - 149));
finalRamp1.onContact = function () {
if (isDead == true) {
return(undefined);
}
checkRampDeath();
};
finalRamp2.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra pared de rampa");
checkRampDeath();
};
var _local1 = 65;
var _local3 = 132;
var _local4 = _local3 - _local1;
var _local9 = _local1 + (_local4 / 2);
var _local2 = FLOOR_ZERO - 20;
wheelA = new org.cove.flade.primitives.Wheel(_local1, _local2, 12, MAXTORQUE);
engine.addPrimitive(wheelA);
wheelB = new org.cove.flade.primitives.Wheel(_local3, _local2, 13, MAXTORQUE);
engine.addPrimitive(wheelB);
p1 = new org.cove.flade.primitives.RectangleParticle(_local9 + xCenterOfMass, _local2 + yCenterOfMass, 20, 10);
engine.addPrimitive(p1);
var _local7 = new org.cove.flade.constraints.SpringConstraint(wheelA, p1);
engine.addConstraint(_local7);
var _local6 = new org.cove.flade.constraints.SpringConstraint(wheelB, p1);
engine.addConstraint(_local6);
ang = new org.cove.flade.constraints.AngularConstraint(wheelA, p1, wheelB);
engine.addConstraint(ang);
angDefault = ang.targetTheta;
var _local5 = new org.cove.flade.constraints.SpringConstraint(wheelA, wheelB);
engine.addConstraint(_local5);
if (DRAW == true) {
engine.paintSurfaces();
}
currBike = fondoclip.moto;
fondoclip.moto._alpha = 100;
fondoclip.caida._alpha = 0;
fondoclip.caida2._alpha = 0;
fondoclip.caida_entre_medio._alpha = 0;
fondoclip.caidapersonaje._alpha = 0;
fondoclip.moto.personaje.gotoAndStop(5);
lastShift = 1;
xOffset = 1;
yOffset = 5;
currState = "CARRETEAR";
achieved360 = false;
lastmodificador = 0;
wheelieStartTime = undefined;
supermanStartTime = undefined;
symBarraEnergia.energia._xscale = (200 - varEnergia) / 2;
}
function angleBetween(x1, y1, x2, y2) {
var _local2 = x2 - x1;
var _local1 = y2 - y1;
return(Math.atan2(_local1, _local2));
}
function checkRampDeath() {
var _local1 = (xRamp1 + 270) + jumpLenght;
if ((wheelA.curr.x < _local1) && (wheelA.curr.y > 200)) {
killCharacter();
}
if (fondoclip.moto._rotation > 80) {
killCharacter();
p1.setPos(p1.curr.x + 10, p1.curr.y);
}
if ((wheelB.curr.x < _local1) && (wheelA.curr.x > _local1)) {
trace("call\u00F3 entre medio de la rampa cabeza abajo");
killCharacter();
}
if (fondoclip.moto._currentframe > 9) {
trace("call\u00F3 haciendo truquitos");
killCharacter();
}
}
function processInput() {
if (isDead == true) {
wheelA.rp.vs = 0;
wheelB.rp.vs = 0;
ang.modificador = 0;
return(undefined);
}
var _local2 = Number(p1.curr.x - p1.prev.x);
var _local3 = Number(p1.curr.y - p1.prev.y);
ang.modificador = 0;
if (Key.isDown(37)) {
if (_local2 > 10) {
if (currState == "VOLANDO") {
if (((Math.abs(fondoclip.moto._rotation) < 60) && (achieved360 == false)) && (fondoclip.moto._currentframe < 9)) {
if (lastmodificador == 0) {
lastmodificador = 0.005;
}
ang.modificador = lastmodificador * 1.3;
lastmodificador = ang.modificador;
} else {
ang.modificador = 0;
lastmodificador = 0;
}
} else {
ang.modificador = 0.03;
}
}
} else if (Key.isDown(39)) {
if ((_local2 > 10) && (_local3 > 7)) {
if (Number(p1.curr.x - wheelA.curr.x) > 34) {
ang.modificador = -0.03;
}
}
}
if (Key.isDown(38)) {
if ((s_playing == "starting") || (s_playing == "brake")) {
s_start_engine.stop();
s_brake.stop();
s_running1.start();
s_playing = "accel";
}
keySpeed = keySpeed + ACCELERATION;
wheelA.rp.vs = keySpeed;
wheelB.rp.vs = keySpeed;
if (currState == "VOLANDO") {
if ((Math.abs(fondoclip.moto._rotation) > 40) && (achieved360 == true)) {
ang.modificador = -5E-5 * Math.abs(fondoclip.moto._rotation);
}
}
} else if (Key.isDown(40)) {
if ((currState == "VOLANDO") && (Math.abs(fondoclip.moto._rotation) > 50)) {
return(undefined);
}
keySpeed = Math.max(0, keySpeed * 0.7);
wheelA.rp.vs = keySpeed;
wheelB.rp.vs = keySpeed;
if ((s_playing == "accel") && (((currState == "FRENAJE") || (currState == "ATERRIZANDO")) || (currState == "CARRETEAR"))) {
soundBrake();
}
} else {
if ((s_playing == "accel") && (((currState == "FRENAJE") || (currState == "ATERRIZANDO")) || (currState == "CARRETEAR"))) {
soundBrake();
}
keySpeed = Math.max(0, keySpeed - 0.3);
wheelA.rp.vs = keySpeed;
wheelB.rp.vs = keySpeed;
if (currState == "VOLANDO") {
if ((Math.abs(fondoclip.moto._rotation) > 40) && (achieved360 == true)) {
ang.modificador = -5E-5 * Math.abs(fondoclip.moto._rotation);
}
}
}
if (Math.abs(fondoclip.moto._rotation) > 50) {
return(undefined);
}
if (Key.isDown(68)) {
if ((currState == "VOLANDO") && (fondoclip.moto._currentframe < 9)) {
fondoclip.moto.gotoAndPlay("giro_manubrio");
GAME_SCORE = GAME_SCORE + SCORE_MANUBRIO;
CUSTOMIZ_POINTS = CUSTOMIZ_POINTS + SCORE_MANUBRIO;
_root.textbarrot3.gotoAndPlay(2);
}
}
if (Key.isDown(65)) {
if ((currState == "VOLANDO") && (fondoclip.moto._currentframe < 9)) {
fondoclip.moto.gotoAndPlay("giro_cuerpo");
GAME_SCORE = GAME_SCORE + SCORE_CUADRO;
CUSTOMIZ_POINTS = CUSTOMIZ_POINTS + SCORE_CUADRO;
_root.textbikerot3.gotoAndPlay(2);
}
}
if (Key.isDown(83)) {
if ((currState == "VOLANDO") && (fondoclip.moto._currentframe < 9)) {
fondoclip.moto.gotoAndPlay("superman_moto");
if (supermanStartTime == undefined) {
var _local4 = new Date();
supermanStartTime = _local4.getTime();
trace("start superman:" + supermanStartTime);
}
}
}
}
function run() {
processInput();
engine.timeStep();
if (DRAW == true) {
engine.paintPrimitives();
engine.paintConstraints();
}
}
function checkState() {
if (((currState == "CARRETEAR") && (p1.curr.x >= xRamp1)) && (p1.curr.x < (xRamp1 + 270))) {
currState = "SOBRERAMPA";
endWheelie();
}
if (((currState == "SOBRERAMPA") && (p1.curr.x >= (xRamp1 + 270))) && (p1.curr.x < ((xRamp1 + 270) + jumpLenght))) {
currState = "VOLANDO";
fondoclip.moto.gotoAndStop(1);
}
if (((currState == "VOLANDO") && (p1.curr.x >= ((xRamp1 + 270) + jumpLenght))) && (p1.curr.x < (((xRamp1 + 270) + jumpLenght) + 270))) {
currState = "ATERRIZANDO";
}
if (p1.curr.x > ((((xRamp1 + 270) + jumpLenght) + 270) + 100)) {
currState = "FRENAJE";
}
}
function soundEngineComplete() {
s_start_engine.start();
s_playing = "starting";
}
function soundBrake() {
s_running1.stop();
s_running2.stop();
s_running3.stop();
var _local1 = Number(p1.curr.x - p1.prev.x);
s_brake.start();
s_playing = "brake";
}
function soundLoopRunning() {
var _local1 = Number(p1.curr.x - p1.prev.x);
s_running1.stop();
s_running2.stop();
s_running3.stop();
if (_local1 > 30) {
trace("loop 3");
s_running3.start();
} else if (_local1 > 15) {
trace("loop 2");
s_running2.start();
} else {
trace("loop 1");
s_running1.start();
}
}
function getShift(speed) {
if (speed > 30) {
return(3);
}
if (speed > 15) {
return(2);
}
return(1);
}
function main(mc) {
s_start_engine = new Sound();
s_start_engine.attachSound("s_motor");
s_start_engine.onSoundComplete = mx.utils.Delegate.create(this, soundEngineComplete);
s_brake = new Sound();
s_brake.attachSound("s_brake");
s_running1 = new Sound();
s_running1.attachSound("s_running1");
s_running2 = new Sound();
s_running2.attachSound("s_running2");
s_running3 = new Sound();
s_running3.attachSound("s_running3");
s_accel.onSoundComplete = mx.utils.Delegate.create(this, soundAccelComplete);
s_running.onSoundComplete = mx.utils.Delegate.create(this, soundRunningComplete);
s_boo = new Sound();
s_boo.attachSound("s_boo");
s_hit = new Sound();
s_hit.attachSound("s_hit");
s_hail = new Sound();
s_hail.attachSound("s_hail");
init();
s_start_engine.start();
s_playing = "starting";
_root.onEnterFrame = function () {
run();
checkState();
fondoclip._x = (-p1.curr.x) + 285;
if (fondoclip._x < ((-fondoclip.symParedon._x) + 400)) {
fondoclip._x = (-fondoclip.symParedon._x) + 400;
}
fondoclip._y = (-p1.curr.y) + 100;
fondoclip._y = Math.max(fondoclip._y, 1);
fondoclip._y = Math.min(fondoclip._y, 208);
currBike._x = p1.curr.x - xOffset;
currBike._y = p1.curr.y - yOffset;
lastRotation = currBike._rotation;
var _local2 = 57.2957795130823 * angleBetween(wheelA.curr.x, wheelA.curr.y, wheelB.curr.x, wheelB.curr.y);
currBike._rotation = _local2;
if (Math.abs(currBike._rotation) < 1) {
updatePlayerLeaning();
}
var _local3 = Number(p1.curr.x - p1.prev.x);
var _local4 = Number(p1.curr.y - p1.prev.y);
symAguja._rotation = Math.max(startAguja, (_local3 * 5) + startAguja);
fondoclip.moto.rueda_trasera._rotation = fondoclip.moto.rueda_trasera._rotation + Math.max(_local3 * 2, 0);
if (fondoclip.moto.rueda_trasera._rotation > 360) {
fondoclip.moto.rueda_trasera._rotation = fondoclip.moto.rueda_trasera._rotation - 360;
}
fondoclip.moto.rueda_delantera._rotation = fondoclip.moto.rueda_delantera._rotation + Math.max(_local3 * 2, 0);
if (fondoclip.moto.rueda_delantera._rotation > 360) {
fondoclip.moto.rueda_delantera._rotation = fondoclip.moto.rueda_delantera._rotation - 360;
}
if (((((currBike == fondoclip.caida2) && (isDead == true)) && (Math.abs(_local2) > 150)) && (currBike._y < 332)) && (currBike._y > 250)) {
trace("\nestaba muerto con caida 2 y se dio vuelta otra vez as\u00ED cambio a caida1");
trace("rotation:" + Math.abs(_local2));
trace((((("klld> p1.curr.x < FLOOR_ZERO" + currBike) + " -- p1.curr.y") + p1.curr.y) + " ----- currBike._y") + currBike._y);
fondoclip.caida2._alpha = 0;
fondoclip.caida_entre_medio._alpha = 0;
fondoclip.caida.gotoAndPlay(8);
fondoclip.caida._alpha = 100;
currBike = fondoclip.caida;
}
if (((((currBike != fondoclip.caida2) && (isDead == true)) && (Math.abs(_local2) < 40)) && (currBike._y < 332)) && (currBike._y > 250)) {
trace("\nestaba muerto y se dio vuelta as\u00ED cambio a caida2");
trace("rotation:" + Math.abs(_local2));
trace((((("klld> p1.curr.x < FLOOR_ZERO" + currBike) + " -- p1.curr.y") + p1.curr.y) + " ----- currBike._y") + currBike._y);
fondoclip.caida._alpha = 0;
fondoclip.caida_entre_medio._alpha = 0;
fondoclip.caida2.gotoAndPlay(11);
fondoclip.caida2._alpha = 100;
currBike = fondoclip.caida2;
}
if ((s_playing == "accel") && (isDead == false)) {
var _local5 = lastShift;
lastShift = getShift(_local3);
if ((_local5 != lastShift) && (currState == "CARRETEAR")) {
trace("newshift:" + lastShift);
soundLoopRunning();
}
}
if (((((lastRotation < 160) && (currBike._rotation > 160)) && (currState == "VOLANDO")) && (p1.curr.y < (FLOOR_ZERO - 40))) && (isDead == false)) {
achieved360 = true;
GAME_SCORE = GAME_SCORE + SCORE_360;
CUSTOMIZ_POINTS = CUSTOMIZ_POINTS + SCORE_360;
_root.text3603.gotoAndPlay(2);
}
if ((isDead == false) && ((currState == "CARRETEAR") || (currState == "FRENAJE"))) {
if ((p1.curr.y > (FLOOR_ZERO - 23)) || (Math.abs(_local2) > 90)) {
trace("si se dio vuelta a baja altura");
trace("altura:" + p1.prev.y);
killCharacter();
} else if ((Math.abs(_local2) > 25) && (Math.abs(_local2) <= 90)) {
if (wheelieStartTime == undefined) {
var _local6 = new Date();
wheelieStartTime = _local6.getTime();
trace("start wheelie:" + wheelieStartTime);
}
} else {
endWheelie();
}
}
if ((p1.curr.y > (FLOOR_ZERO - 10)) && (currState == "VOLANDO")) {
killCharacter();
}
if (((((p1.curr.x > 200) && (_local3 < 2)) && (_local4 < 2)) && (endStageInterval == undefined)) && (currState == "FRENAJE")) {
trace("end end end");
endStageInterval = setInterval(endStage, 2500);
s_running1.stop();
s_running2.stop();
s_running3.stop();
s_hail.start();
fondoclip.moto.gotoAndPlay("victory");
_root.textvictory3.gotoAndPlay(2);
}
};
}
function endStage() {
clearInterval(endStageInterval);
endStageInterval = undefined;
restart();
trace((("isdead:" + isDead) + " -- varEnergia") + varEnergia);
s_running1.stop();
s_running2.stop();
s_running3.stop();
s_brake.stop();
s_hit.stop();
if (varEnergia < 0) {
gotoAndPlay ("sceneGameover");
} else {
if ((isDead == false) && (currState == "FRENAJE")) {
GAME_SCORE = GAME_SCORE + 1000;
CUSTOMIZ_POINTS = CUSTOMIZ_POINTS + 1000;
GAME_LEVEL++;
}
if (GAME_LEVEL == 9) {
GAME_SCORE = GAME_SCORE + 2500;
gotoAndPlay ("sceneCongrats");
} else if (CUSTOMIZ_POINTS >= 1000) {
gotoAndStop ("sceneTuning");
} else {
maincl.removeMovieClip();
createEmptyMovieClip("maincl", 2);
main(maincl);
}
}
}
function endSuperman() {
if ((supermanStartTime != undefined) && (isDead == false)) {
var _local4 = new Date();
var _local3 = _local4.getTime();
trace("end spuerman:" + _local3);
var _local2 = Math.floor((_local3 - supermanStartTime) / 1000);
trace("totalSmTime:" + _local2);
GAME_SCORE = GAME_SCORE + (_local2 * SCORE_SUPERMAN);
_root.textsuperman3.gotoAndPlay(2);
}
supermanStartTime = undefined;
}
function endWheelie() {
if ((wheelieStartTime != undefined) && (isDead == false)) {
var _local4 = new Date();
var _local3 = _local4.getTime();
trace("end willie:" + _local3);
var _local2 = Math.floor((_local3 - wheelieStartTime) / 1000);
trace("totalwheelieTime:" + _local2);
_root.textwheely3.gotoAndPlay(2);
GAME_SCORE = GAME_SCORE + (_local2 * SCORE_WHEELIE);
}
wheelieStartTime = undefined;
}
function killCharacter() {
if (isDead == true) {
return(undefined);
}
isDead = true;
wheelA.rp.vs = -wheelA.rp.vs;
wheelB.rp.vs = -wheelB.rp.vs;
fondoclip.moto._alpha = 0;
fondoclip.caidapersonaje._alpha = 100;
fondoclip.caidapersonaje._x = fondoclip.moto._x - 10;
fondoclip.caidapersonaje._y = FLOOR_ZERO - 80;
fondoclip.caidapersonaje.gotoAndPlay(6);
endWheelie();
endSuperman();
var _local2 = (xRamp1 + 270) + jumpLenght;
if ((wheelA.curr.x < _local2) && (wheelB.curr.x > _local2)) {
trace((((("caida entre medio:" + _local2) + " -- wheelA.curr.x:") + Math.floor(wheelA.curr.x)) + " -- wheelB.curr.x:") + Math.floor(wheelB.curr.x));
fondoclip.caida._alpha = 100;
fondoclip.caida.gotoAndPlay(1);
currBike = fondoclip.caida;
} else {
fondoclip.caida._alpha = 100;
fondoclip.caida.gotoAndPlay(1);
currBike = fondoclip.caida;
}
var _local4 = p1.curr.minusNew(p1.prev);
speed = Math.abs(_local4.magnitude());
trace("velocidad a la que choc\u00F3:" + speed);
var _local3;
if (speed < 15) {
_local3 = 15;
} else {
_local3 = 30;
}
varEnergia = varEnergia - _local3;
symBarraEnergia.energia._xscale = (200 - varEnergia) / 2;
s_running1.stop();
s_running2.stop();
s_running3.stop();
s_hit.start();
s_boo.start();
endStageInterval = setInterval(endStage, 3000);
_root.texttryagain3.gotoAndPlay(2);
}
function updatePlayerLeaning() {
if (currState == "VOLANDO") {
return(undefined);
}
var _local1 = Number(p1.curr.x - p1.prev.x);
_local1 = Math.abs(_local1);
var _local2 = Number(p1.curr.x - p1.prev.x) - lastDistanceOffset;
distanceOffset = Number(p1.curr.x - p1.prev.x);
if (Math.abs(Number(p1.curr.x - p1.prev.x) - lastDistanceOffset) > 0.9) {
distanceOffset = Number(p1.curr.x - p1.prev.x);
if (((distanceOffset < lastDistanceOffset) && (fondoclip.moto.personaje._currentframe < 8)) && (fondoclip.moto.personaje._currentframe > 2)) {
if (fondoclip.moto.personaje._currentframe > 3) {
fondoclip.moto.personaje.gotoAndStop(fondoclip.moto.personaje._currentframe - 1);
}
} else if (((distanceOffset > lastDistanceOffset) && (fondoclip.moto.personaje._currentframe > 2)) && (fondoclip.moto.personaje._currentframe < 8)) {
if (fondoclip.moto.personaje._currentframe < 7) {
fondoclip.moto.personaje.gotoAndStop(fondoclip.moto.personaje._currentframe + 1);
}
}
} else if (fondoclip.moto.personaje._currentframe <= 4) {
fondoclip.moto.personaje.gotoAndStop(fondoclip.moto.personaje._currentframe + 1);
} else if (fondoclip.moto.personaje._currentframe >= 6) {
fondoclip.moto.personaje.gotoAndStop(fondoclip.moto.personaje._currentframe - 1);
}
lastDistanceOffset = Number(p1.curr.x - p1.prev.x);
}
function loadObjectLevel(level) {
fondoclip.symFardos._visible = false;
fondoclip.symTacho1._visible = false;
fondoclip.symTacho2._visible = false;
fondoclip.symTacho3._visible = false;
fondoclip.symTacho4._visible = false;
fondoclip.symTacho5._visible = false;
fondoclip.symTacho6._visible = false;
fondoclip.symTacho7._visible = false;
fondoclip.symTacho8._visible = false;
fondoclip.symTacho9._visible = false;
fondoclip.symTacho10._visible = false;
fondoclip.symTacho11._visible = false;
fondoclip.symTacho12._visible = false;
fondoclip.symCamion._visible = false;
fondoclip.symCamion2._visible = false;
fondoclip.symCamion3._visible = false;
fondoclip.symCamion4._visible = false;
fondoclip.symCamion5._visible = false;
fondoclip.symCamion6._visible = false;
fondoclip.symCamion7._visible = false;
fondoclip.symCamion8._visible = false;
fondoclip.symCamioneta._visible = false;
fondoclip.symCamioneta2._visible = false;
fondoclip.symCamioneta3._visible = false;
fondoclip.symCamioneta4._visible = false;
fondoclip.symCamioneta5._visible = false;
fondoclip.symCamioneta6._visible = false;
fondoclip.symAvion._visible = false;
col1 = null;
switch (level) {
case 1 :
jumpLenght = 450;
fondoclip.symRampa._x = 1280;
xRamp1 = fondoclip.symRampa._x;
fondoclip.symRampa._y = FLOOR_ZERO;
fondoclip.symRampaFlip._x = (xRamp1 + 270) + jumpLenght;
fondoclip.symRampaFlip._y = FLOOR_ZERO;
fondoclip.symFardos._visible = true;
fondoclip.symFardos._x = xRamp1 + 400;
fondoclip.symFardos._y = FLOOR_ZERO;
var col1 = (new org.cove.flade.surfaces.RectangleTile((xRamp1 + 400) + 50, FLOOR_ZERO - 90, 90, 180));
engine.addSurface(col1);
var _local2 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 400) + 50) + 90, FLOOR_ZERO - 60, 90, 120);
engine.addSurface(_local2);
var _local1 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 400) + 50) + 180, FLOOR_ZERO - 30, 90, 60);
engine.addSurface(_local1);
col1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col1");
killCharacter();
};
_local2.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
_local1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
fondoclip.symParedon._x = (((xRamp1 + 270) + jumpLenght) + 1500) - 107;
fondoclip.symParedon._y = FLOOR_ZERO;
var _local3 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 270) + jumpLenght) + 1500, 300, 200, 100);
engine.addSurface(_local3);
_local3.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra fardos finales");
killCharacter();
};
symParedRampaBaja._x = fondoclip.symRampaFlip._x;
finalRamp1 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO - 170, fondoclip.symRampaFlip._x + 400, FLOOR_ZERO);
engine.addSurface(finalRamp1);
finalRamp2 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO, fondoclip.symRampaFlip._x, FLOOR_ZERO - 169);
engine.addSurface(finalRamp2);
break;
case 2 :
fondoclip.symRampa._x = 1480;
xRamp1 = fondoclip.symRampa._x;
fondoclip.symRampa._y = FLOOR_ZERO;
jumpLenght = 560;
fondoclip.symRampaFlip._x = (xRamp1 + 270) + jumpLenght;
fondoclip.symRampaFlip._y = FLOOR_ZERO;
fondoclip.symTacho1._x = fondoclip.symRampa._x + 380;
fondoclip.symTacho1._y = FLOOR_ZERO;
fondoclip.symTacho2._x = fondoclip.symTacho1._x + 180;
fondoclip.symTacho2._y = FLOOR_ZERO;
fondoclip.symTacho3._x = fondoclip.symTacho2._x + 180;
fondoclip.symTacho3._y = FLOOR_ZERO;
var col1 = (new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho1._x, FLOOR_ZERO - 30, 40, 60));
engine.addSurface(col1);
_local2 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho2._x, FLOOR_ZERO - 30, 40, 60);
engine.addSurface(_local2);
_local1 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho3._x, FLOOR_ZERO - 30, 40, 60);
engine.addSurface(_local1);
col1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col1");
killCharacter();
};
_local2.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
_local1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
fondoclip.symParedon._x = (((xRamp1 + 270) + jumpLenght) + 1500) - 107;
fondoclip.symParedon._y = FLOOR_ZERO;
_local3 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 270) + jumpLenght) + 1500, 300, 200, 100);
engine.addSurface(_local3);
_local3.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra fardos finales");
killCharacter();
};
fondoclip.symTacho1._visible = true;
fondoclip.symTacho2._visible = true;
fondoclip.symTacho3._visible = true;
symParedRampaBaja._x = fondoclip.symRampaFlip._x;
finalRamp1 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO - 170, fondoclip.symRampaFlip._x + 400, FLOOR_ZERO);
engine.addSurface(finalRamp1);
finalRamp2 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO, fondoclip.symRampaFlip._x, FLOOR_ZERO - 169);
engine.addSurface(finalRamp2);
break;
case 3 :
fondoclip.symRampa._x = 1680;
xRamp1 = fondoclip.symRampa._x;
fondoclip.symRampa._y = FLOOR_ZERO;
jumpLenght = 680;
fondoclip.symRampaFlip._x = (xRamp1 + 270) + jumpLenght;
fondoclip.symRampaFlip._y = FLOOR_ZERO;
fondoclip.symTacho1._x = fondoclip.symRampa._x + 305;
fondoclip.symTacho1.gotoAndPlay(2);
fondoclip.symTacho1._y = FLOOR_ZERO;
fondoclip.symTacho2._x = fondoclip.symTacho1._x + 61;
fondoclip.symTacho2.gotoAndPlay(3);
fondoclip.symTacho2._y = FLOOR_ZERO;
fondoclip.symTacho3._x = fondoclip.symTacho2._x + 61;
fondoclip.symTacho3._y = FLOOR_ZERO;
fondoclip.symTacho4._x = fondoclip.symTacho3._x + 61;
fondoclip.symTacho4._y = FLOOR_ZERO;
fondoclip.symTacho5._x = fondoclip.symTacho4._x + 61;
fondoclip.symTacho5._y = FLOOR_ZERO;
fondoclip.symTacho6._x = fondoclip.symTacho5._x + 61;
fondoclip.symTacho6._y = FLOOR_ZERO;
fondoclip.symTacho7._x = fondoclip.symTacho6._x + 61;
fondoclip.symTacho7._y = FLOOR_ZERO;
fondoclip.symTacho8._x = fondoclip.symTacho7._x + 61;
fondoclip.symTacho8._y = FLOOR_ZERO;
fondoclip.symTacho9._x = fondoclip.symTacho8._x + 61;
fondoclip.symTacho9._y = FLOOR_ZERO;
fondoclip.symTacho10._x = fondoclip.symTacho9._x + 61;
fondoclip.symTacho10._y = FLOOR_ZERO;
fondoclip.symTacho11._x = fondoclip.symTacho10._x + 61;
fondoclip.symTacho11._y = FLOOR_ZERO;
var col1 = (new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho6._x + 30, FLOOR_ZERO - 30, 730, 60));
engine.addSurface(col1);
col1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col1");
killCharacter();
};
fondoclip.symParedon._x = (((xRamp1 + 270) + jumpLenght) + 1500) - 107;
fondoclip.symParedon._y = FLOOR_ZERO;
_local3 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 270) + jumpLenght) + 1500, 300, 200, 100);
engine.addSurface(_local3);
_local3.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra fardos finales");
killCharacter();
};
fondoclip.symTacho1._visible = true;
fondoclip.symTacho2._visible = true;
fondoclip.symTacho3._visible = true;
fondoclip.symTacho4._visible = true;
fondoclip.symTacho5._visible = true;
fondoclip.symTacho6._visible = true;
fondoclip.symTacho7._visible = true;
fondoclip.symTacho8._visible = true;
fondoclip.symTacho9._visible = true;
fondoclip.symTacho10._visible = true;
fondoclip.symTacho11._visible = true;
symParedRampaBaja._x = fondoclip.symRampaFlip._x;
finalRamp1 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO - 170, fondoclip.symRampaFlip._x + 400, FLOOR_ZERO);
engine.addSurface(finalRamp1);
finalRamp2 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO, fondoclip.symRampaFlip._x, FLOOR_ZERO - 169);
engine.addSurface(finalRamp2);
break;
case 4 :
fondoclip.symRampa._x = 1880;
xRamp1 = fondoclip.symRampa._x;
fondoclip.symRampa._y = FLOOR_ZERO;
jumpLenght = 875;
fondoclip.symRampaFlip._x = (xRamp1 + 270) + jumpLenght;
fondoclip.symRampaFlip._y = FLOOR_ZERO;
fondoclip.symTacho1._visible = true;
fondoclip.symTacho2._visible = true;
fondoclip.symTacho3._visible = true;
fondoclip.symCamioneta._visible = true;
fondoclip.symCamioneta2._visible = true;
fondoclip.symTacho1._x = (fondoclip.symRampa._x + 300) + 100;
fondoclip.symTacho1._y = FLOOR_ZERO;
fondoclip.symCamioneta._x = fondoclip.symTacho1._x + 150;
fondoclip.symCamioneta._y = FLOOR_ZERO;
fondoclip.symTacho2._x = fondoclip.symCamioneta._x + 150;
fondoclip.symTacho2._y = FLOOR_ZERO;
fondoclip.symCamioneta2._x = fondoclip.symTacho2._x + 150;
fondoclip.symCamioneta2._y = FLOOR_ZERO;
fondoclip.symTacho3._x = fondoclip.symCamioneta2._x + 150;
fondoclip.symTacho3._y = FLOOR_ZERO;
var col1 = (new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho1._x, FLOOR_ZERO - 30, 40, 60));
engine.addSurface(col1);
_local2 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho2._x, FLOOR_ZERO - 30, 40, 60);
engine.addSurface(_local2);
_local1 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho3._x, FLOOR_ZERO - 30, 40, 60);
engine.addSurface(_local1);
var _local4 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamioneta._x, FLOOR_ZERO - 50, 100, 100);
engine.addSurface(_local4);
var _local6 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamioneta2._x, FLOOR_ZERO - 50, 100, 100);
engine.addSurface(_local6);
col1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col1");
killCharacter();
};
_local2.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
_local1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
fondoclip.symParedon._x = (((xRamp1 + 270) + jumpLenght) + 1500) - 107;
fondoclip.symParedon._y = FLOOR_ZERO;
_local3 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 270) + jumpLenght) + 1500, 300, 200, 100);
engine.addSurface(_local3);
_local3.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra fardos finales");
killCharacter();
};
symParedRampaBaja._x = fondoclip.symRampaFlip._x;
finalRamp1 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO - 170, fondoclip.symRampaFlip._x + 400, FLOOR_ZERO);
engine.addSurface(finalRamp1);
finalRamp2 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO, fondoclip.symRampaFlip._x, FLOOR_ZERO - 169);
engine.addSurface(finalRamp2);
break;
case 5 :
fondoclip.symRampa._x = 2080;
xRamp1 = fondoclip.symRampa._x;
fondoclip.symRampa._y = FLOOR_ZERO;
jumpLenght = 979;
fondoclip.symRampaFlip._x = (xRamp1 + 270) + jumpLenght;
fondoclip.symRampaFlip._y = FLOOR_ZERO;
fondoclip.symCamioneta._visible = true;
fondoclip.symCamioneta2._visible = true;
fondoclip.symCamioneta3._visible = true;
fondoclip.symCamioneta4._visible = true;
fondoclip.symCamioneta5._visible = true;
fondoclip.symCamioneta6._visible = true;
fondoclip.symCamioneta._x = (fondoclip.symRampa._x + 290) + 100;
fondoclip.symCamioneta._y = FLOOR_ZERO;
fondoclip.symCamioneta2._x = fondoclip.symCamioneta._x + 150;
fondoclip.symCamioneta2._y = FLOOR_ZERO;
fondoclip.symCamioneta3._x = fondoclip.symCamioneta2._x + 150;
fondoclip.symCamioneta3._y = FLOOR_ZERO;
fondoclip.symCamioneta4._x = fondoclip.symCamioneta3._x + 150;
fondoclip.symCamioneta4._y = FLOOR_ZERO;
fondoclip.symCamioneta5._x = fondoclip.symCamioneta4._x + 150;
fondoclip.symCamioneta5._y = FLOOR_ZERO;
fondoclip.symCamioneta6._x = fondoclip.symCamioneta5._x + 150;
fondoclip.symCamioneta6._y = FLOOR_ZERO;
var col1 = (new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamioneta._x, FLOOR_ZERO - 50, 100, 100));
engine.addSurface(col1);
_local2 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamioneta2._x, FLOOR_ZERO - 50, 100, 100);
engine.addSurface(_local2);
_local1 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamioneta3._x, FLOOR_ZERO - 50, 100, 100);
engine.addSurface(_local1);
_local4 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamioneta4._x, FLOOR_ZERO - 50, 100, 100);
engine.addSurface(_local4);
_local6 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamioneta5._x, FLOOR_ZERO - 50, 100, 100);
engine.addSurface(_local6);
var _local5 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamioneta6._x, FLOOR_ZERO - 50, 100, 100);
engine.addSurface(_local5);
col1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col1");
killCharacter();
};
_local2.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
_local1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
fondoclip.symParedon._x = (((xRamp1 + 270) + jumpLenght) + 1500) - 107;
fondoclip.symParedon._y = FLOOR_ZERO;
_local3 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 270) + jumpLenght) + 1500, 300, 200, 100);
engine.addSurface(_local3);
_local3.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra fardos finales");
killCharacter();
};
symParedRampaBaja._x = fondoclip.symRampaFlip._x;
finalRamp1 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO - 170, fondoclip.symRampaFlip._x + 400, FLOOR_ZERO);
engine.addSurface(finalRamp1);
finalRamp2 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO, fondoclip.symRampaFlip._x, FLOOR_ZERO - 169);
engine.addSurface(finalRamp2);
break;
case 6 :
fondoclip.symRampa._x = 2280;
xRamp1 = fondoclip.symRampa._x;
fondoclip.symRampa._y = FLOOR_ZERO;
jumpLenght = 1094;
fondoclip.symRampaFlip._x = (xRamp1 + 270) + jumpLenght;
fondoclip.symRampaFlip._y = FLOOR_ZERO;
fondoclip.symTacho1._visible = true;
fondoclip.symTacho2._visible = true;
fondoclip.symTacho3._visible = true;
fondoclip.symCamion._visible = true;
fondoclip.symCamion2._visible = true;
fondoclip.symTacho1._x = (fondoclip.symRampa._x + 450) + 100;
fondoclip.symTacho1._y = FLOOR_ZERO;
fondoclip.symCamion._x = fondoclip.symTacho1._x + 100;
fondoclip.symCamion._y = FLOOR_ZERO;
fondoclip.symTacho2._x = fondoclip.symCamion._x + 100;
fondoclip.symTacho2._y = FLOOR_ZERO;
fondoclip.symCamion2._x = fondoclip.symTacho2._x + 100;
fondoclip.symCamion2._y = FLOOR_ZERO;
fondoclip.symTacho3._x = fondoclip.symCamion2._x + 100;
fondoclip.symTacho3._y = FLOOR_ZERO;
var col1 = (new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho1._x, FLOOR_ZERO - 30, 40, 60));
engine.addSurface(col1);
_local2 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho2._x, FLOOR_ZERO - 30, 40, 60);
engine.addSurface(_local2);
_local1 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symTacho3._x, FLOOR_ZERO - 30, 40, 60);
engine.addSurface(_local1);
_local4 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamion._x, FLOOR_ZERO - 90, 120, 180);
engine.addSurface(_local4);
_local6 = new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamion2._x, FLOOR_ZERO - 90, 120, 180);
engine.addSurface(_local6);
col1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col1");
killCharacter();
};
_local2.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
_local1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col2");
killCharacter();
};
fondoclip.symParedon._x = (((xRamp1 + 270) + jumpLenght) + 1500) - 107;
fondoclip.symParedon._y = FLOOR_ZERO;
_local3 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 270) + jumpLenght) + 1500, 300, 200, 100);
engine.addSurface(_local3);
_local3.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra fardos finales");
killCharacter();
};
symParedRampaBaja._x = fondoclip.symRampaFlip._x;
finalRamp1 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO - 170, fondoclip.symRampaFlip._x + 400, FLOOR_ZERO);
engine.addSurface(finalRamp1);
finalRamp2 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO, fondoclip.symRampaFlip._x, FLOOR_ZERO - 169);
engine.addSurface(finalRamp2);
break;
case 7 :
fondoclip.symRampa._x = 2480;
xRamp1 = fondoclip.symRampa._x;
fondoclip.symRampa._y = FLOOR_ZERO;
jumpLenght = 1220;
fondoclip.symRampaFlip._x = (xRamp1 + 270) + jumpLenght;
fondoclip.symRampaFlip._y = FLOOR_ZERO;
fondoclip.symCamion._visible = true;
fondoclip.symCamion2._visible = true;
fondoclip.symCamion3._visible = true;
fondoclip.symCamion4._visible = true;
fondoclip.symCamion5._visible = true;
fondoclip.symCamion6._visible = true;
fondoclip.symCamion7._visible = true;
fondoclip.symCamion8._visible = true;
fondoclip.symCamion._x = (fondoclip.symRampa._x + 270) + 125;
fondoclip.symCamion._y = FLOOR_ZERO;
fondoclip.symCamion2._x = fondoclip.symCamion._x + 140;
fondoclip.symCamion2._y = FLOOR_ZERO;
fondoclip.symCamion3._x = fondoclip.symCamion2._x + 140;
fondoclip.symCamion3._y = FLOOR_ZERO;
fondoclip.symCamion4._x = fondoclip.symCamion3._x + 140;
fondoclip.symCamion4._y = FLOOR_ZERO;
fondoclip.symCamion5._x = fondoclip.symCamion4._x + 140;
fondoclip.symCamion5._y = FLOOR_ZERO;
fondoclip.symCamion6._x = fondoclip.symCamion5._x + 140;
fondoclip.symCamion6._y = FLOOR_ZERO;
fondoclip.symCamion7._x = fondoclip.symCamion6._x + 140;
fondoclip.symCamion7._y = FLOOR_ZERO;
fondoclip.symCamion8._x = fondoclip.symCamion7._x + 140;
fondoclip.symCamion8._y = FLOOR_ZERO;
var col1 = (new org.cove.flade.surfaces.RectangleTile(fondoclip.symCamion5._x - 65, FLOOR_ZERO - 90, 1080, 180));
engine.addSurface(col1);
col1.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra col1");
killCharacter();
};
fondoclip.symParedon._x = (((xRamp1 + 270) + jumpLenght) + 1500) - 107;
fondoclip.symParedon._y = FLOOR_ZERO;
_local3 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 270) + jumpLenght) + 1500, 300, 200, 100);
engine.addSurface(_local3);
_local3.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra fardos finales");
killCharacter();
};
symParedRampaBaja._x = fondoclip.symRampaFlip._x;
finalRamp1 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO - 170, fondoclip.symRampaFlip._x + 400, FLOOR_ZERO);
engine.addSurface(finalRamp1);
finalRamp2 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO, fondoclip.symRampaFlip._x, FLOOR_ZERO - 169);
engine.addSurface(finalRamp2);
break;
case 8 :
fondoclip.symRampa._x = 2730;
xRamp1 = fondoclip.symRampa._x;
fondoclip.symRampa._y = FLOOR_ZERO;
jumpLenght = 1360;
fondoclip.symRampaFlip._x = (xRamp1 + 270) + jumpLenght;
fondoclip.symRampaFlip._y = FLOOR_ZERO;
fondoclip.symAvion._x = fondoclip.symRampa._x + 955;
fondoclip.symAvion._y = FLOOR_ZERO;
fondoclip.symAvion._visible = true;
fondoclip.symParedon._x = (((xRamp1 + 270) + jumpLenght) + 1500) - 107;
fondoclip.symParedon._y = FLOOR_ZERO;
var col1 = (new org.cove.flade.surfaces.RectangleTile(fondoclip.symAvion._x, FLOOR_ZERO, 1335, 315));
engine.addSurface(col1);
_local3 = new org.cove.flade.surfaces.RectangleTile(((xRamp1 + 270) + jumpLenght) + 1500, 300, 200, 100);
engine.addSurface(_local3);
_local3.onContact = function () {
if (isDead == true) {
return(undefined);
}
trace("muere contra fardos finales");
killCharacter();
};
symParedRampaBaja._x = fondoclip.symRampaFlip._x;
finalRamp1 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO - 170, fondoclip.symRampaFlip._x + 400, FLOOR_ZERO);
engine.addSurface(finalRamp1);
finalRamp2 = new org.cove.flade.surfaces.LineSurface(fondoclip.symRampaFlip._x, FLOOR_ZERO, fondoclip.symRampaFlip._x, FLOOR_ZERO - 169);
engine.addSurface(finalRamp2);
}
}
stop();
var s_start_engine;
var s_accel;
var s_running1;
var s_running2;
var s_running3;
var s_brake;
var s_playing;
var lastShift;
maincl.removeMovieClip();
createEmptyMovieClip("maincl", 2);
main(maincl);
Frame 4
stop();
errorText.text = "";
Frame 5
stop();
trace("congrats2222s!!");
scoreText.text = "final score: " + GAME_SCORE;
Frame 6
stop();
trace("gameover2222s!!");
scoreText.text = "final score: " + GAME_SCORE;
Symbol 12 MovieClip [fps] Frame 1
function calcFPS() {
numFrames++;
var _local3 = getTimer();
var _local2 = (_local3 - startTime) / 1000;
var _local1 = Math.round(numFrames / _local2);
fpsField.text = _local1;
}
var startTime = getTimer();
var numFrames = 0;
this.onEnterFrame = calcFPS;
Symbol 201 MovieClip Frame 1
stop();
Symbol 201 MovieClip Frame 2
stop();
Symbol 201 MovieClip Frame 3
stop();
Symbol 201 MovieClip Frame 4
stop();
Symbol 201 MovieClip Frame 5
stop();
Symbol 201 MovieClip Frame 6
stop();
Symbol 201 MovieClip Frame 7
stop();
Symbol 201 MovieClip Frame 8
stop();
Symbol 201 MovieClip Frame 9
stop();
stop();
Symbol 201 MovieClip Frame 33
stop();
Symbol 201 MovieClip Frame 50
stop();
Symbol 201 MovieClip Frame 64
stop();
Symbol 201 MovieClip Frame 65
stop();
Symbol 201 MovieClip Frame 93
stop();
Symbol 201 MovieClip Frame 121
stop();
Symbol 201 MovieClip Frame 139
stop();
Symbol 268 MovieClip [symMotoGirando] Frame 9
gotoAndPlay (1);
Symbol 268 MovieClip [symMotoGirando] Frame 15
gotoAndPlay (1);
Symbol 268 MovieClip [symMotoGirando] Frame 20
stop();
Symbol 268 MovieClip [symMotoGirando] Frame 28
stop();
Symbol 268 MovieClip [symMotoGirando] Frame 49
stop();
gotoAndPlay ("anim_normal");
Symbol 268 MovieClip [symMotoGirando] Frame 89
stop();
gotoAndPlay ("anim_normal");
Symbol 268 MovieClip [symMotoGirando] Frame 103
if (Key.isDown(83)) {
gotoAndPlay ("superman_loop");
}
Symbol 268 MovieClip [symMotoGirando] Frame 120
stop();
_root.endSuperman();
gotoAndPlay ("anim_normal");
Symbol 268 MovieClip [symMotoGirando] Frame 128
stop();
Symbol 285 Button
on (release) {
gotoAndStop (2);
}
Symbol 291 Button
on (release) {
getURL ("http://download-dare-devil.freeonlinegames.com?daredevil", "_blank");
}
Symbol 297 Button
on (release) {
getURL ("http://www.freeonlinegames.com?daredevil", "_blank");
}
Symbol 303 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com?daredevil", "_blank");
}
Symbol 510 MovieClip [__Packages.org.cove.flade.primitives.Particle] Frame 0
class org.cove.flade.primitives.Particle
{
var init, curr, prev, temp, extents, bmin, bmax, mtd, isVisible, dmc;
function Particle (posX, posY) {
init = new org.cove.flade.util.Vector(posX, posY);
curr = new org.cove.flade.util.Vector(posX, posY);
prev = new org.cove.flade.util.Vector(posX, posY);
temp = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(0, 0);
bmin = 0;
bmax = 0;
mtd = new org.cove.flade.util.Vector(0, 0);
initializeContainer();
isVisible = true;
}
function initializeContainer() {
var _local3 = _root.getNextHighestDepth();
var _local4 = "_" + _local3;
dmc = _root.createEmptyMovieClip(_local4, _local3);
}
function setVisible(v) {
isVisible = v;
}
function verlet(sysObj) {
temp.x = curr.x;
temp.y = curr.y;
curr.x = curr.x + ((sysObj.coeffDamp * (curr.x - prev.x)) + sysObj.gravity.x);
curr.y = curr.y + ((sysObj.coeffDamp * (curr.y - prev.y)) + sysObj.gravity.y);
prev.x = temp.x;
prev.y = temp.y;
}
function pin() {
curr.x = init.x;
curr.y = init.y;
prev.x = init.x;
prev.y = init.y;
}
function setPos(px, py) {
curr.x = px;
curr.y = py;
prev.x = px;
prev.y = py;
}
function getCardXProjection() {
bmin = curr.x - extents.x;
bmax = curr.x + extents.x;
}
function getCardYProjection() {
bmin = curr.y - extents.y;
bmax = curr.y + extents.y;
}
function getAxisProjection(axis) {
var _local5 = new org.cove.flade.util.Vector(Math.abs(axis.x), Math.abs(axis.y));
var _local2 = curr.dot(axis);
var _local3 = extents.dot(_local5);
bmin = _local2 - _local3;
bmax = _local2 + _local3;
}
function setMTD(depthX, depthY, depthN, surfNormal) {
var _local4 = Math.abs(depthX);
var _local3 = Math.abs(depthY);
var _local2 = Math.abs(depthN);
if ((_local4 < _local3) && (_local4 < _local2)) {
mtd.setTo(depthX, 0);
} else if ((_local3 < _local4) && (_local3 < _local2)) {
mtd.setTo(0, depthY);
} else if ((_local2 < _local4) && (_local2 < _local3)) {
mtd = surfNormal.multNew(depthN);
}
}
function setXYMTD(depthX, depthY) {
var _local3 = Math.abs(depthX);
var _local2 = Math.abs(depthY);
if (_local3 < _local2) {
mtd.setTo(depthX, 0);
} else {
mtd.setTo(0, depthY);
}
}
function resolveCollision(normal, sysObj) {
var _local2 = curr.minusNew(prev);
var _local3 = normal.dot(_local2);
var _local8 = _local2.minusNew(normal.multNew(_local3));
var _local4 = _local8.multNew(sysObj.coeffFric);
var _local5 = normal.multNew(_local3 * sysObj.coeffRest);
var _local6 = _local5.plusNew(_local4);
var _local7 = _local2.minusNew(_local6);
curr.plus(mtd);
prev = curr.minusNew(_local7);
}
function paint() {
}
function checkCollision(surface, sysObj) {
}
}
Symbol 511 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);
}
}
Symbol 512 MovieClip [__Packages.org.cove.flade.DynamicsEngine] Frame 0
class org.cove.flade.DynamicsEngine
{
var primitives, surfaces, constraints, gravity, coeffRest, coeffFric, coeffDamp;
function DynamicsEngine () {
primitives = new Array();
surfaces = new Array();
constraints = new Array();
gravity = new org.cove.flade.util.Vector(0, 1);
coeffRest = 1.5;
coeffFric = 0.01;
coeffDamp = 0.99;
}
function restartEngine() {
primitives.splice(0);
surfaces.splice(0);
constraints.splice(0);
gravity = new org.cove.flade.util.Vector(0, 1);
coeffRest = 1.5;
coeffFric = 0.01;
coeffDamp = 0.99;
}
function addPrimitive(p) {
primitives.push(p);
}
function addSurface(s) {
surfaces.push(s);
}
function addConstraint(c) {
constraints.push(c);
}
function paintSurfaces() {
var _local2 = 0;
while (_local2 < surfaces.length) {
surfaces[_local2].paint();
_local2++;
}
}
function paintPrimitives() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].paint();
_local2++;
}
}
function paintConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].paint();
_local2++;
}
}
function timeStep() {
verlet();
satisfyConstraints();
checkCollisions();
}
function setSurfaceBounce(kfr) {
coeffRest = 1 + kfr;
}
function setSurfaceFriction(f) {
coeffFric = f;
}
function setDamping(d) {
coeffDamp = d;
}
function setGravity(gx, gy) {
gravity.x = gx;
gravity.y = gy;
}
function verlet() {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].verlet(this);
_local2++;
}
}
function satisfyConstraints() {
var _local2 = 0;
while (_local2 < constraints.length) {
constraints[_local2].resolve();
_local2++;
}
}
function checkCollisions() {
var _local4 = 0;
while (_local4 < surfaces.length) {
var _local3 = surfaces[_local4];
if (_local3.getActiveState()) {
var _local2 = 0;
while (_local2 < primitives.length) {
primitives[_local2].checkCollision(_local3, this);
_local2++;
}
}
_local4++;
}
}
}
Symbol 513 MovieClip [__Packages.org.cove.flade.surfaces.Surface] Frame 0
interface org.cove.flade.surfaces.Surface
{
}
Symbol 514 MovieClip [__Packages.org.cove.flade.primitives.CircleParticle] Frame 0
class org.cove.flade.primitives.CircleParticle extends org.cove.flade.primitives.Particle
{
var radius, contactRadius, extents, closestPoint, dmc, curr;
function CircleParticle (px, py, r) {
super(px, py);
radius = r;
contactRadius = r;
extents = new org.cove.flade.util.Vector(r, r);
closestPoint = new org.cove.flade.util.Vector(0, 0);
}
function paint() {
dmc.clear();
dmc.lineStyle(0, 6710886, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, curr.x, curr.y, radius);
}
function checkCollision(surface, sysObj) {
surface.resolveCircleCollision(this, sysObj);
}
}
Symbol 515 MovieClip [__Packages.org.cove.flade.graphics.Graphics] Frame 0
class org.cove.flade.graphics.Graphics
{
function Graphics () {
}
static function paintLine(dmc, x0, y0, x1, y1) {
dmc.moveTo(x0, y0);
dmc.lineTo(x1, y1);
}
static function paintCircle(dmc, x, y, r) {
var mtp8r = (0.414213562373095 * r);
var msp4r = (0.707106781186547 * r);
with (dmc) {
moveTo(x + r, y);
curveTo(r + x, mtp8r + y, msp4r + x, msp4r + y);
curveTo(mtp8r + x, r + y, x, r + y);
curveTo((-mtp8r) + x, r + y, (-msp4r) + x, msp4r + y);
curveTo((-r) + x, mtp8r + y, (-r) + x, y);
curveTo((-r) + x, (-mtp8r) + y, (-msp4r) + x, (-msp4r) + y);
curveTo((-mtp8r) + x, (-r) + y, x, (-r) + y);
curveTo(mtp8r + x, (-r) + y, msp4r + x, (-msp4r) + y);
curveTo(r + x, (-mtp8r) + y, r + x, y);
}
}
static function paintRectangle(dmc, x, y, w, h) {
var w2 = (w / 2);
var h2 = (h / 2);
with (dmc) {
moveTo(x - w2, y - h2);
lineTo(x + w2, y - h2);
lineTo(x + w2, y + h2);
lineTo(x - w2, y + h2);
lineTo(x - w2, y - h2);
}
}
}
Symbol 516 MovieClip [__Packages.org.cove.flade.constraints.Constraint] Frame 0
interface org.cove.flade.constraints.Constraint
{
}
Symbol 517 MovieClip [__Packages.org.cove.flade.primitives.RectangleParticle] Frame 0
class org.cove.flade.primitives.RectangleParticle extends org.cove.flade.primitives.Particle
{
var width, height, vertex, extents, isVisible, dmc, curr;
function RectangleParticle (px, py, w, h) {
super(px, py);
width = w;
height = h;
vertex = new org.cove.flade.util.Vector(0, 0);
extents = new org.cove.flade.util.Vector(w / 2, h / 2);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 6710886, 100);
org.cove.flade.graphics.Graphics.paintRectangle(dmc, curr.x, curr.y, width, height);
}
}
function checkCollision(surface, sysObj) {
surface.resolveRectangleCollision(this, sysObj);
}
}
Symbol 518 MovieClip [__Packages.org.cove.flade.constraints.AngularConstraint] Frame 0
class org.cove.flade.constraints.AngularConstraint implements org.cove.flade.constraints.Constraint
{
var pA, pB, pC, lineA, lineB, pD, lineC, targetTheta, stiffness, modificador;
function AngularConstraint (p1, p2, p3) {
pA = p1.curr;
pB = p2.curr;
pC = p3.curr;
lineA = new org.cove.flade.util.Line(pA, pB);
lineB = new org.cove.flade.util.Line(pB, pC);
pD = new org.cove.flade.util.Vector(pB.x + 0, pB.y - 1);
lineC = new org.cove.flade.util.Line(pB, pD);
targetTheta = calcTheta(pA, pB, pC);
stiffness = 1;
modificador = 0;
}
function resolve() {
var _local6 = getCentroid();
lineC.p2.x = lineC.p1.x + 0;
lineC.p2.y = lineC.p1.y - 1;
var _local10 = pA.distance(pB);
var _local9 = pB.distance(pC);
var _local12 = calcTheta(pA, pB, pC);
var _local13 = calcTheta(pA, pB, pD);
var _local11 = calcTheta(pC, pB, pD);
var _local7 = (targetTheta - _local12) / 2;
var _local5 = _local13 + (_local7 * stiffness);
var _local2 = _local11 - (_local7 * stiffness);
_local5 = _local5 + modificador;
_local2 = _local2 + modificador;
pA.x = (_local10 * Math.sin(_local5)) + pB.x;
pA.y = (_local10 * Math.cos(_local5)) + pB.y;
pC.x = (_local9 * Math.sin(_local2)) + pB.x;
pC.y = (_local9 * Math.cos(_local2)) + pB.y;
var _local8 = getCentroid();
var _local4 = _local8.x - _local6.x;
var _local3 = _local8.y - _local6.y;
pA.x = pA.x - _local4;
pA.y = pA.y - _local3;
pB.x = pB.x - _local4;
pB.y = pB.y - _local3;
pC.x = pC.x - _local4;
pC.y = pC.y - _local3;
}
function paint() {
}
function setStiffness(s) {
stiffness = s;
}
function calcTheta(pa, pb, pc) {
var _local2 = new org.cove.flade.util.Vector(pb.x - pa.x, pb.y - pa.y);
var _local3 = new org.cove.flade.util.Vector(pc.x - pb.x, pc.y - pb.y);
var _local4 = _local2.dot(_local3);
var _local5 = _local2.cross(_local3);
return(Math.atan2(_local5, _local4));
}
function getCentroid() {
var _local3 = ((pA.x + pB.x) + pC.x) / 3;
var _local2 = ((pA.y + pB.y) + pC.y) / 3;
return(new org.cove.flade.util.Vector(_local3, _local2));
}
}
Symbol 519 MovieClip [__Packages.org.cove.flade.util.Line] Frame 0
class org.cove.flade.util.Line
{
var p1, p2;
function Line (p1, p2) {
this.p1 = p1;
this.p2 = p2;
}
}
Symbol 520 MovieClip [__Packages.org.cove.flade.primitives.Wheel] Frame 0
class org.cove.flade.primitives.Wheel extends org.cove.flade.primitives.CircleParticle
{
var MaxTorque, rp, coeffSlip, isVisible, curr, dmc, radius, prev;
function Wheel (x, y, r, maxtorq) {
super(x, y, r);
MaxTorque = maxtorq;
rp = new org.cove.flade.primitives.RimParticle(r, MaxTorque);
coeffSlip = 0;
}
function verlet(sysObj) {
rp.verlet(sysObj);
super.verlet(sysObj);
}
function resolveCollision(normal, sysObj) {
super.resolveCollision(normal, sysObj);
resolve(normal);
}
function paint() {
if (isVisible) {
var _local3 = curr.x;
var _local2 = curr.y;
var _local5 = rp.curr.x;
var _local4 = rp.curr.y;
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintCircle(dmc, _local3, _local2, radius);
dmc.lineStyle(0, 10066329, 100);
org.cove.flade.graphics.Graphics.paintLine(dmc, _local5 + _local3, _local4 + _local2, _local3, _local2);
org.cove.flade.graphics.Graphics.paintLine(dmc, (-_local5) + _local3, (-_local4) + _local2, _local3, _local2);
org.cove.flade.graphics.Graphics.paintLine(dmc, (-_local4) + _local3, _local5 + _local2, _local3, _local2);
org.cove.flade.graphics.Graphics.paintLine(dmc, _local4 + _local3, (-_local5) + _local2, _local3, _local2);
}
}
function setTraction(t) {
coeffSlip = t;
}
function resolve(n) {
var _local3 = -rp.curr.y;
var _local2 = rp.curr.x;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / _local4;
_local2 = _local2 / _local4;
var _local13 = _local3 * rp.speed;
var _local11 = _local2 * rp.speed;
var _local12 = curr.x - prev.x;
var _local10 = curr.y - prev.y;
var _local9 = _local12 + _local13;
var _local8 = _local10 + _local11;
var _local6 = ((-n.y) * _local9) + (n.x * _local8);
rp.prev.x = rp.curr.x - (_local6 * _local3);
rp.prev.y = rp.curr.y - (_local6 * _local2);
var _local7 = 1 - coeffSlip;
curr.x = curr.x + ((_local7 * rp.speed) * (-n.y));
curr.y = curr.y + ((_local7 * rp.speed) * n.x);
rp.speed = rp.speed * coeffSlip;
}
}
Symbol 521 MovieClip [__Packages.org.cove.flade.primitives.RimParticle] Frame 0
class org.cove.flade.primitives.RimParticle
{
var curr, prev, vs, speed, maxTorque, wr;
function RimParticle (r, mt) {
curr = new org.cove.flade.util.Vector(r, 0);
prev = new org.cove.flade.util.Vector(0, 0);
vs = 0;
speed = 0;
maxTorque = mt;
wr = r;
}
function verlet(sysObj) {
speed = Math.max(-maxTorque, Math.min(maxTorque, speed + vs));
var _local3 = -curr.y;
var _local2 = curr.x;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / _local4;
_local2 = _local2 / _local4;
curr.x = curr.x + (speed * _local3);
curr.y = curr.y + (speed * _local2);
var _local10 = prev.x;
var _local9 = prev.y;
var _local8 = (prev.x = curr.x);
var _local7 = (prev.y = curr.y);
curr.x = curr.x + (sysObj.coeffDamp * (_local8 - _local10));
curr.y = curr.y + (sysObj.coeffDamp * (_local7 - _local9));
var _local6 = Math.sqrt((curr.x * curr.x) + (curr.y * curr.y));
var _local5 = (_local6 - wr) / _local6;
curr.x = curr.x - (curr.x * _local5);
curr.y = curr.y - (curr.y * _local5);
}
}
Symbol 522 MovieClip [__Packages.org.cove.flade.constraints.SpringConstraint] Frame 0
class org.cove.flade.constraints.SpringConstraint implements org.cove.flade.constraints.Constraint
{
var p1, p2, restLength, stiffness, color, isVisible, dmc;
function SpringConstraint (p1, p2) {
this.p1 = p1;
this.p2 = p2;
restLength = p1.curr.distance(p2.curr);
stiffness = 0.5;
color = 10053171 /* 0x996633 */;
initializeContainer();
isVisible = true;
}
function initializeContainer() {
var _local3 = _root.getNextHighestDepth();
var _local4 = "_" + _local3;
dmc = _root.createEmptyMovieClip(_local4, _local3);
}
function resolve() {
var _local5 = p1.curr.minusNew(p2.curr);
var _local3 = p1.curr.distance(p2.curr);
var _local4 = (_local3 - restLength) / _local3;
var _local2 = _local5.mult(_local4 * stiffness);
p1.curr.minus(_local2);
p2.curr.plus(_local2);
}
function setRestLength(r) {
restLength = r;
}
function setStiffness(s) {
stiffness = s;
}
function setVisible(v) {
isVisible = v;
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, color, 100);
org.cove.flade.graphics.Graphics.paintLine(dmc, p1.curr.x, p1.curr.y, p2.curr.x, p2.curr.y);
}
}
}
Symbol 523 MovieClip [__Packages.org.cove.flade.surfaces.AbstractTile] Frame 0
class org.cove.flade.surfaces.AbstractTile
{
var center, verts, normal, isVisible, isActivated, dmc, minX, maxX, minY, maxY;
function AbstractTile (cx, cy) {
center = new org.cove.flade.util.Vector(cx, cy);
verts = new Array();
normal = new org.cove.flade.util.Vector(0, 0);
isVisible = true;
isActivated = true;
initializeContainer();
}
function initializeContainer() {
var _local3 = _root.getNextHighestDepth();
var _local4 = "_" + _local3;
dmc = _root.createEmptyMovieClip(_local4, _local3);
}
function setVisible(v) {
isVisible = v;
}
function setActiveState(a) {
isActivated = a;
}
function getActiveState() {
return(isActivated);
}
function createBoundingRect(rw, rh) {
var _local2 = center.y - (rh / 2);
var _local3 = center.y + (rh / 2);
var _local5 = center.x - (rw / 2);
var _local4 = center.x + (rw / 2);
verts.push(new org.cove.flade.util.Vector(_local4, _local3));
verts.push(new org.cove.flade.util.Vector(_local4, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local2));
verts.push(new org.cove.flade.util.Vector(_local5, _local3));
setCardProjections();
}
function testIntervals(boxMin, boxMax, tileMin, tileMax) {
if (boxMax < tileMin) {
return(0);
}
if (tileMax < boxMin) {
return(0);
}
var _local2 = tileMax - boxMin;
var _local1 = tileMin - boxMax;
if (Math.abs(_local2) < Math.abs(_local1)) {
return(_local2);
}
return(_local1);
}
function setCardProjections() {
getCardXProjection();
getCardYProjection();
}
function getCardXProjection() {
minX = verts[0].x;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].x < minX) {
minX = verts[_local2].x;
}
_local2++;
}
maxX = verts[0].x;
_local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].x > maxX) {
maxX = verts[_local2].x;
}
_local2++;
}
}
function getCardYProjection() {
minY = verts[0].y;
var _local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].y < minY) {
minY = verts[_local2].y;
}
_local2++;
}
maxY = verts[0].y;
_local2 = 1;
while (_local2 < verts.length) {
if (verts[_local2].y > maxY) {
maxY = verts[_local2].y;
}
_local2++;
}
}
function onContact() {
}
}
Symbol 524 MovieClip [__Packages.org.cove.flade.surfaces.RectangleTile] Frame 0
class org.cove.flade.surfaces.RectangleTile extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var rectWidth, rectHeight, createBoundingRect, isVisible, dmc, center, onContact, normal, testIntervals, minX, maxX, minY, maxY;
function RectangleTile (cx, cy, rw, rh) {
super(cx, cy);
rectWidth = rw;
rectHeight = rh;
createBoundingRect(rw, rh);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintRectangle(dmc, center.x, center.y, rectWidth, rectHeight);
}
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact();
p.resolveCollision(normal, sysObj);
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact();
p.resolveCollision(normal, sysObj);
}
}
function isCircleColliding(p) {
p.getCardXProjection();
var _local6 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local6 == 0) {
return(false);
}
p.getCardYProjection();
var _local5 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local5 == 0) {
return(false);
}
var _local11 = Math.abs(_local6) < p.radius;
var _local12 = Math.abs(_local5) < p.radius;
if (_local11 && (_local12)) {
var _local10 = center.x + (sign(p.curr.x - center.x) * (rectWidth / 2));
var _local9 = center.y + (sign(p.curr.y - center.y) * (rectHeight / 2));
var _local4 = p.curr.x - _local10;
var _local3 = p.curr.y - _local9;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = p.radius - _local8;
if (_local7 > 0) {
_local4 = _local4 / _local8;
_local3 = _local3 / _local8;
p.mtd.setTo(_local4 * _local7, _local3 * _local7);
normal.setTo(_local4, _local3);
return(true);
}
return(false);
}
p.setXYMTD(_local6, _local5);
normal.setTo(p.mtd.x / Math.abs(_local6), p.mtd.y / Math.abs(_local5));
return(true);
}
function isRectangleColliding(p) {
p.getCardXProjection();
var _local4 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local4 == 0) {
return(false);
}
p.getCardYProjection();
var _local3 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local3 == 0) {
return(false);
}
p.setXYMTD(_local4, _local3);
normal.setTo(p.mtd.x / Math.abs(_local4), p.mtd.y / Math.abs(_local3));
return(true);
}
function sign(val) {
if (val < 0) {
return(-1);
}
if (val > 0) {
return(1);
}
}
}
Symbol 525 MovieClip [__Packages.org.cove.flade.surfaces.LineSurface] Frame 0
class org.cove.flade.surfaces.LineSurface extends org.cove.flade.surfaces.AbstractTile implements org.cove.flade.surfaces.Surface
{
var p1, p2, collNormal, isVisible, dmc, onContact, faceNormal, collisionDepth, testIntervals, minY, maxY, minX, maxX, sideNormal, minS, maxS, minF, maxF, rise, run, sign, slope, invB, setCardProjections, p3, p4, verts;
function LineSurface (p1x, p1y, p2x, p2y) {
super(0, 0);
p1 = new org.cove.flade.util.Vector(p1x, p1y);
p2 = new org.cove.flade.util.Vector(p2x, p2y);
calcFaceNormal();
collNormal = new org.cove.flade.util.Vector(0, 0);
setCollisionDepth(30);
}
function paint() {
if (isVisible) {
dmc.clear();
dmc.lineStyle(0, 2237064, 100);
org.cove.flade.graphics.Graphics.paintLine(dmc, p1.x, p1.y, p2.x, p2.y);
}
}
function resolveCircleCollision(p, sysObj) {
if (isCircleColliding(p)) {
onContact();
p.resolveCollision(faceNormal, sysObj);
}
}
function resolveRectangleCollision(p, sysObj) {
if (isRectangleColliding(p)) {
onContact();
p.resolveCollision(collNormal, sysObj);
}
}
function setCollisionDepth(d) {
collisionDepth = d;
precalculate();
}
function isCircleColliding(p) {
findClosestPoint(p.curr, p.closestPoint);
var _local3 = p.closestPoint.minusNew(p.curr);
_local3.normalize();
if (inequality(p.curr)) {
var _local5 = Math.abs(_local3.x);
_local3.x = ((faceNormal.x < 0) ? (_local5) : (-_local5));
_local3.y = Math.abs(_local3.y);
}
var _local4 = p.curr.plusNew(_local3.mult(p.radius));
if (segmentInequality(_local4)) {
if (_local4.distance(p.closestPoint) > collisionDepth) {
return(false);
}
var _local7 = _local4.x - p.closestPoint.x;
var _local6 = _local4.y - p.closestPoint.y;
p.mtd.setTo(-_local7, -_local6);
return(true);
}
return(false);
}
function isRectangleColliding(p) {
p.getCardYProjection();
var _local7 = testIntervals(p.bmin, p.bmax, minY, maxY);
if (_local7 == 0) {
return(false);
}
p.getCardXProjection();
var _local8 = testIntervals(p.bmin, p.bmax, minX, maxX);
if (_local8 == 0) {
return(false);
}
p.getAxisProjection(sideNormal);
var _local10 = testIntervals(p.bmin, p.bmax, minS, maxS);
if (_local10 == 0) {
return(false);
}
p.getAxisProjection(faceNormal);
var _local9 = testIntervals(p.bmin, p.bmax, minF, maxF);
if (_local9 == 0) {
return(false);
}
var _local4 = Math.abs(_local8);
var _local3 = Math.abs(_local7);
var _local6 = Math.abs(_local10);
var _local5 = Math.abs(_local9);
if (((_local4 <= _local3) && (_local4 <= _local6)) && (_local4 <= _local5)) {
p.mtd.setTo(_local8, 0);
collNormal.setTo(p.mtd.x / _local4, 0);
} else if (((_local3 <= _local4) && (_local3 <= _local6)) && (_local3 <= _local5)) {
p.mtd.setTo(0, _local7);
collNormal.setTo(0, p.mtd.y / _local3);
} else if (((_local5 <= _local4) && (_local5 <= _local3)) && (_local5 <= _local6)) {
p.mtd = faceNormal.multNew(_local9);
collNormal.copy(faceNormal);
} else if (((_local6 <= _local4) && (_local6 <= _local3)) && (_local6 <= _local5)) {
p.mtd = sideNormal.multNew(_local10);
collNormal.copy(sideNormal);
}
return(true);
}
function precalculate() {
rise = p2.y - p1.y;
run = p2.x - p1.x;
sign = ((run >= 0) ? 1 : -1);
slope = rise / run;
invB = 1 / ((run * run) + (rise * rise));
createRectangle();
calcSideNormal();
setCardProjections();
setAxisProjections();
}
function calcFaceNormal() {
faceNormal = new org.cove.flade.util.Vector(0, 0);
var _local3 = p2.x - p1.x;
var _local2 = p2.y - p1.y;
faceNormal.setTo(_local2, -_local3);
faceNormal.normalize();
}
function segmentInequality(toPoint) {
var _local2 = findU(toPoint);
var _local3 = inequality(toPoint);
return(((_local2 >= 0) && (_local2 <= 1)) && (_local3));
}
function inequality(toPoint) {
var _local2 = ((slope * (toPoint.x - p1.x)) + (p1.y - toPoint.y)) * sign;
return(_local2 <= 0);
}
function findClosestPoint(toPoint, returnVect) {
var _local2 = findU(toPoint);
if (_local2 <= 0) {
returnVect.copy(p1);
return(undefined);
}
if (_local2 >= 1) {
returnVect.copy(p2);
return(undefined);
}
var _local5 = p1.x + (_local2 * (p2.x - p1.x));
var _local4 = p1.y + (_local2 * (p2.y - p1.y));
returnVect.setTo(_local5, _local4);
}
function findU(p) {
var _local2 = ((p.x - p1.x) * run) + ((p.y - p1.y) * rise);
return(_local2 * invB);
}
function createRectangle() {
var _local5 = p2.x + ((-faceNormal.x) * collisionDepth);
var _local3 = p2.y + ((-faceNormal.y) * collisionDepth);
var _local4 = p1.x + ((-faceNormal.x) * collisionDepth);
var _local2 = p1.y + ((-faceNormal.y) * collisionDepth);
p3 = new org.cove.flade.util.Vector(_local5, _local3);
p4 = new org.cove.flade.util.Vector(_local4, _local2);
verts.push(p1);
verts.push(p2);
verts.push(p3);
verts.push(p4);
}
function setAxisProjections() {
var _local2;
minF = p2.dot(faceNormal);
maxF = p3.dot(faceNormal);
if (minF > maxF) {
_local2 = minF;
minF = maxF;
maxF = _local2;
}
minS = p1.dot(sideNormal);
maxS = p2.dot(sideNormal);
if (minS > maxS) {
_local2 = minS;
minS = maxS;
maxS = _local2;
}
}
function calcSideNormal() {
sideNormal = new org.cove.flade.util.Vector(0, 0);
var _local3 = p3.x - p2.x;
var _local2 = p3.y - p2.y;
sideNormal.setTo(_local2, -_local3);
sideNormal.normalize();
}
}
Symbol 526 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 309 Button
on (release) {
gotoAndStop (3);
}
Symbol 353 MovieClip Frame 32
stop();
Symbol 354 MovieClip Frame 32
stop();
Symbol 355 MovieClip Frame 32
stop();
Symbol 375 MovieClip Frame 17
stop();
Symbol 380 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 52
gotoAndStop (1);
Symbol 384 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 30
gotoAndStop (1);
Symbol 387 MovieClip Frame 1
stop();
Symbol 387 MovieClip Frame 31
gotoAndStop (1);
Symbol 391 MovieClip Frame 1
stop();
Symbol 391 MovieClip Frame 31
gotoAndStop (1);
Symbol 394 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 31
gotoAndStop (1);
Symbol 397 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 31
gotoAndStop (1);
Symbol 400 MovieClip Frame 1
stop();
Symbol 400 MovieClip Frame 45
gotoAndStop (1);
Symbol 423 Button
on (release) {
play();
}
Symbol 434 Button
on (release) {
getURL ("http://download-dare-devil.freeonlinegames.com?daredevil", "_blank");
}
Symbol 437 Button
on (release) {
getURL ("http://www.freeonlinegames.com?daredevil", "_blank");
}
Symbol 440 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com?daredevil", "_blank");
}
Symbol 443 Button
on (release, keyPress "z") {
gotoAndStop (2);
}
Symbol 445 Button
on (release, keyPress "z") {
gotoAndStop (1);
}
Symbol 446 MovieClip Frame 1
stop();
playAllSounds();
Symbol 450 Button
on (release) {
play();
}
Symbol 453 Button
on (release) {
play();
}
Symbol 455 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 13
stop();
Symbol 471 Button
on (release) {
trace("release!!");
_root.gotoAndStop("sceneGame");
}
Symbol 476 Button
on (release) {
if (CUSTOMIZ_POINTS >= 1000) {
if (CUSTOMWEIGHT < 5) {
CUSTOMIZ_POINTS = CUSTOMIZ_POINTS - 1000;
CUSTOMWEIGHT = CUSTOMWEIGHT + 1;
Y_GRAVITY = Y_GRAVITY - 0.05;
} else {
errorText.text = "you can't remove more weight!";
}
} else {
errorText.text = "you don't have not enough points \n You need at least 1000 points.";
}
}
Symbol 481 Button
on (release) {
if (CUSTOMIZ_POINTS >= 1000) {
if (CUSTOMACCEL < 7) {
CUSTOMIZ_POINTS = CUSTOMIZ_POINTS - 1000;
CUSTOMACCEL = CUSTOMACCEL + 1;
ACCELERATION = ACCELERATION + 0.05;
} else {
errorText.text = "you can't muy more Accl. +7 is the maximum!";
}
} else {
errorText.text = "you don't have not enough points \n You need at least 1000 points.";
}
}
Symbol 482 Button
on (release) {
if (CUSTOMIZ_POINTS >= 1000) {
if (CUSTOMSPEED < 7) {
CUSTOMIZ_POINTS = CUSTOMIZ_POINTS - 1000;
CUSTOMSPEED = CUSTOMSPEED + 1;
MAXTORQUE = MAXTORQUE + 0.2;
} else {
errorText.text = "you can't muy more Accl. +7 is the maximum!";
}
} else {
errorText.text = "you don't have not enough points \n You need at least 1000 points.";
}
}
Symbol 488 Button
on (release) {
gotoAndStop (1);
}
Symbol 494 Button
on (release) {
gotoAndStop (1);
}
Symbol 500 Button
on (release) {
gotoAndStop (1);
}