Frame 1
_root.scriptPath = "http://www.flashgames247.com/scores/skateboy";
_root.gameId = 18;
Frame 7
prevFrame();
Instance of Symbol 19 MovieClip in Frame 8
onClipEvent (enterFrame) {
this.gotoAndStop(int((100 * _root.getBytesLoaded()) / _root.getBytesTotal()));
}
Frame 15
function setLevel(thisLevel, select) {
switch (thisLevel) {
case 1 :
level = new Array(4, 1, 1, 1, 1, 1, 6, 7, 1, 1, 1, 5, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 6, 7, 1, 6, 7, 1, 1, 1, 2, 1, 5, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 4);
return;
case 2 :
level = new Array(4, 1, 1, 1, 1, 1, 6, 7, 1, 1, 1, 5, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 6, 7, 1, 6, 7, 1, 1, 1, 2, 1, 5, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 4);
return;
case 3 :
level = new Array(1, 1, 1, 6, 7, 1, 1, 9, 8, 9, 8, 1, 1, 1, 9, 1, 5, 1, 8, 1, 1, 1, 1, 9, 2, 8, 8, 8, 9, 9, 9, 3, 8, 1, 1, 1, 2, 8, 8, 5, 9, 9, 3, 1, 1, 8, 9, 1, 8, 9, 1, 1, 5, 3, 8, 8, 1, 9, 2, 8, 8, 5, 9, 1, 8, 8, 8, 1, 1, 1, 5, 1, 1, 1, 1, 1, 6, 7);
return;
case 4 :
level = new Array(1, 1, 6, 7, 1, 1, 1, 5, 1, 1, 1, 1, 1, 8, 8, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 4, 3, 1, 1, 1, 1, 2, 1, 7, 1, 1, 6, 8, 8, 8, 1, 1, 1, 1, 1, 2, 8, 8, 7, 8, 8, 8, 8, 1, 1, 1, 2, 5, 1, 5, 3, 1, 1, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 7);
}
}
stop();
message = "";
RTRICK = 10;
STRICK = 100;
CONVERSION = 0.017453;
MAX_SPEED = 50;
levelNumber = 1;
function slowDown(_when) {
var _local1 = (landRotation != 0) && ((state != "crash") || ((tileNum != 8) && (tileNum != 9)));
if (((((frameCounter % 2) == 0) && (state != "air")) && (overSomething == false)) && (_local1)) {
if ((landRotation < 0) && (Math.abs(speed) < speedLimit)) {
speed--;
return(undefined);
}
if ((0 < landRotation) && (speed < speedLimit)) {
speed++;
return(undefined);
}
}
if (((frameCounter % _when) == 0) && (!_local1)) {
if (0 < speed) {
speed--;
} else if (speed < 0) {
speed++;
}
}
return(undefined);
}
function speedUp(_amt) {
var _local1 = _amt;
if (((((Math.abs(speed) < 20) && ((frameCounter % 4) == 0)) || ((Math.abs(speed) >= 20) && ((frameCounter % 2) == 0))) || ((0 < speed) && (_local1 < 0))) || ((speed < 0) && (0 < _local1))) {
if ((landRotation != 0) && (speed == 0)) {
speed = speed + (landRotation / Math.abs(landRotation));
} else if ((!(((_local1 < 0) && (0 < landRotation)) || ((0 < _local1) && (landRotation < 0)))) || (overSomething)) {
if (((speed + _local1) >= (-1 * speedLimit)) && (speedLimit >= (speed + _local1))) {
speed = speed + _local1;
}
}
}
}
function putInAir(_air) {
if (state == "crash") {
biker.gotoAndStop("flail");
biker.player.gotoAndPlay(1);
} else if (biker._currentframe != 20) {
biker.gotoAndStop("fast");
}
air = _air;
state = "air";
if (0 < _air) {
landSound.start();
}
spinFactor = (Math.floor(Math.abs(speed) / 10) + 1) * 5;
if (15 < spinFactor) {
spinFactor = 15;
}
}
function handleAir() {
land = getLand();
if (((overSomething == true) && (state != "air")) && (biker._y < land)) {
putInAir(0);
overSomething = false;
}
if (state == "air") {
air = air - 1;
if (0 >= air) {
halfPipeLaunch = false;
}
if ((land < ((biker._y - moveY) - air)) && (halfPipeLaunch == false)) {
if (biker._currentframe >= 300) {
state = "crash";
if (Math.abs(biker._rotation - landRotation) >= 90) {
goCrash(3, false, 0);
} else if (biker._currentframe == 300) {
if (landRotation != 0) {
biker.gotoAndStop("crash2");
} else {
biker.gotoAndStop("crash1");
}
affectLife(-2);
} else if (biker._currentframe == 330) {
biker.player.gotoAndPlay("crash");
affectLife(-2);
}
} else {
state = "ground";
if (Math.abs(biker._rotation - landRotation) >= 90) {
goCrash(3, false, 0);
} else if ((30 < Math.abs(biker._rotation - landRotation)) || ((biker._currentframe != 15) && (biker._currentframe != 20))) {
goCrash(2, false, 0);
}
if (state == "ground") {
landSound.start();
var _local1 = Math.round(Math.abs(rotation) / 180);
if (0 < _local1) {
addTrick(multiple(_local1 / 2) add "Flip", _local1 * 100);
}
if ((biker._currentframe != 20) && ((((0 < speed) && (0 < biker._xscale)) || ((speed < 0) && (biker._xscale < 0))) || ((speed == 0) && (landRotation == 0)))) {
newMessage(message);
}
}
}
if (landRotation != 0) {
speed = speed + Math.round(air * (landRotation / -90));
if ((tileNum == 6) || (tileNum == 7)) {
halfPipeAmt = Math.round((landRotation * CONVERSION) * -70);
}
}
rotation = (air = (spinFactor = 0));
halfPipeLaunch = false;
bankHop = (hop = "");
} else {
moveY = moveY + air;
}
}
if (state != "air") {
biker._rotation = landRotation;
moveY = biker._y - land;
}
}
function getLand() {
var _land = (eval ("tile" add tile)._y - 30);
landRotation = 0;
onBuilding = false;
if (tileNum == 8) {
_land = _land + (tileOffset * 0.2);
landRotation = 10;
} else if (tileNum == 9) {
_land = _land - (tileOffset * 0.2);
landRotation = -10;
} else if ((tileNum == 13) && (75 < tileOffset)) {
_land = _land - ((200 - tileOffset) * 0.2);
landRotation = 10;
} else if ((tileNum == 14) && (tileOffset < 120)) {
_land = _land - (tileOffset * 0.2);
landRotation = -10;
}
clouds._y = _land - 200;
if (state == "air") {
overSomething = false;
}
var _buildLand = Math.round((eval ("tile" add tile)._y + eval ("tile" add tile).building._y) - 30);
var _busyCheck = (((((biker._currentframe == 15) || (biker._currentframe == 20)) || (biker._currentframe >= 300)) || (state != "air")) && (30 >= Math.abs(biker._rotation)));
if (((_busyCheck && (30 >= Math.abs(biker._rotation))) && (_buildLand >= biker._y)) && (eval ("tile" add tile).building._currentframe != 1)) {
_land = _buildLand;
overSomething = (onBuilding = true);
landRotation = 0;
} else if ((((tileNum == 6) || (tileNum == 7)) && (tileOffset >= 15)) && (185 >= tileOffset)) {
_land = _land - getHalfPipeLand();
} else if ((((tileNum == 6) && (185 < tileOffset)) && (level[eval ("tile" add tile).number + 1] == 7)) || (((tileNum == 7) && (tileOffset < 15)) && (level[eval ("tile" add tile).number - 1] == 6))) {
overSomething = true;
_land = _land - 100;
} else if (((tileNum == 4) && (tileOffset >= 50)) && (150 >= tileOffset)) {
_land = _land - 70;
overSomething = true;
} else if (((tileNum == 5) && (tileOffset >= 65)) && (135 >= tileOffset)) {
_land = _land - 40;
overSomething = true;
} else if ((tileNum == 3) && (75 < tileOffset)) {
_land = _land - ((200 - tileOffset) * 0.2);
landRotation = 10;
} else if ((tileNum == 2) && (tileOffset < 120)) {
_land = _land - (tileOffset * 0.2);
landRotation = -10;
}
return(_land);
}
function getHalfPipeLand() {
var _local1 = tileOffset - 40;
if (tileNum == 6) {
if (70 < _local1) {
overSomething = true;
if (halfPipeLaunch == true) {
return(70);
}
return(100);
}
if (0 >= _local1) {
return(0);
}
landRotation = Math.round((-1 * Math.asin(_local1 / 70)) / CONVERSION);
return(70 - Math.round(Math.sqrt(4900 - Math.pow(_local1, 2))));
}
if (tileNum == 7) {
if (_local1 < 50) {
overSomething = true;
if (halfPipeLaunch == true) {
return(70);
}
return(100);
}
if (_local1 >= 120) {
return(0);
}
_local1 = 120 - _local1;
landRotation = Math.round(Math.asin(_local1 / 70) / CONVERSION);
if (_local1 == 0) {
return(0);
}
return(70 - Math.round(Math.sqrt(4900 - Math.pow(_local1, 2))));
}
return(undefined);
}
function getMoveX() {
var enterFlag = false;
var futureTileNum = 0;
if ((state != "air") && (overSomething == false)) {
moveX = speed;
if (thruPoint(40, 1) && (tileNum == 6)) {
halfPipeAmt = (tileOffset - 40) + speed;
enterFlag = true;
} else if (thruPoint(160, -1) && (tileNum == 7)) {
halfPipeAmt = (tileOffset - 160) + speed;
enterFlag = true;
} else if ((level[eval ("tile" add tileLoop(1, tile)).number] == 6) && (thruPoint(240, 1))) {
futureTileNum = 6;
halfPipeAmt = (tileOffset + speed) - 240;
enterFlag = true;
} else if ((level[eval ("tile" add tileLoop(-1, tile)).number] == 7) && (thruPoint(-40, -1))) {
futureTileNum = 7;
halfPipeAmt = (tileOffset - -40) + speed;
enterFlag = true;
}
}
if (((state != "air") && (overSomething == false)) && (((((tileNum == 6) && (tileOffset >= 40)) && (110 >= tileOffset)) || (((tileNum == 7) && (tileOffset >= 90)) && (160 >= tileOffset))) || (enterFlag == true))) {
if (speed == 0) {
moveX = 0;
return(undefined);
}
if (enterFlag == false) {
halfPipeAmt = halfPipeAmt + speed;
}
var angle = ((halfPipeAmt / CONVERSION) / 70);
if (-90 >= angle) {
moveX = 90 - tileOffset;
putInAir(Math.abs(speed));
biker._rotation = 90;
if (kLeft && (-10 >= speed)) {
speed = -10;
rotation = 90;
} else {
speed = 0;
}
halfPipeLaunch = true;
return(undefined);
}
if (angle >= 90) {
moveX = 110 - tileOffset;
putInAir(Math.abs(speed));
biker._rotation = -90;
if (kRight && (speed >= 10)) {
speed = 10;
rotation = -90;
} else {
speed = 0;
}
halfPipeLaunch = true;
return(undefined);
}
var xVal = (Math.round((Math.sin(angle * CONVERSION) * 70) * 10) / 10);
if (futureTileNum == 6) {
moveX = (240 + xVal) - tileOffset;
} else if (futureTileNum == 7) {
moveX = (-40 + xVal) - tileOffset;
} else if (tileNum == 6) {
moveX = (40 + xVal) - tileOffset;
} else {
moveX = (160 + xVal) - tileOffset;
}
moveX = roundTenthsToFive(moveX);
if (((moveX / Math.abs(moveX)) != (speed / Math.abs(speed))) && (moveX != 0)) {
moveX = 0;
}
if ((tileNum == 6) && (110 < (moveX + tileOffset))) {
moveX = 110 - tileOffset;
} else if ((tileNum == 7) && ((moveX + tileOffset) < 90)) {
moveX = 90 - tileOffset;
}
} else {
moveX = speed;
halfPipeAmt = 0;
}
}
function roundTenthsToFive(_initial) {
var _local2 = _initial;
if (_local2 == 0) {
return(0);
}
var _local1 = Math.abs((_local2 * 10) % 10);
var _local3;
var initialWhole;
var finalAbsolute;
if ((_local1 >= 0) && (2 >= _local1)) {
_local3 = 0;
} else if ((2 < _local1) && (7 >= _local1)) {
_local3 = 0.5;
} else if ((7 < _local1) && (_local1 < 10)) {
_local3 = 1;
}
if (0 < _local2) {
initialWhole = Math.floor(_local2);
} else {
initialWhole = Math.ceil(_local2);
}
finalAbsolute = Math.abs(initialWhole) + _local3;
if (finalAbsolute == undefined) {
}
return(finalAbsolute * (_local2 / Math.abs(_local2)));
}
function moveVert(_amt) {
var endLoop;
if (gameMode == "editor") {
endLoop = 13;
} else {
endLoop = 4;
bg._y = bg._y + (_amt / 4);
if (bg._y >= 0) {
background.gotoAndStop(1);
} else if (-80 >= bg._y) {
background.gotoAndStop(2);
}
}
var i = 0;
while (i < endLoop) {
eval ("tile" + i)._y = eval ("tile" + i)._y + _amt;
i++;
}
var i = 0;
while (i < objects.length) {
eval (objects[i])._y = eval (objects[i])._y + _amt;
i++;
}
}
function moveHor(_amt) {
var leftBound = 0;
var leftBoundNumber;
var rightBound;
var rightBoundNumber;
var leftTile;
var rightTile;
var tileAmount;
var xAdjust;
var yAdjust;
if (gameMode == "editor") {
leftBoundNumber = 0;
rightBoundNumber = level.length - 1;
rightBound = 39;
tileAmount = 13;
xAdjust = 5;
yAdjust = 4;
leftTile = firstTile;
rightTile = tileLoop(-1, firstTile, tileAmount);
} else {
leftBoundNumber = -20;
rightBoundNumber = level.length + 19;
rightBound = 199;
tileAmount = 4;
xAdjust = 1;
yAdjust = 1;
leftTile = (rightTile = tile);
}
if ((leftBoundNumber >= eval ("tile" add leftTile).number) && ((_amt + tileOffset) < leftBound)) {
_amt = -tileOffset;
speed = 0;
} else if ((eval ("tile" add rightTile).number >= rightBoundNumber) && (rightBound < (_amt + tileOffset))) {
_amt = rightBound - tileOffset;
speed = 0;
}
if (gameMode == "editor") {
leftBound = -10;
rightBound = 30;
} else {
leftBound = -260;
rightBound = 0;
}
if (rightBound < (eval ("tile" add firstTile)._x - _amt)) {
clearPills(tileLoop(-1, firstTile, tileAmount));
drawTile(tileLoop(-1, firstTile, tileAmount), eval ("tile" + tileLoop(-1, firstTile, tileAmount)).number - tileAmount, -1);
eval ("tile" add tileLoop(-1, firstTile, tileAmount))._x = eval ("tile" add firstTile)._x - (200 / xAdjust);
eval ("tile" add tileLoop(-1, firstTile, tileAmount))._y = eval ("tile" add firstTile)._y;
firstTile = tileLoop(-1, firstTile, tileAmount);
if (gameMode == "editor") {
var frame = buildFrame(eval ("tile" add firstTile).number);
if ((frame == "single") || (frame == "left")) {
firstColor = tileLoop(-1, firstColor, 4);
}
}
if (level[eval ("tile" add firstTile).number] == 8) {
eval ("tile" add firstTile)._y = eval ("tile" add firstTile)._y - (40 / yAdjust);
} else if (level[eval ("tile" add firstTile).number] == 9) {
eval ("tile" add firstTile)._y = eval ("tile" add firstTile)._y + (40 / yAdjust);
}
newObject(firstTile, -1);
} else if (leftBound >= (eval ("tile" add firstTile)._x - _amt)) {
if (gameMode == "editor") {
firstColor = eval ("tile" + firstTile).color;
}
firstTile = tileLoop(1, firstTile, tileAmount);
clearPills(tileLoop(-1, firstTile, tileAmount));
drawTile(tileLoop(-1, firstTile, tileAmount), eval ("tile" + tileLoop(-1, firstTile, tileAmount)).number + tileAmount, 1);
eval ("tile" + tileLoop(-1, firstTile, tileAmount))._x = eval ("tile" + tileLoop(-1, firstTile, tileAmount))._x + ((200 / xAdjust) * tileAmount);
eval ("tile" + tileLoop(-1, firstTile, tileAmount))._y = eval ("tile" + tileLoop(-2, firstTile, tileAmount))._y;
if (level[eval ("tile" add tileLoop(-2, firstTile, tileAmount)).number] == 8) {
eval ("tile" add tileLoop(-1, firstTile, tileAmount))._y = eval ("tile" add tileLoop(-1, firstTile, tileAmount))._y + (40 / yAdjust);
} else if (level[eval ("tile" add tileLoop(-2, firstTile, tileAmount)).number] == 9) {
eval ("tile" add tileLoop(-1, firstTile, tileAmount))._y = eval ("tile" add tileLoop(-1, firstTile, tileAmount))._y - (40 / yAdjust);
}
newObject(tileLoop(-1, firstTile, tileAmount), 1);
}
var i = 0;
while (i < objects.length) {
eval (objects[i])._x = eval (objects[i])._x - _amt;
i++;
}
eval ("tile" add firstTile)._x = eval ("tile" add firstTile)._x - _amt;
var looper = 1;
while (looper < tileAmount) {
eval ("tile" add tileLoop(looper, firstTile, tileAmount))._x = eval ("tile" add firstTile)._x + ((200 / xAdjust) * looper);
looper++;
}
setTileOffset(_amt);
if (gameMode == "editor") {
pointer._x = pointer._x - _amt;
if (pointer._x < 30) {
editArrowMove(tileLoop(1, editTile, tileAmount), 40);
} else if (510 < pointer._x) {
editArrowMove(tileLoop(-1, editTile, tileAmount), -40);
}
} else {
var pos = (bg._x - (_amt / 10));
var width = (bg._width / 2);
if (pos < (-width)) {
bg._x = pos + width;
} else if (0 < pos) {
bg._x = pos - width;
} else {
bg._x = pos;
}
pos = clouds._x - _amt;
width = clouds._width / 2;
if (pos < (-width)) {
clouds._x = pos + width;
} else if (0 < pos) {
clouds._x = pos - width;
} else {
clouds._x = pos;
}
}
}
function setTileOffset(_move) {
var xAdjust;
var tileAmount;
if (gameMode == "editor") {
xAdjust = 5;
tileAmount = 13;
} else {
xAdjust = 1;
tileAmount = 4;
}
tileOffset = tileOffset + _move;
var flag = true;
while (flag) {
flag = false;
if (tileOffset >= (200 / xAdjust)) {
tile = tileLoop(1, tile, tileAmount);
tileOffset = tileOffset - (200 / xAdjust);
flag = true;
} else if (tileOffset < 0) {
tile = tileLoop(-1, tile, tileAmount);
tileOffset = tileOffset + (200 / xAdjust);
flag = true;
}
}
tileNum = level[eval ("tile" add tile).number];
}
function tileLoop(_num, _from, _howMany) {
var _local1 = _num;
var _local2 = _howMany;
if (_local2 == undefined) {
_local2 = 4;
}
_local1 = _local1 + _from;
if ((_local2 - 1) < _local1) {
_local1 = _local1 - _local2;
} else if (_local1 < 0) {
_local1 = _local1 + _local2;
}
return(_local1);
}
function drawTile(_number, _index, _position) {
var frame;
var tileAmount = 4;
if (gameMode == "editor") {
tileAmount = 13;
} else {
clearPills(_number);
}
if (((level.length - 1) < _index) || (_index < 0)) {
frame = 1;
} else {
frame = level[_index];
}
if ((frame == 6) && (level[_index + 1] == 7)) {
frame = 10;
} else if ((frame == 7) && (level[_index - 1] == 6)) {
frame = 11;
}
eval ("tile" add _number).gotoAndStop(frame);
eval ("tile" add _number).number = _index;
frame = buildFrame(_index);
eval (("tile" add _number) add ".building").gotoAndStop(frame);
if (frame == "none") {
eval ("tile" add _number).building._y = 0;
} else {
eval ("tile" add _number).building._y = -180 - (build[_index] * 20);
}
if (level[_index] == 8) {
eval ("tile" add _number).building._y = eval ("tile" add _number).building._y + 40;
}
var _color = 0;
if (_index == 0) {
_position = 0;
}
if (0 < _position) {
if ((gameMode == "editor") && (_number == firstTile)) {
_color = firstColor;
} else {
_color = eval ("tile" add tileLoop(-1, _number, tileAmount)).color;
}
if ((frame == "left") || (frame == "single")) {
_color = tileLoop(1, _color, 4);
}
} else if (_position < 0) {
_color = eval ("tile" add tileLoop(1, _number, tileAmount)).color;
var nextBuildFrame = eval ("tile" add tileLoop(1, _number, tileAmount)).building._currentframe;
if ((nextBuildFrame == 2) || (nextBuildFrame == 5)) {
_color = tileLoop(-1, _color, 4);
}
}
eval ("tile" add _number).color = _color;
if (frame != "none") {
eval ("tile" add _number).building.b.gotoAndStop(_color + 1);
}
eval ("tile" add _number).door._y = 20;
if ((((((level[_index] != 4) && (level[_index] != 5)) && ((_index % 4) == 0)) && (frame != "none")) && ((_color != 3) || (frame == "single"))) && ((build[_index] != 1) || (level[_index] != 9))) {
if ((level[_index] == 9) || ((build[_index] >= 3) && (level[_index] != 8))) {
eval (("tile" add _number) add ".door")._y = eval (("tile" add _number) add ".door")._y - 40;
}
eval ("tile" add _number).door.gotoAndStop(3);
} else {
eval ("tile" add _number).door.gotoAndStop(1);
}
}
function buildFrame(_index) {
var _local1 = _index;
var frame;
var _local3;
var _local2;
if ((((build.length - 1) < _local1) || (_local1 < 0)) || (build[_local1] == 0)) {
frame = "none";
} else {
_local3 = build[_local1 - 1];
if (_local3 != 0) {
if (level[_local1] == 8) {
_local3 = _local3 + 2;
}
if (level[_local1 - 1] == 9) {
_local3 = _local3 - 2;
}
}
_local2 = build[_local1 + 1];
if (_local2 != 0) {
if (level[_local1 + 1] == 8) {
_local2 = _local2 - 2;
}
if (level[_local1] == 9) {
_local2 = _local2 + 2;
}
}
if ((_local2 == build[_local1]) && (_local3 == build[_local1])) {
frame = "middle";
} else if (_local2 == build[_local1]) {
frame = "left";
} else if (_local3 == build[_local1]) {
frame = "right";
} else {
frame = "single";
}
}
return(frame);
}
function goCrash(_num, _wall, _xPos) {
var _local2 = _num;
var _local1 = 0;
if (_wall == true) {
if ((state == "ground") && (Math.abs(speed) >= 40)) {
state = "crash";
biker.gotoAndStop("crash" add _local2);
_local1 = -1;
} else if ((state == "air") && (Math.abs(speed) >= 35)) {
biker.gotoAndStop("wallcrash");
_local1 = -1;
}
moveX = _xPos - tileOffset;
((speed < 0) ? ((moveX = moveX + 1)) : ((moveX = moveX - 1)));
air = (speed = 0);
} else {
state = "crash";
biker.gotoAndStop("crash" add _local2);
_local1 = -2;
}
if (_local1 < 0) {
message = new Array();
trickScore = 0;
affectLife(_local1);
}
}
function peddle() {
if (biker._currentframe != 20) {
if (state == "ground") {
if (Math.abs(speed) >= 20) {
biker.gotoAndStop("fast");
} else if ((((0 < Math.abs(speed)) || (landRotation != 0)) || (kRight)) || (kLeft)) {
biker.gotoAndStop("slow");
} else {
biker.gotoAndStop("stopped");
}
if (((0 < biker._xscale) && (kRight)) || (kLeft && (biker._xscale < 0))) {
biker.ani.play();
} else {
biker.ani.stop();
}
} else {
biker.ani.stop();
}
}
}
function doMove(_move, _trickName, _score) {
biker.gotoAndStop(_move);
}
function handleObstacles() {
var _bankHop = bankHop;
var groundLand = (eval ("tile" add tile)._y - 30);
var nextLand = (eval ("tile" add tileLoop(1, tile))._y - 30);
var prevLand = (eval ("tile" add tileLoop(-1, tile))._y - 30);
var nextBuildLand = (nextLand + eval ("tile" add tileLoop(1, tile)).building._y);
var prevBuildLand = (prevLand + eval ("tile" add tileLoop(-1, tile)).building._y);
var nextBuild = eval ("tile" add tileLoop(1, tile)).building._currentframe;
var prevBuild = eval ("tile" add tileLoop(-1, tile)).building._currentframe;
if (state == "air") {
if ((thruPoint(0, -1) && ((eval ("tile" add tile).building._currentframe == 2) || (eval ("tile" add tile).building._currentframe == 5))) || (thruPoint(200, 1) && ((eval ("tile" add tile).building._currentframe == 4) || (eval ("tile" add tile).building._currentframe == 5)))) {
checkHop("");
}
if ((thruPoint(200, 1) && ((nextBuild == 2) || (nextBuild == 5))) && (biker._y < nextBuildLand)) {
checkHop("left");
} else if ((thruPoint(0, -1) && ((prevBuild == 4) || (prevBuild == 5))) && (biker._y < prevBuildLand)) {
checkHop("right");
}
}
if (onBuilding) {
return(undefined);
}
var landAllowance = 10;
if (tileNum == 2) {
if (thruPoint(125, -1)) {
if ((groundLand - 25) < biker._y) {
goCrash(1, true, 125);
} else {
_bankHop = "";
}
} else if (thruPoint(125, 1) && (biker._currentframe < 300)) {
_bankHop = "left";
}
} else if (tileNum == 3) {
if (thruPoint(75, 1)) {
if ((land - 25) < biker._y) {
goCrash(1, true, 75);
} else {
_bankHop = "";
}
} else if (thruPoint(75, -1) && (biker._currentframe < 300)) {
_bankHop = "right";
}
} else if (tileNum == 4) {
if ((groundLand - 65) < biker._y) {
if (thruPoint(50, 1)) {
goCrash(1, true, 50);
} else if (thruPoint(150, -1)) {
goCrash(1, true, 150);
}
} else if (thruPoint(50, 1) || (thruPoint(150, -1))) {
checkHop("mailbox");
} else if (thruPoint(50, -1) || (thruPoint(150, 1))) {
checkHop("");
}
} else if (tileNum == 5) {
if ((groundLand - 35) < biker._y) {
if (thruPoint(65, 1)) {
goCrash(1, true, 65);
} else if (thruPoint(135, -1)) {
goCrash(1, true, 135);
}
} else if (thruPoint(65, 1) || (thruPoint(135, -1))) {
checkHop("hydrant");
} else if (thruPoint(65, -1) || (thruPoint(135, 1))) {
checkHop("");
}
} else if ((tileNum == 6) && ((groundLand - 100) < biker._y)) {
if ((thruPoint(110, 1) && (halfPipeLaunch == false)) && (state == "air")) {
goCrash(2, true, 110);
} else if (thruPoint(185, -1) && (((groundLand - 100) + landAllowance) < biker._y)) {
goCrash(1, true, 185);
}
} else if ((tileNum == 7) && ((groundLand - 100) < biker._y)) {
if ((thruPoint(90, -1) && (halfPipeLaunch == false)) && (state == "air")) {
goCrash(2, true, 90);
} else if (thruPoint(15, 1) && (((groundLand - 100) + landAllowance) < biker._y)) {
goCrash(1, true, 15);
}
} else if ((level[eval ("tile" add tileLoop(1, tile)).number] == 7) && (((nextLand - 100) + landAllowance) < biker._y)) {
if (thruPoint(215, 1)) {
goCrash(1, true, 215);
}
} else if ((level[eval ("tile" add tileLoop(-1, tile)).number] == 6) && (((prevLand - 100) + landAllowance) < biker._y)) {
if (thruPoint(-15, -1)) {
goCrash(1, true, -15);
}
}
if (((bankHop == "left") || (bankHop == "right")) && (_bankHop == "")) {
addTrick("Bank2Bank", 500);
}
bankHop = _bankHop;
}
function thruPoint(_point, _dir) {
var _local1 = _point;
if (_dir < 0) {
return((_local1 < tileOffset) && (_local1 >= (tileOffset + moveX)));
}
if (0 < _dir) {
return((tileOffset < _local1) && ((tileOffset + moveX) >= _local1));
}
return(undefined);
}
function launch() {
if ((state != "air") && (overSomething == false)) {
if ((thruPoint(75, -1) && (tileNum == 3)) || (thruPoint(125, 1) && (tileNum == 2))) {
putInAir(Math.round(Math.abs(speed) / 3));
}
}
}
function newObject(this_tile, dir) {
var obj;
var flag = true;
var temp_tile = eval ("tile" + this_tile).number;
while (flag) {
flag = false;
obj = pills[obj_index].split(":");
if (((obj[0] >= temp_tile) && (dir < 0)) || ((temp_tile >= obj[0]) && (0 < dir))) {
if ((obj[0] == temp_tile) && (obj[1] >= 0)) {
eval ("tile" + this_tile).pill.push(createObj(this_tile, Number(obj[1]), Number(obj[2])));
}
if (((obj_index + dir) >= 0) && ((obj_index + dir) < pills.length)) {
obj_index = obj_index + dir;
flag = true;
}
}
}
}
function createObj(_this_tile, _cO_x, _cO_y) {
var name = ("pill" add objects.length);
var xAdjust = 1;
var yAdjust = 1;
if (gameMode == "editor") {
xAdjust = 5;
yAdjust = 4;
}
duplicateMovieClip ("p.pill", name, copy);
copy++;
if (copy >= MAX_COPIES) {
copy = copy - MAX_COPIES;
}
name = "p." add name;
eval (name)._x = eval ("tile" add _this_tile)._x + (_cO_x / xAdjust);
eval (name)._y = eval ("tile" add _this_tile)._y - (_cO_y / yAdjust);
objects.push(name);
eval (name).obj_index = obj_index;
eval (name).tile = _this_tile;
eval (name).tilePillIndex = eval ("tile" add _this_tile).pill.length;
return(name);
}
function destroyObj(name) {
var instance = (substring(name, name.length, 1));
eval (name)._name = "toDelete";
if (instance != (objects.length - 1)) {
eval ("p.pill" add (objects.length - 1))._name = substring(name, 3, -1);
eval ("tile" add eval (name).tile).pill[eval (name).tilePillIndex] = name;
}
objects.pop();
var thisTile = ("tile" add p.toDelete.tile);
if (p.toDelete.TilePillIndex != (eval (thisTile).pill.length - 1)) {
eval (thisTile).pill[toDelete.tilePillIndex] = eval (thisTile).pill[eval (thisTile).pill.length - 1];
eval (eval (thisTile).pill[toDelete.tilePillIndex]).tilePillIndex = p.toDelete.tilePillIndex;
}
eval ("tile" add p.toDelete.tile).pill.pop();
removeMovieClip("p.toDelete");
}
function checkPills() {
var arr;
var i = 0;
while (i < objects.length) {
if (collide(objects[i], "biker", 35, 35)) {
arr = pills[eval (objects[i]).obj_index].split(":");
pills[eval (objects[i]).obj_index] = arr[0] add ":-1";
caughtPill(1);
pillSound.start();
addTrick("Power Grab", 1000);
if (MAX_SPEED >= (speedLimit + 5)) {
speedLimit = speedLimit + 5;
}
destroyObj(objects[i]);
i--;
}
i++;
}
}
function collide(_obj1, _obj2, _c_x, _c_y) {
return((((eval (_obj2)._y < (eval (_obj1)._y + _c_y)) && ((eval (_obj1)._y - _c_y) < eval (_obj2)._y)) && (eval (_obj2)._x < (eval (_obj1)._x + _c_x))) && ((eval (_obj1)._x - _c_x) < eval (_obj2)._x));
}
function deleteAllPills() {
while (0 < objects.length) {
destroyObj(objects[objects.length - 1]);
}
}
function clearPills(_number) {
var i = (eval ("tile" add _number).pill.length - 1);
while (i >= 0) {
destroyObj(eval ("tile" add _number).pill[i]);
i--;
}
}
function caughtPill(_amt) {
status.pills = status.pills + _amt;
status.pillDisplay = (status.pills add " / ") add pills.length;
if (((status.pills >= pills.length) && (secrets[levelNumber] == 0)) && (0 < levelNumber)) {
if (status.unlock._currentframe == 1) {
status.unlock.gotoAndPlay(2);
} else {
maxCharacter++;
}
secrets[levelNumber] = 1;
}
}
function calculateScore() {
var _local2;
var _local1 = 0;
while (_local1 < highScore.length) {
_local2 = _local2 + highScore[_local1];
_local1++;
}
return(_local2);
}
function addLevelScore() {
if (highScore[levelNumber - 1] < score) {
highScore[levelNumber - 1] = score;
}
}
function speedToMPH(_speed) {
var _local1 = _speed / 2;
((_local1 < 0) ? (_local1 = Math.floor(_local1)) : (_local1 = Math.ceil(_local1)));
return(Math.abs(_local1));
}
function addTrick(_msg, _score, _times) {
var _local2 = _msg;
var _local3 = _root;
_score = Math.round(_score * 10.2);
if (_local3.tile0._y > 350) {
var heightBonus = ((_local3.tile0._y - 270) * 10);
_local3._heig = "HEIGHT BONUS: +" + heightBonus;
} else {
_local3._heig = "";
}
var extra;
if (_times != undefined) {
extra = Math.round(_times / 8) + 1;
if (1 < extra) {
_score = _score * extra;
} else {
extra = 1;
}
} else {
extra = 1;
}
var _local1 = 0;
while (_local1 < extra) {
message.push(_local2);
_local1++;
}
_local3.score = (Number(_local3.score) + Number(_score)) + Number(heightBonus);
if (_times > 1) {
_local3._msg = (((("GREAT " + _local2.toUpperCase()) + " + ") + _score) + " X ") + extra;
} else {
_local3._msg = (_local2.toUpperCase() + " + ") + _score;
}
_local3.scoreAlert.play();
}
function checkHop(_hop) {
var _local1 = _hop;
if (300 < biker._currentframe) {
return(undefined);
}
if ((hop == "hydrant") && (_local1 != "hydrant")) {
addTrick("Toxic Waste Jump", 100);
} else if ((hop == "mailbox") && (_local1 != "mailbox")) {
addTrick("Tires Jump", 500);
} else if (((hop == "left") && (_local1 != "left")) || ((hop == "right") && (_local1 != "right"))) {
addTrick("Jump", 2000);
}
hop = _local1;
return(undefined);
}
function affectLife(_amt) {
var _local2 = _root;
if (_amt < 0) {
var _local1 = 500 * _amt;
if ((_local2.score + _local1) > 0) {
_local2.score = _local2.score + _local1;
} else {
_local2.score = 0;
}
_local2._crashmsg = "CRASH: " + _local1;
_local2.crashAlert.play();
}
}
function multiple(_amt) {
switch (_amt) {
case 0.5 :
return("Half ");
case 1 :
return("");
case 2 :
return("Double ");
case 3 :
return("Triple ");
case 4 :
return("Quad ");
case 5 :
return("Quint ");
}
return((_amt * 180) add " ");
}
function convertCode(_editLevel) {
var pieces;
var _local2;
pieces = _editLevel.split(";");
level = pieces[0].split(",");
if (level == undefined) {
level = new Array();
}
var _local3 = 0;
while ((_local3 < level.length) || (_local3 < 13)) {
level[_local3] = parseInt(level[_local3]);
if (((level[_local3] < 1) || (9 < level[_local3])) || (isNaN(level[_local3]))) {
level[_local3] = 1;
}
_local3++;
}
build = pieces[1].split(",", level.length);
if (build == undefined) {
build = new Array();
}
_local3 = 0;
while (_local3 < level.length) {
build[_local3] = parseInt(build[_local3]);
if (((build[_local3] < 0) || (9 < build[_local3])) || (isNaN(build[_local3]))) {
build[_local3] = 0;
}
_local3++;
}
pills = pieces[2].split(",", level.length);
if (pills == undefined) {
pills = new Array();
}
_local3 = 0;
var _local1;
while (_local3 < pills.length) {
_local2 = pills[_local3].split(":");
_local1 = 0;
while (_local1 < 3) {
_local2[_local1] = parseInt(_local2[_local1]);
if (((isNaN(_local2[_local1]) || ((_local1 == 0) && ((_local2[_local1] < 0) || (_local2[_local1] >= level.length)))) || ((_local1 == 1) && ((_local2[_local1] < 0) || (190 < _local2[_local1])))) || ((_local1 == 2) && ((_local2[_local1] < 0) || (1400 < _local2[_local1])))) {
pills.splice(_local3, 1);
break;
}
_local1++;
}
if (_local1 == 3) {
pills[_local3] = _local2.join(":");
_local3++;
}
}
}
function editorArrowClick() {
var whichTile = Math.floor(((_xmouse - 30) + tileOffset) / 40);
var newMouse = (((whichTile * 40) - tileOffset) + 50);
if ((newMouse >= 30) && (510 >= newMouse)) {
if (eval ("tile" add tileLoop(whichTile, firstTile, 13)).number >= level.length) {
var adjust = (eval ("tile" add tileLoop(whichTile, firstTile, 13)).number - (level.length - 1));
whichTile = whichTile - adjust;
newMouse = newMouse - (adjust * 40);
newMessage("If you want to select that area, please insert more tiles.");
} else {
message = "Ready";
}
pointer._x = newMouse;
editArrowMove(tileLoop(whichTile, firstTile, 13));
}
}
function editArrowMove(_num, _move) {
if (_move != undefined) {
pointer._x = pointer._x + _move;
}
editTile = _num;
editIndex = eval ("tile" add _num).number;
editPills = eval ("tile" add _num).pill.length;
editPillPosition();
}
function changePillPosition() {
var thisPill = eval ("tile" add editTile).pill[editPills - 1];
var _index = eval (thisPill).obj_index;
pills[_index] = (((editIndex add ":") add editPillsX) add ":") add editPillsY;
eval (thisPill)._x = eval ("tile" add editTile)._x + (editPillsX / 5);
eval (thisPill)._y = eval ("tile" add editTile)._y - (editPillsY / 4);
}
function editPillPosition() {
var work;
var _index;
if (0 < editPills) {
_index = eval (eval ("tile" add editTile).pill[editPills - 1]).obj_index;
var work = pills[_index].split(":");
editPillsX = parseInt(work[1]);
editPillsY = parseInt(work[2]);
} else {
editPillsX = (editPillsY = 0);
}
}
function changePill(_delete) {
var pillIndex = 0;
var obj;
var flag = true;
if (_delete) {
obj = eval ("tile" add editTile).pill[editPills - 1];
pillIndex = eval (obj).obj_index;
deleteAllPills();
pills.splice(pillIndex, 1);
} else {
deleteAllPills();
while (flag) {
flag = false;
obj = pills[pillIndex].split(":");
if ((editIndex >= obj[0]) && (pills.length >= (pillIndex + 1))) {
pillIndex++;
flag = true;
}
}
pills.splice(pillIndex, 0, editIndex add ":100:60");
}
redrawAllPills();
}
function redrawAllPills() {
obj_index = 0;
var _local1 = 0;
while (_local1 < 13) {
newObject(tileLoop(_local1, firstTile, 13), 1);
_local1++;
}
editArrowMove(editTile);
}
function adjustPills(effect) {
var _local3 = effect;
var _local2;
var _local1;
deleteAllPills();
if (_local3 != 0) {
_local2 = pills.length - 1;
while (_local2 >= 0) {
_local1 = pills[_local2].split(":");
if (_local1[0] < editIndex) {
break;
}
if ((_local1[0] == editIndex) && (_local3 < 0)) {
pills.splice(_local2, 1);
} else {
_local1[0] = parseInt(_local1[0]) + _local3;
pills[_local2] = _local1.join(":");
}
_local2--;
}
}
redrawAllPills();
}
function newMessage(_msg) {
var _local3 = _msg;
if (gameMode == "editor") {
frameCounter = 80;
message = _local3;
} else if (message.length != 0) {
var _local2 = 0;
while (_local2 < (message.length - 1)) {
var _local1 = _local2 + 1;
while (_local1 < message.length) {
if (message[_local1] != message[_local2]) {
break;
}
_local1++;
}
if (_local2 < (_local1 - 1)) {
message.splice(_local2, _local1 - _local2, ((_local1 - _local2) add "x ") add message[_local2]);
}
_local2++;
}
var _bonus = ((message.length - 1) * 1000);
if (trickScore < _bonus) {
_bonus = Math.floor(trickScore / 1000) * 1000;
}
_local3 = (message.join(" + ") add newline) add trickScore;
if (0 < _bonus) {
_local3 = _local3 + (" + " add _bonus);
}
_local3 = _local3 + " points";
trickScore = trickScore + _bonus;
if (trickScore >= 20000) {
status.trickCombos.gotoAndPlay("highscore");
_local3 = _local3 + "!!!";
} else {
status.trickCombos.gotoAndPlay(2);
}
status.trickCombos.message = _local3;
if (status.timeDisplay._currentframe == 1) {
score = score + trickScore;
if (((100000 < score) && (secrets[5 + levelNumber] == 0)) && (levelNumber != 0)) {
if (maxLevel < 5) {
status.unlockLevel.gotoAndPlay(2);
} else if (status.unlock._currentframe == 1) {
status.unlock.gotoAndPlay(2);
} else {
maxCharacter++;
}
secrets[5 + levelNumber] = 1;
}
}
trickScore = 0;
message = new Array();
affectLife(1);
}
}
function init(_mode) {
gameMode = _mode;
air = (speed = (spinFactor = (moveX = (moveY = 0))));
state = "ground";
firstTile = 0;
frameCounter = 0;
overSomething = (onBuilding = false);
landRotation = 0;
halfPipeLaunch = false;
halfPipeAmt = 0;
rotation = (trickScore = (score = 0));
bankHop = (hop = "");
keyHold = new Array(0, "");
kSpace_hold = (kM_hold = false);
minutes = 3;
seconds = 0;
copy = 0;
objects = new Array();
obj_index = 0;
if (gameMode == "editor") {
tileOffset = 0;
tile = 6;
speedLimit = 20;
message = "Ready";
firstColor = 0;
editTile = (editIndex = (editPills = (editPillsX = (editPillsY = 0))));
} else {
tileOffset = 70;
tile = 1;
speedLimit = 25;
message = new Array();
status.pills = 0;
caughtPill(0);
status.life.gotoAndStop(3);
}
repaint(true);
if (gameMode == "editor") {
editArrowMove(0);
} else if (musicFlag) {
music.gotoAndPlay("start");
}
}
function repaint(_firstTime) {
var tileAmount = 4;
var draw_y = 0;
var yAdjust = 1;
var xAdjust = 1;
var xStart = 0;
var yStart = 230;
if (gameMode == "editor") {
tileAmount = 13;
yAdjust = 4;
xAdjust = 5;
xStart = 30;
yStart = eval ("tile" add firstTile)._y;
}
var i = 0;
while (i < tileAmount) {
if (_firstTime) {
eval ("tile" + i).pill = new Array();
drawTile(i, i, i);
eval ("tile" add i)._x = xStart + ((i * 200) / xAdjust);
} else {
drawTile(tileLoop(i, firstTile, tileAmount), eval ("tile" + tileLoop(i, firstTile, tileAmount)).number, 1);
}
eval ("tile" add tileLoop(i, firstTile, tileAmount))._y = yStart - ((40 / yAdjust) * draw_y);
if (_firstTime) {
newObject(i, 1);
}
if (level[eval ("tile" add tileLoop(i, firstTile, tileAmount)).number] == 8) {
draw_y--;
} else if (level[eval ("tile" add tileLoop(i, firstTile, tileAmount)).number] == 9) {
draw_y++;
}
i++;
}
}
function collectKeys() {
k1 = false;
k2 = false;
kUp = false;
kDown = false;
kLeft = false;
kRight = false;
kSpace = false;
if ((18 < status._currentframe) && (!((status._currentframe == 30) && (status.end._visible == false)))) {
return(undefined);
}
if (Key.isDown(38)) {
kUp = true;
}
if (Key.isDown(40)) {
kDown = true;
}
if (Key.isDown(39)) {
kRight = true;
}
if (Key.isDown(37)) {
kLeft = true;
}
if (Key.isDown(32)) {
if (kSpace_hold == false) {
kSpace = true;
}
kSpace_hold = true;
} else {
kSpace_hold = false;
}
if (Key.isDown(50)) {
k2 = true;
}
if (Key.isDown(49)) {
k1 = true;
}
}
function quit(_frame) {
addLevelScore();
deleteAllPills();
music.gotoAndPlay("stop");
gotoAndPlay(_frame);
}
function keyActions() {
if (kM) {
if (musicFlag) {
music.gotoAndPlay("stop");
} else {
music.gotoAndPlay("start");
}
musicFlag = musicFlag == false;
}
if (state == "crash") {
slowDown(1);
} else if (state == "ground") {
if (Key.isDown(49)) {
doMove("seatSpin");
slowDown(6);
} else if (kSpace) {
putInAir(Math.round(Math.abs(speed) / 10) + 10);
if (landRotation != 0) {
if ((tileNum == 2) || (tileNum == 3)) {
speed = Math.round(speed * 0.8);
} else if ((tileNum == 6) || (tileNum == 7)) {
if (20 >= Math.abs(landRotation)) {
speed = Math.round(speed * 0.8);
} else if (((speed < 0) && (tileNum == 7)) || ((0 < speed) && (tileNum == 6))) {
speed = 0;
}
}
}
} else if (kRight) {
if ((biker._currentframe != 20) && (((0 < biker._xscale) && (speedLimit >= speed)) || (speed < 0))) {
speedUp(1);
} else {
slowDown(6);
}
} else if (kLeft) {
if ((biker._currentframe != 20) && (((biker._xscale < 0) && (speed >= (-1 * speedLimit))) || (0 < speed))) {
speedUp(-1);
} else {
slowDown(6);
}
} else {
slowDown(6);
}
} else if ((state == "air") && (biker._currentframe < 300)) {
slowDown(24);
if (Key.isDown(49)) {
doMove("seatSpin", "Seat Spin", 10);
} else if (Key.isDown(50)) {
doMove("noHander");
} else if (Key.isDown(51)) {
doMove("tomahawk");
} else if (Key.isDown(52)) {
doMove("peacock");
} else if (Key.isDown(53)) {
doMove("noFooter");
} else if (Key.isDown(54)) {
doMove("slideFoot");
} else if (Key.isDown(55)) {
doMove("lateralJump");
} else if (Key.isDown(56)) {
doMove("verticalSpin");
} else if (Key.isDown(57)) {
doMove("deadlyJump");
} else if (Key.isDown(58)) {
doMove("horizontal");
} else if (kUp) {
doMove("spin");
} else if (kDown) {
doMove("barSpin");
}
var _local1 = "";
if ((k1 && (keyHold[0] == 1)) || (k2 && (keyHold[0] == 2))) {
_local1 = keyHold[1];
}
if (kRight && (_local1 != "right")) {
rotation = rotation + spinFactor;
biker._rotation = biker._rotation + spinFactor;
} else if (kLeft && (_local1 != "left")) {
rotation = rotation - spinFactor;
biker._rotation = biker._rotation - spinFactor;
}
}
}
function bikerDirection(_dir) {
if (0 < _dir) {
if (kRight && (0 < biker._xscale)) {
return(true);
}
if (kLeft && (biker._xscale < 0)) {
return(true);
}
return(false);
}
if (kLeft && (0 < biker._xscale)) {
return(true);
}
if (kRight && (biker._xscale < 0)) {
return(true);
}
return(false);
}
function keyHoldCheck(_key, _dir) {
var _local1 = "";
if (biker._currentframe != 15) {
return(undefined);
}
if (0 < _dir) {
if (0 < biker._xscale) {
_local1 = "right";
} else {
_local1 = "left";
}
} else if (biker._xscale < 0) {
_local1 = "right";
} else {
_local1 = "left";
}
keyHold = new Array(_key, _local1);
return(undefined);
}
_root.backsound.Fade = 0;
Frame 16
if (Key.getCode() != cs.secretEntry) {
cs.secretEntry = Key.getCode();
cs.secretCode = cs.secretCode + String.fromCharCode(Key.getCode());
if (-1 < cs.secretCode.indexOf("FLIP")) {
cs.codeUnlock(new Array(0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0));
} else if (-1 < cs.secretCode.indexOf("SPOKES")) {
cs.codeUnlock(new Array(0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0));
} else if (-1 < cs.secretCode.indexOf("NETSRIK")) {
cs.codeUnlock(new Array(1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0));
} else if (-1 < cs.secretCode.indexOf("ROBOT")) {
cs.codeUnlock(new Array(0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0));
} else if (-1 < cs.secretCode.indexOf("STRONG")) {
cs.codeUnlock(new Array(0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0));
} else if (-1 < cs.secretCode.indexOf("AWESOME")) {
cs.codeUnlock(new Array(0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1));
} else if (-1 < cs.secretCode.indexOf("THEBEST")) {
cs.codeUnlock(new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1));
}
}
play();
Frame 17
gotoAndPlay(_currentframe - 1);
Frame 22
gotoAndPlay(_currentframe + 1);
Frame 30
levelNumber = 1;
setLevel(levelNumber, false);
init("platform");
gotoAndPlay(_currentframe + 1);
Instance of Symbol 71 MovieClip "bg" in Frame 30
onClipEvent (load) {
this.gotoAndStop(_root.levelNumber);
}
Instance of Symbol 73 MovieClip "clouds" in Frame 30
onClipEvent (load) {
this.gotoAndStop(_root.levelNumber);
}
Instance of Symbol 95 MovieClip in Frame 30
onClipEvent (enterFrame) {
if (!s) {
var my_date = new Date(getTimer() - iniTime);
var currMin = (2 - my_date.getMinutes());
var currMin0 = ("0" + currMin);
var currSec = (59 - my_date.getSeconds());
if (currSec < 10) {
currSec0 = "0" + currSec;
} else {
currSec0 = currSec;
}
_root.timeFormated = (currMin0 + ":") + currSec0;
if ((currMin <= 0) && (currSec <= 0)) {
_root.stop();
_root.gameOver.play();
}
}
}
onClipEvent (load) {
var iniTime = getTimer();
var currTime = iniTime;
var s = false;
}
Frame 31
collectKeys();
keyActions();
if (((state == "ground") && (biker._currentframe != 20)) && (((speed == 0) || ((0 < speed) && (0 < biker._xscale))) || ((speed < 0) && (biker._xscale < 0)))) {
newMessage(message);
}
moveY = (moveX = 0);
getMoveX();
launch();
handleObstacles();
moveHor(moveX);
peddle();
handleAir();
moveVert(moveY);
checkPills();
if (frameCounter < 24) {
frameCounter++;
} else {
frameCounter = 1;
if (0 < seconds) {
seconds--;
} else if (0 < minutes) {
seconds = 59;
minutes--;
}
}
if (((((minutes == 0) && (seconds == 0)) && (status.timeDisplay._currentframe == 1)) && (state != "air")) && (message.length == 0)) {
status.timeDisplay.gotoAndPlay(2);
status.gotoAndPlay("end");
}
status.speed = speedtoMPH(speed);
status.time = (minutes add ":") add ((seconds < 10) ? ("0" add seconds) : (seconds));
Frame 32
gotoAndPlay(_currentframe - 1);
Frame 35
nextFrame();
Frame 36
stop();
_root.backsound.Fade = 1;
Symbol 5 Button
on (press) {
getURL ("http://www.flashgames247.com");
}
Symbol 10 MovieClip Frame 9
stop();
Symbol 12 MovieClip Frame 1
Symbol 12 MovieClip Frame 138
_root.gotoAndStop("loading");
Symbol 15 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 17
_root.gotoAndStop(_name);
Symbol 19 MovieClip Frame 100
_root.gotoAndStop("initg");
Symbol 27 Button
on (release) {
getURL ("http://www.flashgames247.com?skateboy", "_blank");
}
Symbol 28 Button
on (release) {
getURL ("http://www.flashgames247.com");
}
Symbol 30 MovieClip Frame 14
stop();
Symbol 34 MovieClip Frame 20
stop();
Symbol 37 Button
on (release) {
_root.game.play();
}
Symbol 42 Button
on (release) {
_root.instructions.play();
}
Symbol 44 Button
on (release) {
_root.getURL(_root.scriptPath + "/index.php");
}
Symbol 48 Button
on (release) {
getURL ("http://www.flashgames247.com?skateboy", "_blank");
}
Symbol 51 MovieClip Frame 1
music = new Sound();
music.attachSound("backsound");
music.start(0, 999999);
music.setVolume(0);
vol = 0;
step = 3;
fade = setInterval(fadeIn, 100);
Fade = 0;
this.onEnterFrame = function () {
if (Fade == 1) {
vol = vol - step;
if (vol < 0) {
vol = 0;
}
music.setVolume(vol);
} else {
vol = vol + step;
if (vol > 100) {
vol = 100;
}
music.setVolume(vol);
}
};
stop();
Symbol 53 Button
on (release) {
getURL ("http://www.flashgames247.com?skateboy");
}
Symbol 69 Button
on (release) {
_root.initg.play();
}
Symbol 76 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 26
_root.addTrick("Heelflip", 1);
_parent.gotoAndStop("fast");
Symbol 146 MovieClip Frame 1
counter = 1;
Symbol 146 MovieClip Frame 20
if (_parent._parent.kUp && (_parent._parent.k1)) {
gotoAndPlay ("jump");
counter++;
}
Symbol 146 MovieClip Frame 26
_root.addTrick("Ollie " + counter, counter * _root.RTRICK);
_parent.gotoAndStop("fast");
Symbol 155 MovieClip Frame 1
counter = 1;
Symbol 155 MovieClip Frame 9
if (_parent._parent.bikerDirection(-1) && (_parent._parent.k1)) {
gotoAndPlay (5);
counter++;
}
Symbol 155 MovieClip Frame 16
_root.addTrick("No Foot", _root.RTRICK);
_parent.gotoAndStop("fast");
Symbol 177 MovieClip Frame 36
_root.addTrick("Horizontal Mortal Flip", _root.STRICK);
_parent.gotoAndStop("fast");
Symbol 195 MovieClip Frame 1
if (_parent._xscale < 0) {
gotoAndPlay (7);
}
Symbol 195 MovieClip Frame 12
_parent._xscale = _parent._xscale * -1;
if (_parent._parent.kUp) {
play();
counter = counter + 5;
} else {
_root.addTrick("Spin", _root.RTRICK);
_parent.gotoAndStop("fast");
}
Symbol 195 MovieClip Frame 19
call(6);
Symbol 210 MovieClip Frame 1
counter = 1;
Symbol 210 MovieClip Frame 16
if (_parent._parent.bikerDirection(1) && (_parent._parent.k1)) {
gotoAndPlay ("jump");
counter++;
}
Symbol 210 MovieClip Frame 25
_root.addTrick("Back Mortal Jump " + counter, counter * _root.RTRICK);
_parent.gotoAndStop("fast");
Symbol 220 MovieClip Frame 1
counter = 1;
Symbol 220 MovieClip Frame 15
if (_parent._parent.bikerDirection(1) && (_parent._parent.k2)) {
counter = counter++;
gotoAndPlay(_currentframe - 1);
}
Symbol 220 MovieClip Frame 34
_root.addTrick("No Foot Mortal Jump " + counter, counter * _root.STRICK, counter);
_parent.gotoAndStop("fast");
Symbol 239 MovieClip Frame 21
_parent._xscale = _parent._xscale * -1;
Symbol 239 MovieClip Frame 25
_root.addTrick("Vertical", _root.STRICK);
_parent.gotoAndStop("fast");
Symbol 251 MovieClip Frame 23
_root.addTrick("Deadly Jump", _root.STRICK);
_parent.gotoAndStop("fast");
Symbol 260 MovieClip Frame 1
counter = 1;
Symbol 260 MovieClip Frame 10
if (_parent._parent.bikerDirection(-1) && (_parent._parent.k2)) {
counter++;
gotoAndPlay(_currentframe - 1);
}
Symbol 260 MovieClip Frame 20
_root.addTrick("Axe " + counter, counter * _root.STRICK);
_parent.gotoAndStop("fast");
Symbol 276 MovieClip Frame 64
_parent.gotoAndStop(1);
Symbol 281 MovieClip Frame 1
wait = 15;
Symbol 281 MovieClip Frame 35
_parent.gotoAndStop(1);
Symbol 285 MovieClip Frame 1
wait = 30;
Symbol 285 MovieClip Frame 35
tellTarget ("..") {
gotoAndStop (1);
};
Symbol 289 MovieClip Frame 51
_parent.gotoAndStop(1);
Symbol 290 MovieClip Frame 1
stop();
_parent.state = "ground";
_parent.keyHold = new Array(0, "");
Symbol 290 MovieClip Frame 15
_parent.keyHold = new Array(0, "");
Instance of Symbol 132 MovieClip "sd" in Symbol 290 MovieClip Frame 20
onClipEvent (load) {
play();
}
Symbol 290 MovieClip Frame 54
player.counter = 0;
Symbol 294 MovieClip Frame 46
stop();
Symbol 297 MovieClip Frame 46
stop();
Symbol 308 Button
on (release) {
function EncryptString(strVal) {
var _local1 = strVal;
var _local3 = "121212121212121212212212221222221121212121212121212212212221222221121212121212121212212212221222221121212121212121212212212221222221121212121212121212212212221222221121212121212121212212212221222221121212121212121212212212221222221";
var _local2 = "";
i = 0;
while (i < _local1.length) {
char = Number(_local3.substr(i, 1)) + _local1.charCodeAt(i);
_local2 = _local2 + String.fromCharCode(char);
i++;
}
return(_local2);
}
_root.name = name;
_root.score = _root.score;
url = ((("&namee" + name) + "&scoree") + score) + "&passecoolgames";
getURL ((_root.scriptPath + "/index.php?") + EncryptString(url), "_blank");
_root.initg.play();
}