Frame 1
play();
Frame 4
function preloadSite() {
var _local3 = _root.getBytesLoaded();
var _local2 = _root.getBytesTotal();
var _local4 = Math.round((_local3 / _local2) * 100);
l_mc.gotoAndStop(_local4);
txtPer = _local4 + "%";
if (_local3 >= _local2) {
clearInterval(loadingCall);
gotoAndStop ("startbtn");
}
}
function deadClick() {
getURL ("http://www.gameseverytime.com", "_blank");
}
function gotoMySite() {
getURL ("http://www.gameseverytime.com", "_blank");
}
stop();
fscommand ("showmenu", false);
var loadingCall = setInterval(preloadSite, 50);
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var mySiteLink = new ContextMenuItem("More Games", gotoMySite);
var copyrightNotice = new ContextMenuItem("@ www.gameseverytime.com", deadClick);
myMenu.customItems.push(mySiteLink);
myMenu.customItems.push(copyrightNotice);
_root.menu = myMenu;
fscommand ("alloscale", false);
Instance of Symbol 45 MovieClip in Frame 4
on (release) {
getURL ("http://www.gameseverytime.com", "_blank");
}
Frame 5
function btnVisible() {
play_btn._visible = true;
}
stop();
play_btn._visible = false;
setTimeout(btnVisible, 500);
play_btn.onRelease = function () {
play();
};
Frame 12
var soundss = 1;
var menusnd = new Sound(_root.createEmptyMovieClip("ms1", 6010));
menusnd.attachSound("Menubg");
var playbgsnd = new Sound(_root.createEmptyMovieClip("playbgsnd_mc", 7010));
playbgsnd.attachSound("playbgsnd");
var btnsnd = new Sound();
btnsnd.attachSound("btnsnd");
var titlesnd = new Sound();
titlesnd.attachSound("titlesnd");
var coinssnd = new Sound();
coinssnd.attachSound("coinssnd");
var btnfalling = new Sound();
btnfalling.attachSound("btnfalling");
var lvlendsnd = new Sound();
lvlendsnd.attachSound("lvlendsnd");
var crashsnd = new Sound();
crashsnd.attachSound("crash");
Frame 13
stop();
_root.menusnd.onSoundComplete = function () {
_root.menusnd.start();
};
var lvls = 1;
var scores = 0;
var lifee = 10;
var totascores = 0;
if (_root.soundss == 0) {
_root.mc_but.gotoAndStop(2);
} else {
_root.mc_but.gotoAndStop(1);
}
var playerDetails = SharedObject.getLocal("MarioRide");
if (playerDetails.data.lev == undefined) {
playerDetails.data.lev = _root.lvls;
} else {
_root.lvls = playerDetails.data.lev;
}
Frame 14
stop();
stopAllSounds();
_root.menusnd.start();
_root.menusnd.onSoundComplete = function () {
_root.menusnd.start();
};
Frame 15
this.stop();
stopAllSounds();
_root.playbgsnd.start();
_root.playbgsnd.setVolume(50);
_root.playbgsnd.onSoundComplete = function () {
_root.playbgsnd.start();
};
var lvl = level;
trace("levels==" + lvls);
_root.scoress = 0;
if (lifee == 0) {
_root.gotoAndStop("gameover");
}
if (lvls == 1) {
level = 1;
}
if (lvls == 2) {
level = 2;
}
if (lvls == 3) {
level = 3;
}
if (lvls == 3) {
level = 3;
}
if (lvls == 4) {
level = 4;
}
if (lvls == 5) {
level = 5;
}
if (lvls == 6) {
level = 6;
}
if (lvls == 7) {
level = 7;
}
if (lvls == 8) {
level = 8;
}
if (lvls == 9) {
level = 9;
}
if (lvls == 10) {
level = 10;
}
Instance of Symbol 71 MovieClip "mc_control" in Frame 15
onClipEvent (load) {
this._parent.initLevel();
}
onClipEvent (keyDown) {
this._parent.keyPressed();
updateAfterEvent();
}
onClipEvent (enterFrame) {
this._parent.processGame();
}
Frame 17
stop();
if (_root.soundss == 0) {
_root.mc_but.gotoAndStop(2);
} else {
_root.mc_but.gotoAndStop(1);
}
stopAllSounds();
_root.lvlendsnd.start();
_root.lvlendsnd.onSoundComplete = function () {
_root.lvlendsnd.start();
};
trace("lvlvs=" + lvls);
_root.scoress = _root.scores;
trace("_root.scoress=" + _root.scoress);
_root.totalscoress = _root.totascores + _root.scores;
_root.totascores = _root.totalscoress;
lvls++;
_root.playerDetails.data.lev = _root.lvls;
if (_root.lvls >= 11) {
gotoAndStop ("gamewin");
}
Frame 18
stop();
if (_root.soundss == 0) {
_root.mc_but.gotoAndStop(2);
} else {
_root.mc_but.gotoAndStop(1);
}
stopAllSounds();
_root.menusnd.start();
_root.menusnd.onSoundComplete = function () {
_root.menusnd.start();
};
totalscoress = 0;
_root.totascores = 0;
_root.totalscoress = 0;
_root.lifee = 10;
onEnterFrame = function () {
if (_root.lvls >= 1) {
_root.lvl_mc.le1._alpha = 100;
_root.lvl_mc.le1.onRelease = function () {
_root.lvls = 1;
_root.gotoAndStop("help");
};
_root.lvl_mc.le1.onRollOver = function () {
_root.btnsnd.start();
};
}
if (_root.lvls >= 2) {
_root.lvl_mc.le2._alpha = 100;
_root.lvl_mc.le2.onRelease = function () {
_root.lvls = 2;
gameStart();
};
_root.lvl_mc.le2.onRollOver = function () {
_root.btnsnd.start();
};
}
if (_root.lvls >= 3) {
_root.lvl_mc.le3._alpha = 100;
_root.lvl_mc.le3.onRelease = function () {
_root.lvls = 3;
gameStart();
};
_root.lvl_mc.le3.onRollOver = function () {
_root.btnsnd.start();
};
}
if (_root.lvls >= 4) {
_root.lvl_mc.le4._alpha = 100;
_root.lvl_mc.le4.onRelease = function () {
_root.lvls = 4;
gameStart();
};
_root.lvl_mc.le4.onRollOver = function () {
_root.btnsnd.start();
};
}
if (_root.lvls >= 5) {
_root.lvl_mc.le5._alpha = 100;
_root.lvl_mc.le5.onRelease = function () {
_root.lvls = 5;
gameStart();
};
_root.lvl_mc.le5.onRollOver = function () {
_root.btnsnd.start();
};
}
if (_root.lvls >= 6) {
_root.lvl_mc.le6._alpha = 100;
_root.lvl_mc.le6.onRelease = function () {
_root.lvls = 6;
gameStart();
};
_root.lvl_mc.le6.onRollOver = function () {
_root.btnsnd.start();
};
}
if (_root.lvls >= 7) {
_root.lvl_mc.le7._alpha = 100;
_root.lvl_mc.le7.onRelease = function () {
_root.lvls = 7;
gameStart();
};
_root.lvl_mc.le7.onRollOver = function () {
_root.btnsnd.start();
};
}
if (_root.lvls >= 8) {
_root.lvl_mc.le8._alpha = 100;
_root.lvl_mc.le8.onRelease = function () {
_root.lvls = 8;
gameStart();
};
_root.lvl_mc.le8.onRollOver = function () {
_root.btnsnd.start();
};
}
if (_root.lvls >= 9) {
_root.lvl_mc.le9._alpha = 100;
_root.lvl_mc.le9.onRelease = function () {
_root.lvls = 9;
gameStart();
};
_root.lvl_mc.le9.onRollOver = function () {
_root.btnsnd.start();
};
}
if (_root.lvls >= 10) {
_root.lvl_mc.le10._alpha = 100;
_root.lvl_mc.le10.onRelease = function () {
_root.lvls = 10;
gameStart();
};
_root.lvl_mc.le10.onRollOver = function () {
_root.btnsnd.start();
};
}
};
Frame 19
function submitScore() {
var _local5 = _root.username;
trace(_local5);
var _local4 = _root.totascores;
trace(_root.totascores);
var _local2 = "";
if (_local4 == "") {
_local2 = _local2 + "The score is required\n";
}
if (_local2 != "") {
status_txt.text = _local2;
trace("hello1231233");
return(undefined);
}
var _local3 = new LoadVars();
_local3.name = _local5;
_local3.score = _local4;
_local3.send(path, "_blank", "POST");
}
stop();
if (_root.soundss == 0) {
_root.mc_but.gotoAndStop(2);
} else {
_root.mc_but.gotoAndStop(1);
}
stopAllSounds();
_root.lvlendsnd.start();
_root.lvlendsnd.onSoundComplete = function () {
_root.lvlendsnd.start();
};
_root.dispscore = totalscoress;
var path = "http://gameseverytime.com/score/MarioRide/submit.php";
Frame 20
function submitScore() {
var _local5 = _root.username;
trace(_local5);
var _local4 = _root.totascores;
trace(_root.totascores);
var _local2 = "";
if (_local4 == "") {
_local2 = _local2 + "The score is required\n";
}
if (_local2 != "") {
status_txt.text = _local2;
trace("hello1231233");
return(undefined);
}
var _local3 = new LoadVars();
_local3.name = _local5;
_local3.score = _local4;
_local3.send(path, "_blank", "POST");
}
stop();
if (_root.soundss == 0) {
_root.mc_but.gotoAndStop(2);
} else {
_root.mc_but.gotoAndStop(1);
}
stopAllSounds();
_root.dispscore = totalscoress;
if ((_root.dispscore == undefined) || (_root.dispscore <= 0)) {
_root.dispscore = 0;
}
trace(_root.dispscore + "=====");
_root.lvlendsnd.start();
_root.lvlendsnd.onSoundComplete = function () {
_root.lvlendsnd.start();
};
var path = "http://gameseverytime.com/score/MarioRide/submit.php";
Symbol 520 MovieClip [__Packages.CWheel] Frame 0
class CWheel extends MovieClip
{
function CWheel () {
super();
}
function init(particle_, maxAccSpeed_, rad_) {
var _local2 = this;
_local2.particle = particle_;
_local2.rad = rad_;
_local2.maxAccSpeed = maxAccSpeed_ * 4;
_local2.speed = 0;
_local2.accSpeed = 0;
_local2.rot = new CVector2D(1, 0);
_local2.addedAcc = new CVector2D(0, 0);
_local2.intersectionFlag = false;
_local2.lastIntersPoint = new CVector2D(0, 0);
_local2.lastN = new CVector2D(0, 0);
var _local3;
var _local5;
var _local4 = 6.283185 / _local2.hitCount;
_local2.hitPointArray = new Array(_local2.hitCount);
_local2.normalArray = new Array(_local2.hitCount);
_local2.hitArray = new Array(_local2.hitCount);
_local2.intersArray = new Array();
_local3 = 0;
while (_local3 < _local2.hitCount) {
_local2.hitPointArray[_local3] = new CVector2D(Math.sin(_local4 * _local3) * _local2.rad, (-Math.cos(_local4 * _local3)) * _local2.rad);
_local2.normalArray[_local3] = _local2.hitPointArray[_local3].multNew(-1);
_local2.normalArray[_local3].normalize();
_local3++;
}
}
function process(dTime, acc, koeffDamp) {
var _local2 = this;
var _local3 = dTime;
_local2.accSpeed = Math.max(-_local2.maxAccSpeed, Math.min(_local2.maxAccSpeed, _local2.accSpeed + (acc * _local3)));
_local2.speed = Math.max((-_local2.maxSpeed) * _local3, Math.min((_local2.speed * koeffDamp) + _local2.accSpeed, _local2.maxSpeed * _local3));
_local2.rot.rotate(_local2.speed / _local2.rad);
_local2.mc.mc_rim._rotation = (Math.atan2(_local2.rot.y, _local2.rot.x) * 180) / 3.141593;
}
function checkCollision(hit_mc) {
var _local2 = this;
var _local10;
var _local7;
var _local8 = new CVector2D(0, 0);
var _local16 = false;
var _local3;
var _local4;
var _local17;
var _local18 = new CVector2D(_local2.particle.prevPos.x, _local2.particle.prevPos.y);
var _local5 = new CVector2D(0, 0);
var _local15;
_local2._x = _local2.particle.pos.x;
_local2._y = _local2.particle.pos.y;
_local15 = 0;
_local10 = 0;
while (_local10 < _local2.hitCount) {
_local2.hitPointArray[_local10].copyTo(_local8);
_local2.localToGlobal(_local8);
if ((_local2.hitArray[_local10] = hit_mc.hitTest(_local8.x, _local8.y, true))) {
_local16 = true;
_local3 = _local10;
_local15++;
}
_local10++;
}
if (_local15 == _local2.hitCount) {
_local2.particle.pos.x = _local2.particle.prevPos.x + ((_local2.particle.pos.x - _local2.particle.prevPos.x) * 0.3);
_local2.particle.pos.y = _local2.particle.prevPos.y + ((_local2.particle.pos.y - _local2.particle.prevPos.y) * 0.3);
_local2._x = _local2.particle.pos.x;
_local2._y = _local2.particle.pos.y;
return(undefined);
}
_local10 = 0;
if (_local16) {
while (true) {
_local10++;
if (_local10 == _local2.hitCount) {
_local10 = 0;
}
if (!_local2.hitArray[_local10]) {
_local3 = -1;
_local7 = 0;
while (_local7 < _local2.hitCount) {
_local10++;
if (_local10 == _local2.hitCount) {
_local10 = 0;
}
if (_local3 == -1) {
if (_local2.hitArray[_local10]) {
_local3 = _local10;
_local5.plus(_local2.normalArray[_local10]);
}
} else if (!_local2.hitArray[_local10]) {
_local4 = _local10 - 1;
if (_local4 < 0) {
_local4 = _local2.hitCount - 1;
}
_local2.intersArray.push({k1:_local3, k2:_local4});
_local3 = -1;
} else {
_local5.plus(_local2.normalArray[_local10]);
}
_local7++;
}
break;
}
}
var _local6 = new CVector2D(0, 0);
if (_local2.intersArray.length > 0) {
_local5.normalize();
if (_local2.intersectionFlag) {
_local5.x = _local5.x + _local2.lastN.x;
_local5.y = _local5.y + _local2.lastN.y;
_local5.x = _local5.x / 2;
_local5.y = _local5.y / 2;
}
var _local13;
var _local12;
_local17 = _local2.intersArray.length;
_local10 = 0;
while (_local10 < _local17) {
_local13 = _local2.intersArray.pop();
_local3 = _local13.k1;
_local4 = _local13.k2;
_local2.particle.pos.minusNew(_local2.particle.prevPos).copyTo(_local6);
if (_local5.scalar(_local6) < 0) {
_local12 = Math.atan2(_local5.y, _local5.x);
_local6.rotate(-_local12);
_local6.x = (-_local6.x) * _local2.koeffSpring;
_local6.rotate(_local12);
_local2.pushOut(_local3, _local4, hit_mc);
_local2.particle.prevPos.x = _local2.particle.pos.x - _local6.x;
_local2.particle.prevPos.y = _local2.particle.pos.y - _local6.y;
} else {
_local2.pushOut(_local3, _local4, hit_mc);
}
_local10++;
}
_local2.validateRotation(_local5, _local18);
_local2.intersectionFlag = true;
_local2.particle.pos.copyTo(_local2.lastIntersPoint);
_local5.copyTo(_local2.lastN);
}
} else if (_local2.intersectionFlag) {
_local2.validateRotation(_local2.lastN, _local18);
_local2.intersectionFlag = false;
}
_local2._x = _local2.particle.pos.x;
_local2._y = _local2.particle.pos.y;
}
function pushOut(k1, k2, hit_mc) {
var _local2 = this;
var _local3;
if (k1 != k2) {
_local3 = _local2.normalArray[k1].plusNew(_local2.normalArray[k2]);
_local3.normalize();
var _local8 = new CVector2D(0, 0).getDistanceTo(_local2.hitPointArray[k1], _local2.hitPointArray[k2]);
_local8 = _local2.rad - Math.abs(_local8);
_local2.particle.pos.plus(_local3.multNew(_local8));
_local2.particle.prevPos.plus(_local3.multNew(_local8));
return(undefined);
}
_local3 = _local2.normalArray[k1];
var _local7 = _local3.multNew(-_local2.rad);
var _local5 = new CVector2D(0, 0);
var _local6 = 0;
var _local4 = 0.03;
_local7.copyTo(_local5);
_local2.localToGlobal(_local5);
if (hit_mc.hitTest(_local5.x, _local5.y, true)) {
_local6++;
_local2._x = (_local2.particle.pos.x = _local2.particle.pos.x + (_local3.x * _local4));
_local2._y = (_local2.particle.pos.y = _local2.particle.pos.y + (_local3.y * _local4));
// unexpected jump
}
_local6--;
_local2.particle.pos.x = _local2.particle.pos.x - (_local3.x * _local4);
_local2.particle.pos.y = _local2.particle.pos.y - (_local3.y * _local4);
_local2.particle.prevPos.plus(_local3.multNew(_local4 * _local6));
return(undefined);
}
function validateRotation(n, oldPos) {
var _local2 = this;
if ((!_local2.intersectionFlag) && (Math.abs(_local2.accSpeed) > 0.01)) {
if (Math.abs(_local2.accSpeed) < ((_local2.maxAccSpeed * 0.02) / 2)) {
_local2.accSpeed = 0;
} else if (_local2.accSpeed > 0) {
_local2.accSpeed = _local2.maxAccSpeed * 0.02;
} else {
_local2.accSpeed = (-_local2.maxAccSpeed) * 0.02;
}
}
var _local4 = new CVector2D(-n.y, n.x);
var _local7 = _local2.particle.pos.minusNew(oldPos);
var _local6 = Math.atan2(_local4.y, _local4.x);
var _local3 = _local7.rotateNew(-_local6);
_local2.speed = _local3.x + _local2.accSpeed;
_local3.y = 0;
_local3.rotate(_local6);
var _local5 = 1 - _local2.koeffSlip;
_local2.particle.pos.x = (_local2.particle.pos.x + ((_local4.x * _local2.accSpeed) * _local5)) - ((1 - _local2.koeffFriction) * _local3.x);
_local2.particle.pos.y = (_local2.particle.pos.y + ((_local4.y * _local2.accSpeed) * _local5)) - ((1 - _local2.koeffFriction) * _local3.y);
_local2.accSpeed = _local2.accSpeed * _local2.koeffSlip;
}
function applyAddedAcc() {
var _local2 = this;
_local2.particle.acc.x = _local2.particle.acc.x + (_local2.addedAcc.x * _local2.particle.mass);
_local2.particle.acc.y = _local2.particle.acc.y + (_local2.addedAcc.y * _local2.particle.mass);
}
var maxSpeed = 180;
var koeffSpring = 0.05;
var koeffSlip = 0.15;
var koeffFriction = 0.97;
var hitCount = 32;
}
Symbol 521 MovieClip [__Packages.CVector2D] Frame 0
class CVector2D
{
var x, y;
function CVector2D (x_, y_) {
x = x_;
y = y_;
}
function reinit(x_, y_) {
x = x_;
y = y_;
}
function getUgol() {
return(Math.atan2(y, x));
}
function duplicate() {
return(new CVector2D(x, y));
}
function copyTo(v) {
v.x = x;
v.y = y;
}
function minus(v) {
x = x - v.x;
y = y - v.y;
}
function minusNew(v) {
return(new CVector2D(x - v.x, y - v.y));
}
function normalize() {
var _local2 = this;
var _local3 = Math.sqrt((_local2.x * _local2.x) + (_local2.y * _local2.y));
_local2.x = _local2.x / _local3;
_local2.y = _local2.y / _local3;
}
function reverseNew() {
return(new CVector2D(-x, -y));
}
function scalar(v) {
return((x * v.x) + (y * v.y));
}
function modul() {
var _local2 = this;
Math.sqrt((_local2.x * _local2.x) + (_local2.y * _local2.y));
return(Math.sqrt((_local2.x * _local2.x) + (_local2.y * _local2.y)));
}
function reflectFromNormal(n) {
var _local2 = this;
var _local3 = Math.atan2(n.y, n.x);
_local2.rotate(-_local3);
_local2.x = -_local2.x;
_local2.rotate(_local3);
}
function rotate(u) {
var _local3 = u;
var _local2 = this;
var _local5 = _local2.x;
var _local4 = _local2.y;
_local2.x = (_local5 * Math.cos(_local3)) - (_local4 * Math.sin(_local3));
_local2.y = (_local5 * Math.sin(_local3)) + (_local4 * Math.cos(_local3));
}
function rotateNew(u) {
var _local3 = u;
var _local2 = this;
new CVector2D((_local2.x * Math.cos(_local3)) - (_local2.y * Math.sin(_local3)), (_local2.x * Math.sin(_local3)) + (_local2.y * Math.cos(_local3)));
return(new CVector2D((_local2.x * Math.cos(_local3)) - (_local2.y * Math.sin(_local3)), (_local2.x * Math.sin(_local3)) + (_local2.y * Math.cos(_local3))));
}
function mult(k) {
x = x * k;
y = y * k;
}
function multNew(k) {
return(new CVector2D(x * k, y * k));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
}
function plusNew(v) {
return(new CVector2D(x + v.x, y + v.y));
}
function getDistanceTo(p1, p2) {
var _local2 = p1;
var _local3 = _local2.y - p2.y;
var _local4 = p2.x - _local2.x;
var _local5 = (_local2.x * (p2.y - _local2.y)) - (_local2.y * (p2.x - _local2.x));
var _local6 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
_local3 = _local3 / _local6;
_local4 = _local4 / _local6;
_local5 = _local5 / _local6;
((_local3 * x) + (_local4 * y)) + _local5;
return(((_local3 * x) + (_local4 * y)) + _local5);
}
}
Symbol 522 MovieClip [__Packages.CMan] Frame 0
class CMan extends MovieClip
{
var stopFlag, state, mc;
function CMan () {
super();
stopFlag = false;
state = 0;
}
function stopAnim() {
stopFlag = true;
}
function stopMCAnim() {
mc.stop();
}
function startAnim() {
stopFlag = false;
}
function onEnterFrame() {
var _local2 = this;
if (_local2.stopFlag) {
return(undefined);
}
if (Key.isDown(LEFT_BUTTON)) {
_local2.toLeft();
return(undefined);
}
if (Key.isDown(RIGHT_BUTTON)) {
_local2.toRight();
return(undefined);
}
if ((_local2.state == 1) || (_local2.state == 2)) {
_local2.fromLeft();
return(undefined);
}
if ((_local2.state == 4) || (_local2.state == 5)) {
_local2.fromRight();
}
}
function toLeft() {
var _local2 = this;
var _local3;
if (_local2.state == 0) {
_local2.state = 1;
_local2.gotoAndStop("toLeft");
_local2.state = 1;
return(undefined);
}
if (_local2.state == 3) {
_local3 = _local2.mc._currentframe;
_local2.gotoAndStop("toLeft");
_local2.mc.gotoAndPlay((ANIM_FRAMES - _local3) + 1);
_local2.state = 1;
return(undefined);
}
if ((_local2.state == 4) || (_local2.state == 5)) {
_local2.fromRight();
_local2.state = 6;
}
}
function toRight() {
var _local2 = this;
var _local3;
if (_local2.state == 0) {
_local2.state = 1;
_local2.gotoAndStop("toRight");
_local2.state = 4;
return(undefined);
}
if (_local2.state == 6) {
_local3 = _local2.mc._currentframe;
_local2.gotoAndStop("toRight");
_local2.mc.gotoAndPlay((ANIM_FRAMES - _local3) + 1);
_local2.state = 4;
return(undefined);
}
if ((_local2.state == 1) || (_local2.state == 2)) {
_local2.fromLeft();
_local2.state = 3;
}
}
function fromLeft() {
var _local2 = this;
var _local3;
if (_local2.state == 1) {
_local3 = _local2.mc._currentframe;
_local2.gotoAndStop("fromLeft");
_local2.mc.gotoAndPlay((ANIM_FRAMES - _local3) + 1);
_local2.state = 3;
return(undefined);
}
if (_local2.state == 2) {
_local2.gotoAndStop("fromLeft");
_local2.state = 3;
}
}
function fromRight() {
var _local2 = this;
var _local3;
if (_local2.state == 4) {
_local3 = _local2.mc._currentframe;
_local2.gotoAndStop("fromRight");
_local2.mc.gotoAndPlay((ANIM_FRAMES - _local3) + 1);
_local2.state = 6;
return(undefined);
}
if (_local2.state == 5) {
_local2.gotoAndStop("fromRight");
_local2.state = 6;
}
}
function endMove() {
var _local2 = this;
if (_local2.state == 1) {
_local2.gotoAndStop("left");
_local2.state = 2;
return(undefined);
}
if (_local2.state == 3) {
_local2.state = 0;
_local2.gotoAndStop("stay");
return(undefined);
}
if (_local2.state == 4) {
_local2.state = 5;
_local2.gotoAndStop("right");
return(undefined);
}
if (_local2.state == 6) {
_local2.state = 0;
_local2.gotoAndStop("stay");
}
}
static var LEFT_BUTTON = 37;
static var RIGHT_BUTTON = 39;
static var ANIM_FRAMES = 7;
}
Symbol 523 MovieClip [__Packages.CParticleEngine] Frame 0
class CParticleEngine
{
var hit_mc, prevTime;
function CParticleEngine () {
}
function clear() {
var _local2 = this;
while (_local2.p_array.pop() != undefined) {
}
while (_local2.w_array.pop() != undefined) {
}
while (_local2.c_array.pop() != undefined) {
}
}
function setHitMovie(hit_mc_) {
hit_mc = hit_mc_;
}
function addParticle(p) {
p_array.push(p);
}
function addWheel(wheel, p, maxSpeed, radius) {
wheel.init(p, maxSpeed, radius);
w_array.push(wheel);
}
function addSpringConstraint(p1, p2, koeffStiff1, koeffStiff2) {
var _local2 = new CSpringConstraint(p1, p2, koeffStiff1, koeffStiff2);
c_array.push(_local2);
}
function start() {
prevTime = getTimer();
}
function computeForces() {
var _local3 = this;
var _local2;
var _local4 = _local3.p_array.length;
_local2 = 0;
while (_local2 < _local4) {
_local3.p_array[_local2].acc.x = 0;
_local3.p_array[_local2].acc.y = _local3.gravity * _local3.p_array[_local2].mass;
_local2++;
}
}
function clearForces() {
var _local4 = w_array.length;
var _local2;
var _local3;
_local2 = 0;
while (_local2 < _local4) {
_local3 = w_array[_local2];
_local3.addedAcc.x = (_local3.addedAcc.y = 0);
_local2++;
}
}
function applyManFrictions() {
var _local3 = this;
var _local4 = _local3.w_array.length;
var _local2;
_local2 = 0;
while (_local2 < _local4) {
_local3.w_array[_local2].applyAddedAcc();
_local2++;
}
}
function verlet(dTime) {
var _local3 = this;
var _local7 = 0.995;
var _local2;
var _local4 = _local3.p_array.length;
_local2 = 0;
while (_local2 < _local4) {
_local3.p_array[_local2].verlet(dTime, _local7);
_local2++;
}
_local4 = _local3.w_array.length;
var _local6 = 0;
if (Key.isDown(40)) {
_local6 = -0.6;
} else if (Key.isDown(38)) {
_local6 = 1;
}
_local2 = 0;
while (_local2 < _local4) {
_local3.w_array[_local2].process(dTime, (_local3.w_array[_local2].maxAccSpeed * _local6) / 3.2, 0.99);
_local2++;
}
}
function checkCollisions() {
var _local3 = this;
var _local2;
var _local4 = _local3.w_array.length;
_local2 = 0;
while (_local2 < _local4) {
_local3.w_array[_local2].checkCollision(_local3.hit_mc);
_local2++;
}
}
function checkConstraints(dTime) {
var _local3 = this;
var _local2;
var _local4 = _local3.c_array.length;
_local2 = 0;
while (_local2 < _local4) {
_local3.c_array[_local2].resolve(dTime);
_local2++;
}
}
function process() {
var _local2 = this;
var _local5 = getTimer();
var _local6 = (_local5 - _local2.prevTime) / 1000;
_local2.prevTime = _local5;
var _local3;
var _local4 = Math.min(Math.round(_local6 / _local2.t), _local2.maxSteps);
_local3 = 0;
while (_local3 < _local4) {
_local2.computeForces();
_local2.applyManFrictions();
_local2.verlet(_local2.t);
_local2.checkConstraints(_local2.t);
_local2.checkCollisions();
_local3++;
}
_local2.clearForces();
}
var p_array = new Array();
var w_array = new Array();
var c_array = new Array();
var t = 0.02;
var maxSteps = 2;
var gravity = 3.15;
}
Symbol 524 MovieClip [__Packages.CSpringConstraint] Frame 0
class CSpringConstraint
{
function CSpringConstraint (p1_, p2_, koeffStiffPress_, koeffStiffStretch_) {
var _local2 = this;
_local2.p1 = p1_;
_local2.p2 = p2_;
_local2.koeffStiffPress = koeffStiffPress_;
_local2.koeffStiffStretch = koeffStiffStretch_;
var _local3 = new CVector2D(_local2.p1.pos.x - _local2.p2.pos.x, _local2.p1.pos.y - _local2.p2.pos.y);
_local2.relaxLen = _local3.modul();
}
function resolve(dTime) {
var _local2 = this;
var _local3 = new CVector2D(_local2.p1.pos.x - _local2.p2.pos.x, _local2.p1.pos.y - _local2.p2.pos.y);
var _local5 = _local3.modul();
var _local6 = (_local2.relaxLen - _local5) / _local5;
_local3.mult(_local6);
var _local4;
if (_local5 > _local2.relaxLen) {
_local4 = _local2.koeffStiffStretch;
} else {
_local4 = _local2.koeffStiffPress;
}
_local2.p2.pos.x = _local2.p2.pos.x - (((_local3.x * ((_local2.p1.mass / (_local2.p1.mass + _local2.p2.mass)) + 1)) / 2) * _local4);
_local2.p2.pos.y = _local2.p2.pos.y - (((_local3.y * ((_local2.p1.mass / (_local2.p1.mass + _local2.p2.mass)) + 1)) / 2) * _local4);
_local2.p1.pos.x = _local2.p1.pos.x + (((_local3.x * ((_local2.p2.mass / (_local2.p1.mass + _local2.p2.mass)) + 1)) / 2) * _local4);
_local2.p1.pos.y = _local2.p1.pos.y + (((_local3.y * ((_local2.p2.mass / (_local2.p1.mass + _local2.p2.mass)) + 1)) / 2) * _local4);
}
}
Symbol 525 MovieClip [__Packages.CParticle] Frame 0
class CParticle
{
function CParticle (x_, y_, mass_) {
var _local2 = this;
_local2.pos = new CVector2D(x_, y_);
_local2.prevPos = _local2.pos.duplicate();
_local2.mass = mass_;
_local2.acc = new CVector2D(0, 0);
_local2.mc = null;
}
function verlet(dTime, koeffDamp) {
var _local2 = this;
var _local3 = _local2.pos.duplicate();
_local2.pos.x = _local2.pos.x + (((_local2.pos.x - _local2.prevPos.x) * koeffDamp) + (_local2.acc.x * dTime));
_local2.pos.y = _local2.pos.y + (((_local2.pos.y - _local2.prevPos.y) * koeffDamp) + (_local2.acc.y * dTime));
_local3.copyTo(_local2.prevPos);
if (_local2.mc != null) {
_local2.mc._x = _local2.pos.x;
_local2.mc._y = _local2.pos.y;
}
}
}
Symbol 526 MovieClip [__Packages.CCamera] Frame 0
class CCamera
{
function CCamera () {
}
function init(targetMovie_, levelMovie_) {
var _local2 = this;
_local2.targetMovie = targetMovie_;
_local2.levelMovie = levelMovie_;
_local2.process();
}
function process() {
var _local2 = this;
var _local3 = {x:_local2.targetMovie._x, y:_local2.targetMovie._y};
_local2.targetMovie._parent.localToGlobal(_local3);
_local2.levelMovie._parent.globalToLocal(_local3);
_local2.levelMovie._x = _local2.levelMovie._x + (SCREEN_WIDTH2 - _local3.x);
_local2.levelMovie._y = _local2.levelMovie._y + (SCREEN_HEIGHT2 - _local3.y);
_local2.levelMovie._x = Math.round(_local2.levelMovie._x);
_local2.levelMovie._y = Math.round(_local2.levelMovie._y);
if (_local2.levelMovie._x > 0) {
_local2.levelMovie._x = 0;
} else if ((_local2.levelMovie._x + _local2.levelMovie._width) < SCREEN_WIDTH) {
_local2.levelMovie._x = SCREEN_WIDTH - _local2.levelMovie._width;
}
if (_local2.levelMovie._y < 0) {
_local2.levelMovie._y = 0;
}
}
static var SCREEN_WIDTH = 500;
static var SCREEN_HEIGHT = 400;
static var SCREEN_WIDTH2 = SCREEN_WIDTH / 2;
static var SCREEN_HEIGHT2 = SCREEN_HEIGHT / 2;
}
Symbol 527 MovieClip [__Packages.CBack] Frame 0
class CBack
{
function CBack () {
}
function init(mc1_, mc2_, scaleFactor_) {
var _local2 = this;
_local2.mc1 = mc1_;
_local2.mc2 = mc2_;
_local2.scaleFactor = scaleFactor_;
}
function process(levelX) {
var _local2 = this;
var _local3 = levelX;
_local3 = Math.abs(Math.round(_local3) / _local2.scaleFactor) % _local2.mc1._width;
_local2.mc1._x = -_local3;
_local2.mc2._x = (_local2.mc1._x + _local2.mc1._width) - 1;
}
static var SCREEN_WIDTH = 500;
}
Symbol 528 MovieClip [__Packages.CBikeSynchronizer] Frame 0
class CBikeSynchronizer
{
function CBikeSynchronizer () {
var _local2 = this;
_local2.fdir = new CVector2D(0, 0);
_local2.fpos = new CVector2D(0, 0);
_local2.bdir = new CVector2D(0, 0);
_local2.bpos = new CVector2D(0, 0);
}
function init(mc_container, sX, sY) {
var _local2 = this;
var _local4 = mc_container;
var _local3 = {x:0, y:0};
_local2.mc_back_wheel = _local4.attachMovie("lib_back_wheel", "back_w", 0);
_local2.mc_forward_wheel = _local4.attachMovie("lib_forward_wheel", "forward_w", 1);
_local2.mc_bike = _local4.attachMovie("lib_bike_body", "body", 2);
_local2.mc_bike._x = sX;
_local2.mc_bike._y = sY;
_local3.x = _local2.mc_bike.mc.mc_s_wheel_back._x;
_local3.y = _local2.mc_bike.mc.mc_s_wheel_back._y;
_local2.mc_bike.mc.localToGlobal(_local3);
_local2.mc_bike._parent.globalToLocal(_local3);
_local2.mc_back_wheel._x = _local3.x;
_local2.mc_back_wheel._y = _local3.y;
_local3.x = _local2.mc_bike.mc.mc_s_wheel_forward._x;
_local3.y = _local2.mc_bike.mc.mc_s_wheel_forward._y;
_local2.mc_bike.mc.localToGlobal(_local3);
_local2.mc_bike._parent.globalToLocal(_local3);
_local2.mc_forward_wheel._x = _local3.x;
_local2.mc_forward_wheel._y = _local3.y;
}
function setParticles(pBody_, pBWheel_, pFWheel_) {
var _local2 = this;
_local2.pBody = pBody_;
_local2.pBWheel = pBWheel_;
_local2.pFWheel = pFWheel_;
_local2.fdir.reinit(_local2.mc_bike.mc.mc_f_point._x - _local2.mc_bike.mc.mc_s_wheel_forward._x, _local2.mc_bike.mc.mc_f_point._y - _local2.mc_bike.mc.mc_s_wheel_forward._y);
_local2.fdir.normalize();
_local2.fpos.x = _local2.mc_bike.mc.mc_f_spring._x + ((_local2.fdir.x * (-_local2.mc_bike.mc.mc_f_spring._y)) / _local2.fdir.y);
_local2.fpos.x = _local2.fpos.x - _local2.mc_bike.mc.mc_body_man._x;
_local2.bpos.reinit(_local2.mc_bike.mc.mc_b_spring.mc_top._x, _local2.mc_bike.mc.mc_b_spring.mc_top._y);
_local2.mc_bike.mc.mc_b_spring.localToGlobal(_local2.bpos);
_local2.bdir.reinit(_local2.bpos.x, _local2.bpos.y);
_local2.mc_bike.mc.mc_body_man.globalToLocal(_local2.bpos);
_local2.mc_bike.mc.globalToLocal(_local2.bdir);
_local2.bdir.x = _local2.bdir.x - _local2.mc_bike.mc.mc_b_spring._x;
_local2.bdir.y = _local2.bdir.y - _local2.mc_bike.mc.mc_b_spring._y;
}
function process() {
var _local2 = this;
var _local3 = {x:0, y:0};
var _local4;
_local2.mc_bike._x = _local2.pBody.pos.x;
_local2.mc_bike._y = _local2.pBody.pos.y;
_local4 = _local2.pFWheel.pos.minusNew(_local2.pBWheel.pos);
_local2.mc_bike._rotation = (Math.atan2(_local4.y, _local4.x) * 180) / 3.141593;
_local3.x = _local2.pFWheel.pos.x;
_local3.y = _local2.pFWheel.pos.y;
_local2.mc_bike._parent.localToGlobal(_local3);
_local2.mc_bike.mc.globalToLocal(_local3);
_local2.mc_bike.mc.mc_f_spring._x = _local3.x;
_local2.mc_bike.mc.mc_f_spring._y = _local3.y;
var _local5 = ((_local3.x + ((_local2.fdir.x * (-_local3.y)) / _local2.fdir.y)) - _local2.mc_bike.mc.mc_body_man._x) - _local2.fpos.x;
_local2.mc_bike.mc.mc_body_man._x = _local2.mc_bike.mc.mc_body_man._x + _local5;
_local2.mc_bike.mc.mc_f_spring.mc_spring._xscale = _local2.mc_bike.mc.mc_f_spring._y * 10;
_local3.x = _local2.mc_bike.mc.mc_f_spring.mc_spring._x;
_local3.y = _local2.mc_bike.mc.mc_f_spring.mc_spring._y;
_local2.mc_bike.mc.mc_f_spring.localToGlobal(_local3);
_local2.mc_bike.mc.globalToLocal(_local3);
_local2.mc_bike.mc.mc_f_spring.mc_spring._xscale = _local3.y * 10;
_local3.x = _local2.pBWheel.pos.x;
_local3.y = _local2.pBWheel.pos.y;
_local2.mc_bike._parent.localToGlobal(_local3);
_local2.mc_bike.mc.globalToLocal(_local3);
_local2.mc_bike.mc.mc_b_spring._x = _local3.x;
_local2.mc_bike.mc.mc_b_spring._y = _local3.y;
_local4.reinit(_local2.bpos.x, _local2.bpos.y);
_local2.mc_bike.mc.mc_body_man.localToGlobal(_local4);
_local2.mc_bike.mc.globalToLocal(_local4);
_local4.x = _local4.x - _local2.mc_bike.mc.mc_b_spring._x;
_local4.y = _local4.y - _local2.mc_bike.mc.mc_b_spring._y;
_local2.mc_bike.mc.mc_b_spring._rotation = ((_local4.getUgol() - _local2.bdir.getUgol()) * 180) / 3.141593;
}
}
Symbol 45 MovieClip Frame 444
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 100
_root.play();
Symbol 69 MovieClip [lib_back_wheel] Frame 1
#initclip 12
Object.registerClass("lib_back_wheel", CWheel);
#endinitclip
Symbol 70 MovieClip [lib_forward_wheel] Frame 1
#initclip 10
Object.registerClass("lib_forward_wheel", CWheel);
#endinitclip
Symbol 123 MovieClip [lib_man] Frame 1
#initclip 11
Object.registerClass("lib_man", CMan);
#endinitclip
this.stop();
Symbol 134 MovieClip Frame 1
#initclip 13
function updateSoundLoop() {
if (!stopSoundFlag) {
if (zastSoundFlag) {
mc_sloop.gotoAndStop(3);
mc_sloop_zast.gotoAndStop(2);
} else {
mc_sloop.gotoAndStop(2);
mc_sloop_zast.gotoAndStop(3);
}
}
}
function soundOff() {
if (zastSoundFlag) {
mc_sloop_zast.gotoAndStop(3);
} else {
mc_sloop.gotoAndStop(3);
}
stopSoundFlag = true;
}
function soundOn() {
if (zastSoundFlag) {
mc_sloop_zast.gotoAndStop(2);
} else {
mc_sloop.gotoAndStop(2);
}
stopSoundFlag = false;
}
function gameStart() {
scores = 0;
timeCounter = 0;
stargeted = 0;
life = 10;
zastSoundFlag = false;
updateSoundLoop();
level = 0;
nextLevel();
}
function nextLevel() {
stargeted = 0;
levelTimeCounter = 0;
if (level == 15) {
newGame();
return(undefined);
}
level++;
this.gotoAndStop("reset");
this.gotoAndStop("game");
}
function replay() {
stargeted = 0;
this.gotoAndStop("reset");
this.gotoAndStop("game");
}
function newGame() {
stargeted = 0;
zastSoundFlag = true;
updateSoundLoop();
this.gotoAndStop("menu");
}
function playSnd(lib_snd) {
s = new Sound(this);
s.attachSound(lib_snd);
s.start();
}
function initLevel() {
lastTimer = getTimer();
mc_level.mc_minimap._visible = true;
mc_level.mc_minimap.mc_stage.gotoAndStop(level);
if (level > 1) {
var _local1 = 1;
while (_local1 < level) {
mc_level.mc_minimap["s" + _local1].gotoAndStop(2);
_local1++;
}
}
mc_level.mc_minimap["s" + level].gotoAndStop(3);
mc_level.gotoAndStop(level);
mc_level.mc.mc_hit._visible = false;
if (bikeSync == null) {
bikeSync = new CBikeSynchronizer();
engine = new CParticleEngine();
objCamera = new CCamera();
back1 = new CBack();
back2 = new CBack();
} else {
engine.clear();
}
back1.init(mc_level.mc.mc_fon.mc_grass.mc1, mc_level.mc.mc_fon.mc_grass.mc2, 1);
back2.init(mc_level.mc.mc_fon.mc_hill.mc1, mc_level.mc.mc_fon.mc_hill.mc2, 2);
bikeSync.init(mc_level.mc.mc_bike, 0, 0);
var _local4 = new CParticle(bikeSync.mc_back_wheel._x, bikeSync.mc_back_wheel._y, 3);
engine.addParticle(_local4);
engine.addWheel(bikeSync.mc_back_wheel, _local4, 28.5, 17.5);
var _local2 = new CParticle(bikeSync.mc_forward_wheel._x, bikeSync.mc_forward_wheel._y, 3);
engine.addParticle(_local2);
engine.addWheel(bikeSync.mc_forward_wheel, _local2, 10.5, 17.5);
var _local3 = new CParticle(bikeSync.mc_bike._x, bikeSync.mc_bike._y, 3);
_local3.mc = mc_level.mc.mc_bike.mc_test;
engine.addParticle(_local3);
engine.addSpringConstraint(_local4, _local2, 0.45, 0.5);
engine.addSpringConstraint(_local4, _local3, 0.45, 0.55);
engine.addSpringConstraint(_local3, _local2, 0.45, 0.7);
bikeSync.setParticles(_local3, _local4, _local2);
objCamera.init(bikeSync.mc_bike, mc_level.mc);
engine.setHitMovie(mc_level.mc.mc_hit);
engine.start();
accFlag = false;
accCounter = 50;
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(2);
}
mc_messageF.gotoAndStop(1);
mc_messageF.mc_message.gotoAndStop("empty");
gameState = 0;
var _local1 = 1;
while (_local1 <= 10) {
mc_level.mc["s" + _local1].gotoAndStop(Math.floor((Math.random() * 3) + 1));
_local1++;
}
}
function processGame() {
var _local8;
var _local7;
_local8 = getTimer();
_local7 = _local8 - lastTimer;
txtFps = 1 / (_local7 / 1000);
lastTimer = _local8;
if (gameState == 0) {
timeCounter = timeCounter + _local7;
levelTimeCounter = levelTimeCounter + _local7;
showTime();
var _local10 = 0;
var _local9 = 0;
var _local4;
var _local6;
accCounter++;
if (!accFlag) {
accFlag = Key.isDown(38);
if (accFlag && (accCounter > 10)) {
accCounter = 0;
if (!stopSoundFlag) {
mc_gas.gotoAndPlay(2);
}
}
} else {
accFlag = Key.isDown(38);
}
if (Key.isDown(CMan.LEFT_BUTTON)) {
_local4 = calcBikeNVector();
if (_local4.y > 0) {
_local6 = (Math.abs(_local4.y) * 0.2) + 0.8;
bikeSync.mc_forward_wheel.addedAcc.x = bikeSync.mc_forward_wheel.addedAcc.x - (((_local4.x * engine.gravity) / 1.1) * _local6);
bikeSync.mc_forward_wheel.addedAcc.y = bikeSync.mc_forward_wheel.addedAcc.y - (((_local4.y * engine.gravity) * 1.3) * _local6);
bikeSync.mc_back_wheel.addedAcc.x = bikeSync.mc_back_wheel.addedAcc.x + (((_local4.x * engine.gravity) / 1.5) * _local6);
bikeSync.mc_back_wheel.addedAcc.y = bikeSync.mc_back_wheel.addedAcc.y + ((_local4.y * engine.gravity) * _local6);
}
} else if (Key.isDown(CMan.RIGHT_BUTTON)) {
_local4 = calcBikeNVector();
if (_local4.y > 0) {
_local6 = (Math.abs(_local4.y) * 0.2) + 0.8;
bikeSync.mc_forward_wheel.addedAcc.x = bikeSync.mc_forward_wheel.addedAcc.x + (((_local4.x * engine.gravity) / 1.5) * _local6);
bikeSync.mc_forward_wheel.addedAcc.y = bikeSync.mc_forward_wheel.addedAcc.y + ((_local4.y * engine.gravity) * _local6);
bikeSync.mc_back_wheel.addedAcc.x = bikeSync.mc_back_wheel.addedAcc.x - (((_local4.x * engine.gravity) / 1.1) * _local6);
bikeSync.mc_back_wheel.addedAcc.y = bikeSync.mc_back_wheel.addedAcc.y - (((_local4.y * engine.gravity) * 1.3) * _local6);
}
}
engine.process();
bikeSync.process();
objCamera.process();
back1.process(mc_level.mc._x);
back2.process(mc_level.mc._x);
mc_level.mc.mc_fon._x = -mc_level.mc._x;
var _local2 = 1;
while (_local2 <= _root.nofbonus) {
if (((mc_level.mc["s" + _local2]._visible == true) && (bikeSync.mc_bike.hitTest(mc_level.mc["s" + _local2]))) && (!mc_level.mc["s" + _local2].bikehit)) {
mc_level.mc["s" + _local2].bikehit = true;
mc_level.mc["s" + _local2].pio.gotoAndPlay(2);
}
_local2++;
}
if (((bikeSync.mc_bike._x + mc_level.mc.mc_bike._x) >= mc_level.mc.mc_finish._x) && (stargeted >= 5)) {
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(3);
}
if (level < 11) {
mc_messageF.gotoAndPlay(2);
gotoAndStop ("comple");
gameState = 2;
} else {
mc_messageF.gotoAndPlay(2);
mc_messageF.mc_message.gotoAndStop("gamewin");
gameState = 3;
}
addLevelScores();
mc_messageF.mc_message.levelTime = getTimeString(levelTimeCounter);
mc_messageF.mc_message.commonTime = getTimeString(timeCounter);
mc_messageF.mc_message.scores = scores;
bikeSync.mc_bike.mc.mc_body_man.mc.stopAnim();
bikeSync.mc_bike.mc.mc_body_man.mc.stopMCAnim();
return(undefined);
}
var _local3 = {x:0, y:0};
var _local5 = bikeSync.mc_bike.mc.mc_body_man.mc.mc.h;
_local3.x = _local5.p._x;
_local3.y = _local5.p._y;
_local5.localToGlobal(_local3);
if (mc_level.mc.mc_hit.hitTest(_local3.x, _local3.y, true)) {
trace("ravi2");
loose();
return(undefined);
}
_local5 = bikeSync.mc_bike.mc.mc_body_man.mc.mc.b;
_local3.x = _local5.p._x;
_local3.y = _local5.p._y;
_local5.localToGlobal(_local3);
if (mc_level.mc.mc_hit.hitTest(_local3.x, _local3.y, true)) {
trace("ravi3");
loose();
return(undefined);
}
_local5 = bikeSync.mc_bike.mc.mc_body_man.mc.mc.l;
_local3.x = _local5.p._x;
_local3.y = _local5.p._y;
_local5.localToGlobal(_local3);
if (mc_level.mc.mc_hit.hitTest(_local3.x, _local3.y, true)) {
loose();
}
}
}
function keyPressed() {
if (Key.isDown(32)) {
if (gameState == 2) {
nextLevel();
} else if (gameState == 1) {
var _local2 = 0;
while (_local2 <= _root.nofbonus) {
mc_level.mc["s" + _loc1].bikehit = false;
_local2++;
}
replay();
}
}
}
function showTime() {
txtTime = getTimeString(timeCounter);
}
function getTimeString(time) {
var _local1 = Math.round(time / 1000);
var _local2 = Math.floor(_local1 / 60);
_local1 = _local1 - (_local2 * 60);
var _local3;
var _local4;
if (_local1 < 10) {
_local4 = "0" + _local1;
} else {
_local4 = "" + _local1;
}
if (_local2 < 10) {
_local3 = "0" + _local2;
} else {
_local3 = "" + _local2;
}
(_local3 + ":") + _local4;
return((_local3 + ":") + _local4);
}
function resume() {
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(2);
}
mc_messageF.gotoAndStop(1);
mc_messageF.mc_message.gotoAndStop("empty");
bikeSync.mc_bike.mc.mc_body_man.mc.startAnim();
gameState = 0;
}
function pauseGame() {
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(3);
}
mc_messageF.mc_message.gotoAndStop("pause");
bikeSync.mc_bike.mc.mc_body_man.mc.stopAnim();
gameState = 4;
}
function loose() {
if (!stopSoundFlag) {
mc_sloop.gotoAndStop(3);
}
if (!stopSoundFlag) {
playSnd("lib_snd_fail");
}
mc_messageF.gotoAndPlay(2);
_root.life--;
_root.crash.gotoAndPlay(2);
_root.scores = 0;
mc_messageF.mc_message.levelTime = getTimeString(levelTimeCounter);
mc_messageF.mc_message.commonTime = getTimeString(timeCounter);
mc_messageF.mc_message.scores = scores;
bikeSync.mc_bike.mc.mc_body_man.mc.stopAnim();
bikeSync.mc_bike.mc.mc_body_man.mc.stopMCAnim();
gameState = 1;
}
function calcBikeNVector() {
var _local1;
_local1 = bikeSync.mc_forward_wheel.particle.pos.minusNew(bikeSync.mc_back_wheel.particle.pos);
_local1.normalize();
var _local2;
_local2 = _local1.x;
_local1.x = -_local1.y;
_local1.y = _local2;
return(_local1);
}
_root.nofbonus = 25;
var lastTimer;
var level;
var stopSoundFlag = false;
var bikeSync = null;
var engine = null;
var objCamera = null;
var back1 = null;
var back2 = null;
var gameState;
var zastSoundFlag = true;
var accFlag;
var accCounter;
var timeCounter;
var levelTimeCounter;
var scores;
var highQuality = true;
var life = 10;
var stargeted;
#endinitclip
Symbol 178 Button
on (release) {
_root.gotoAndStop("level selection");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 192 Button
on (release) {
getURL ("http://gameseverytime.com/score/MarioRide", "_blank");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 206 Button
on (release) {
_root.gotoAndStop("help");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 207 Button
on (release) {
_root.gotoAndStop("level selection");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 210 Button
on (release) {
getURL ("http://www.gameseverytime.com", "_blank");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 211 MovieClip Frame 1
_root.titlesnd.start();
Symbol 211 MovieClip Frame 30
_root.btnfalling.start();
Symbol 211 MovieClip Frame 36
_root.btnfalling.start();
Symbol 211 MovieClip Frame 40
_root.btnfalling.start();
Symbol 211 MovieClip Frame 41
_root.btnfalling.start();
Symbol 211 MovieClip Frame 72
stop();
_root.menusnd.start();
_root.menusnd.setVolume(55);
Symbol 212 MovieClip Frame 1
stop();
Symbol 217 Button
on (release) {
_root.btnsnd.setVolume(0);
gotoAndStop (2);
_root.soundss = 0;
}
Symbol 219 Button
on (release) {
_root.btnsnd.setVolume(100);
gotoAndStop (1);
_root.soundss = 1;
}
Symbol 220 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 2
stop();
Symbol 231 Button
on (release) {
_root.gotoAndStop("help");
}
Symbol 232 Button
on (release) {
_root.lvls = 1;
_root.scores = 0;
_root.playerDetails.data.lev = _root.lvls;
_root.gameStart();
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 233 MovieClip Frame 1
_root.titlesnd.start();
Symbol 233 MovieClip Frame 12
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 2
stop();
Symbol 241 MovieClip Frame 3
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 2
_root.coinssnd.start();
Symbol 264 MovieClip Frame 10
_root.stargeted = ++_root.stargeted;
_root.scores = _root.scores + 100;
_root.scoress = _root.scores;
Symbol 264 MovieClip Frame 25
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 2
_root.coinssnd.start();
Symbol 268 MovieClip Frame 10
_root.stargeted = ++_root.stargeted;
_root.scores = _root.scores + 100;
_root.scoress = _root.scores;
Symbol 268 MovieClip Frame 25
stop();
Symbol 269 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 2
_root.coinssnd.start();
Symbol 269 MovieClip Frame 10
_root.stargeted = ++_root.stargeted;
_root.scores = _root.scores + 100;
_root.scoress = _root.scores;
Symbol 269 MovieClip Frame 25
stop();
Symbol 270 MovieClip Frame 1
stop();
Instance of Symbol 241 MovieClip "mc_fon" in Symbol 275 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(1 + random(3));
}
Symbol 355 MovieClip Frame 1
_root.nofbonus = 25;
Symbol 388 Button
on (release) {
getURL ("http://www.gameseverytime.com", "_blank");
}
Symbol 403 MovieClip Frame 444
stop();
Symbol 412 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 3
stopAllSounds();
_root.crashsnd.start();
Symbol 412 MovieClip Frame 8
_root.lifee = _root.lifee - 1;
Symbol 412 MovieClip Frame 122
_root.replay();
Symbol 433 Button
on (release) {
_root.gameStart();
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 434 MovieClip Frame 1
_root.titlesnd.start();
Symbol 434 MovieClip Frame 8
stop();
Symbol 485 MovieClip Frame 5
_root.btnfalling.start();
Symbol 485 MovieClip Frame 9
_root.btnfalling.start();
Symbol 485 MovieClip Frame 13
_root.btnfalling.start();
Symbol 485 MovieClip Frame 14
_root.btnfalling.start();
Symbol 485 MovieClip Frame 15
_root.btnfalling.start();
Symbol 485 MovieClip Frame 16
_root.btnfalling.start();
Symbol 485 MovieClip Frame 19
_root.btnfalling.start();
Symbol 485 MovieClip Frame 40
stop();
var i = 1;
while (i <= 10) {
_root.lvl_mc["le" + i]._alpha = 50;
i++;
}
Symbol 491 Button
on (release) {
_root.submitScore();
_root.lifee = 10;
_root.totalscoress = 0;
_root.gotoAndStop("menu");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 493 Button
on (release) {
_root.gotoAndStop("menu");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 503 MovieClip Frame 1
_root.titlesnd.start();
Symbol 503 MovieClip Frame 18
stop();
Symbol 513 Button
on (release) {
_root.gotoAndStop("level selection");
}
on (rollOver) {
_root.btnsnd.start();
}
Symbol 519 MovieClip Frame 1
_root.titlesnd.start();
Symbol 519 MovieClip Frame 13
stop();