Frame 1
stop();
Instance of Symbol 1445 MovieClip in Frame 1
onClipEvent (enterFrame) {
percentloaded = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 1000);
nextframe = Math.ceil((_currentframe - percentloaded) / -10);
if (nextframe > 0) {
i = 0;
while (i < nextframe) {
nextFrame();
i++;
}
}
if (_currentframe < 1000) {
} else {
gotoAndStop (1001);
}
}
Frame 2
var Star = Array("", false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false);
_root.Restartcoins = function () {
_root["coindata1-1"] = [""];
_root["coindata1-2"] = [""];
_root["coindata1-3"] = [""];
_root["coindata1-4"] = [""];
_root["coindata2-1"] = [""];
_root["coindata2-2"] = [""];
_root["coindata2-3"] = [""];
_root["coindata2-4"] = [""];
_root.coindataLevel1 = [""];
_root.coincount = 0;
_root.Coins = 0;
_root.RedCoins = 0;
};
_root.Restartcoins();
Frame 3
isEven = function (a) {
if (Math.round(a / 2) == (a / 2)) {
return(true);
}
return(false);
};
isOdd = function (a) {
if (Math.round(a / 2) == (a / 2)) {
return(false);
}
return(true);
};
canBeDividedBy = function (a, b) {
if (Math.round(a / b) == (a / b)) {
return(true);
}
return(false);
};
isPrime = function (c) {
c = Math.abs(c);
if (c > 0) {
d = 2;
while (d < (c + 1)) {
if (!(c === Math.round(c))) {
return(false);
}
if (canBeDividedBy(c, d) && (!(c === d))) {
return(false);
}
d++;
}
}
if ((b >= c) && (c == Math.round(c))) {
return(true);
}
};
radiansToAngle = function (a) {
a = 57.2957795130823 * a;
return(a);
};
angleToRadians = function (a) {
a = (a / 180) * Math.PI;
return(a);
};
groundFriction = function (a, b, c) {
if (a > 0) {
d = 1;
} else {
d = -1;
}
a = Math.abs(a);
a = a - b;
if (a < 0) {
a = 0;
}
a = a / c;
a = a * d;
return(a);
};
moveObject = function (a, b, c) {
c._x = c._x + a;
c._y = c._y + b;
};
moveObjectFromAngle = function (a, b, c) {
c._x = c._x + (Math.cos(angleToRadians(b)) * a);
c._y = c._y + (Math.sin(angleToRadians(b)) * a);
};
moveObjectFromRadians = function (a, b, c) {
c._x = c._x + (Math.cos(b) * a);
c._y = c._y + (Math.sin(b) * a);
};
keyPressed = function (a) {
if (isNaN(_root["numberdown" + a]) == true) {
_root["numberdown" + a] = 0;
}
if (Key.isDown(a)) {
if (_root["numberdown" + a] == 0) {
_root["numberdown" + a] = 1;
return(true);
}
} else {
_root["numberdown" + a] = 0;
}
};
keyUnpressed = function (a) {
if (isNaN(_root["numberup" + a]) == true) {
_root["numberup" + a] = 1;
}
if (!Key.isDown(a)) {
if (_root["numberup" + a] == 0) {
_root["numberup" + a] = 1;
return(true);
}
} else {
_root["numberup" + a] = 0;
}
};
radiansToAngle = function (a) {
a = 57.2957795130823 * a;
return(a);
};
angleToRadians = function (a) {
a = (a / 180) * Math.PI;
return(a);
};
com.wiicade.WiiMote.init();
StartChar = function (a, b, c, d, e, f, g, h, i, resetmusic) {
_root.playingcourse = a;
_root.attachMovie(_root[a + "FarBackground"], "FarBackground", _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
_root.createEmptyMovieClip("BGCourse", _root.getNextHighestDepth());
_root.BGCourse._y = _root.screensizeY / 2;
_root.BGCourse._x = _root.screensizeX / 2;
_root.BGCourse.attachMovie(_root[a + "Background"], "BG", _root.BGCourse.getNextHighestDepth(), {_x:(-b) / 10, _y:(-c) / 10});
_root.createEmptyMovieClip("Course", _root.getNextHighestDepth());
_root.Course._y = _root.screensizeY / 2;
_root.Course._x = _root.screensizeX / 2;
b = -b;
c = -c;
d = -d;
e = -e;
_root.Course.attachMovie(a + "Puddle", "Puddle", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "Ice", "Ice", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "BackGFX", "BackGFX", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "Platforms", "Platforms", _root.Course.getNextHighestDepth(), {_x:b, _y:c, _alpha:0});
_root.Course.attachMovie(a + "BPlatforms", "BPlatforms", _root.Course.getNextHighestDepth(), {_x:b, _y:c, _alpha:0});
_root.Course.attachMovie("Char", "Char", _root.Course.getNextHighestDepth(), {_x:b - d, _y:c - e});
_root.Course.attachMovie(a + "Water", "Water", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "FrontGFX", "FrontGFX", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "Edge", "Edge", _root.Course.getNextHighestDepth(), {_x:b, _y:c, _alpha:0});
_root.Course.attachMovie(a + "CamEdge", "CamEdge", _root.Course.getNextHighestDepth(), {_x:b, _y:c, _alpha:0});
_root.Course.BackGFX.createEmptyMovieClip("StartClip", _root.Course.BackGFX.getNextHighestDepth());
_root.Course.BackGFX.StartClip._y = _root.Course.Char._y - _root.Course.BackGFX._y;
_root.Course.BackGFX.StartClip._x = _root.Course.Char._x - _root.Course.BackGFX._x;
_root.StartY = _root.Course.BackGFX.StartClip._y - _root.Course.BackGFX._y;
_root.StartX = _root.Course.BackGFX.StartClip._x - _root.Course.BackGFX._x;
tellTarget (_root.Course.Char) {
tall = 40;
wide = 10;
yspeed = 0;
xspeed = 0;
air = true;
frame = 1;
lockon = true;
Ice = false;
Puddle = false;
Water = false;
attack = false;
attackFrame = "";
_root.DiveRot = 0;
hurt = false;
blink = 0;
StunTime = 0;
doublejump = 0;
doublejumpcount = 0;
_root.playpause = false;
spinattackcount = 0;
spincount = 0;
spinattackcounter = 0;
};
_root.Camcenter = _root.Course.Char;
_root.Controll = true;
_root.CameraZoom = 100;
_root.coursescale2 = f - 100;
_root.coursescale = _root.coursescale2;
_root.CameraZoom2 = _root.CameraZoom;
_root.Fluddpow = h;
if (_root[a + "Maxzoomout"] == undefined) {
_root.Maxzoomout = 50;
} else {
_root.Maxzoomout = _root[a + "Maxzoomout"];
}
if (_root[a + "Maxzoomin"] == undefined) {
_root.Maxzoomin = 200;
} else {
_root.Maxzoomin = _root[a + "Maxzoomin"];
}
_root.attachMovie("Stats Clip", "Stats", _root.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie(i, "Transition", _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
_root.attachMovie("Pointer", "pointer", _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
if (g == "Mario") {
_root.Course.Char.gotoAndStop(1);
}
if (g == "Luigi") {
_root.Course.Char.gotoAndStop(2);
}
_root.PlayingChar = g;
if (resetmusic == true) {
if ((!(_root[a + "MusicIntro"] === undefined)) && (!(_root[a + "MusicIntro"] === "None"))) {
_root.bgsong.stop();
_root.bgsong = new Sound(this);
_root.bgsong.attachSound(_root[a + "MusicIntro"]);
_root.bgsong.start(0, 1);
_root.bgsong.setVolume(_root.BgVolume);
_root.bgsong.onSoundComplete = function () {
_root.bgsong.attachSound(_root[a + "Music"]);
_root.bgsong.start(0, 999);
_root.bgsong.setVolume(_root.BgVolume);
};
} else {
_root.bgsong.stop();
_root.bgsong = new Sound(this);
_root.bgsong.attachSound(_root[a + "Music"]);
_root.bgsong.start(0, 1);
_root.bgsong.setVolume(_root.BgVolume);
}
}
};
CharCode = function () {
_root.bgsong.setVolume(_root.BgVolume);
_root.StartY = _root.Course.BackGFX.StartClip._y + _root.Course.BackGFX._y;
_root.StartX = _root.Course.BackGFX.StartClip._x + _root.Course.BackGFX._x;
_root.Power = Math.min(_root.Power, _root.TotalPower);
_root.Power = Math.max(_root.Power, 0);
_root.WaterAmount = Math.min(_root.WaterAmount, _root.TotalWater);
_root.WaterAmount = Math.max(_root.WaterAmount, 0);
_root.Course._yscale = _root.coursescale;
_root.Course._xscale = _root.coursescale;
_root.BGCourse._yscale = ((_root.coursescale - 100) / 5) + 100;
_root.BGCourse._xscale = ((_root.coursescale - 100) / 5) + 100;
_root.Waterpercent = (_root.WaterAmount / _root.TotalWater) * 100;
_root.Powerpercent = (_root.Power / _root.TotalPower) * 100;
if (Key.isDown(34)) {
_root.CameraZoom = _root.CameraZoom - 5;
}
if (Key.isDown(33)) {
_root.CameraZoom = _root.CameraZoom + 5;
}
while (_root.coincount >= 100) {
_root.coincount = _root.coincount - 100;
_root.CharLives++;
}
tellTarget (_root.Course.Char) {
if (_root.PauseGame == false) {
if (_root.playpause == true) {
_root.Controll = false;
}
blink = Math.round(blink);
blink = Math.max(blink, 0);
StunTime = Math.round(StunTime);
StunTime = Math.max(StunTime, 0);
if (StunTime > 0) {
StunTime--;
if ((air == false) || (Water == true)) {
StunTime = StunTime - 3;
} else {
_root.Controll = false;
}
}
if (blink > 0) {
blink--;
if ((blink / 3) == Math.round(blink / 3)) {
charClip.frame._alpha = 20;
} else {
charClip.frame._alpha = 70;
}
} else {
charClip.frame._alpha = 100;
}
if (yspeed > -3) {
lockon = true;
} else {
lockon = false;
}
if ((_root.newstar == true) && (_root.playingcourse == "Castle")) {
attack = true;
attackFrame = "NewStar";
}
if (attackFrame == "Star") {
_root.CameraZoom = 100;
if (yspeed > 7) {
yspeed = yspeed * 0.95;
}
}
if (((attackFrame == "frontflip") && (attack == true)) && ((!_root.Fluddpow) == "")) {
attack = false;
}
if (air == true) {
if (Water == true) {
yspeed = yspeed + (_root.gravity / 3);
} else {
yspeed = yspeed + _root.gravity;
if (yspeed > 0) {
yspeed = _root.groundFriction(yspeed, _root.gravity / 5, 1.05);
}
}
yspeed = _root.groundFriction(yspeed, 0, 1.001);
xspeed = _root.groundFriction(xspeed, 0, 1.001);
if (attack == false) {
if (yspeed > 2) {
frame = 4;
} else {
frame = 3;
}
if (_root.KeyDOWN() && (Water == false)) {
attack = true;
attackFrame = "Dive";
yspeed = yspeed + 3;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - _root.Divespeed) / 5);
} else {
xspeed = xspeed - ((xspeed + _root.Divespeed) / 5);
}
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Mario-Dive");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
}
if (_root.KeyRIGHT() && (_root.Controll == true)) {
xspeed = xspeed - Math.min((xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0);
_xscale = -100;
if (((_root.KeySPACE() && (_root.Power > 0)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "H")) {
_rotation = (_rotation + 5);
xspeed = xspeed - Math.min((xspeed - _root.airwalkspeed) / _root.airmaxWalkspeed, 0);
}
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
xspeed = xspeed - Math.max((xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0);
_xscale = 100;
if (((_root.KeySPACE() && (_root.Power > 0)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "H")) {
_rotation = (_rotation - 5);
xspeed = xspeed - Math.max((xspeed + _root.airwalkspeed) / _root.airmaxWalkspeed, 0);
}
}
if ((_root.KeyTapRIGHT() && (!_root.KeyRIGHT())) && (_root.Controll == true)) {
xspeed = xspeed - Math.min((xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
_xscale = -100;
if (((_root.KeySPACE() && (_root.Power > 0)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "H")) {
_rotation = (_rotation + 5);
xspeed = xspeed - Math.min((xspeed - _root.airtapspeed) / _root.airmaxtapWalkspeed, 0);
}
}
if ((_root.KeyTapLEFT() && (!_root.KeyLEFT())) && (_root.Controll == true)) {
xspeed = xspeed - Math.max((xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
_xscale = 100;
if (((_root.KeySPACE() && (_root.Power > 0)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "H")) {
_rotation = (_rotation - 5);
xspeed = xspeed - Math.max((xspeed + _root.airtapspeed) / _root.airmaxtapWalkspeed, 0);
}
}
}
if (((((_root.KeyUP() && (Water == false)) && (_root.Course.Water.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y + 3) * _root.coursescale) / 100) + _root.Course._y, true))) && (yspeed < 0)) && (yspeed > -7)) && (_root.Controll == true)) {
lockon = false;
yspeed = yspeed - (_root.jumpspeed / 3);
frame = 3;
}
} else {
doublejumpcount--;
doublejumpcount = Math.max(doublejumpcount, 0);
if (doublejumpcount == 0) {
doublejump = 0;
}
if (_root.Course.Ice.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y + 3) * _root.coursescale) / 100) + _root.Course._y, true)) {
Ice = true;
} else {
Ice = false;
}
if (_root.Course.Puddle.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y + 3) * _root.coursescale) / 100) + _root.Course._y, true)) {
Puddle = true;
} else {
Puddle = false;
}
if ((frame == 3) || (frame == 4)) {
frame = 1;
}
yspeed = Math.min(0, yspeed);
if (((Puddle == false) && (Ice == false)) && (!((attackFrame == "Dive") && (attack == true)))) {
xspeed = _root.groundFriction(xspeed, 0.3, 1.15);
} else {
if ((((attackFrame == "Dive") && (attack == true)) && (Ice == false)) && (Puddle == false)) {
xspeed = _root.groundFriction(xspeed, 0.2, 1.05);
}
if ((((attack == true) && (attackFrame == "Dive")) && (Ice == false)) && (Puddle == true)) {
xspeed = _root.groundFriction(xspeed, 0.1, 1.015);
}
if ((!((attack == true) && (attackFrame == "Dive"))) && (Puddle == true)) {
xspeed = _root.groundFriction(xspeed, 0.15, 1.07);
}
if (((attack == true) && (attackFrame == "Dive")) && (Ice == true)) {
xspeed = _root.groundFriction(xspeed, 0.04, 1.007);
}
if ((!((attack == true) && (attackFrame == "Dive"))) && (Ice == true)) {
xspeed = _root.groundFriction(xspeed, 0.05, 1.01);
}
}
if (Puddle == true) {
_root.WaterAmount = _root.WaterAmount + 250;
}
_root.Power = _root.TotalPower;
if ((attack == false) && (_root.Controll == true)) {
if (_root.KeyRIGHT()) {
frame = 2;
if (Ice == true) {
xspeed = xspeed + (_root.walkspeed / _root.IceAccel);
} else if (Puddle == true) {
xspeed = xspeed + (_root.walkspeed / _root.PuddleAccel);
} else {
xspeed = xspeed + _root.walkspeed;
}
_xscale = -100;
}
if (_root.KeyLEFT()) {
frame = 2;
if (Ice == true) {
xspeed = xspeed - (_root.walkspeed / _root.IceAccel);
} else if (Puddle == true) {
xspeed = xspeed - (_root.walkspeed / _root.PuddleAccel);
} else {
xspeed = xspeed - _root.walkspeed;
}
_xscale = 100;
}
if (_root.KeyTapRIGHT() && (!_root.KeyRIGHT())) {
frame = 2;
if (Ice == true) {
xspeed = xspeed + (_root.tapwalkspeed / _root.IceAccel);
} else if (Puddle == true) {
xspeed = xspeed + (_root.tapwalkspeed / _root.PuddleAccel);
} else {
xspeed = xspeed + _root.tapwalkspeed;
}
_xscale = -100;
}
if (_root.KeyTapLEFT() && (!_root.KeyLEFT())) {
frame = 2;
if (Ice == true) {
xspeed = xspeed - (_root.tapwalkspeed / _root.IceAccel);
} else if (Puddle == true) {
xspeed = xspeed - (_root.tapwalkspeed / _root.PuddleAccel);
} else {
xspeed = xspeed - _root.tapwalkspeed;
}
_xscale = 100;
}
if (_root.KeyDOWN() && (Water == false)) {
attack = true;
attackFrame = "Dive";
}
}
if (attack == false) {
if (_root.KeyUP() && (_root.Controll == true)) {
if (attack == true) {
doublejump = 0;
}
attack = false;
lockon = false;
if (_root.Fluddpow == "") {
if (doublejump == 0) {
yspeed = Math.min(-_root.jumpspeed, yspeed);
doublejumpcount = 7;
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Mario Jump-1");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
} else if (doublejump == 1) {
yspeed = Math.min((-_root.jumpspeed) - 2, yspeed);
doublejumpcount = 5;
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Mario Jump-2");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
} else if (Math.abs(xspeed) > 3) {
attack = true;
attackFrame = "frontflip";
yspeed = Math.min((-_root.jumpspeed) - 5, yspeed);
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Mario Tripple Jump");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - 15) / 5);
} else {
xspeed = xspeed - ((xspeed + 15) / 5);
}
doublejumpcount = 0;
doublejump = -1;
}
if (doublejump >= 3) {
doublejump = 0;
}
} else if (doublejump == 0) {
yspeed = Math.min(-_root.jumpspeed, yspeed);
doublejumpcount = 7;
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Mario Jump-1");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
} else {
doublejumpcount = 0;
yspeed = Math.min((-_root.jumpspeed) - 2, yspeed);
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Mario Jump-2");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
doublejump = -1;
}
doublejump++;
frame = 3;
}
}
}
spinattackcount--;
if (spinattackcount <= 0) {
spinattackcount = 0;
spincount = 0;
spinattackcounter = 0;
}
if (_root.KeyRIGHT() && (!_root.KeyLEFT())) {
if (!(spincount === "R")) {
if ((spinattackcounter < 1) || (spinattackcount > 0)) {
spinattackcounter++;
spinattackcount = 7 - (spinattackcounter * 2);
}
}
spincount = "R";
}
if (_root.KeyLEFT() && (!_root.KeyRIGHT())) {
if (!(spincount === "L")) {
if ((spinattackcounter < 1) || (spinattackcount > 0)) {
spinattackcounter++;
spinattackcount = 7 - (spinattackcounter * 2);
}
}
spincount = "L";
}
if ((((spinattackcounter >= 3) || ((_root.Fluddpow == "") && (_root.KeySPACE()))) && (attack == false)) && (yspeed > -3)) {
attackFrame = "Spin";
attack = true;
spinattackcount = 0;
spincount = 0;
spinattackcounter = 0;
}
if (((spinattackcounter >= 3) && (attackFrame == "Spin")) && (attack == true)) {
_root.Course.Char.charClip.speed = _root.Course.Char.charClip.speed * 0.8;
_root.Course.Char.charClip.speed = _root.Course.Char.charClip.speed + 15;
spinattackcount = 0;
spincount = 0;
spinattackcounter = 0;
}
if (((_root.KeySPACE() && (_root.Power >= 100)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "R")) {
_root.waterblast = true;
} else {
_root.waterblast = false;
}
if ((attack == false) && (_root.Controll == true)) {
if (_root.KeyUP() && (air == true)) {
yspeed = yspeed - _root.risespeed;
if (Water == true) {
yspeed = yspeed - (_root.risespeed * 5);
}
}
if (_root.KeyDOWN()) {
yspeed = yspeed + _root.risespeed;
if (Water == true) {
yspeed = yspeed + (_root.risespeed * 3);
}
}
if (((_root.KeySPACE() && (_root.Power > 0)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "H")) {
lockon = false;
yspeed = yspeed * 0.8;
yspeed = yspeed - ((((_root.Hoverspeed * 10) - yspeed) / 10) * ((_root.Power / 175) + 0.75));
_root.WaterAmount = _root.WaterAmount - 7;
_root.Power = _root.Power - 1.5;
xspeed = _root.groundFriction(xspeed, 0.05, 1.03);
}
if (((_root.KeySPACE() && (_root.Power >= 100)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "T")) {
_root.WaterAmount = _root.WaterAmount - 10;
if ((air == false) && (Ice == false)) {
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - _root.turbospeed) / 30);
} else {
xspeed = xspeed - ((xspeed + _root.turbospeed) / 30);
}
} else if (_xscale < 0) {
xspeed = xspeed - ((xspeed - (_root.turbospeed / 2)) / 30);
} else {
xspeed = xspeed - ((xspeed + (_root.turbospeed / 2)) / 30);
}
if (Water == true) {
yspeed = yspeed - (_root.gravity / 1.5);
}
if ((Water == false) && (_root.Course.Water.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y + 3) * _root.coursescale) / 100) + _root.Course._y, true))) {
if (_root.Course.Water.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, ((_y * _root.coursescale) / 100) + _root.Course._y, true)) {
_y = (_y-1);
}
waterrepeats = 0;
while (waterrepeats < ((Math.abs(xspeed) / 7) + random(2))) {
_root.Course.FrontGFX.attachMovie("Run-Splash" + (random(2) + 1), "Run-Splash" + _root.Course.FrontGFX.getNextHighestDepth(), _root.Course.FrontGFX.getNextHighestDepth(), {_x:(_x - _root.Course.FrontGFX._x) + (((waterrepeats - 1) / Math.round(xspeed)) * 100), _y:_y - _root.Course.FrontGFX._y});
waterrepeats++;
}
_root.WaterAmount = _root.WaterAmount + 50;
yspeed = Math.min(0, yspeed);
if ((!_root.KeyRIGHT()) && (!_root.KeyLEFT())) {
xspeed = _root.groundFriction(xspeed, 0.1, 1.05);
}
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - (_root.turbospeed / 2)) / 30);
} else {
xspeed = xspeed - ((xspeed + (_root.turbospeed / 2)) / 30);
}
frame = 2;
if (_root.keyPressed(38)) {
lockon = false;
yspeed = yspeed - (_root.jumpspeed / 1.5);
frame = 3;
}
}
}
}
if (Water == true) {
_root.WaterAmount = _root.WaterAmount + 500;
_root.Power = _root.Power + 3;
yspeed = _root.groundFriction(yspeed, 0.05, 1.1);
xspeed = _root.groundFriction(xspeed, 0.05, 1.05);
}
if ((attack == true) && (attackFrame == "Dive")) {
if (((_root.KeySPACE() && (_root.Power > 0)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "S")) {
_root.WaterAmount = _root.WaterAmount - 5;
_root.Power = _root.Power - 1;
}
if (((_root.KeySPACE() && (_root.Power > 0)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "H")) {
_root.WaterAmount = _root.WaterAmount - 7;
_root.Power = _root.Power - 1.5;
yspeed = yspeed * 0.98;
xspeed = xspeed * 0.97;
if (air == true) {
yspeed = yspeed - ((Math.sin(_root.angleToRadians(_root.DiveRot)) * _root.Hoverspeed) / 2);
if (_xscale > 0) {
xspeed = xspeed - ((Math.cos(_root.angleToRadians(_root.DiveRot)) * _root.Hoverspeed) / 2);
} else {
xspeed = xspeed + ((Math.cos(_root.angleToRadians(_root.DiveRot)) * _root.Hoverspeed) / 2);
}
} else if (_xscale > 0) {
xspeed = xspeed - (Math.cos(_root.angleToRadians(_root.DiveRot)) * _root.Hoverspeed);
} else {
xspeed = xspeed + (Math.cos(_root.angleToRadians(_root.DiveRot)) * _root.Hoverspeed);
}
}
if (((_root.KeySPACE() && (_root.Power >= 100)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "T")) {
_root.WaterAmount = _root.WaterAmount - 10;
yspeed = yspeed - (Math.sin(_root.angleToRadians(_root.DiveRot - 90)) / 2);
if (_xscale > 0) {
xspeed = xspeed - (Math.cos(_root.angleToRadians(_root.DiveRot - 90)) / 2);
} else {
xspeed = xspeed + (Math.cos(_root.angleToRadians(_root.DiveRot - 90)) / 2);
}
}
}
if ((!_root.KeySPACE()) || (!(_root.Fluddpow === "H"))) {
_root.Power = _root.Power + 1;
}
repeats = Math.ceil((Math.abs(yspeed) + Math.abs(xspeed)) / 5);
repeats = Math.min(repeats, 50);
repeats = Math.max(repeats, 1);
i = 1;
while (i <= repeats) {
if (_root.Course.Water.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y - (tall / 4)) * _root.coursescale) / 100) + _root.Course._y, true)) {
if (Water == false) {
if (yspeed > 7) {
_root.Course.FrontGFX.attachMovie("Med-Splash", "Med-Splash" + _root.Course.FrontGFX.getNextHighestDepth(), _root.Course.FrontGFX.getNextHighestDepth(), {_x:_x - _root.Course.FrontGFX._x, _y:_y - _root.Course.FrontGFX._y});
}
}
Water = true;
doublejump = 0;
} else {
Water = false;
}
if (_root.Course.Platforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, ((_y * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, ((_y * _root.coursescale) / 100) + _root.Course._y, true))) {
air = false;
yspeed = Math.min(0, yspeed);
} else {
air = true;
}
while (_root.Course.Platforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y - 3) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y - 3) * _root.coursescale) / 100) + _root.Course._y, true))) {
_y = (_y-1);
if (!((attack == true) && (attackFrame == "Dive"))) {
xspeed = xspeed * 0.98;
} else {
xspeed = xspeed * 0.997;
}
yspeed = Math.min(0, yspeed);
}
if (lockon == true) {
while (_root.Course.Platforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y + 5) * _root.coursescale) / 100) + _root.Course._y, true) && (!_root.Course.Platforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y - 1) * _root.coursescale) / 100) + _root.Course._y, true))) {
_y = (_y+1);
if (!((attack == true) && (attackFrame == "Dive"))) {
xspeed = xspeed * 0.98;
} else {
xspeed = xspeed * 0.998;
}
frame = 2;
}
while (_root.Course.BPlatforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y + 5) * _root.coursescale) / 100) + _root.Course._y, true) && (!_root.Course.BPlatforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y - 1) * _root.coursescale) / 100) + _root.Course._y, true))) {
_y = (_y+1);
if (!((attack == true) && (attackFrame == "Dive"))) {
xspeed = xspeed * 0.98;
} else {
xspeed = xspeed * 0.998;
}
frame = 2;
}
}
while (_root.Course.Platforms.hitTest(((((_x + wide) - 1) * _root.coursescale) / 100) + _root.Course._x, (((_y - (tall / 2)) * _root.coursescale) / 100) + _root.Course._y, true)) {
_x = (_x-1);
}
while (_root.Course.Platforms.hitTest(((((_x - wide) + 1) * _root.coursescale) / 100) + _root.Course._x, (((_y - (tall / 2)) * _root.coursescale) / 100) + _root.Course._y, true)) {
_x = (_x+1);
}
if (_root.Course.Platforms.hitTest((((_x + wide) * _root.coursescale) / 100) + _root.Course._x, (((_y - (tall / 2)) * _root.coursescale) / 100) + _root.Course._y, true)) {
if (_root.KeyRIGHT()) {
xspeed = Math.min(xspeed, (-xspeed) * _root.bounce);
xspeed = _root.groundFriction(xspeed, 3, 1);
} else {
xspeed = Math.min(xspeed - 1, (-xspeed) * _root.bounce);
}
}
if (_root.Course.Platforms.hitTest((((_x - wide) * _root.coursescale) / 100) + _root.Course._x, (((_y - (tall / 2)) * _root.coursescale) / 100) + _root.Course._y, true)) {
if (_root.KeyLEFT()) {
xspeed = Math.min(xspeed, (-xspeed) * _root.bounce);
xspeed = _root.groundFriction(xspeed, 3, 1);
} else {
xspeed = Math.max(xspeed + 1, (-xspeed) * _root.bounce);
}
}
if (_root.Course.Platforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, ((((_y - tall) + 1) * _root.coursescale) / 100) + _root.Course._y, true)) {
yspeed = Math.max(yspeed, -3);
}
while (_root.Course.Platforms.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y - tall) * _root.coursescale) / 100) + _root.Course._y, true)) {
_y = (_y+1);
}
if ((_root.Course.Edge.hitTest(((_x * _root.coursescale) / 100) + _root.Course._x, (((_y - (tall / 2)) * _root.coursescale) / 100) + _root.Course._y, true) && (!(((((attackFrame == "Fall") || (attackFrame == "Respawn")) || (attackFrame == "Faint")) || (attackFrame == "Pause")) && (attack == true)))) && (_root.playpause == false)) {
attack = true;
attackFrame = "Fall";
}
_x = (_x + (xspeed / repeats));
_y = (_y + (yspeed / repeats));
i++;
}
if (air == false) {
rotation = _rotation;
distance = 5;
frontpointX = _root.Course.Char._x - (Math.cos(_root.angleToRadians(rotation)) * distance);
frontpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
frontpointY++;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
frontpointY--;
count++;
} while (count <= 50);
backpointX = _root.Course.Char._x + (Math.cos(_root.angleToRadians(rotation)) * distance);
backpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
backpointY++;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
backpointY--;
count++;
} while (count <= 50);
rotation = _root.radiansToAngle(Math.atan2(backpointY - frontpointY, backpointX - frontpointX));
groundrot = rotation;
speedslide = Math.sin(_root.angleToRadians(rotation));
speedslide = Math.max(speedslide, -0.5);
speedslide = Math.min(speedslide, 0.5);
if (Ice == true) {
xspeed = xspeed + (speedslide * 0.3);
} else if (Puddle == true) {
xspeed = xspeed + (speedslide * 0.1);
}
_rotation = rotation;
_rotation = (_rotation / 2);
if ((Math.abs(rotation) > 25) && (Ice == true)) {
attack = true;
attackFrame = "Dive";
}
} else {
_rotation = _root.groundFriction(_rotation, 3, 1.3);
}
_rotation = Math.max(_rotation, -30);
_rotation = Math.min(_rotation, 30);
if (((_root.CharHP <= 0) && (!((((((attackFrame == "Fall") || (attackFrame == "Respawn")) || (attackFrame == "Faint")) || (attackFrame == "Pause")) || (attackFrame == "none")) && (attack == true)))) && (_root.playpause == false)) {
attack = true;
attackFrame = "Faint";
}
if (((((((attackFrame == "Fall") || (attackFrame == "Respawn")) || (attackFrame == "Faint")) || (attackFrame == "Pause")) && (attack == true)) || (_root.playpause == true)) || (attackFrame == "none")) {
yspeed = -_root.gravity;
xspeed = 0;
if (_root.playpause == false) {
charClip.gotoAndStop(attackFrame);
}
} else if (attack == false) {
charClip.gotoAndStop(_root.Fluddpow + frame);
} else {
charClip.gotoAndStop(_root.Fluddpow + attackFrame);
}
_root.playpause = false;
_root.Controll = true;
}
if (_root.Camcenter == _root.Course.Char) {
camYspeed = (-_root.Camcenter._y) / _root.Camspeed;
camXspeed = (-_root.Camcenter._x) / _root.Camspeed;
_root.currentCamY = _root.Camcenter._y;
_root.currentCamX = _root.Camcenter._x;
} else {
camYspeed = (-(_root.Camcenter._y + _root.Camcenter._parent._y)) / _root.Camspeed;
camXspeed = (-(_root.Camcenter._x + _root.Camcenter._parent._x)) / _root.Camspeed;
_root.currentCamY = _root.Camcenter._y + _root.Camcenter._parent._y;
_root.currentCamX = _root.Camcenter._x + _root.Camcenter._parent._x;
}
if ((((_root.KeySPACE() && (_root.Power >= 100)) && (_root.WaterAmount > 0)) && (_root.Fluddpow == "T")) && (_root.Camcenter == _root.Course.Char)) {
camXspeed = (-_x) / 5;
camXspeed = camXspeed - _root.Course.Char.xspeed;
}
camYspeed = Math.max(-_root.MaxCamspeed, camYspeed);
camYspeed = Math.min(_root.MaxCamspeed, camYspeed);
camXspeed = Math.max(-_root.MaxCamspeed, camXspeed);
camXspeed = Math.min(_root.MaxCamspeed, camXspeed);
_root.CameraZoom = Math.min(_root.Maxzoomin, _root.CameraZoom);
_root.CameraZoom = Math.max(_root.Maxzoomout, _root.CameraZoom);
_root.CameraZoom2 = _root.CameraZoom2 + (Math.round(_root.CameraZoom - _root.CameraZoom2) / 10);
_root.coursescale2 = _root.groundFriction(_root.coursescale2, 3, 1.01);
_root.coursescale = _root.coursescale2 + _root.CameraZoom2;
if (_root.Camspeed > 1) {
if (_root.Course.CamEdge.hitTest(_root.screensizeX / 2, _root.screensizeY - Math.min(camYspeed, 0), true)) {
camYspeed = Math.max(-3, camYspeed);
}
if (_root.Course.CamEdge.hitTest(_root.screensizeX / 2, -Math.max(camYspeed, 0), true) && (_root.Camspeed > 1)) {
camYspeed = Math.min(3, camYspeed);
}
if (_root.Course.CamEdge.hitTest(_root.screensizeX - Math.min(camXspeed, 0), _root.screensizeY / 2, true)) {
camXspeed = Math.max(-3, camXspeed);
}
if (_root.Course.CamEdge.hitTest(-Math.max(camXspeed, 0), _root.screensizeY / 2, true)) {
camXspeed = Math.min(3, camXspeed);
}
count = 0;
do {
if (!_root.Course.CamEdge.hitTest(_root.screensizeX / 2, _root.screensizeY - count, true)) {
break;
}
count++;
} while (count <= 50);
_root.MoveAllPlats(count, 0);
count = 0;
do {
if (!_root.Course.CamEdge.hitTest(_root.screensizeX / 2, count, true)) {
break;
}
count++;
} while (count <= 50);
_root.MoveAllPlats(-count, 0);
count = 0;
do {
if (!_root.Course.CamEdge.hitTest(_root.screensizeX - count, _root.screensizeY / 2, true)) {
break;
}
count++;
} while (count <= 50);
_root.MoveAllPlats(0, count);
count = 0;
do {
if (!_root.Course.CamEdge.hitTest(count, _root.screensizeY / 2, true)) {
break;
}
count++;
} while (count <= 50);
_root.MoveAllPlats(0, -count);
}
if ((!_root.nullCam) == true) {
_root.MoveAllPlats(camYspeed, camXspeed);
}
_root.Camspeed = 10;
_root.MaxCamspeed = 1200;
_root.nullCam = false;
_root.Camcenter = _root.Course.Char;
};
};
_root.MoveAllPlats = function (Yamoumt, Xamoumt) {
_root.Course.Platforms._y = _root.Course.Platforms._y + Yamoumt;
_root.Course.Platforms._x = _root.Course.Platforms._x + Xamoumt;
_root.Course.BPlatforms._y = _root.Course.BPlatforms._y + Yamoumt;
_root.Course.BPlatforms._x = _root.Course.BPlatforms._x + Xamoumt;
_root.Course.FrontGFX._y = _root.Course.FrontGFX._y + Yamoumt;
_root.Course.FrontGFX._x = _root.Course.FrontGFX._x + Xamoumt;
_root.Course.BackGFX._y = _root.Course.BackGFX._y + Yamoumt;
_root.Course.BackGFX._x = _root.Course.BackGFX._x + Xamoumt;
_root.Course.Water._y = _root.Course.Water._y + Yamoumt;
_root.Course.Water._x = _root.Course.Water._x + Xamoumt;
_root.Course.Puddle._y = _root.Course.Puddle._y + Yamoumt;
_root.Course.Puddle._x = _root.Course.Puddle._x + Xamoumt;
_root.Course.Ice._y = _root.Course.Ice._y + Yamoumt;
_root.Course.Ice._x = _root.Course.Ice._x + Xamoumt;
_root.Course.Edge._y = _root.Course.Edge._y + Yamoumt;
_root.Course.Edge._x = _root.Course.Edge._x + Xamoumt;
_root.Course.CamEdge._y = _root.Course.CamEdge._y + Yamoumt;
_root.Course.CamEdge._x = _root.Course.CamEdge._x + Xamoumt;
_root.BGCourse.BG._y = _root.BGCourse.BG._y + (Yamoumt / 10);
_root.BGCourse.BG._x = _root.BGCourse.BG._x + (Xamoumt / 10);
_root.Course.Char._y = _root.Course.Char._y + Yamoumt;
_root.Course.Char._x = _root.Course.Char._x + Xamoumt;
};
_root.ZoomoutCam = function () {
_root.nullCam = true;
_root.coursescale2 = _root.coursescale2 - 7;
_root.coursescale2 = _root.coursescale2 * 0.9;
_root.MoveAllPlats(5, 0);
};
_root.MarioHit = function (a, b, c, d, e, f) {
if (((_root.Course.Char.blink <= 0) && (!((((attack == true) && (attackFrame == "Fall")) && (attackFrame == "Respawn")) && (attackFrame == "Faint")))) && (_root.playpause == false)) {
_root.Course.Char.hurt = true;
_root.Course.Char.attack = false;
_root.Course.Char.hurt = true;
_root.Course.Char.blink = b;
_root.CharHP = _root.CharHP - a;
_root.Course.Char.yspeed = _root.Course.Char.yspeed * 0.5;
_root.Course.Char.xspeed = _root.Course.Char.xspeed * 0.5;
if (e > 0) {
_root.Course.Char.StunTime = e;
}
_root.Course.Char.yspeed = _root.Course.Char.yspeed + c;
_root.Course.Char.xspeed = _root.Course.Char.xspeed + d;
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound(f);
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
}
};
_root.Blackout = function () {
_root.attachMovie("Blackout", "Blackout", _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
};
_root.Whiteout = function () {
_root.attachMovie("Whiteout", "Blackout", _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
};
_root.GetStarMusic1 = function () {
_root.bgsong.stop();
_root.bgsong = new Sound(this);
_root.bgsong.attachSound("Star Swish");
_root.bgsong.start(0, 1);
_root.bgsong.setVolume(_root.BgVolume);
};
_root.GetStarMusic2 = function () {
_root.bgsong = new Sound(this);
_root.bgsong.attachSound("GetStar");
_root.bgsong.start(0, 1);
_root.bgsong.setVolume(_root.BgVolume);
};
_root.PaintingSound = function () {
_root.bgsong.stop();
_root.bgsong = new Sound(this);
_root.bgsong.attachSound("Select Woosh");
_root.bgsong.start(0, 1);
_root.bgsong.setVolume(_root.BgVolume);
};
_root.StopBGsong = function () {
_root.bgsong.stop();
_root.bgsong = new Sound(this);
_root.bgsong.start(0, 1);
_root.bgsong.setVolume(_root.BgVolume);
};
_root.RemoveCourse = function () {
_root.pointer.removeMovieClip(_root.pointer);
_root.Stats.removeMovieClip(_root.Stats);
_root.Course.removeMovieClip(_root.Course);
_root.BGCourse.removeMovieClip(_root.BGCourse);
_root.FarBackground.removeMovieClip(_root.FarBackground);
_root.Blackout.removeMovieClip(_root.Blackout);
_root.onEnterFrame = null;
};
_root.ReturnToCastle = function () {
_root.CharHP = 8;
_root.WaterAmount = _root.TotalWater;
_root.Power = _root.TotalPower;
_root.Restartcoins();
_root.RemoveCourse();
_root.gotoAndStop("Courseframe");
_root.StartChar("Castle", 0, -100, 0, 0, 100, _root.CurrentPlayer, "", "StarIn", true);
_root.onEnterFrame = function () {
_root.CharCode();
};
};
_root.StartInsideofCastle = function () {
_root.RemoveCourse();
_root.gotoAndStop("Courseframe");
_root.StartChar("CastleInside", 0, -100, 0, 40, 100, _root.CurrentPlayer, "", "StarIn", true);
_root.onEnterFrame = function () {
_root.CharCode();
};
};
_root.StartBombombBattlefield = function () {
_root.RemoveCourse();
_root.gotoAndStop("Courseframe");
_root.StartChar("1-1", 0, 0, 0, 0, 100, _root.CurrentPlayer, _root.Fluddpow, "Fromwhite", true);
_root.onEnterFrame = function () {
_root.CharCode();
};
};
_root.StartHazyMazeCave = function () {
_root.RemoveCourse();
_root.gotoAndStop("Courseframe");
_root.StartChar("3-1", 0, 0, 0, 0, 100, _root.CurrentPlayer, _root.Fluddpow, "Fromwhite", true);
_root.onEnterFrame = function () {
_root.CharCode();
};
};
_root.changecourse = function (transition, level, a, b, c, d, e) {
_root.RemoveCourse();
_root.gotoAndStop("Courseframe");
if (e == undefined) {
e = false;
}
_root.StartChar(level, a, b, c, d, 100, _root.CurrentPlayer, _root.Fluddpow, transition, e);
_root.onEnterFrame = function () {
_root.CharCode();
};
e = false;
};
_root.StartLevel1 = function () {
_root.RemoveCourse();
_root.gotoAndStop("Courseframe");
_root.StartChar("Level1", 1200, -500, 1200, 0, 40, _root.CurrentPlayer, _root.Fluddpow, "Fromwhite");
_root.onEnterFrame = function () {
_root.CharCode();
};
};
StartCourseNochar = function (a, b, c, d, e, f, g, h, i) {
_root.playingcourse = a;
_root.attachMovie(_root[a + "FarBackground"], "FarBackground", _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
_root.createEmptyMovieClip("BGCourse", _root.getNextHighestDepth());
_root.BGCourse._y = 200;
_root.BGCourse._x = 275;
_root.BGCourse.attachMovie(_root[a + "Background"], "BG", _root.BGCourse.getNextHighestDepth(), {_x:(-b) / 10, _y:(-c) / 10});
_root.createEmptyMovieClip("Course", _root.getNextHighestDepth());
_root.Course._y = _root.screensizeY / 2;
_root.Course._x = _root.screensizeX / 2;
b = -b;
c = -c;
d = -d;
e = -e;
_root.Course.attachMovie(a + "Puddle", "Puddle", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "Ice", "Ice", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "BackGFX", "BackGFX", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "Platforms", "Platforms", _root.Course.getNextHighestDepth(), {_x:b, _y:c, _alpha:0});
_root.Course.attachMovie(a + "BPlatforms", "BPlatforms", _root.Course.getNextHighestDepth(), {_x:b, _y:c, _alpha:0});
_root.Course.attachMovie(a + "Water", "Water", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "FrontGFX", "FrontGFX", _root.Course.getNextHighestDepth(), {_x:b, _y:c});
_root.Course.attachMovie(a + "Edge", "Edge", _root.Course.getNextHighestDepth(), {_x:b, _y:c, _alpha:0});
_root.Course.attachMovie(a + "CamEdge", "CamEdge", _root.Course.getNextHighestDepth(), {_x:b, _y:c, _alpha:0});
_root.Course.BackGFX.createEmptyMovieClip("StartClip", _root.Course.BackGFX.getNextHighestDepth());
_root.Course.BackGFX.StartClip._y = (c - e) - _root.Course.BackGFX._y;
_root.Course.BackGFX.StartClip._x = (b - d) - _root.Course.BackGFX._x;
_root.StartY = _root.Course.BackGFX.StartClip._y - _root.Course.BackGFX._y;
_root.StartX = _root.Course.BackGFX.StartClip._x - _root.Course.BackGFX._x;
_root.DiveRot = 0;
_root.playpause = false;
_root.coincount = 0;
_root.Coins = 0;
_root.RedCoins = 0;
_root.Camcenter = _root.Course.BackGFX.StartClip;
_root.CharHP = 8;
_root.Controll = true;
_root.CameraZoom = 100;
_root.coursescale2 = f - 100;
_root.coursescale = _root.coursescale2;
_root.CameraZoom2 = _root.CameraZoom;
_root.WaterAmount = _root.TotalWater;
_root.Power = _root.TotalPower;
_root.Fluddpow = h;
if (_root[a + "Maxzoomout"] == undefined) {
_root.Maxzoomout = 50;
} else {
_root.Maxzoomout = _root[a + "Maxzoomout"];
}
if (_root[a + "Maxzoomin"] == undefined) {
_root.Maxzoomin = 200;
} else {
_root.Maxzoomin = _root[a + "Maxzoomin"];
}
_root.PlayingChar = g;
};
CourseCodeNoChar = function () {
_root.Course._yscale = _root.coursescale;
_root.Course._xscale = _root.coursescale;
_root.BGCourse._yscale = ((_root.coursescale - 100) / 5) + 100;
_root.BGCourse._xscale = ((_root.coursescale - 100) / 5) + 100;
if (_root.Course.CamEdge.hitTest(275, 400 - Math.min(camYspeed / 2, 0), true)) {
camYspeed = Math.max(0, camYspeed);
count = 0;
_root.MoveAllPlats(count, 0);
}
do {
if (!_root.Course.CamEdge.hitTest(275, 400 - count, true)) {
break;
}
count++;
} while (count <= 50);
if (_root.Course.CamEdge.hitTest(275, -Math.max(camYspeed / 2, 0), true)) {
camYspeed = Math.min(0, camYspeed);
count = 0;
do {
if (!_root.Course.CamEdge.hitTest(275, count, true)) {
break;
}
count++;
} while (count <= 50);
_root.MoveAllPlats(-count, 0);
}
if (_root.Course.CamEdge.hitTest(550 - Math.min(camXspeed / 2, 0), 200, true)) {
camXspeed = Math.max(0, camXspeed);
count = 0;
do {
if (!_root.Course.CamEdge.hitTest(550 - count, 200, true)) {
break;
}
count++;
} while (count <= 50);
_root.MoveAllPlats(0, count);
}
if (_root.Course.CamEdge.hitTest(-Math.max(camXspeed / 2, 0), 200, true)) {
camXspeed = Math.min(0, camXspeed);
count = 0;
do {
if (!_root.Course.CamEdge.hitTest(count, 200, true)) {
break;
}
count++;
} while (count <= 50);
_root.MoveAllPlats(0, -count);
}
if ((!_root.nullCam) == true) {
_root.MoveAllPlats(camYspeed, camXspeed);
}
_root.nullCam = false;
_root.Camcenter = _root.Course.BackGFX.StartClip;
_root.Camcenter._y = -_root.Camcenter._parent._y;
_root.Camcenter._x = -_root.Camcenter._parent._x;
_root.currentCamY = _root.Camcenter._y + _root.Camcenter._parent._y;
_root.currentCamX = _root.Camcenter._x + _root.Camcenter._parent._x;
};
_root.KeyUP = function () {
if ((com.wiicade.WiiMote.isDown(com.wiicade.WiiMote.BUTTON_UP) || (((_root.mousemoveY + Math.abs(_root.mousemoveX / 2)) < -30) && (_root.pointer._y < 150))) || (_root.pointer._y < 75)) {
return(true);
}
return(false);
};
_root.KeyDOWN = function () {
if ((com.wiicade.WiiMote.isDown(com.wiicade.WiiMote.BUTTON_DOWN) || (((_root.mousemoveY - Math.abs(_root.mousemoveX / 2)) > 30) && (_root.pointer._y > 150))) || (_root.pointer._y > 200)) {
return(true);
}
return(false);
};
_root.KeyLEFT = function () {
if (((com.wiicade.WiiMote.isDown(com.wiicade.WiiMote.BUTTON_LEFT) || (_root.pointer._x < ((_root.screensizeX / 2) - (_root.screensizeX / 5)))) || ((_root.mousemoveX < -15) && (_root.pointer._x < ((_root.screensizeX / 2) - (_root.screensizeX / 6))))) || ((_root.mousemoveX < -40) && (_root.pointer._x < ((_root.screensizeX / 2) + (_root.screensizeX / 8))))) {
return(true);
}
return(false);
};
_root.KeyRIGHT = function () {
if (((com.wiicade.WiiMote.isDown(com.wiicade.WiiMote.BUTTON_RIGHT) || (_root.pointer._x > ((_root.screensizeX / 2) + (_root.screensizeX / 5)))) || ((_root.mousemoveX > 15) && (_root.pointer._x > ((_root.screensizeX / 2) + (_root.screensizeX / 6))))) || ((_root.mousemoveX > 40) && (_root.pointer._x > ((_root.screensizeX / 2) - (_root.screensizeX / 8))))) {
return(true);
}
return(false);
};
_root.KeyTapRIGHT = function () {
if (((com.wiicade.WiiMote.isDown(com.wiicade.WiiMote.BUTTON_RIGHT) || (_root.pointer._x > ((_root.screensizeX / 2) + (_root.screensizeX / 8)))) || ((_root.mousemoveX > 7) && (_root.pointer._x > ((_root.screensizeX / 2) + (_root.screensizeX / 8))))) || ((_root.mousemoveX > 30) && (_root.pointer._x > ((_root.screensizeX / 2) - (_root.screensizeX / 7))))) {
return(true);
}
return(false);
};
_root.KeyTapLEFT = function () {
if (((com.wiicade.WiiMote.isDown(com.wiicade.WiiMote.BUTTON_LEFT) || (_root.pointer._x < ((_root.screensizeX / 2) - (_root.screensizeX / 8)))) || ((_root.mousemoveX > 7) && (_root.pointer._x < ((_root.screensizeX / 2) - (_root.screensizeX / 8))))) || ((_root.mousemoveX > 30) && (_root.pointer._x < ((_root.screensizeX / 2) - (_root.screensizeX / 7))))) {
return(true);
}
return(false);
};
_root.KeySPACE = function () {
if (com.wiicade.WiiMote.isDown(com.wiicade.WiiMote.BUTTON_A)) {
_root.MouseDown = true;
} else {
_root.MouseDown = false;
}
if (com.wiicade.WiiMote.isDown(com.wiicade.WiiMote.BUTTON_B) || (_root.MouseDown)) {
return(true);
}
return(false);
};
_root.KeyMinus = function () {
if (com.wiicade.WiiMote.isDown(com.wiicade.WiiMote.BUTTON_MINUS)) {
return(true);
}
return(false);
};
_root.CameraZoom = 100;
_root.TotalWater = 10000;
_root.Fluddpow = "H";
_root.TotalPower = 100;
_root.newstar = false;
_root.CalculateStars = function () {
count = 1;
_root.TotalStars = 0;
while (!(Star[count] === undefined)) {
if (Star[count] == true) {
_root.TotalStars++;
}
count++;
}
};
_root.CalculateStars();
_root.Level1Background = "GrassandHillsBG";
_root.Level1FarBackground = "CloudBackground";
_root.Level1MusicIntro = "NSMBLandIntro";
_root.Level1Music = "NSMBLandRepeat";
_root.CastleInsideMusic = "InsidetheCastleWalls";
_root["1-1MusicIntro"] = "Bombomb Battlefield Intro";
_root["1-1Music"] = "Bombomb Battlefield Repeat";
_root["1-4Music"] = "Bombomb Battlefield Repeat";
_root["1-5Music"] = "Secret Course";
_root["3-1MusicIntro"] = "HazyMazeCave-Intro";
_root["3-1Music"] = "HazyMazeCave-Rock";
_root["3-6Music"] = "HazyMazeCave-Haze";
_root.GameOverMusic = "GameOverSong";
_root.CastleBackground = "CastleColoredBG";
_root.CastleFarBackground = "CastleColoredFarBG";
_root.CastleMaxzoomout = 75;
_root["1-1FarBackground"] = "1-FarBG";
_root["1-2FarBackground"] = "1-FarBG";
_root["1-3FarBackground"] = "1-FarBG";
_root["1-4FarBackground"] = "1-FarBG";
_root["1-5FarBackground"] = "SecretLevelBG";
_root["2-1FarBackground"] = "2-farBG";
_root["3-1FarBackground"] = "3-farBG";
_root["3-2FarBackground"] = "3-farBG";
_root["3-3FarBackground"] = "3-farBG";
_root["3-4FarBackground"] = "3-farBG";
_root["4-1FarBackground"] = "4-farBG";
_root.gravity = 1;
_root.bounce = 0.5;
_root.IceAccel = 5;
_root.PuddleAccel = 1.5;
_root.tapwalkspeed = 0.6;
_root.walkspeed = 1.2;
_root.jumpspeed = 11;
_root.airtapspeed = 2.5;
_root.airwalkspeed = 5;
_root.airmaxWalkspeed = 20;
_root.airmaxtapWalkspeed = 30;
_root.Hoverspeed = 1.06;
_root.RocketBlast = 25;
_root.turbospeed = 75;
_root.Divespeed = 35;
_root.risespeed = 0.1;
_root.waterBounce1 = 13;
_root.waterBounce2 = 0.5;
_root.BgVolume = 100;
_root.MarioVolume = 100;
_root.SoundFXVolume = 100;
_root.respawnblink = 90;
_root.CharLives = 4;
_root.Fluddpow = "";
CurrentPlayer = "Mario";
_root.CharHP = 8;
_root.coincount = 0;
_root.Coins = 0;
_root.RedCoins = 0;
_root.screensizeX = 512;
_root.screensizeY = 250;
_root.WiiMode = true;
_root.WaterAmount = _root.TotalWater;
_root.Power = _root.TotalPower;
_root.PauseGame = false;
_root.CheatCastleRestore = true;
Frame 4
stop();
_root.bgsong = new Sound(this);
_root.bgsong.attachSound("TitleScreenTheme");
_root.bgsong.start(0, 1);
_root.bgsong.setVolume(_root.BgVolume);
Frame 5
stop();
_root.bgsong.stop();
_root.bgsong = new Sound(this);
_root.bgsong.attachSound("File Select Song");
_root.bgsong.start(0, 999);
_root.bgsong.setVolume(_root.BgVolume);
Frame 6
_root.bgsong.stop();
gotoAndStop ("Courseframe");
StartChar("Castle", 0, -100, 0, 0, 100, _root.CurrentPlayer, "", "StarIn");
onEnterFrame = function () {
CharCode();
};
Frame 8
stop();
_root.StartChar("GameOver", 0, 0, 0, 0, 100, _root.CurrentPlayer, _root.Fluddpow, "StarIn");
onEnterFrame = function () {
_root.nullCam = true;
_root.CharCode();
};
Frame 9
stop();
StartCourseNochar("Level1", 1200, 0, 1200, 0, 40, _root.CurrentPlayer, _root.Fluddpow, "Fromwhite");
_root.coursescale = 100;
speedX = 70;
zoom = false;
timer++;
onEnterFrame = function () {
_root.coursescale = _root.coursescale * 0.99;
camYspeed = 3.5;
camXspeed = (speedX = speedX - 1);
if (speedX < -50) {
speedX = speedX * 0.99;
}
if (speedX < -72) {
_root.RemoveCourse();
_root.gotoAndStop("Title");
}
CourseCodeNoChar();
};
Symbol 18 MovieClip [trail] Frame 6
this.removeMovieClip(this);
Symbol 20 MovieClip [Pointer] Frame 1
_y = _root._ymouse;
_x = _root._xmouse;
newY = _root._ymouse;
newX = _root._xmouse;
oldX = newX;
oldY = newY;
moveY = 0;
moveX = 0;
_root.MouseDown = false;
if (_root.WiiMode == false) {
_alpha = 0;
}
onEnterFrame = function () {
if (_root.WiiMode == true) {
newY = _root._ymouse;
newX = _root._xmouse;
moveY = newY - oldY;
moveX = newX - oldX;
oldX = newX;
oldY = newY;
repeats = Math.ceil((Math.abs(moveY) + Math.abs(moveX)) / 50);
i = 0;
while (i < repeats) {
_x = (_x + (moveX / repeats));
_y = (_y + (moveY / repeats));
_root.attachMovie("trail", "trail" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_x, _y:_y, _rotation:((Math.random() * 12) - (Math.random() * 12)) + _root.radiansToAngle(Math.atan2(-moveX, moveY))});
i++;
}
_y = _root._ymouse;
_x = _root._xmouse;
_root.mousemoveY = moveY;
_root.mousemoveX = moveX;
_alpha = 100;
} else {
_x = 275;
_y = 200;
_alpha = 0;
}
};
Symbol 23 MovieClip [ChargeLine] Frame 1
_rotation = random(360);
gotoAndPlay(random(10));
Symbol 23 MovieClip [ChargeLine] Frame 16
this.removeMovieClip(this);
stop();
Symbol 26 MovieClip [Rnozzle] Frame 1
yspeed = -3;
count = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true)) {
_root.Fluddpow = "R";
_root.WaterAmount = _root.TotalWater;
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Fludd Nozzle");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
this.removeMovieClip(this);
}
if ((!_root.Course.Platforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 7) * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 7) * _root.coursescale) / 100) + _root.Course._y, true))) {
_y = (_y + yspeed);
yspeed = yspeed + 0.5;
yspeed = yspeed * 0.95;
}
while (_root.Course.Platforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 5) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 5) * _root.coursescale) / 100) + _root.Course._y, true))) {
_y = (_y-1);
yspeed = Math.min(0, yspeed);
}
count++;
if (count > 900) {
_alpha = random(100);
}
if (count > 1000) {
this.removeMovieClip(this);
}
}
};
Symbol 29 MovieClip [Hnozzle] Frame 1
yspeed = -3;
count = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true)) {
_root.Fluddpow = "H";
_root.WaterAmount = _root.TotalWater;
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Fludd Nozzle");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
this.removeMovieClip(this);
}
if ((!_root.Course.Platforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 7) * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 7) * _root.coursescale) / 100) + _root.Course._y, true))) {
_y = (_y + yspeed);
yspeed = yspeed + 0.5;
yspeed = yspeed * 0.95;
}
while (_root.Course.Platforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 5) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 5) * _root.coursescale) / 100) + _root.Course._y, true))) {
_y = (_y-1);
yspeed = Math.min(0, yspeed);
}
count++;
if (count > 900) {
_alpha = random(100);
}
if (count > 1000) {
this.removeMovieClip(this);
}
}
};
Symbol 32 MovieClip [Tnozzle] Frame 1
yspeed = -3;
count = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true)) {
_root.Fluddpow = "T";
_root.WaterAmount = _root.TotalWater;
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Fludd Nozzle");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
this.removeMovieClip(this);
}
if ((!_root.Course.Platforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 7) * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 7) * _root.coursescale) / 100) + _root.Course._y, true))) {
_y = (_y + yspeed);
yspeed = yspeed + 0.5;
yspeed = yspeed * 0.95;
}
while (_root.Course.Platforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 5) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x + _parent._x) * _root.coursescale) / 100) + _root.Course._x, ((((_y + _parent._y) + 5) * _root.coursescale) / 100) + _root.Course._y, true))) {
_y = (_y-1);
yspeed = Math.min(0, yspeed);
}
count++;
if (count > 900) {
_alpha = random(100);
}
if (count > 1000) {
this.removeMovieClip(this);
}
}
};
Symbol 42 MovieClip [Med-Splash] Frame 10
this.removeMovieClip(this);
Symbol 60 MovieClip [Run-Splash1] Frame 18
stop();
removeMovieClip(this);
Symbol 68 MovieClip [Run-Splash2] Frame 8
stop();
removeMovieClip(this);
Symbol 70 MovieClip [redX] Frame 2
this.removeMovieClip(this);
Symbol 74 MovieClip [ChargeLight] Frame 11
this.removeMovieClip(this);
Symbol 76 MovieClip [GreenPLleftrightCode] Frame 1
stop();
currentspeedX = 0;
distancecountX = speedX + Xoffstart;
currentspeedY = 0;
distancecountY = speedY + Yoffstart;
landedon = false;
lessthan = false;
morethan = false;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (currentspeedY < 0) {
_y = (_y - currentspeedY);
}
distancecountX++;
if (distancecountX >= distanceX) {
distancecountX = 0;
if (DirectionX == "Right") {
DirectionX = "Left";
} else {
DirectionX = "Right";
}
}
if (DirectionX == "Right") {
currentspeedX = currentspeedX + accelX;
} else {
currentspeedX = currentspeedX - accelX;
}
distancecountY++;
if (distancecountY >= distanceY) {
distancecountY = 0;
if (DirectionY == "Up") {
DirectionY = "Down";
} else {
DirectionY = "Up";
}
}
if (DirectionY == "Up") {
currentspeedY = currentspeedY - accelY;
} else {
currentspeedY = currentspeedY + accelY;
}
currentspeedX = Math.max(-speedX, currentspeedX);
currentspeedX = Math.min(speedX, currentspeedX);
currentspeedY = Math.max(-speedY, currentspeedY);
currentspeedY = Math.min(speedY, currentspeedY);
if (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true)) {
_root.Course.Char._x = _root.Course.Char._x + currentspeedX;
_root.Course.Char._y = _root.Course.Char._y + currentspeedY;
_root.Course.Char.xspeed = _root.groundFriction(_root.Course.Char.xspeed, 0.3, 1.1);
if (landedon == false) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - currentspeedX;
}
landedon = true;
} else {
if (landedon == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + currentspeedX;
_root.Course.Char.yspeed = _root.Course.Char.yspeed + (currentspeedY / 2);
}
landedon = false;
}
_y = (_y + currentspeedY);
_x = (_x + currentspeedX);
if (currentspeedY < 0) {
_y = (_y + currentspeedY);
}
}
};
Symbol 83 MovieClip [Rotating Block Plat Code] Frame 1
stop();
currentspeedX = 0;
distancecountX = speedX + Xoffstart;
currentspeedY = 0;
distancecountY = speedY + Yoffstart;
landedon = false;
lessthan = false;
morethan = false;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (currentspeedY < 0) {
_y = (_y - currentspeedY);
}
distancecountX++;
if (distancecountX >= distanceX) {
distancecountX = 0;
if (DirectionX == "Right") {
DirectionX = "Left";
} else {
DirectionX = "Right";
}
}
if (DirectionX == "Right") {
currentspeedX = currentspeedX + accelX;
} else {
currentspeedX = currentspeedX - accelX;
}
distancecountY++;
if (distancecountY >= distanceY) {
distancecountY = 0;
if (DirectionY == "Up") {
DirectionY = "Down";
} else {
DirectionY = "Up";
}
}
if (DirectionY == "Up") {
currentspeedY = currentspeedY - accelY;
} else {
currentspeedY = currentspeedY + accelY;
}
currentspeedX = Math.max(-speedX, currentspeedX);
currentspeedX = Math.min(speedX, currentspeedX);
currentspeedY = Math.max(-speedY, currentspeedY);
currentspeedY = Math.min(speedY, currentspeedY);
if (hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true) && (_root.Course.Char.air == false)) {
_root.Course.Char._x = _root.Course.Char._x + currentspeedX;
_root.Course.Char._y = _root.Course.Char._y + currentspeedY;
_root.Course.Char.xspeed = _root.groundFriction(_root.Course.Char.xspeed, 0.3, 1.1);
if (landedon == false) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - currentspeedX;
}
landedon = true;
} else {
if (landedon == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + currentspeedX;
_root.Course.Char.yspeed = _root.Course.Char.yspeed + (currentspeedY / 2);
}
landedon = false;
}
_y = (_y + currentspeedY);
_x = (_x + currentspeedX);
if (currentspeedY < 0) {
_y = (_y + currentspeedY);
}
}
};
Symbol 88 MovieClip [lefttransition2] Frame 17
this.removeMovieClip(this);
Symbol 91 MovieClip [lefttransition] Frame 16
_root.warpframe = true;
Symbol 91 MovieClip [lefttransition] Frame 17
this.removeMovieClip(this);
Symbol 94 MovieClip [downtransition] Frame 15
_root.warpframe = true;
Symbol 94 MovieClip [downtransition] Frame 16
this.removeMovieClip(this);
Symbol 98 MovieClip [uptransition2] Frame 17
this.removeMovieClip(this);
Symbol 101 MovieClip [uptransition] Frame 16
_root.warpframe = true;
Symbol 101 MovieClip [uptransition] Frame 17
this.removeMovieClip(this);
Symbol 105 MovieClip [downtransition2] Frame 17
this.removeMovieClip(this);
Symbol 108 MovieClip [righttransition] Frame 16
_root.warpframe = true;
Symbol 108 MovieClip [righttransition] Frame 17
this.removeMovieClip(this);
Symbol 112 MovieClip [righttransition2] Frame 18
this.removeMovieClip(this);
Symbol 115 MovieClip [Whiteout] Frame 11
stop();
Symbol 126 MovieClip [StarIn] Frame 12
stop();
this.removeMovieClip(this);
Symbol 127 MovieClip [Blackout] Frame 11
stop();
Symbol 130 MovieClip [Fromwhite] Frame 11
stop();
this.removeMovieClip(this);
Symbol 144 MovieClip Frame 1
onEnterFrame = function () {
frame = Math.round(_root.Waterpercent);
gotoAndStop(frame);
frame = frame + "%";
};
Symbol 189 MovieClip Frame 1
frame = _root.CharHP + 1;
onEnterFrame = function () {
if ((_currentframe - 1) < _root.CharHP) {
frame = frame + 0.3;
}
if ((_currentframe - 1) > _root.CharHP) {
frame = frame - 0.3;
}
gotoAndStop(Math.round(frame));
};
Symbol 190 MovieClip Frame 1
stop();
count = 0;
currenthp = _root.CharHP;
onEnterFrame = function () {
if ((currenthp == _root.CharHP) && (_root.CharHP > 2)) {
count++;
} else {
currenthp = _root.CharHP;
count = 0;
}
if (count > 90) {
play();
onEnterFrame = null;
}
};
Symbol 190 MovieClip Frame 15
stop();
currenthp = _root.CharHP;
onEnterFrame = function () {
if ((!(currenthp === _root.CharHP)) || (_root.CharHP <= 2)) {
if ((_root.CharHP < currenthp) || (_root.CharHP <= 2)) {
play();
} else {
gotoAndPlay ("slower");
}
onEnterFrame = null;
}
};
Symbol 190 MovieClip Frame 20
gotoAndStop (1);
Symbol 190 MovieClip Frame 35
gotoAndStop (1);
Symbol 208 Button
on (release) {
_root.WiiMode = true;
nextFrame();
}
Symbol 209 Button
on (release) {
_root.WiiMode = false;
nextFrame();
}
Symbol 226 MovieClip Frame 1
stop();
Symbol 226 MovieClip Frame 6
gotoAndPlay(page);
Symbol 226 MovieClip Frame 11
stop();
Symbol 226 MovieClip Frame 15
gotoAndPlay(page);
Symbol 226 MovieClip Frame 21
stop();
Symbol 226 MovieClip Frame 25
gotoAndPlay(page);
Symbol 226 MovieClip Frame 31
stop();
Symbol 226 MovieClip Frame 35
gotoAndPlay(page);
Symbol 226 MovieClip Frame 41
stop();
Symbol 226 MovieClip Frame 45
gotoAndPlay(page);
Symbol 226 MovieClip Frame 50
stop();
Symbol 226 MovieClip Frame 55
gotoAndPlay(page);
Symbol 231 MovieClip Frame 1
stop();
_root.PauseGame = false;
rewind = false;
presskey = false;
onEnterFrame = function () {
if (presskey == false) {
if ((_root.KeyMinus() || (Key.isDown(36))) && (!(_root.PauseGame === true))) {
_root.PauseGame = true;
rewind = false;
play();
presskey = true;
} else if ((_root.KeyMinus() || (Key.isDown(36))) && (!(_root.PauseGame === false))) {
rewind = true;
presskey = true;
}
}
if ((!_root.KeyMinus()) && (!Key.isDown(36))) {
presskey = false;
}
if ((_currentframe > 1) && (!(_root.PauseGame === true))) {
rewind = true;
}
if (rewind == true) {
prevFrame();
}
};
Instance of Symbol 229 MovieClip "box" in Symbol 231 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 231 MovieClip Frame 15
stop();
Symbol 238 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this.hitTest(_root.Course.Char.charClip.head) && (_root.Course.Char.yspeed < 0)) {
_root.Course.Char.yspeed = 3;
play();
}
};
Symbol 238 MovieClip Frame 25
_root.Blackout();
Symbol 238 MovieClip Frame 45
_root.ReturnToCastle();
Symbol 268 MovieClip Frame 1
stop();
Instance of Symbol 260 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true) && (_root.Course.Char.yspeed > 0)) {
_parent.play();
_root.Course.Char.yspeed = -6;
}
}
Symbol 268 MovieClip Frame 2
_parent.attachMovie("Rnozzle", "Rnozzle" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x, _y:_y + 10});
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Nozzle Box Break");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 268 MovieClip Frame 11
stop();
count = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
count++;
if (count > 300) {
gotoAndStop (1);
onEnterFrame = null;
}
}
};
Symbol 276 MovieClip Frame 1
stop();
Instance of Symbol 260 MovieClip in Symbol 276 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true) && (_root.Course.Char.yspeed > 0)) {
_parent.play();
_root.Course.Char.yspeed = -6;
}
}
Symbol 276 MovieClip Frame 2
_parent.attachMovie("Hnozzle", "Hnozzle" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x, _y:_y + 10});
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Nozzle Box Break");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Instance of Symbol 260 MovieClip in Symbol 276 MovieClip Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(((_root.Course.Mario._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Mario._y * _root.coursescale) / 100) + _root.Course._y, true) && (_root.Course.Mario.yspeed > 0)) {
_parent.play();
_root.Course.Mario.yspeed = -6;
}
}
Symbol 276 MovieClip Frame 11
stop();
count = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
count++;
if (count > 300) {
gotoAndStop (1);
onEnterFrame = null;
}
}
};
Symbol 284 MovieClip Frame 1
stop();
Instance of Symbol 260 MovieClip in Symbol 284 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true) && (_root.Course.Char.yspeed > 0)) {
_parent.play();
_root.Course.Char.yspeed = -6;
}
}
Symbol 284 MovieClip Frame 2
_parent.attachMovie("Tnozzle", "Hnozzle" + _parent.getNextHighestDepth(), _parent.getNextHighestDepth(), {_x:_x, _y:_y + 10});
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Nozzle Box Break");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 284 MovieClip Frame 11
stop();
count = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
count++;
if (count > 300) {
gotoAndStop (1);
onEnterFrame = null;
}
}
};
Symbol 299 MovieClip Frame 3
stop();
onEnterFrame = function () {
if (_parent._parent.yspeed > 0) {
nextFrame();
onEnterFrame = null;
}
};
Symbol 316 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 325 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 332 MovieClip Frame 4
stop();
Symbol 334 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 1
_visible = false;
_rotation = 0;
onEnterFrame = function () {
if (_parent.seeing == true) {
gotoAndStop (20);
}
};
Symbol 340 MovieClip Frame 13
_rotation = ((Math.random() * 20) - 10);
Symbol 340 MovieClip Frame 19
gotoAndPlay (1);
Symbol 340 MovieClip Frame 20
stop();
_rotation = 0;
onEnterFrame = function () {
if (_parent.seeing == false) {
gotoAndPlay (1);
}
};
Symbol 341 MovieClip Frame 1
if (scale == undefined) {
scale = 1;
}
if (walkspeed == undefined) {
walkspeed = 0.5;
}
if (movedirection == undefined) {
randomnum = random(2);
if (randomnum == 0) {
movedirection = "right";
} else {
movedirection = "left";
}
} else {
randomnum = 0;
}
if (WalkDistance == undefined) {
WalkDistance = 100;
}
powerhit = false;
seeing = false;
see = false;
hurt = false;
frame = "Idle";
xspeed = 0;
yspeed = 0;
wide = 10 * scale;
tall = 25 * scale;
air = false;
tumble = false;
tumblerot = 0;
_xscale = (scale * 100);
_yscale = (scale * 100);
Moveright = function () {
offground = true;
if (offground == false) {
}
Xspot2 = 15;
while (Xspot2 < 40) {
Xspot = Xspot2 + (xspeed * 7);
adding = 3;
Yspot = -5;
while (Yspot < 100) {
adding = Math.min(adding, 5);
if (_root.Course.Platforms.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
offground = false;
break;
}
if (_root.Course.BPlatforms.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
offground = false;
break;
}
if (_root.Course.Water.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
break;
}
Yspot = Yspot + ((adding = adding + 0.5));
}
Xspot2 = Xspot2 + 10;
}
if (offground == false) {
xspeed = xspeed + walkspeed;
} else {
randomnum = 0;
movedirection = "left";
if (air == false) {
frame = "Idle";
}
}
};
Moveleft = function () {
offground = true;
if (offground == false) {
}
Xspot2 = 15;
while (Xspot2 < 40) {
Xspot = (-Xspot2) + (xspeed * 7);
adding = 3;
Yspot = -5;
while (Yspot < 100) {
adding = Math.min(adding, 5);
if (_root.Course.Platforms.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
offground = false;
break;
}
if (_root.Course.BPlatforms.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
offground = false;
break;
}
if (_root.Course.Water.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
break;
}
Yspot = Yspot + ((adding = adding + 0.5));
}
Xspot2 = Xspot2 + 10;
}
if (offground == false) {
xspeed = xspeed - walkspeed;
} else {
randomnum = 0;
movedirection = "right";
if (((air == false) && ((!frame) == "tumble")) && ((!frame) == "Squish")) {
frame = "Idle";
}
}
};
Symbol 341 MovieClip Frame 3
stop();
onEnterFrame = function () {
if (_root.PauseGame == false) {
if ((Math.abs(_root.currentCamX - (_x + _parent._x)) < 1000) && (Math.abs(_root.currentCamY - (_y + _parent._y)) < 1000)) {
_yscale = (scale * 100);
_xscale = (scale * 100);
eye._yscale = (1 / scale) * 100;
eye._xscale = (1 / scale) * 100;
if (hurt == true) {
xspeed = 0;
yspeed = 0;
tumble = false;
clip.frame._rotation = tumblerot;
}
if (!(frame === "Squish")) {
if (_root.playpause == false) {
if (this.eye.hitTest(_root.Course.Char.charClip.body) && (tumble == false)) {
if (seeing == false) {
see = true;
}
seeing = true;
} else {
seeing = false;
see = false;
}
if (((this.body.hitTest(_root.Course.Char.charClip.body) && (_root.Course.Char.attackFrame == "Dive")) && (_root.Course.Char.attack == true)) && (Math.abs(_root.Course.Char.xspeed) > 1)) {
tumble = true;
yspeed = yspeed - (Math.abs((_root.Course.Char.xspeed + 1) / 5) / scale);
xspeed = xspeed + ((_root.Course.Char.xspeed - (xspeed / 1.5)) / scale);
_y = (_y - 3);
if (Math.abs(xspeed / (scale / 2)) > 17) {
powerhit = true;
}
}
if (((this.body.hitTest(_root.Course.Char.charClip.water) || (this.body.hitTest(_root.Course.Char.charClip.frame.water))) || (this.head.hitTest(_root.Course.Char.charClip.water))) || (this.head.hitTest(_root.Course.Char.charClip.frame.water))) {
tumble = true;
yspeed = yspeed - (1.5 / scale);
if ((_root.Course.Char.attackFrame == "Spin") && (_root.Course.Char.attack == true)) {
if (_root.Course.Char._x > (_x + _parent._x)) {
xspeed = xspeed * 0.7;
xspeed = xspeed - (20 / scale);
} else {
xspeed = xspeed * 0.7;
xspeed = xspeed + (20 / scale);
}
} else if (_root.Course.Char._xscale > 0) {
if ((_root.Fluddpow == "T") || (((_root.Fluddpow == "H") && (_root.Course.Char.attackFrame == "Dive")) && (_root.Course.Char.attack == true))) {
xspeed = xspeed * 0.9;
xspeed = xspeed + (6 / scale);
} else {
xspeed = xspeed * 0.9;
xspeed = xspeed - (3 / scale);
}
} else if ((_root.Fluddpow == "T") || (((_root.Fluddpow == "H") && (_root.Course.Char.attackFrame == "Dive")) && (_root.Course.Char.attack == true))) {
xspeed = xspeed * 0.9;
xspeed = xspeed - (6 / scale);
} else {
xspeed = xspeed * 0.9;
xspeed = xspeed + (3 / scale);
}
if (Math.abs(xspeed / (scale / 2)) > 9) {
powerhit = true;
}
_y = (_y - 3);
}
if ((this.body.hitTest(_root.Course.Char.charClip.body) && ((_root.Course.Char.attack == false) || (!(((_root.Course.Char.attackFrame == "Dive") && (_root.Course.Char.attack == true)) && (Math.abs(_root.Course.Char.xspeed) > 0.3))))) && (tumble == false)) {
if (_root.Course.Char._x > (_x + _parent._x)) {
_root.MarioHit(1, 90, -5, 7, 7, "");
} else {
_root.MarioHit(1, 90, -5, -7, 7, "");
}
}
if ((this.head.hitTest(_root.Course.Char.charClip.feet) && (_root.Course.Char.air == true)) && (_root.Course.Char.yspeed > 0)) {
_root.Course.Char.yspeed = _root.Course.Char.yspeed / 2;
_root.Course.Char.yspeed = _root.Course.Char.yspeed - 7;
hurt = true;
tumblerot = 0;
}
if (_root.Course.Water.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
hurt = true;
tumblerot = 0;
}
if ((!_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
_y = (_y + yspeed);
yspeed = yspeed + 1;
yspeed = yspeed * 0.98;
air = true;
}
if (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
if (air == true) {
jump = false;
}
air = false;
if (tumble == false) {
yspeed = Math.min(0, yspeed);
} else {
if ((Math.abs(yspeed) + Math.abs(xspeed / 2)) > 11) {
tumble = false;
if (powerhit == true) {
tumblerot = 0;
hurt = true;
}
}
if (yspeed > 3) {
yspeed = Math.min(0, (-yspeed) + 2);
xspeed = _root.groundFriction(xspeed, 2, 1.2);
} else {
xspeed = _root.groundFriction(xspeed, 0.5, 1.1);
yspeed = 0;
}
if (Math.abs(xspeed) < 2) {
tumble = false;
if (powerhit == true) {
tumblerot = 0;
hurt = true;
}
}
}
}
while (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
_y = (_y-1);
}
while (_root.Course.Platforms.hitTest(((((_x + wide) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - (tall / 2)) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
_x = (_x-1);
movedirection = "left";
randomnum = 0;
if (tumble == true) {
if (xspeed < 7) {
xspeed = Math.max(xspeed * 0.7, (-xspeed) * 0.7);
} else if ((xspeed > 0) && (powerhit == true)) {
hurt = true;
tumblerot = -90;
}
}
}
while (_root.Course.Platforms.hitTest(((((_x - wide) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - (tall / 2)) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
_x = (_x+1);
movedirection = "right";
randomnum = 0;
if (tumble == true) {
if (xspeed > 7) {
xspeed = Math.min(xspeed * 0.7, (-xspeed) * 0.7);
} else if ((xspeed < 0) && (powerhit == true)) {
hurt = true;
tumblerot = 90;
}
}
}
while ((_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) && (!(_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 1) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))))) {
_y = (_y+1);
}
while (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 1) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
_y = (_y-1);
}
if (hurt == true) {
frame = "Squish";
}
if ((air == true) && (!(frame === "Squish"))) {
frame = "jump";
}
if (((seeing == true) && (tumble == false)) && (!(frame === "Squish"))) {
if ((_root.Course.Char._x > (_x + _parent._x)) && (Math.abs(_root.Course.Char._x - (_x + _parent._x)) > 20)) {
Moveright();
} else if ((_root.Course.Char._x < (_x + _parent._x)) && (Math.abs(_root.Course.Char._x - (_x + _parent._x)) > 20)) {
Moveleft();
} else if (((air == false) && (!(frame === "Squish"))) && (tumble == false)) {
frame = "Idle";
}
}
if (((seeing == false) && (tumble == false)) && (!(frame === "Squish"))) {
randomnum++;
if (movedirection == "right") {
Moveright();
}
if (movedirection == "left") {
Moveleft();
}
if (randomnum > WalkDistance) {
if (movedirection == "right") {
movedirection = "left";
} else {
movedirection = "right";
}
randomnum = 0;
}
}
if (see == true) {
jump = true;
see = false;
}
if ((jump == true) && (air == false)) {
yspeed = -5;
_y = (_y - 3);
jump = false;
frame = "jump";
}
if (((((air == false) && (!(frame === "Squish"))) && (tumble == false)) && (Math.abs(xspeed) > 0.3)) && (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)))) {
if (xspeed > 0) {
frame = "Walkright";
} else {
frame = "Walkleft";
}
} else if (((air == false) && (!(frame === "Squish"))) && (tumble == false)) {
frame = "Idle";
}
if (((air == true) && (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
air == false;
if ((((!(frame === "Squish")) && (tumble == false)) && (Math.abs(xspeed) > 0.3)) && (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)))) {
if (xspeed > 0) {
frame = "Walkright";
} else {
frame = "Walkleft";
}
} else if (((air == false) && (!(frame === "Squish"))) && (tumble == false)) {
frame = "Idle";
}
}
if ((tumble == true) && (hurt == false)) {
tumblerot = tumblerot + (xspeed * 3);
frame = "tumble";
}
if (yspeed > 7) {
yspeed = yspeed * 0.9;
}
yspeed = Math.max(yspeed, -10);
yspeed = Math.min(yspeed, 10);
xspeed = Math.max(xspeed, -15);
xspeed = Math.min(xspeed, 15);
_x = (_x + xspeed);
if (tumble == false) {
xspeed = _root.groundFriction(xspeed, 0.3, 1.1);
} else {
xspeed = _root.groundFriction(xspeed, 0.05, 1.01);
}
if ((tumble == false) && (Math.abs(tumblerot) > 0)) {
tumblerot = _root.groundFriction(tumblerot, 5, 1.3);
frame = "tumble";
}
clip.frame._rotation = -tumblerot;
clip.gotoAndStop(frame);
}
}
}
if ((frame == "Walkright") || (frame == "Walkleft")) {
if (_root.playpause == true) {
clip.frame.stop();
} else {
clip.frame.play();
}
}
}
};
Symbol 357 MovieClip Frame 1
if (_parent.coincountnum == undefined) {
_parent.coincountnum = 0;
} else {
_parent.coincountnum++;
}
if (_root["coindata" + _root.playingcourse][0] == undefined) {
_root["coindata" + _root.playingcourse] = [""];
}
coinnum = _parent.coincountnum;
if ((_root["coindata" + _root.playingcourse][coinnum] == 1) && (!(_root["coindata" + _root.playingcourse][coinnum] === undefined))) {
gotoAndStop (17);
}
Symbol 357 MovieClip Frame 2
stop();
onEnterFrame = function () {
if ((Math.abs(_root.currentCamX - (_x + _parent._x)) < 1000) && (Math.abs(_root.currentCamY - (_y + _parent._y)) < 1000)) {
_visible = true;
if (this.hitTest(_root.Course.Char.charClip.body) || (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y - 15) * _root.coursescale) / 100) + _root.Course._y, true))) {
play();
if (_root.CharHP < 8) {
_root.CharHP++;
}
_root.coincount++;
_root.Coins++;
onEnterFrame = null;
}
} else {
_visible = false;
}
};
Symbol 357 MovieClip Frame 3
_root.bgsoundFX = new Sound(this);
_root.bgsoundFX.attachSound("CoinJingle");
_root.bgsoundFX.start(0, 1);
_root.bgsoundFX.setVolume(_root.BgVolume);
_root["coindata" + _root.playingcourse][coinnum] = 1;
Symbol 357 MovieClip Frame 17
stop();
Symbol 375 MovieClip Frame 1
if (_parent.coincountnum == undefined) {
_parent.coincountnum = 0;
} else {
_parent.coincountnum++;
}
if (_root["coindata" + _root.playingcourse][0] == undefined) {
_root["coindata" + _root.playingcourse] = [""];
}
coinnum = _parent.coincountnum;
if ((_root["coindata" + _root.playingcourse][coinnum] == 1) && (!(_root["coindata" + _root.playingcourse][coinnum] === undefined))) {
gotoAndStop (48);
}
Symbol 375 MovieClip Frame 2
stop();
onEnterFrame = function () {
if ((Math.abs(_root.currentCamX - (_x + _parent._x)) < 1000) && (Math.abs(_root.currentCamY - (_y + _parent._y)) < 1000)) {
_visible = true;
if (this.hitTest(_root.Course.Char.charClip.body)) {
_root["coindata" + _root.playingcourse][coinnum] = 1;
play();
_root.RedCoins++;
coinnum = _root.RedCoins;
_root.CharHP = _root.CharHP + 2;
_root.CharHP = Math.min(_root.CharHP, 8);
_root.coincount = _root.coincount + 2;
_root.Coins = _root.Coins + 2;
_root.Power = _root.Power + 20;
_root.Power = Math.min(_root.Power, 100);
onEnterFrame = null;
}
} else {
_visible = false;
}
};
Symbol 375 MovieClip Frame 3
_root.bgsoundFX = new Sound(this);
_root.bgsoundFX.attachSound("CoinJingle");
_root.bgsoundFX.start(0, 1);
_root.bgsoundFX.setVolume(_root.BgVolume);
_root["coindata" + _root.playingcourse][coinnum] = 1;
Symbol 375 MovieClip Frame 4
_root.bgsoundFX = new Sound(this);
_root.bgsoundFX.attachSound("CoinJingle");
_root.bgsoundFX.start(0, 1);
_root.bgsoundFX.setVolume(_root.BgVolume);
Symbol 375 MovieClip Frame 48
stop();
Symbol 379 MovieClip Frame 1
if (DirectionX == undefined) {
DirectionX = "Right";
}
if (DirectionY == undefined) {
DirectionY = "Up";
}
if (distanceX == undefined) {
distanceX = 25;
}
if (distanceY == undefined) {
distanceY = 0;
}
if (accelX == undefined) {
accelX = 1;
}
if (accelY == undefined) {
accelY = 0;
}
if (speedX == undefined) {
speedX = 5;
}
if (speedY == undefined) {
speedY = 0;
}
if (Xoffstart == undefined) {
Xoffstart = 0;
}
if (Yoffstart == undefined) {
Yoffstart = 0;
}
if (DirectionY == "Up") {
_y = (_y - speedY);
} else {
_y = (_y + speedY);
}
if (DirectionY == "Right") {
_x = (_x - speedX);
} else {
_x = (_x + speedX);
}
_root.Course.BPlatforms.attachMovie("GreenPLleftrightCode", "GreenPLleftright" + _root.Course.BPlatforms.getNextHighestDepth(), _root.Course.BPlatforms.getNextHighestDepth(), {_x:_x, _y:_y, DirectionX:DirectionX, distanceX:distanceX, accelX:accelX, speedX:speedX, DirectionY:DirectionY, distanceY:distanceY, accelY:accelY, speedY:speedY, Xoffstart:Xoffstart, Yoffstart:Yoffstart});
currentspeedX = 0;
distancecountX = speedX + Xoffstart;
currentspeedY = 0;
distancecountY = speedY + Yoffstart;
onEnterFrame = function () {
if (_root.PauseGame == false) {
distancecountX++;
if (distancecountX >= distanceX) {
distancecountX = 0;
if (DirectionX == "Right") {
DirectionX = "Left";
} else {
DirectionX = "Right";
}
}
if (DirectionX == "Right") {
currentspeedX = currentspeedX + accelX;
} else {
currentspeedX = currentspeedX - accelX;
}
distancecountY++;
if (distancecountY >= distanceY) {
distancecountY = 0;
if (DirectionY == "Up") {
DirectionY = "Down";
} else {
DirectionY = "Up";
}
}
if (DirectionY == "Up") {
currentspeedY = currentspeedY - accelY;
} else {
currentspeedY = currentspeedY + accelY;
}
currentspeedX = Math.max(-speedX, currentspeedX);
currentspeedX = Math.min(speedX, currentspeedX);
currentspeedY = Math.max(-speedY, currentspeedY);
currentspeedY = Math.min(speedY, currentspeedY);
_x = (_x + currentspeedX);
_y = (_y + currentspeedY);
}
};
Symbol 379 MovieClip Frame 2
stop();
Symbol 398 MovieClip Frame 1
wingdive = false;
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 398 MovieClip Frame 7
wingdive = true;
Symbol 398 MovieClip Frame 8
wingdive = false;
Symbol 398 MovieClip Frame 15
wingdive = true;
Symbol 398 MovieClip Frame 16
wingdive = false;
Symbol 399 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 402 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 4
_parent.frame = "fly";
Symbol 403 MovieClip Frame 1
if (speedY == undefined) {
speedY = -0.7 - (Math.random() * 0.25);
}
if (moveup == undefined) {
moveup = 250;
}
if (movedown == undefined) {
movedown = 45;
}
if (_xscale > 0) {
if (speedX == undefined) {
speedX = -2 - (Math.random() * 0.5);
}
} else if (speedX == undefined) {
speedX = 2 + (Math.random() * 0.5);
}
upcount = random(moveup);
downcount = 0;
frame = "fly";
depth = _root.Course.BPlatforms.getNextHighestDepth();
_root.Course.BPlatforms.attachMovie("GooniePL", "GooniePL" + depth, depth, {_x:_x, _y:_y, speedY:speedY, speedX:speedX, landedon:false, _xscale:_xscale});
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (frame == "fly") {
upcount++;
if ((upcount > moveup) && (clip.wingdive == true)) {
frame = "dive";
upcount = 0;
downcount = random(movedown / 2);
}
} else if (frame == "dive") {
downcount++;
if (downcount > movedown) {
clip.play();
upcount = random(moveup / 2);
downcount = 0;
}
}
tellTarget (_root.Course.BPlatforms["GooniePL" + depth]) {
currentspeedX = speedX;
if (this.frame == "ride") {
currentspeedY = _root.gravity / 1.5;
} else if (this.frame == "dive") {
currentspeedY = _root.gravity * 1.5;
currentspeedX = speedX * 1.5;
} else {
currentspeedY = speedY;
}
if (currentspeedY < 0) {
_y = (_y - currentspeedY);
}
if (hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true)) {
_root.Course.Char._x = _root.Course.Char._x + currentspeedX;
_root.Course.Char._y = _root.Course.Char._y + currentspeedY;
_root.Course.Char.xspeed = _root.groundFriction(_root.Course.Char.xspeed, 0.3, 1.1);
if (landedon == false) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - currentspeedX;
this.frame = "ride";
}
landedon = true;
} else {
if (landedon == true) {
this.frame = "fly";
_root.Course.Char.xspeed = _root.Course.Char.xspeed + currentspeedX;
_root.Course.Char.yspeed = _root.Course.Char.yspeed + (currentspeedY / 2);
}
landedon = false;
}
if (currentspeedY < 0) {
_y = (_y + currentspeedY);
}
count = 0;
if (_root.Course.Edge.hitTest(((((_x + 50) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
do {
if (_root.Course.Edge.hitTest(((((_x - 50) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
break;
}
_x = (_x - 75);
count++;
} while (count <= 150);
_x = (_x + 50);
}
if (_root.Course.Edge.hitTest(((((_x - 50) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
do {
if (_root.Course.Edge.hitTest(((((_x + 50) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
break;
}
_x = (_x + 75);
count++;
} while (count <= 150);
_x = (_x - 50);
}
if (_root.Course.Edge.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 50) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
do {
if (_root.Course.Edge.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 50) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
break;
}
_y = (_y - 75);
count++;
} while (count <= 150);
_y = (_y + 50);
}
if (_root.Course.Edge.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 50) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
do {
if (_root.Course.Edge.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 50) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
break;
}
_y = (_y + 75);
count++;
} while (count <= 150);
_y = (_y - 50);
}
_y = (_y + currentspeedY);
_x = (_x + currentspeedX);
this._y = _y;
this._x = _x;
_xscale = this._xscale;
};
gotoAndStop(frame);
}
};
Symbol 403 MovieClip Frame 2
if (firstloadthisframe == undefined) {
clip.gotoAndPlay(random(18));
firstloadthisframe = true;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
walkspeed = 0.7;
scale = 2;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 379 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Left";
distanceX = 32;
accelX = 1;
speedX = 4;
DirectionY = "Up";
distanceY = 32;
accelY = 1;
speedY = 4;
}
Instance of Symbol 379 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
distanceX = 0;
accelX = 0;
speedX = 0;
DirectionY = "Up";
distanceY = 35;
accelY = 1;
speedY = 5;
}
Instance of Symbol 379 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
distanceX = 0;
accelX = 0;
speedX = 0;
DirectionY = "Up";
distanceY = 37;
accelY = 1;
speedY = 5;
}
Instance of Symbol 379 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
distanceX = 0;
accelX = 0;
speedX = 0;
DirectionY = "Up";
distanceY = 37;
accelY = 1;
speedY = 5;
}
Instance of Symbol 341 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
scale = 1;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 404 MovieClip [Level1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Symbol 415 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 2
_root.bgsong.stop();
onEnterFrame = function () {
_root.Camcenter = _parent;
_root.playpause = true;
_root.PauseGame = false;
};
Symbol 415 MovieClip Frame 30
_root.bgSoundFX.stop();
_root.bgSoundFX = new Sound();
_root.bgSoundFX.attachSound("StarAppear");
_root.bgSoundFX.start(0, 1);
_root.bgSoundFX.setVolume(100);
alphacount = 0;
onEnterFrame = function () {
_root.playpause = true;
_root.Camcenter = _parent;
alphacount = alphacount + 3;
alphacount = Math.min(alphacount, 100);
this.attachMovie("ChargeLight", "ChargeLight" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:0, _y:0, _rotation:random(360), _alpha:alphacount});
_root.PauseGame = false;
};
Symbol 415 MovieClip Frame 89
onEnterFrame = function () {
_root.playpause = true;
_root.Camcenter = _parent;
alphacount = alphacount - 5;
alphacount = Math.min(alphacount, 100);
this.attachMovie("ChargeLight", "ChargeLight" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:0, _y:0, _rotation:random(360), _alpha:alphacount});
_root.PauseGame = false;
};
Symbol 415 MovieClip Frame 107
onEnterFrame = function () {
_root.playpause = true;
_root.Camcenter = _parent;
_root.PauseGame = false;
};
Symbol 415 MovieClip Frame 127
_root.bgsong.start(0, 1);
onEnterFrame = function () {
_root.playpause = true;
_root.PauseGame = false;
};
Symbol 415 MovieClip Frame 140
onEnterFrame = null;
Symbol 415 MovieClip Frame 150
_parent.gotoAndStop(1);
Symbol 416 MovieClip Frame 1
stop();
if (invis == undefined) {
invis = false;
}
onEnterFrame = function () {
if (invis == false) {
if (_root.Star[starnum] == true) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
if (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y - 20) * _root.coursescale) / 100) + _root.Course._y, true)) {
if (_root.Star[starnum] == false) {
_root.Star[starnum] = true;
_root.newstar = true;
}
_root.Course.Char.attack = true;
_root.Course.Char.attackFrame = "Star";
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = _root.Course.Char.yspeed / 2;
_root.Course.Char._x = _x + _parent._x;
_root.Course.Char._y = (_y + _parent._y) + ((20 * _root.coursescale) / 100);
onEnterFrame = null;
gotoAndStop ("Gone");
}
} else {
gotoAndStop ("Invis");
}
};
Symbol 416 MovieClip Frame 3
onEnterFrame = function () {
if ((invis == false) && ((_root.Course.Char.attack == false) || (_root.Course.Char.attackFrame == "Dive"))) {
star.play();
}
};
Symbol 416 MovieClip Frame 4
stop();
Instance of Symbol 416 MovieClip in Symbol 418 MovieClip [Level1FrontGFX] Frame 1
onClipEvent (load) {
starnum = 1;
}
Instance of Symbol 416 MovieClip in Symbol 418 MovieClip [Level1FrontGFX] Frame 1
onClipEvent (load) {
invis = true;
starnum = 2;
}
onClipEvent (enterFrame) {
if (_root.RedCoins >= 8) {
invis = false;
}
}
Symbol 425 MovieClip [0-1Ice] Frame 1
_alpha = 0;
Symbol 536 MovieClip [4-1BackGFX] Frame 2
stop();
onEnterFrame = function () {
if (lava.hitTest(_root.Course.Char.charClip.feet)) {
_root.MarioHit(3, 20, -22, 0, 20, "");
_root.Course.Char.yspeed = Math.min(-22, _root.Course.Char.yspeed);
}
};
Instance of Symbol 260 MovieClip "lava" in Symbol 536 MovieClip [4-1BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 416 MovieClip in Symbol 559 MovieClip [3-3BackGFX] Frame 1
onClipEvent (load) {
starnum = 13;
}
Symbol 559 MovieClip [3-3BackGFX] Frame 2
stop();
_root.warpframe = false;
onEnterFrame = function () {
if (this.warp1.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 1;
}
if (this.warp2.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 2;
}
if (this.warp3.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 3;
}
if ((warp == true) && (_root.warpframe == false)) {
if (warpnum == 1) {
_root.attachMovie("lefttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else if (warpnum == 2) {
_root.attachMovie("lefttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else if (warpnum == 3) {
_root.attachMovie("lefttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
warp = false;
}
if (_root.warpframe == true) {
if (warpnum == 1) {
_root.changecourse("lefttransition2", "3-4", 2350, 30, 2350, 30);
} else if (warpnum == 2) {
_root.changecourse("righttransition2", "3-2", 2350, -70, 2350, -70);
} else if (warpnum == 3) {
_root.changecourse("righttransition2", "3-5", 2400, 50, 2400, 50);
}
}
};
Instance of Symbol 260 MovieClip "warp2" in Symbol 559 MovieClip [3-3BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp1" in Symbol 559 MovieClip [3-3BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp3" in Symbol 559 MovieClip [3-3BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 573 MovieClip Frame 1
stop();
if (DirectionX == undefined) {
DirectionX = "Right";
}
if (DirectionY == undefined) {
DirectionY = "Up";
}
if (distanceX == undefined) {
distanceX = 0;
}
if (distanceY == undefined) {
distanceY = 0;
}
if (accelX == undefined) {
accelX = 0;
}
if (accelY == undefined) {
accelY = 0;
}
if (speedX == undefined) {
speedX = 0;
}
if (speedY == undefined) {
speedY = 0;
}
if (Xoffstart == undefined) {
Xoffstart = 0;
}
if (Yoffstart == undefined) {
Yoffstart = 0;
}
if (DirectionY == "Up") {
_y = (_y - speedY);
} else {
_y = (_y + speedY);
}
if (DirectionY == "Right") {
_x = (_x - speedX);
} else {
_x = (_x + speedX);
}
if (rotdirection == undefined) {
rotdirection = "Left";
}
if (rotspeed == undefined) {
rotspeed = 3;
}
if (rotwait == undefined) {
rotwait = 72;
}
if ((quake == undefined) && (rotwait > 20)) {
quake = true;
} else {
quake = true;
}
depth = _root.Course.Platforms.getNextHighestDepth();
_root.Course.Platforms.attachMovie("Rotating Block Plat Code", "Rotating Block Plat Code" + depth, depth, {_x:_x, _y:_y, count:0, spincount:0, DirectionX:DirectionX, distanceX:distanceX, accelX:accelX, speedX:speedX, DirectionY:DirectionY, distanceY:distanceY, accelY:accelY, speedY:speedY, Xoffstart:Xoffstart, Yoffstart:Yoffstart});
currentspeedX = 0;
distancecountX = speedX + Xoffstart;
currentspeedY = 0;
distancecountY = speedY + Yoffstart;
onEnterFrame = function () {
if (_root.PauseGame == false) {
tellTarget (_root.Course.Platforms["Rotating Block Plat Code" + depth]) {
count++;
if (count > this.rotwait) {
spincount++;
if ((spincount * this.rotspeed) <= 90) {
if (this.rotdirection == "Right") {
_rotation = (_rotation + this.rotspeed);
}
if (this.rotdirection == "Left") {
_rotation = (_rotation - this.rotspeed);
}
if (hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true)) {
if (this.rotdirection == "Right") {
_root.Course.Char._x = _root.Course.Char._x + this.rotspeed;
}
if (this.rotdirection == "Left") {
_root.Course.Char._x = _root.Course.Char._x - this.rotspeed;
}
}
} else {
count = 0;
spincount = 0;
_rotation = (Math.round(_rotation / 90) * 90);
}
}
if (((count + 20) > this.rotwait) && (count < this.rotwait)) {
_rotation = (Math.round(_rotation / 90) * 90);
_rotation = (_rotation + ((Math.random() * 5) - 2.5));
}
this._rotation = _rotation;
};
distancecountX++;
if (distancecountX >= distanceX) {
distancecountX = 0;
if (DirectionX == "Right") {
DirectionX = "Left";
} else {
DirectionX = "Right";
}
}
if (DirectionX == "Right") {
currentspeedX = currentspeedX + accelX;
} else {
currentspeedX = currentspeedX - accelX;
}
distancecountY++;
if (distancecountY >= distanceY) {
distancecountY = 0;
if (DirectionY == "Up") {
DirectionY = "Down";
} else {
DirectionY = "Up";
}
}
if (DirectionY == "Up") {
currentspeedY = currentspeedY - accelY;
} else {
currentspeedY = currentspeedY + accelY;
}
currentspeedX = Math.max(-speedX, currentspeedX);
currentspeedX = Math.min(speedX, currentspeedX);
currentspeedY = Math.max(-speedY, currentspeedY);
currentspeedY = Math.min(speedY, currentspeedY);
_x = (_x + currentspeedX);
_y = (_y + currentspeedY);
}
};
Symbol 578 MovieClip Frame 1
stop();
if (scale == undefined) {
scale = 1;
}
if (this.scale > 2) {
gotoAndStop (3);
} else if (this.scale > 1) {
gotoAndStop (2);
}
depth = _root.Course.BPlatforms.getNextHighestDepth();
_root.Course.BPlatforms.attachMovie("LogPL", "LogPL" + depth, depth, {_x:_x, _y:_y, speedY:speedY, speedX:speedX, landedon:false, _xscale:_xscale});
rotspeed = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
rotspeed = rotspeed * 0.8;
distance = (_root.Course.Char._x - (_x + _parent._x)) / this.scale;
tellTarget (_root.Course.BPlatforms["LogPL" + depth]) {
if (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true)) {
this.rotspeed = this.rotspeed + ((this.distance / 20) / this.scale);
_rotation = _root.groundFriction(_rotation, 0.3 / this.scale, (0.03 / this.scale) + 1);
} else {
_rotation = _root.groundFriction(_rotation, 0.7 / this.scale, (0.07 / this.scale) + 1);
}
_rotation = (_rotation + (this.rotspeed / this.scale));
_rotation = Math.max(_rotation, -160);
_rotation = Math.min(_rotation, 160);
_root.Course.Char._x = _root.Course.Char._x + (_rotation / 20);
_xscale = (this.scale * 100);
this._rotation = _rotation;
};
}
};
Instance of Symbol 573 MovieClip in Symbol 582 MovieClip [3-4BackGFX] Frame 1
onClipEvent (load) {
rotwait = 30;
}
Instance of Symbol 573 MovieClip in Symbol 582 MovieClip [3-4BackGFX] Frame 1
onClipEvent (load) {
rotwait = 30;
}
Instance of Symbol 578 MovieClip in Symbol 582 MovieClip [3-4BackGFX] Frame 1
onClipEvent (load) {
scale = 3;
}
Instance of Symbol 379 MovieClip in Symbol 582 MovieClip [3-4BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
DirectionY = "Down";
distanceX = 0;
distanceY = 80;
accelX = 0;
accelY = 0.5;
speedX = 0;
speedY = 3;
}
Instance of Symbol 578 MovieClip in Symbol 582 MovieClip [3-4BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 573 MovieClip in Symbol 582 MovieClip [3-4BackGFX] Frame 1
onClipEvent (load) {
rotwait = 30;
rotdirection = "Left";
DirectionX = "Right";
DirectionY = "Up";
distanceX = 90;
distanceY = 0;
accelX = 0.5;
accelY = 0;
speedX = 3;
speedY = 0;
Xoffstart = 0;
Yoffstart = 0;
}
Instance of Symbol 260 MovieClip in Symbol 582 MovieClip [3-4BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.Course.Char.charClip.body)) {
_root.Course.Char.yspeed = -20;
}
}
Instance of Symbol 260 MovieClip in Symbol 582 MovieClip [3-4BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.Course.Char.charClip.body)) {
_root.Course.Char.xspeed = (Math.random() * 2) - 6;
_root.Course.Char.yspeed = -20;
}
}
Symbol 582 MovieClip [3-4BackGFX] Frame 4
stop();
_root.warpframe = false;
onEnterFrame = function () {
if (this.warp1.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 1;
}
if (this.warp2.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 2;
}
if (this.warp3.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 3;
}
if ((warp == true) && (_root.warpframe == false)) {
if (warpnum == 1) {
_root.attachMovie("lefttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else if (warpnum == 2) {
_root.attachMovie("downtransition", "downtransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else {
_root.attachMovie("righttransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
warp = false;
}
if (_root.warpframe == true) {
if (warpnum == 1) {
_root.changecourse("lefttransition2", "3-1", 1650, -170, 1650, -170);
} else if (warpnum == 2) {
_root.changecourse("downtransition2", "3-2", _root.Course.Char._x - _root.Course.CamEdge._x, -350, _root.Course.Char._x - _root.Course.CamEdge._x, -350);
} else {
_root.changecourse("righttransition2", "3-3", 0, -850, 0, -850);
}
}
};
Instance of Symbol 260 MovieClip "warp1" in Symbol 582 MovieClip [3-4BackGFX] Frame 4
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp2" in Symbol 582 MovieClip [3-4BackGFX] Frame 4
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp3" in Symbol 582 MovieClip [3-4BackGFX] Frame 4
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 379 MovieClip in Symbol 600 MovieClip [3-2BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
DirectionY = "Down";
distanceX = 60;
distanceY = 0;
accelX = 0.3;
accelY = 0;
speedX = 2;
speedY = 0;
}
Instance of Symbol 379 MovieClip in Symbol 600 MovieClip [3-2BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
DirectionY = "Down";
distanceX = 70;
distanceY = 0;
accelX = 0.3;
accelY = 0;
speedX = 2;
speedY = 0;
}
Instance of Symbol 379 MovieClip in Symbol 600 MovieClip [3-2BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
DirectionY = "Down";
distanceX = 0;
distanceY = 125;
accelX = 0;
accelY = 0.5;
speedX = 0;
speedY = 3;
}
Instance of Symbol 379 MovieClip in Symbol 600 MovieClip [3-2BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
DirectionY = "Down";
distanceX = 0;
distanceY = 78;
accelX = 0;
accelY = 0.5;
speedX = 0;
speedY = 3;
}
Instance of Symbol 379 MovieClip in Symbol 600 MovieClip [3-2BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
DirectionY = "Up";
distanceX = 0;
distanceY = 125;
accelX = 0;
accelY = 0.5;
speedX = 0;
speedY = 3;
}
Symbol 600 MovieClip [3-2BackGFX] Frame 2
stop();
_root.warpframe = false;
onEnterFrame = function () {
if (this.warp1.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 1;
}
if (this.warp2.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 2;
}
if (this.warp3.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 3;
}
if (this.warp4.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 4;
}
if (this.warp5.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 5;
}
if ((warp == true) && (_root.warpframe == false)) {
if (warpnum == 1) {
_root.attachMovie("lefttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else if (warpnum == 2) {
_root.attachMovie("lefttransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else if (warpnum == 3) {
_root.attachMovie("downtransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else if (warpnum == 4) {
_root.attachMovie("uptransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else {
_root.attachMovie("righttransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
warp = false;
}
if (_root.warpframe == true) {
if (warpnum == 1) {
_root.changecourse("lefttransition2", "3-1", 1700, 830, 1700, 830);
} else if (warpnum == 2) {
_root.changecourse("lefttransition2", "3-1", 1800, 1400, 1800, 1400);
} else if (warpnum == 3) {
_root.changecourse("downtransition2", "3-5", 0, 0, 0, 0);
} else if (warpnum == 4) {
_root.changecourse("uptransition2", "3-4", _root.Course.Char._x - _root.Course.CamEdge._x, 450, _root.Course.Char._x - _root.Course.CamEdge._x, 450);
} else {
_root.changecourse("righttransition2", "3-3", 0, 0, 0, 0);
}
}
};
Instance of Symbol 260 MovieClip "warp2" in Symbol 600 MovieClip [3-2BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp1" in Symbol 600 MovieClip [3-2BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp4" in Symbol 600 MovieClip [3-2BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp5" in Symbol 600 MovieClip [3-2BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp3" in Symbol 600 MovieClip [3-2BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp6" in Symbol 600 MovieClip [3-2BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp7" in Symbol 600 MovieClip [3-2BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 627 MovieClip Frame 1
if (fallspeed == undefined) {
fallspeed = 10;
}
if (fallamount == undefined) {
fallamount = 24;
}
if (fallwait == undefined) {
fallwait = 10;
}
if (quakeamount == undefined) {
quakeamount = 3;
}
depth = _root.Course.BPlatforms.getNextHighestDepth();
_root.Course.BPlatforms.attachMovie("FallinglogCode", "FallinglogCode" + depth, depth, {_x:_x, _y:_y, fallspeed:fallspeed, fallamount:fallamount, fallwait:fallwait, quakeamount:quakeamount, yspeed:0, fall:false});
onEnterFrame = function () {
if (_root.PauseGame == false) {
tellTarget (_root.Course.BPlatforms["FallinglogCode" + depth]) {
if (fall == false) {
this._alpha = this._alpha + 10;
this._alpha = Math.min(this._alpha, 100);
if ((this._alpha >= 100) && (hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true))) {
returnX = _x;
returnY = _y;
timefall = 0;
fallcount = 0;
fall = true;
}
}
if (fall == true) {
timefall++;
if (timefall > fallwait) {
fallcount++;
yspeed = yspeed + _root.gravity;
yspeed = _root.groundFriction(yspeed, 0.1, 1.05);
} else {
_y = (returnY + ((Math.random() * quakeamount) - (Math.random() * quakeamount)));
_x = (returnX + ((Math.random() * quakeamount) - (Math.random() * quakeamount)));
if (timefall == fallwait) {
_y = returnY;
_x = returnX;
}
}
if (yspeed < 0) {
_y = (_y - yspeed);
}
if (hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, ((_root.Course.Char._y * _root.coursescale) / 100) + _root.Course._y, true)) {
_root.Course.Char._y = _root.Course.Char._y + yspeed;
if (landedon == false) {
}
landedon = true;
} else {
if (landedon == true) {
_root.Course.Char.yspeed = _root.Course.Char.yspeed + yspeed;
}
landedon = false;
}
if (yspeed < 0) {
_y = (_y + yspeed);
}
_y = (_y + yspeed);
if (fallcount > (fallamount - 10)) {
this._alpha = this._alpha - 10;
this._alpha = Math.max(this._alpha, 0);
}
if (fallcount > fallamount) {
fallcount = 0;
yspeed = 0;
_x = returnX;
_y = returnY;
fall = false;
}
}
this._y = _y;
this._x = _x;
};
}
};
Instance of Symbol 578 MovieClip in Symbol 629 MovieClip [3-1BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 578 MovieClip in Symbol 629 MovieClip [3-1BackGFX] Frame 1
onClipEvent (load) {
scale = 3;
}
Instance of Symbol 341 MovieClip in Symbol 629 MovieClip [3-1BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 341 MovieClip in Symbol 629 MovieClip [3-1BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Symbol 629 MovieClip [3-1BackGFX] Frame 2
stop();
_root.warpframe = false;
onEnterFrame = function () {
if (this.warp1.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 1;
}
if (this.warp2.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 2;
}
if (this.warp3.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 3;
}
if ((warp == true) && (_root.warpframe == false)) {
if (warpnum == 1) {
_root.attachMovie("righttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else if (warpnum == 1) {
_root.attachMovie("righttransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else {
_root.attachMovie("righttransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
warp = false;
}
if (_root.warpframe == true) {
if (warpnum == 1) {
_root.changecourse("righttransition2", "3-2", 0, 0, 0, 0);
} else if (warpnum == 2) {
_root.changecourse("righttransition2", "3-4", 0, 0, 0, 0);
} else {
_root.changecourse("righttransition2", "3-2", 0, 550, 0, 550);
}
}
};
Instance of Symbol 260 MovieClip "warp1" in Symbol 629 MovieClip [3-1BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp2" in Symbol 629 MovieClip [3-1BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp3" in Symbol 629 MovieClip [3-1BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 639 MovieClip [2-1Ice] Frame 1
_visible = false;
Symbol 658 MovieClip [1-5BackGFX] Frame 1
count = 0;
stop();
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (count < 48) {
_root.PauseGame = false;
_root.Camspeed = 2;
_root.Camcenter = star;
_root.playpause = true;
count++;
} else if (count < 150) {
_root.PauseGame = false;
count++;
_root.playpause = true;
_root.MaxCamspeed = 35;
_root.Camspeed = 30;
} else {
nextFrame();
_root.warpframe = false;
onEnterFrame = function () {
if (this.warp1.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 1;
}
if ((warp == true) && (_root.warpframe == false)) {
if (warpnum == 1) {
_root.attachMovie("lefttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
warp = false;
}
if (_root.warpframe == true) {
if (warpnum == 1) {
_root.changecourse("lefttransition2", "1-4", 1950, -750, 1950, -750, true);
}
}
};
}
}
};
Instance of Symbol 416 MovieClip "secretstar" in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
starnum = 2;
_parent.star = this;
}
Instance of Symbol 578 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
scale = 3;
}
Instance of Symbol 573 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
rotwait = 30;
rotdirection = "Left";
}
Instance of Symbol 379 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
DirectionY = "Up";
distanceX = 0;
distanceY = 80;
accelX = 0;
accelY = 0.5;
speedX = 0;
speedY = 3;
}
Instance of Symbol 578 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
scale = 3;
}
Instance of Symbol 578 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 578 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 573 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
rotwait = 30;
rotdirection = "Right";
}
Instance of Symbol 573 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
rotwait = 30;
rotdirection = "Left";
}
Instance of Symbol 379 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Left";
DirectionY = "Up";
distanceX = 80;
distanceY = 0;
accelX = 0.5;
accelY = 0;
speedX = 3;
speedY = 0;
Xoffstart = 60;
Yoffstart = 0;
}
Instance of Symbol 379 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Left";
DirectionY = "Up";
distanceX = 80;
distanceY = 0;
accelX = 0.5;
accelY = 0;
speedX = 3;
speedY = 0;
Xoffstart = 40;
Yoffstart = 0;
}
Instance of Symbol 379 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Left";
DirectionY = "Up";
distanceX = 80;
distanceY = 0;
accelX = 0.5;
accelY = 0;
speedX = 3;
speedY = 0;
Xoffstart = 20;
Yoffstart = 0;
}
Instance of Symbol 379 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Left";
DirectionY = "Up";
distanceX = 80;
distanceY = 0;
accelX = 0.5;
accelY = 0;
speedX = 3;
speedY = 0;
Xoffstart = 0;
Yoffstart = 0;
}
Instance of Symbol 573 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
rotwait = 30;
rotdirection = "Left";
DirectionX = "Right";
DirectionY = "Up";
distanceX = 80;
distanceY = 0;
accelX = 0.5;
accelY = 0;
speedX = 3;
speedY = 0;
Xoffstart = 0;
Yoffstart = 0;
}
Instance of Symbol 578 MovieClip in Symbol 658 MovieClip [1-5BackGFX] Frame 1
onClipEvent (load) {
scale = 3;
}
Instance of Symbol 260 MovieClip "warp1" in Symbol 658 MovieClip [1-5BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 691 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 701 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 701 MovieClip Frame 9
stop();
onEnterFrame = null;
Symbol 702 MovieClip Frame 1
stop();
Symbol 703 MovieClip Frame 1
if (scale == undefined) {
scale = 1;
}
if (walkspeed == undefined) {
walkspeed = 0.5;
}
if (movedirection == undefined) {
randomnum = random(2);
if (randomnum == 0) {
movedirection = "right";
} else {
movedirection = "left";
}
} else {
randomnum = 0;
}
if (WalkDistance == undefined) {
WalkDistance = 100;
}
powerhit = false;
seeing = false;
see = false;
hurt = false;
frame = "Idle";
xspeed = 0;
yspeed = 0;
wide = 10 * scale;
tall = 25 * scale;
air = false;
tumble = false;
tumblerot = 0;
_xscale = (scale * 100);
_yscale = (scale * 100);
explodetimer = 0;
exploding = false;
Moveright = function () {
offground = true;
if (offground == false) {
}
Xspot2 = 15;
while (Xspot2 < 30) {
Xspot = Xspot2 + (xspeed * 7);
adding = 3;
Yspot = -5;
while (Yspot < 100) {
adding = Math.min(adding, 5);
if (_root.Course.Platforms.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
offground = false;
break;
}
if (_root.Course.BPlatforms.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
offground = false;
break;
}
if (_root.Course.Water.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
break;
}
Yspot = Yspot + ((adding = adding + 0.5));
}
Xspot2 = Xspot2 + 10;
}
if (offground == false) {
xspeed = xspeed + walkspeed;
if (exploding == true) {
xspeed = xspeed + (walkspeed / 3);
}
} else {
randomnum = 0;
movedirection = "left";
if (air == false) {
frame = "Idle";
}
}
};
Moveleft = function () {
offground = true;
if (offground == false) {
}
Xspot2 = 15;
while (Xspot2 < 30) {
Xspot = (-Xspot2) + (xspeed * 7);
adding = 3;
Yspot = -5;
while (Yspot < 100) {
adding = Math.min(adding, 5);
if (_root.Course.Platforms.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
offground = false;
break;
}
if (_root.Course.BPlatforms.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
offground = false;
break;
}
if (_root.Course.Water.hitTest(((((_x + Xspot) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + Yspot) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
break;
}
Yspot = Yspot + ((adding = adding + 0.5));
}
Xspot2 = Xspot2 + 10;
}
if (offground == false) {
xspeed = xspeed - walkspeed;
if (exploding == true) {
xspeed = xspeed - (walkspeed / 3);
}
} else {
randomnum = 0;
movedirection = "right";
if (((air == false) && ((!frame) == "tumble")) && ((!frame) == "Squish")) {
frame = "Idle";
}
}
};
Symbol 703 MovieClip Frame 3
stop();
onEnterFrame = function () {
if (_root.PauseGame == false) {
if ((Math.abs(_root.currentCamX - (_x + _parent._x)) < 1000) && (Math.abs(_root.currentCamY - (_y + _parent._y)) < 1000)) {
_yscale = (scale * 100);
_xscale = (scale * 100);
eye._yscale = (1 / scale) * 100;
eye._xscale = (1 / scale) * 40;
if (hurt == true) {
xspeed = 0;
yspeed = 0;
tumble = false;
clip.frame._rotation = tumblerot;
}
if (!(frame === "explode")) {
if (_root.playpause == false) {
if (this.eye.hitTest(_root.Course.Char.charClip.body)) {
if (tumble == false) {
if (seeing == false) {
see = true;
}
seeing = true;
}
} else {
seeing = false;
see = false;
}
if (((this.body.hitTest(_root.Course.Char.charClip.body) && (_root.Course.Char.attackFrame == "Dive")) && (_root.Course.Char.attack == true)) && (Math.abs(_root.Course.Char.xspeed) > 1)) {
tumble = true;
yspeed = yspeed - (Math.abs((_root.Course.Char.xspeed + 1) / 5) / scale);
xspeed = xspeed + ((_root.Course.Char.xspeed - (xspeed / 1.5)) / scale);
_y = (_y - 3);
if (Math.abs(xspeed / (scale / 2)) > 17) {
powerhit = true;
}
}
if (((this.body.hitTest(_root.Course.Char.charClip.water) || (this.body.hitTest(_root.Course.Char.charClip.frame.water))) || (this.head.hitTest(_root.Course.Char.charClip.water))) || (this.head.hitTest(_root.Course.Char.charClip.frame.water))) {
tumble = true;
yspeed = yspeed - (1.5 / scale);
if ((_root.Course.Char.attackFrame == "Spin") && (_root.Course.Char.attack == true)) {
if (_root.Course.Char._x > (_x + _parent._x)) {
xspeed = xspeed * 0.7;
xspeed = xspeed - (20 / scale);
} else {
xspeed = xspeed * 0.7;
xspeed = xspeed + (20 / scale);
}
} else if (_root.Course.Char._xscale > 0) {
if ((_root.Fluddpow == "T") || (((_root.Fluddpow == "H") && (_root.Course.Char.attackFrame == "Dive")) && (_root.Course.Char.attack == true))) {
xspeed = xspeed * 0.9;
xspeed = xspeed + (6 / scale);
} else {
xspeed = xspeed * 0.9;
xspeed = xspeed - (3 / scale);
}
} else if ((_root.Fluddpow == "T") || (((_root.Fluddpow == "H") && (_root.Course.Char.attackFrame == "Dive")) && (_root.Course.Char.attack == true))) {
xspeed = xspeed * 0.9;
xspeed = xspeed - (6 / scale);
} else {
xspeed = xspeed * 0.9;
xspeed = xspeed + (3 / scale);
}
if (Math.abs(xspeed / (scale / 2)) > 9) {
powerhit = true;
}
_y = (_y - 3);
}
if ((this.body.hitTest(_root.Course.Char.charClip.body) && ((_root.Course.Char.attack == false) || (!(((_root.Course.Char.attackFrame == "Dive") && (_root.Course.Char.attack == true)) && (Math.abs(_root.Course.Char.xspeed) > 0.3))))) && (tumble == false)) {
if (_root.Course.Char._x > (_x + _parent._x)) {
_root.MarioHit(0, 0, 0, 3, 0, "");
xspeed = xspeed - Math.max(_root.Course.Char.xspeed / 3, 0);
} else {
_root.MarioHit(0, 0, 0, -3, 0, "");
xspeed = xspeed - Math.min(_root.Course.Char.xspeed / 3, 0);
}
}
if ((this.head.hitTest(_root.Course.Char.charClip.feet) && (_root.Course.Char.air == true)) && (_root.Course.Char.yspeed > 0)) {
_root.Course.Char.yspeed = _root.Course.Char.yspeed / 2;
_root.Course.Char.yspeed = _root.Course.Char.yspeed - 7;
hurt = true;
tumblerot = 0;
}
if (_root.Course.Water.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
hurt = true;
tumblerot = 0;
}
if ((!_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
_y = (_y + yspeed);
yspeed = yspeed + 1;
yspeed = yspeed * 0.98;
air = true;
}
if (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, (((_y * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
if (air == true) {
jump = false;
}
air = false;
if (tumble == false) {
yspeed = Math.min(0, yspeed);
} else {
if ((Math.abs(yspeed) + Math.abs(xspeed / 2)) > 11) {
tumble = false;
if (powerhit == true) {
tumblerot = 0;
hurt = true;
}
}
if (yspeed > 3) {
yspeed = Math.min(0, (-yspeed) + 2);
xspeed = _root.groundFriction(xspeed, 2, 1.2);
} else {
xspeed = _root.groundFriction(xspeed, 0.5, 1.1);
yspeed = 0;
}
if (Math.abs(xspeed) < 2) {
tumble = false;
if (powerhit == true) {
tumblerot = 0;
hurt = true;
}
}
}
}
while (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
_y = (_y-1);
}
while (_root.Course.Platforms.hitTest(((((_x + wide) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - (tall / 2)) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
_x = (_x-1);
movedirection = "left";
randomnum = 0;
if (tumble == true) {
if (xspeed < 7) {
xspeed = Math.max(xspeed * 0.7, (-xspeed) * 0.7);
} else if ((xspeed > 0) && (powerhit == true)) {
hurt = true;
tumblerot = -90;
}
}
}
while (_root.Course.Platforms.hitTest(((((_x - wide) * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - (tall / 2)) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)) {
_x = (_x+1);
movedirection = "right";
randomnum = 0;
if (tumble == true) {
if (xspeed > 7) {
xspeed = Math.min(xspeed * 0.7, (-xspeed) * 0.7);
} else if ((xspeed < 0) && (powerhit == true)) {
hurt = true;
tumblerot = 90;
}
}
}
while ((_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) && (!(_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 1) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))))) {
_y = (_y+1);
}
while (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 1) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y - 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
_y = (_y-1);
}
if (hurt == true) {
frame = "explode";
}
if (((seeing == true) && (tumble == false)) && (!(frame === "explode"))) {
if ((_root.Course.Char._x > (_x + _parent._x)) && (Math.abs(_root.Course.Char._x - (_x + _parent._x)) > 20)) {
Moveright();
} else if ((_root.Course.Char._x < (_x + _parent._x)) && (Math.abs(_root.Course.Char._x - (_x + _parent._x)) > 20)) {
Moveleft();
} else if (((air == false) && (!(frame === "explode"))) && (tumble == false)) {
}
}
if (((seeing == false) && (tumble == false)) && (!(frame === "explode"))) {
randomnum++;
if (movedirection == "right") {
Moveright();
}
if (movedirection == "left") {
Moveleft();
}
if (randomnum > WalkDistance) {
if (movedirection == "right") {
movedirection = "left";
} else {
movedirection = "right";
}
randomnum = 0;
}
}
if (see == true) {
see = false;
exploding = true;
}
if (((((air == false) && (!(frame === "explode"))) && (tumble == false)) && (Math.abs(xspeed) > 0.3)) && (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)))) {
if (xspeed > 0) {
frame = "Walkright";
} else {
frame = "Walkleft";
}
} else if (((air == false) && (!(frame === "explode"))) && (tumble == false)) {
}
if (((air == true) && (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true))) {
air == false;
if ((((!(frame === "explode")) && (tumble == false)) && (Math.abs(xspeed) > 0.3)) && (_root.Course.Platforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest((((_x * _root.coursescale) / 100) + ((_parent._x * _root.coursescale) / 100)) + _root.Course._x, ((((_y + 3) * _root.coursescale) / 100) + ((_parent._y * _root.coursescale) / 100)) + _root.Course._y, true)))) {
if (xspeed > 0) {
frame = "Walkright";
} else {
frame = "Walkleft";
}
} else if (((air == false) && (!(frame === "explode"))) && (tumble == false)) {
}
}
if ((tumble == true) && (hurt == false)) {
tumblerot = tumblerot + (xspeed * 3);
frame = "tumble";
}
if (yspeed > 7) {
yspeed = yspeed * 0.9;
}
yspeed = Math.max(yspeed, -15);
yspeed = Math.min(yspeed, 10);
xspeed = Math.max(xspeed, -15);
xspeed = Math.min(xspeed, 15);
_x = (_x + xspeed);
if (tumble == false) {
xspeed = _root.groundFriction(xspeed, 0.3, 1.1);
} else {
xspeed = _root.groundFriction(xspeed, 0.05, 1.01);
}
if ((tumble == false) && (Math.abs(tumblerot) > 0)) {
tumblerot = _root.groundFriction(tumblerot, 5, 1.3);
frame = "tumble";
}
if (!(frame === "tumble")) {
tumblerot = 0;
}
if (exploding == true) {
explodetimer++;
myColor = new Color(this);
colorTrans = new Object();
colorTrans = {ra:100, rb:Math.pow(explodetimer, 2) / 25, ga:((-Math.pow(explodetimer, 2)) / 50) + 100, gb:0, ba:((-Math.pow(explodetimer, 2)) / 50) + 100, bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
if (explodetimer >= 60) {
frame = "explode";
myColor = new Color(this);
colorTrans = new Object();
colorTrans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
}
clip.frame._rotation = -tumblerot;
clip.gotoAndStop(frame);
if (frame == "explode") {
myColor = new Color(this);
colorTrans = new Object();
colorTrans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
}
}
}
if (this.clip.frame.explode.hitTest(_root.Course.Char.charClip.body)) {
if (_root.Course.Char._x > (_x + _parent._x)) {
_root.MarioHit(2, 90, -7, 5, 10, "");
} else {
_root.MarioHit(2, 90, -7, -5, 10, "");
}
}
if ((frame == "Walkright") || (frame == "Walkleft")) {
if (_root.playpause == true) {
clip.frame.stop();
} else {
clip.frame.play();
}
}
if (xspeed > 0) {
_xscale = ((-scale) * 100);
} else {
_xscale = (scale * 100);
}
clip.gotoAndStop(frame);
}
};
Symbol 708 MovieClip Frame 2
stop();
onEnterFrame = function () {
if (this.box.hitTest(_root.Course.Char.charClip.body)) {
if (_root.Course.Char._x > ((_x + _parent._x) + _parent._x)) {
_root.MarioHit(2, 90, -5, 3, 7, "");
} else {
_root.MarioHit(2, 90, -5, -3, 7, "");
}
}
};
Symbol 709 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 710 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 711 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Instance of Symbol 416 MovieClip in Symbol 712 MovieClip [1-4BackGFX] Frame 1
onClipEvent (load) {
starnum = 1;
}
Instance of Symbol 341 MovieClip in Symbol 712 MovieClip [1-4BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 709 MovieClip in Symbol 712 MovieClip [1-4BackGFX] Frame 1
onClipEvent (load) {
gotoAndPlay (200);
}
Instance of Symbol 710 MovieClip in Symbol 712 MovieClip [1-4BackGFX] Frame 1
onClipEvent (load) {
gotoAndPlay (300);
}
Symbol 712 MovieClip [1-4BackGFX] Frame 2
stop();
cannonsetup = false;
_root.warpframe = false;
onEnterFrame = function () {
if (this.warp1.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 1;
}
if (this.warp2.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 2;
}
if ((warp == true) && (_root.warpframe == false)) {
if (warpnum == 1) {
_root.attachMovie("lefttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
} else {
_root.attachMovie("righttransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
warp = false;
}
if (_root.warpframe == true) {
if (warpnum == 1) {
_root.changecourse("lefttransition2", "1-2", 2100, -150, 2100, -150);
} else {
_root.changecourse("righttransition2", "1-5", 100, 0, 0, 0, true);
}
}
};
Instance of Symbol 260 MovieClip "warp1" in Symbol 712 MovieClip [1-4BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp2" in Symbol 712 MovieClip [1-4BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 746 MovieClip Frame 1
if (_parent.coincountnum == undefined) {
_parent.coincountnum = 0;
} else {
_parent.coincountnum++;
}
if (_root["coindata" + _root.playingcourse][0] == undefined) {
_root["coindata" + _root.playingcourse] = [""];
}
coinnum = _parent.coincountnum;
if ((_root["coindata" + _root.playingcourse][coinnum] == 1) && (!(_root["coindata" + _root.playingcourse][coinnum] === undefined))) {
gotoAndStop (17);
}
Symbol 746 MovieClip Frame 2
stop();
onEnterFrame = function () {
if ((Math.abs(_root.currentCamX - (_x + _parent._x)) < 1000) && (Math.abs(_root.currentCamY - (_y + _parent._y)) < 1000)) {
_visible = true;
if (this.hitTest(_root.Course.Char.charClip.body) || (this.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y - 15) * _root.coursescale) / 100) + _root.Course._y, true))) {
play();
if (_root.CharHP < 6) {
_root.CharHP = _root.CharHP + 3;
}
_root.coincount = _root.coincount + 5;
_root.Coins = _root.Coins + 5;
_root.Power = _root.Power + 10;
_root.Power = Math.min(_root.Power, 100);
onEnterFrame = null;
}
} else {
_visible = false;
}
};
Symbol 746 MovieClip Frame 3
_root.bgsoundFX = new Sound(this);
_root.bgsoundFX.attachSound("CoinJingle");
_root.bgsoundFX.start(0, 1);
_root.bgsoundFX.setVolume(_root.BgVolume);
_root["coindata" + _root.playingcourse][coinnum] = 1;
Symbol 746 MovieClip Frame 17
stop();
Symbol 756 MovieClip Frame 1
stop();
if (side == undefined) {
side = "Right";
}
if (Xpower == undefined) {
Xpower = 35;
}
if (Ypower == undefined) {
Ypower = 25;
}
onEnterFrame = function () {
if ((this.box.hitTest(_root.Course.Char.charClip.feet) && (cannonsetup == true)) && (_root.Course.Char.air == false)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
play();
}
};
Instance of Symbol 260 MovieClip "box" in Symbol 756 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 756 MovieClip Frame 2
onEnterFrame = function () {
_root.PauseGame = false;
};
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 40
onClipEvent (enterFrame) {
if (_parent.side == "Right") {
_rotation = (_rotation + 4.5);
} else {
_rotation = (_rotation - 4.5);
}
}
Symbol 756 MovieClip Frame 50
stop();
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 50
onClipEvent (load) {
if (_parent.side == "Right") {
rotation = 45;
} else {
rotation = -45;
}
_rotation = rotation;
rotspeed = 0;
}
onClipEvent (enterFrame) {
if (_root.KeyUP()) {
if (_parent.side == "Right") {
rotspeed = rotspeed - 1;
} else {
rotspeed = rotspeed + 1;
}
}
if (_root.KeyDOWN()) {
if (_parent.side == "Right") {
rotspeed = rotspeed + 1;
} else {
rotspeed = rotspeed - 1;
}
}
if (_root.KeySPACE()) {
_parent.play();
_parent.rotdirection = _rotation;
}
rotation = rotation + rotspeed;
_rotation = rotation;
if (_parent.side == "Right") {
_rotation = Math.max(0, _rotation);
_rotation = Math.min(75, _rotation);
} else {
_rotation = Math.min(0, _rotation);
_rotation = Math.max(-75, _rotation);
}
rotation = _rotation;
rotspeed = _root.groundFriction(rotspeed, 0.5, 1.1);
}
Symbol 756 MovieClip Frame 51
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = Math.sin(_root.angleToRadians(rotdirection)) * Xpower;
_root.Course.Char.yspeed = (-Math.cos(_root.angleToRadians(rotdirection))) * Ypower;
if (side == "Right") {
_root.Course.Char._xscale = -100;
} else {
_root.Course.Char._xscale = 100;
}
_root.Course.Char._y = _root.Course.Char._y - 20;
_root.Course.Char._y = _root.Course.Char._y - (Math.cos(_root.angleToRadians(rotdirection)) * 30);
_root.Course.Char._x = _root.Course.Char._x + (Math.sin(_root.angleToRadians(rotdirection)) * 30);
_root.Course.Char.air = true;
_root.Course.Char.attackFrame = "Dive";
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 51
onClipEvent (load) {
_rotation = _parent.rotdirection;
_yscale = 90;
}
Symbol 756 MovieClip Frame 52
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Cannon Shot");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
onEnterFrame = null;
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 52
onClipEvent (load) {
_rotation = _parent.rotdirection;
_yscale = 80;
}
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 53
onClipEvent (load) {
_rotation = _parent.rotdirection;
_yscale = 90;
}
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 54
onClipEvent (load) {
_rotation = _parent.rotdirection;
_yscale = 100;
}
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 55
onClipEvent (load) {
_rotation = _parent.rotdirection;
_yscale = 110;
}
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 56
onClipEvent (load) {
_rotation = _parent.rotdirection;
_yscale = 105;
}
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 57
onClipEvent (load) {
_rotation = _parent.rotdirection;
_yscale = 100;
}
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 63
onClipEvent (load) {
_rotation = _parent.rotdirection;
}
onClipEvent (enterFrame) {
_parent.rotdirection = _root.groundFriction(_parent.rotdirection, 3, 1.2);
_rotation = _parent.rotdirection;
}
Instance of Symbol 755 MovieClip in Symbol 756 MovieClip Frame 75
onClipEvent (load) {
_rotation = _parent.rotdirection;
}
onClipEvent (enterFrame) {
_y = (_y + 3);
_yscale = (_yscale - 10);
_yscale = Math.max(_yscale, 0);
_yscale = Math.min(_yscale, 100);
}
Symbol 756 MovieClip Frame 86
gotoAndStop (1);
Instance of Symbol 260 MovieClip "warp1" in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 416 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
starnum = 2;
}
Instance of Symbol 260 MovieClip "warp2" in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 379 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Left";
DirectionY = "Up";
distanceX = 45;
distanceY = 45;
accelX = 0.5;
accelY = 0.5;
speedX = 3;
speedY = 3;
}
Instance of Symbol 379 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
DirectionY = "Up";
distanceX = 60;
distanceY = 60;
accelX = 0.5;
accelY = 0.5;
speedX = 3;
speedY = 3;
}
Instance of Symbol 379 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Left";
DirectionY = "Up";
distanceX = 0;
distanceY = 50;
accelX = 0;
accelY = 0.5;
speedX = 0;
speedY = 3;
}
Instance of Symbol 379 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Left";
DirectionY = "Up";
distanceX = 0;
distanceY = 50;
accelX = 0;
accelY = 0.5;
speedX = 0;
speedY = 3;
}
Instance of Symbol 578 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
}
Instance of Symbol 756 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
Xpower = 30;
Ypower = 40;
cannonsetup = true;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 260 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.Course.Char.charClip.body)) {
_root.Course.Char.xspeed = (Math.random() * 4) - 2;
_root.Course.Char.yspeed = -9;
}
}
Instance of Symbol 260 MovieClip in Symbol 759 MovieClip [1-3BackGFX] Frame 2
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.Course.Char.charClip.body)) {
_root.Course.Char._x = _root.Course.Char._x + 200;
}
}
Symbol 759 MovieClip [1-3BackGFX] Frame 4
stop();
_root.warpframe = false;
onEnterFrame = function () {
if (this.warp1.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 1;
}
if (this.warp2.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 2;
}
if ((warp == true) && (_root.warpframe == false)) {
if (warpnum == 1) {
_root.attachMovie("downtransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
if (warpnum == 2) {
_root.attachMovie("righttransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
warp = false;
}
if (_root.warpframe == true) {
if (warpnum == 1) {
_root.changecourse("downtransition2", "1-1", 2000 + (_root.Course.Char._x - _root.Course.CamEdge._x), -100, 2000 + (_root.Course.Char._x - _root.Course.CamEdge._x), -300);
}
if (warpnum == 2) {
_root.changecourse("righttransition2", "1-2", 0, -200, 0, -320);
}
}
};
Instance of Symbol 756 MovieClip in Symbol 780 MovieClip [1-2BackGFX] Frame 1
onClipEvent (load) {
cannonsetup = true;
side = "Left";
}
Instance of Symbol 260 MovieClip "warp1" in Symbol 780 MovieClip [1-2BackGFX] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp2" in Symbol 780 MovieClip [1-2BackGFX] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp3" in Symbol 780 MovieClip [1-2BackGFX] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 379 MovieClip in Symbol 780 MovieClip [1-2BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Left";
DirectionY = "Up";
distanceX = 30;
distanceY = 0;
accelX = 1;
accelY = 0;
speedX = 5;
speedY = 0;
}
Symbol 780 MovieClip [1-2BackGFX] Frame 2
stop();
cannonsetup = false;
_root.warpframe = false;
onEnterFrame = function () {
if (this.warp1.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 1;
}
if (this.warp2.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 2;
}
if (this.warp3.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 3;
}
if ((warp == true) && (_root.warpframe == false)) {
if (warpnum == 1) {
_root.attachMovie("lefttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
if (warpnum == 2) {
_root.attachMovie("righttransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
if (warpnum == 3) {
_root.attachMovie("lefttransition", "lefttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
warp = false;
}
if (_root.warpframe == true) {
if (warpnum == 1) {
_root.changecourse("lefttransition2", "1-1", 1800, 0, 2100, 0);
}
if (warpnum == 2) {
_root.changecourse("righttransition2", "1-4", 200, 0, 0, 0);
}
if (warpnum == 3) {
_root.changecourse("lefttransition2", "1-3", 0, -200, 0, 0);
}
}
};
Symbol 802 MovieClip Frame 1
stop();
if (cannonopen == undefined) {
gotoAndStop (45);
}
onEnterFrame = function () {
if (cannonopen == true) {
play();
}
};
Symbol 802 MovieClip Frame 2
onEnterFrame = function () {
_root.Camcenter = _parent;
_root.playpause = true;
_root.PauseGame = false;
};
Symbol 802 MovieClip Frame 36
onEnterFrame = function () {
_root.playpause = true;
_root.PauseGame = false;
};
Symbol 802 MovieClip Frame 45
stop();
onEnterFrame = null;
_parent._parent.cannonsetup = true;
Instance of Symbol 403 MovieClip in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 802 MovieClip in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
}
Instance of Symbol 403 MovieClip in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 403 MovieClip in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 341 MovieClip in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
scale = 2;
walkspeed = 0.75;
}
Instance of Symbol 756 MovieClip in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
cannonsetup = true;
}
Instance of Symbol 260 MovieClip "warp1" in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 260 MovieClip "warp2" in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 416 MovieClip in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
invis = true;
starnum = 3;
timecount = 0;
if (_parent.coincountnum == undefined) {
_parent.coincountnum = 0;
} else {
_parent.coincountnum++;
}
if (_root["coindata" + _root.playingcourse][0] == undefined) {
_root["coindata" + _root.playingcourse] = [""];
}
coinnum = _parent.coincountnum;
if (_root["coindata" + _root.playingcourse][coinnum] == 1) {
invis = false;
}
}
onClipEvent (enterFrame) {
timecount++;
if ((_root.RedCoins >= 8) && (timecount > 12)) {
_root["coindata" + _root.playingcourse][coinnum] = 1;
invis = false;
}
}
Instance of Symbol 379 MovieClip in Symbol 805 MovieClip [1-1BackGFX] Frame 1
onClipEvent (load) {
DirectionX = "Right";
DirectionY = "Up";
distanceX = 0;
distanceY = 25;
accelX = 0;
accelY = 0.5;
speedX = 0;
speedY = 3;
}
Symbol 805 MovieClip [1-1BackGFX] Frame 2
stop();
cannonsetup = false;
_root.warpframe = false;
onEnterFrame = function () {
if (this.warp1.hitTest(_root.Course.Char.charClip.feet)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 1;
}
if (this.warp2.hitTest(_root.Course.Char.charClip.feet) && (_root.Course.Char.yspeed <= 0)) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.yspeed = 0;
_root.Course.Char.attackFrame = "none";
warp = true;
warpnum = 2;
}
if ((warp == true) && (_root.warpframe == false)) {
if (warpnum == 1) {
_root.attachMovie("righttransition", "righttransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
if (warpnum == 2) {
_root.attachMovie("uptransition", "uptransition" + _root.getNextHighestDepth(), _root.getNextHighestDepth(), {_x:_root.screensizeX / 2, _y:_root.screensizeY / 2});
}
warp = false;
}
if (_root.warpframe == true) {
if (warpnum == 1) {
_root.changecourse("righttransition2", "1-2", 200, 0, 0, 0);
}
if (warpnum == 2) {
_root.changecourse("uptransition2", "1-3", -1800 + (_root.Course.Char._x - _root.Course.CamEdge._x), -200, -1800 + (_root.Course.Char._x - _root.Course.CamEdge._x), 0);
}
}
};
Symbol 828 MovieClip Frame 2
stop();
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (this.box.hitTest(_root.Course.Char.charClip.feet2) && (_root.Course.Char.attack == false)) {
if (_root.KeyUP() && (!(walk === "front"))) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
if (walk == "far") {
_root.Course.Char.attackFrame = "FarDoor";
} else {
_root.Course.Char.attackFrame = "Door";
}
_root.door = doorplace;
play();
} else if ((walk == "front") && (_root.KeyDOWN())) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.attackFrame = "FrontDoor";
_root.door = doorplace;
play();
}
}
}
};
Instance of Symbol 260 MovieClip "box" in Symbol 828 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 828 MovieClip Frame 3
onEnterFrame = function () {
X = _x + _parent._x;
_root.Course.Char._x = _root.Course.Char._x + ((X - _root.Course.Char._x) / 5);
};
Symbol 828 MovieClip Frame 16
onEnterFrame = null;
Symbol 828 MovieClip Frame 36
_root.bgsong = new Sound(this);
_root.bgsong.attachSound("DoorClose");
_root.bgsong.start(0, 1);
_root.bgsong.setVolume(_root.BgVolume);
Symbol 828 MovieClip Frame 40
stop();
Instance of Symbol 260 MovieClip "box" in Symbol 834 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 834 MovieClip Frame 2
stop();
onEnterFrame = function () {
if ((this.box.hitTest(_root.Course.Char.charClip.feet2) && (_root.Course.Char.attack == false)) && (_root.KeyUP())) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.attackFrame = "Painting";
play();
}
};
Symbol 834 MovieClip Frame 56
_root.StartHazyMazeCave();
Instance of Symbol 828 MovieClip in Symbol 835 MovieClip [C-2BackGFX] Frame 1
onClipEvent (load) {
doorplace = "fromC-2";
}
Instance of Symbol 834 MovieClip in Symbol 835 MovieClip [C-2BackGFX] Frame 1
onClipEvent (load) {
level = "3";
}
Instance of Symbol 260 MovieClip "box" in Symbol 843 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 843 MovieClip Frame 2
stop();
onEnterFrame = function () {
if ((this.box.hitTest(_root.Course.Char.charClip.feet2) && (_root.Course.Char.attack == false)) && (_root.KeyUP())) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.attackFrame = "Painting";
play();
}
};
Symbol 843 MovieClip Frame 56
_root.StartBombombBattlefield();
Instance of Symbol 828 MovieClip in Symbol 844 MovieClip [C-1BackGFX] Frame 1
onClipEvent (load) {
doorplace = "fromC-1";
}
Symbol 859 MovieClip Frame 2
stop();
onEnterFrame = function () {
if ((this.box.hitTest(_root.Course.Char.charClip.feet2) && (_root.Course.Char.attack == false)) && (_root.KeyUP())) {
_root.Course.Char.attack = true;
_root.Course.Char.xspeed = 0;
_root.Course.Char.attackFrame = "Door";
_root.door = doorplace;
play();
}
};
Instance of Symbol 260 MovieClip "box" in Symbol 859 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 859 MovieClip Frame 3
onEnterFrame = function () {
X = _x + _parent._x;
_root.Course.Char._x = _root.Course.Char._x + ((X - _root.Course.Char._x) / 5);
};
Symbol 859 MovieClip Frame 16
onEnterFrame = null;
Instance of Symbol 828 MovieClip in Symbol 860 MovieClip [CastleInsideBackGFX] Frame 1
onClipEvent (load) {
walk = "front";
doorplace = "outCastle";
_alpha = 30;
}
Instance of Symbol 828 MovieClip in Symbol 860 MovieClip [CastleInsideBackGFX] Frame 1
onClipEvent (load) {
walk = "front";
doorplace = "outCastle";
_alpha = 30;
}
Instance of Symbol 828 MovieClip in Symbol 860 MovieClip [CastleInsideBackGFX] Frame 1
onClipEvent (load) {
doorplace = "C-2";
}
Instance of Symbol 828 MovieClip in Symbol 860 MovieClip [CastleInsideBackGFX] Frame 1
onClipEvent (load) {
doorplace = "C-1";
}
Instance of Symbol 859 MovieClip in Symbol 860 MovieClip [CastleInsideBackGFX] Frame 1
onClipEvent (load) {
doorplace = "CoolCoolMountain";
}
Instance of Symbol 862 MovieClip in Symbol 863 MovieClip [CastleFrontGFX] Frame 1
onClipEvent (load) {
color = Math.round(_root.TotalStars * 1.5) + 25;
color2 = Math.abs(100 - color);
myColor = new Color(this);
colorTrans = new Object();
colorTrans = {ra:(100 - ((color2 / 2) + Math.max(color2 - 50, 0))) - (color2 / 5), rb:0, ga:color, gb:0, ba:color, bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
onClipEvent (enterFrame) {
color = color + (Math.round(((_root.TotalStars * 1.5) + 25) - color) / 7);
if (_root.CheatCastleRestore == true) {
color = 100;
}
color = Math.max(color, 0);
color = Math.min(color, 100);
color2 = Math.abs(100 - color);
colorTrans = {ra:((color * 0.75) + 25) - (color2 / 5), rb:0, ga:color - (color2 / 3), gb:0, ba:color - (color2 / 3), bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
Symbol 882 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
if (_root.PauseGame == false) {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
frame = frame - (_root.Course.Char.xspeed / 2);
if (Key.isDown(39)) {
frame = frame + 3;
}
if (Key.isDown(37)) {
frame = frame - 3;
}
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 80) {
frame = 1;
}
if (frame <= 0) {
frame = 80;
}
} else {
stop();
}
};
Symbol 893 MovieClip Frame 1
rotation = 0;
rotspeed = 0;
rot2 = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (_root.Course.Char.air == true) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot2 = rot2 + 10;
}
if (_root.Course.Char._xscale < 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot2 = rot2 - 10;
}
if ((!_root.Course.Platforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 5) * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 3) * _root.coursescale) / 100) + _root.Course._y, true))) {
if (air == false) {
air = true;
if (groundrot < 0) {
_root.Course.Char.yspeed = _root.Course.Char.yspeed - ((Math.sin(groundrot) * _root.Course.Char.xspeed) * 0.75);
}
_rotation = (groundrot * (_root.Course.Char._xscale / 100));
rotation = groundrot * (_root.Course.Char._xscale / 100);
}
if (rot > 0) {
rot = rot2;
if (rot < -90) {
rotation = rotation - 360;
}
rotspeed = (rot - rotation) / 10;
} else {
rot = rot2;
if (rot > 90) {
rotation = rotation + 360;
}
rotspeed = (rot - rotation) / 10;
}
if (rotation > 520) {
rotation = rotation - 360;
}
if (rotation < -520) {
rotation = rotation + 360;
}
rotspeed = _root.groundFriction(rotspeed, 0.1, 1.15);
rotspeed = Math.min(rotspeed, 15);
rotspeed = Math.max(rotspeed, -15);
rotation = rotation + rotspeed;
_rotation = rotation;
air = true;
} else {
if ((air == undefined) || (air == true)) {
rotation = 0;
_rotation = 0;
air = false;
}
rotation = _rotation * (_root.Course.Char._xscale / 100);
distance = 5;
frontpointX = _root.Course.Char._x - (Math.cos(_root.angleToRadians(rotation)) * distance);
frontpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
frontpointY = frontpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
frontpointY = frontpointY - 0.5;
count++;
} while (count <= 50);
backpointX = _root.Course.Char._x + (Math.cos(_root.angleToRadians(rotation)) * distance);
backpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
backpointY = backpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
backpointY = backpointY - 0.5;
count++;
} while (count <= 50);
rotation = _root.radiansToAngle(Math.atan2(backpointY - frontpointY, backpointX - frontpointX));
if (((rotation > groundrot) && (groundrot < 0)) && ((_root.Course.Char.xspeed * ((-_root.Course.Char._xscale) / 100)) > 5)) {
_root.Course.Char.yspeed = -1;
_root.Course.Char._y = _root.Course.Char._y - 1;
}
groundrot = rotation;
_rotation = ((rotation * (_root.Course.Char._xscale / 100)) * 0.9);
speedslide = Math.sin(_root.angleToRadians(rotation));
speedslide = speedslide * 0.9;
speedslide = Math.max(speedslide, -1);
speedslide = Math.min(speedslide, 1);
if (_root.Course.Char.Ice == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.75);
} else if (_root.Course.Char.Puddle == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.9);
} else {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + speedslide;
}
}
_root.DiveRot = _rotation;
if (!_root.KeyDOWN()) {
}
if (((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 5)) && (((_root.Course.Char._xscale > 0) && (_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (_root.KeyLEFT())))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "backflip";
xspeed = xspeed * 0.75;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed + 30) / 5);
} else {
xspeed = xspeed - ((xspeed - 30) / 5);
}
yspeed = Math.min((-_root.jumpspeed) - 2, yspeed);
};
}
if ((((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) > 3)) && (((_root.Course.Char._xscale > 0) && (!_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (!_root.KeyLEFT())))) && (!((Math.abs(rotation) > 25) && (Ice == true)))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "diveflip";
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - 15) / 5);
} else {
xspeed = xspeed - ((xspeed + 15) / 5);
}
yspeed = Math.min((-_root.jumpspeed) / 1.5, yspeed);
};
}
if (((_root.Course.Char.Ice == true) && (Math.abs(rotation) <= 3)) || (Math.abs(rotation) <= 15)) {
if ((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 3)) {
play();
}
if (((_root.Course.Char.air == false) && (Math.abs(_root.Course.Char.xspeed) < 1)) && (!_root.KeyDOWN())) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
}
};
Symbol 893 MovieClip Frame 3
stop();
Symbol 893 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 899 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 899 MovieClip Frame 9
_root.Course.Char.attack = false;
Symbol 904 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 904 MovieClip Frame 4
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 904 MovieClip Frame 15
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
tellTarget (_root.Course.Char) {
if (_root.KeyDOWN() && (Water == false)) {
doublejump = 0;
attack = true;
attackFrame = "Dive";
yspeed = yspeed + 3;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - _root.Divespeed) / 5);
} else {
xspeed = xspeed - ((xspeed + _root.Divespeed) / 5);
}
}
if (air == false) {
attack = false;
}
};
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 904 MovieClip Frame 22
_root.Course.Char.attack = false;
Symbol 906 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 906 MovieClip Frame 3
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
tellTarget (_root.Course.Char) {
if (_root.KeyDOWN() && (Water == false)) {
doublejump = 0;
attack = true;
attackFrame = "Dive";
yspeed = yspeed + 3;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - _root.Divespeed) / 5);
} else {
xspeed = xspeed - ((xspeed + _root.Divespeed) / 5);
}
}
if (air == false) {
attack = false;
}
};
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 906 MovieClip Frame 46
_root.Course.Char.attack = false;
Symbol 923 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
if (_root.PauseGame == false) {
frame = frame + Math.min(Math.round(Math.max(_parent.speed, 5)), 10);
while (frame >= 41) {
frame = frame - 40;
}
if (_parent.speed > 10) {
gotoAndStop(frame);
} else {
gotoAndStop(frame + 40);
}
if (_parent.speed > 5) {
_parent.speed = _root.groundFriction(_parent.speed, 0.3, 1.05);
} else {
_parent.speed = _root.groundFriction(_parent.speed, 0.1, 1.03);
}
_parent.speed = Math.max(_parent.speed, 1);
if ((_parent.speed <= 3) && (_root.Course.Char.air == false)) {
_root.Course.Char.attack = false;
}
if (_root.Course.Char.air == true) {
if (_parent.speed > 5) {
_root.Course.Char.yspeed = _root.groundFriction(_root.Course.Char.yspeed, 0.3, 1.05);
} else {
_root.Course.Char.yspeed = _root.groundFriction(_root.Course.Char.yspeed, 0.1, 1.03);
}
_root.Course.Char.yspeed = _root.Course.Char.yspeed - (Math.sqrt((_parent.speed + 1) / 30) / 3);
}
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 929 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 929 MovieClip Frame 2
onEnterFrame = function () {
_root.PauseGame = false;
};
_root.GetStarMusic2();
Symbol 929 MovieClip Frame 43
onEnterFrame = function () {
_root.PauseGame = false;
_root.PauseGame = false;
_root.ZoomoutCam();
};
Symbol 929 MovieClip Frame 80
_root.Blackout();
Symbol 929 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 932 MovieClip Frame 1
stop();
onEnterFrame = function () {
_root.PauseGame = false;
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 932 MovieClip Frame 2
onEnterFrame = null;
Symbol 932 MovieClip Frame 15
_root.GetStarMusic1();
Symbol 932 MovieClip Frame 40
_root.newstar = false;
_root.CalculateStars();
Symbol 932 MovieClip Frame 50
_root.Course.Char.attack = false;
Symbol 954 MovieClip Frame 1
onEnterFrame = function () {
_root.PauseGame = false;
_root.Course.Char.yspeed = Math.max(0, _root.Course.Char.yspeed);
};
Symbol 954 MovieClip Frame 30
_root.Blackout();
Symbol 954 MovieClip Frame 55
if (_root.door == "inCastle") {
_root.StartInsideofCastle();
} else if (_root.door == "outCastle") {
_root.ReturnToCastle();
} else if (_root.door == "CoolCoolMountain") {
_root.changecourse("StarIn", "2-1", 0, 0, 0, 0);
} else if (_root.door == "C-1") {
_root.changecourse("StarIn", "C-1", 0, 0, 0, 0);
} else if (_root.door == "fromC-1") {
_root.changecourse("StarIn", "CastleInside", -450, 0, -450, 50);
} else if (_root.door == "C-2") {
_root.changecourse("StarIn", "C-2", 0, 0, 0, 0);
} else if (_root.door == "fromC-2") {
_root.changecourse("StarIn", "CastleInside", 450, 0, 450, 50);
} else {
_root.StartLevel1();
}
stop();
Symbol 974 MovieClip Frame 1
onEnterFrame = function () {
_root.PauseGame = false;
_root.Course.Char.yspeed = Math.max(0, _root.Course.Char.yspeed);
};
Symbol 974 MovieClip Frame 30
_root.Blackout();
Symbol 974 MovieClip Frame 55
if (_root.door == "inCastle") {
_root.StartInsideofCastle();
} else if (_root.door == "outCastle") {
_root.ReturnToCastle();
} else if (_root.door == "0-1") {
_root.changecourse("righttransition2", "0-1", 0, 0, 0, 0);
} else {
_root.StartLevel1();
}
stop();
Symbol 975 MovieClip Frame 1
onEnterFrame = function () {
_root.PauseGame = false;
_root.Course.Char.yspeed = Math.max(0, _root.Course.Char.yspeed);
};
Symbol 975 MovieClip Frame 50
_root.Blackout();
Symbol 975 MovieClip Frame 75
if (_root.door == "inCastle") {
_root.StartInsideofCastle();
} else if (_root.door == "outCastle") {
_root.ReturnToCastle();
} else if (_root.door == "0-1") {
_root.changecourse("righttransition2", "0-1", 0, 0, 0, 0);
} else {
_root.StartLevel1();
}
stop();
Symbol 982 MovieClip Frame 1
onEnterFrame = function () {
_root.PauseGame = false;
};
Symbol 982 MovieClip Frame 26
_root.PaintingSound();
Symbol 982 MovieClip Frame 45
_root.Whiteout();
stop();
Symbol 999 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
if (_root.PauseGame == false) {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
frame = frame - (_root.Course.Char.xspeed / 2);
if (Key.isDown(39)) {
frame = frame + 3;
}
if (Key.isDown(37)) {
frame = frame - 3;
}
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 80) {
frame = 1;
}
if (frame <= 0) {
frame = 80;
}
} else {
stop();
}
};
Symbol 1008 MovieClip Frame 1
stop();
onEnterFrame = function () {
if ((_root.PauseGame == false) && (_root.playpause == false)) {
_yscale = (_yscale * -1);
if ((_root.KeySPACE() && (_root.Power > 0)) && (_root.WaterAmount > 0)) {
nextFrame();
} else {
prevFrame();
}
}
};
Symbol 1019 MovieClip Frame 1
rotation = 0;
rotspeed = 0;
rot2 = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (_root.Course.Char.air == true) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot2 = rot2 + 10;
}
if (_root.Course.Char._xscale < 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot2 = rot2 - 10;
}
if ((!_root.Course.Platforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 5) * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 3) * _root.coursescale) / 100) + _root.Course._y, true))) {
if (air == false) {
air = true;
if (groundrot < 0) {
_root.Course.Char.yspeed = _root.Course.Char.yspeed - ((Math.sin(groundrot) * _root.Course.Char.xspeed) * 0.75);
}
_rotation = (groundrot * (_root.Course.Char._xscale / 100));
rotation = groundrot * (_root.Course.Char._xscale / 100);
}
if (rot > 0) {
rot = rot2;
if (rot < -90) {
rotation = rotation - 360;
}
rotspeed = (rot - rotation) / 10;
} else {
rot = rot2;
if (rot > 90) {
rotation = rotation + 360;
}
rotspeed = (rot - rotation) / 10;
}
if (rotation > 520) {
rotation = rotation - 360;
}
if (rotation < -520) {
rotation = rotation + 360;
}
rotspeed = _root.groundFriction(rotspeed, 0.1, 1.15);
rotspeed = Math.min(rotspeed, 15);
rotspeed = Math.max(rotspeed, -15);
rotation = rotation + rotspeed;
_rotation = rotation;
air = true;
} else {
if ((air == undefined) || (air == true)) {
rotation = 0;
_rotation = 0;
air = false;
}
rotation = _rotation * (_root.Course.Char._xscale / 100);
distance = 5;
frontpointX = _root.Course.Char._x - (Math.cos(_root.angleToRadians(rotation)) * distance);
frontpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
frontpointY = frontpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
frontpointY = frontpointY - 0.5;
count++;
} while (count <= 50);
backpointX = _root.Course.Char._x + (Math.cos(_root.angleToRadians(rotation)) * distance);
backpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
backpointY = backpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
backpointY = backpointY - 0.5;
count++;
} while (count <= 50);
rotation = _root.radiansToAngle(Math.atan2(backpointY - frontpointY, backpointX - frontpointX));
if (((rotation > groundrot) && (groundrot < 0)) && ((_root.Course.Char.xspeed * ((-_root.Course.Char._xscale) / 100)) > 5)) {
_root.Course.Char.yspeed = -1;
_root.Course.Char._y = _root.Course.Char._y - 1;
}
groundrot = rotation;
_rotation = ((rotation * (_root.Course.Char._xscale / 100)) * 0.9);
speedslide = Math.sin(_root.angleToRadians(rotation));
speedslide = speedslide * 0.9;
speedslide = Math.max(speedslide, -1);
speedslide = Math.min(speedslide, 1);
if (_root.Course.Char.Ice == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.75);
} else if (_root.Course.Char.Puddle == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.9);
} else {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + speedslide;
}
}
_root.DiveRot = _rotation;
if (!_root.KeyDOWN()) {
}
if (((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 5)) && (((_root.Course.Char._xscale > 0) && (_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (_root.KeyLEFT())))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "backflip";
xspeed = xspeed * 0.75;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed + 30) / 5);
} else {
xspeed = xspeed - ((xspeed - 30) / 5);
}
yspeed = Math.min((-_root.jumpspeed) - 2, yspeed);
};
}
if ((((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) > 3)) && (((_root.Course.Char._xscale > 0) && (!_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (!_root.KeyLEFT())))) && (!((Math.abs(rotation) > 25) && (Ice == true)))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "diveflip";
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - 15) / 5);
} else {
xspeed = xspeed - ((xspeed + 15) / 5);
}
yspeed = Math.min((-_root.jumpspeed) / 1.5, yspeed);
};
}
if (((_root.Course.Char.Ice == true) && (Math.abs(rotation) <= 3)) || (Math.abs(rotation) <= 15)) {
if ((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 3)) {
play();
}
if (((_root.Course.Char.air == false) && (Math.abs(_root.Course.Char.xspeed) < 1)) && (!_root.KeyDOWN())) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
}
};
Symbol 1019 MovieClip Frame 3
stop();
Symbol 1019 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 1025 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1025 MovieClip Frame 2
onEnterFrame = function () {
_root.PauseGame = false;
};
_root.GetStarMusic2();
Symbol 1025 MovieClip Frame 43
onEnterFrame = function () {
_root.PauseGame = false;
_root.ZoomoutCam();
};
Symbol 1025 MovieClip Frame 80
_root.Blackout();
Symbol 1025 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 1042 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
if (_root.PauseGame == false) {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
frame = frame - (_root.Course.Char.xspeed / 2);
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 80) {
frame = 1;
}
if (frame <= 0) {
frame = 80;
}
} else {
stop();
}
};
Symbol 1053 MovieClip Frame 1
rotation = 0;
rotspeed = 0;
rot2 = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (_root.Course.Char.air == true) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot2 = rot2 + 10;
}
if (_root.Course.Char._xscale < 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot2 = rot2 - 10;
}
if ((!_root.Course.Platforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 5) * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 3) * _root.coursescale) / 100) + _root.Course._y, true))) {
if (air == false) {
air = true;
if (groundrot < 0) {
_root.Course.Char.yspeed = _root.Course.Char.yspeed - ((Math.sin(groundrot) * _root.Course.Char.xspeed) * 0.75);
}
_rotation = (groundrot * (_root.Course.Char._xscale / 100));
rotation = groundrot * (_root.Course.Char._xscale / 100);
}
if (rot > 0) {
rot = rot2;
if (rot < -90) {
rotation = rotation - 360;
}
rotspeed = (rot - rotation) / 10;
} else {
rot = rot2;
if (rot > 90) {
rotation = rotation + 360;
}
rotspeed = (rot - rotation) / 10;
}
if (rotation > 520) {
rotation = rotation - 360;
}
if (rotation < -520) {
rotation = rotation + 360;
}
rotspeed = _root.groundFriction(rotspeed, 0.1, 1.15);
rotspeed = Math.min(rotspeed, 15);
rotspeed = Math.max(rotspeed, -15);
rotation = rotation + rotspeed;
_rotation = rotation;
air = true;
} else {
if ((air == undefined) || (air == true)) {
rotation = 0;
_rotation = 0;
air = false;
}
rotation = _rotation * (_root.Course.Char._xscale / 100);
distance = 5;
frontpointX = _root.Course.Char._x - (Math.cos(_root.angleToRadians(rotation)) * distance);
frontpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
frontpointY = frontpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
frontpointY = frontpointY - 0.5;
count++;
} while (count <= 50);
backpointX = _root.Course.Char._x + (Math.cos(_root.angleToRadians(rotation)) * distance);
backpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
backpointY = backpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
backpointY = backpointY - 0.5;
count++;
} while (count <= 50);
rotation = _root.radiansToAngle(Math.atan2(backpointY - frontpointY, backpointX - frontpointX));
if (((rotation > groundrot) && (groundrot < 0)) && ((_root.Course.Char.xspeed * ((-_root.Course.Char._xscale) / 100)) > 5)) {
_root.Course.Char.yspeed = -1;
_root.Course.Char._y = _root.Course.Char._y - 1;
}
groundrot = rotation;
_rotation = ((rotation * (_root.Course.Char._xscale / 100)) * 0.9);
speedslide = Math.sin(_root.angleToRadians(rotation));
speedslide = speedslide * 0.9;
speedslide = Math.max(speedslide, -1);
speedslide = Math.min(speedslide, 1);
if (_root.Course.Char.Ice == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.75);
} else if (_root.Course.Char.Puddle == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.9);
} else {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + speedslide;
}
}
_root.DiveRot = _rotation;
if (!_root.KeyDOWN()) {
}
if (((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 5)) && (((_root.Course.Char._xscale > 0) && (_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (_root.KeyLEFT())))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "backflip";
xspeed = xspeed * 0.75;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed + 30) / 5);
} else {
xspeed = xspeed - ((xspeed - 30) / 5);
}
yspeed = Math.min((-_root.jumpspeed) - 2, yspeed);
};
}
if ((((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) > 3)) && (((_root.Course.Char._xscale > 0) && (!_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (!_root.KeyLEFT())))) && (!((Math.abs(rotation) > 25) && (Ice == true)))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "diveflip";
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - 15) / 5);
} else {
xspeed = xspeed - ((xspeed + 15) / 5);
}
yspeed = Math.min((-_root.jumpspeed) / 1.5, yspeed);
};
}
if (((_root.Course.Char.Ice == true) && (Math.abs(rotation) <= 3)) || (Math.abs(rotation) <= 15)) {
if ((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 3)) {
play();
}
if (((_root.Course.Char.air == false) && (Math.abs(_root.Course.Char.xspeed) < 1)) && (!_root.KeyDOWN())) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
}
};
Symbol 1053 MovieClip Frame 3
stop();
Instance of Symbol 1008 MovieClip in Symbol 1053 MovieClip Frame 3
/* no clip actions */
Instance of Symbol 1008 MovieClip "water" in Symbol 1053 MovieClip Frame 3
/* no clip actions */
Symbol 1053 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 1059 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 1059 MovieClip Frame 9
_root.Course.Char.attack = false;
Symbol 1065 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 1065 MovieClip Frame 4
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 1065 MovieClip Frame 15
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
tellTarget (_root.Course.Char) {
if (_root.KeyDOWN() && (Water == false)) {
doublejump = 0;
attack = true;
attackFrame = "Dive";
yspeed = yspeed + 3;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - _root.Divespeed) / 5);
} else {
xspeed = xspeed - ((xspeed + _root.Divespeed) / 5);
}
}
if (air == false) {
attack = false;
}
};
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 1065 MovieClip Frame 22
_root.Course.Char.attack = false;
Symbol 1080 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
if (_root.PauseGame == false) {
frame = frame + Math.min(Math.round(Math.max(_parent.speed, 5)), 10);
while (frame >= 41) {
frame = frame - 40;
}
if (_parent.speed > 10) {
gotoAndStop(frame);
} else {
gotoAndStop(frame + 40);
}
if (_parent.speed > 5) {
_parent.speed = _root.groundFriction(_parent.speed, 0.3, 1.05);
} else {
_parent.speed = _root.groundFriction(_parent.speed, 0.1, 1.03);
}
_parent.speed = Math.max(_parent.speed, 1);
if ((_parent.speed <= 3) && (_root.Course.Char.air == false)) {
_root.Course.Char.attack = false;
}
if (_root.Course.Char.air == true) {
if (_parent.speed > 5) {
_root.Course.Char.yspeed = _root.groundFriction(_root.Course.Char.yspeed, 0.3, 1.05);
} else {
_root.Course.Char.yspeed = _root.groundFriction(_root.Course.Char.yspeed, 0.1, 1.03);
}
_root.Course.Char.yspeed = _root.Course.Char.yspeed - (Math.sqrt((_parent.speed + 1) / 30) / 3);
}
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 1086 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1086 MovieClip Frame 2
onEnterFrame = function () {
_root.PauseGame = false;
};
_root.GetStarMusic2();
Symbol 1086 MovieClip Frame 43
onEnterFrame = function () {
_root.PauseGame = false;
_root.PauseGame = false;
_root.ZoomoutCam();
};
Symbol 1086 MovieClip Frame 80
_root.Blackout();
Symbol 1086 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 1103 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
if (_root.PauseGame == false) {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
frame = frame - (_root.Course.Char.xspeed / 2);
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 80) {
frame = 1;
}
if (frame <= 0) {
frame = 80;
}
} else {
stop();
}
};
Symbol 1114 MovieClip Frame 1
rotation = 0;
rotspeed = 0;
rot2 = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (_root.Course.Char.air == true) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot2 = rot2 + 10;
}
if (_root.Course.Char._xscale < 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot2 = rot2 - 10;
}
if ((!_root.Course.Platforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 5) * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 3) * _root.coursescale) / 100) + _root.Course._y, true))) {
if (air == false) {
air = true;
if (groundrot < 0) {
_root.Course.Char.yspeed = _root.Course.Char.yspeed - ((Math.sin(groundrot) * _root.Course.Char.xspeed) * 0.75);
}
_rotation = (groundrot * (_root.Course.Char._xscale / 100));
rotation = groundrot * (_root.Course.Char._xscale / 100);
}
if (rot > 0) {
rot = rot2;
if (rot < -90) {
rotation = rotation - 360;
}
rotspeed = (rot - rotation) / 10;
} else {
rot = rot2;
if (rot > 90) {
rotation = rotation + 360;
}
rotspeed = (rot - rotation) / 10;
}
if (rotation > 520) {
rotation = rotation - 360;
}
if (rotation < -520) {
rotation = rotation + 360;
}
rotspeed = _root.groundFriction(rotspeed, 0.1, 1.15);
rotspeed = Math.min(rotspeed, 15);
rotspeed = Math.max(rotspeed, -15);
rotation = rotation + rotspeed;
_rotation = rotation;
air = true;
} else {
if ((air == undefined) || (air == true)) {
rotation = 0;
_rotation = 0;
air = false;
}
rotation = _rotation * (_root.Course.Char._xscale / 100);
distance = 5;
frontpointX = _root.Course.Char._x - (Math.cos(_root.angleToRadians(rotation)) * distance);
frontpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
frontpointY = frontpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
frontpointY = frontpointY - 0.5;
count++;
} while (count <= 50);
backpointX = _root.Course.Char._x + (Math.cos(_root.angleToRadians(rotation)) * distance);
backpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
backpointY = backpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
backpointY = backpointY - 0.5;
count++;
} while (count <= 50);
rotation = _root.radiansToAngle(Math.atan2(backpointY - frontpointY, backpointX - frontpointX));
if (((rotation > groundrot) && (groundrot < 0)) && ((_root.Course.Char.xspeed * ((-_root.Course.Char._xscale) / 100)) > 5)) {
_root.Course.Char.yspeed = -1;
_root.Course.Char._y = _root.Course.Char._y - 1;
}
groundrot = rotation;
_rotation = ((rotation * (_root.Course.Char._xscale / 100)) * 0.9);
speedslide = Math.sin(_root.angleToRadians(rotation));
speedslide = speedslide * 0.9;
speedslide = Math.max(speedslide, -1);
speedslide = Math.min(speedslide, 1);
if (_root.Course.Char.Ice == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.75);
} else if (_root.Course.Char.Puddle == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.9);
} else {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + speedslide;
}
}
_root.DiveRot = _rotation;
if (!_root.KeyDOWN()) {
}
if (((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 5)) && (((_root.Course.Char._xscale > 0) && (_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (_root.KeyLEFT())))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "backflip";
xspeed = xspeed * 0.75;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed + 30) / 5);
} else {
xspeed = xspeed - ((xspeed - 30) / 5);
}
yspeed = Math.min((-_root.jumpspeed) - 2, yspeed);
};
}
if ((((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) > 3)) && (((_root.Course.Char._xscale > 0) && (!_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (!_root.KeyLEFT())))) && (!((Math.abs(rotation) > 25) && (Ice == true)))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "diveflip";
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - 15) / 5);
} else {
xspeed = xspeed - ((xspeed + 15) / 5);
}
yspeed = Math.min((-_root.jumpspeed) / 1.5, yspeed);
};
}
if (((_root.Course.Char.Ice == true) && (Math.abs(rotation) <= 3)) || (Math.abs(rotation) <= 15)) {
if ((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 3)) {
play();
}
if (((_root.Course.Char.air == false) && (Math.abs(_root.Course.Char.xspeed) < 1)) && (!_root.KeyDOWN())) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
}
};
Symbol 1114 MovieClip Frame 3
stop();
Symbol 1114 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 1120 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 1120 MovieClip Frame 9
_root.Course.Char.attack = false;
Symbol 1126 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 1126 MovieClip Frame 4
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 1126 MovieClip Frame 15
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
tellTarget (_root.Course.Char) {
if (_root.KeyDOWN() && (Water == false)) {
doublejump = 0;
attack = true;
attackFrame = "Dive";
yspeed = yspeed + 3;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - _root.Divespeed) / 5);
} else {
xspeed = xspeed - ((xspeed + _root.Divespeed) / 5);
}
}
if (air == false) {
attack = false;
}
};
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 1126 MovieClip Frame 22
_root.Course.Char.attack = false;
Symbol 1143 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
if (_root.PauseGame == false) {
frame = frame + Math.min(Math.round(Math.max(_parent.speed, 5)), 10);
while (frame >= 41) {
frame = frame - 40;
}
if (_parent.speed > 10) {
gotoAndStop(frame);
} else {
gotoAndStop(frame + 40);
}
if (_parent.speed > 5) {
_parent.speed = _root.groundFriction(_parent.speed, 0.3, 1.05);
} else {
_parent.speed = _root.groundFriction(_parent.speed, 0.1, 1.03);
}
_parent.speed = Math.max(_parent.speed, 1);
if ((_parent.speed <= 3) && (_root.Course.Char.air == false)) {
_root.Course.Char.attack = false;
}
if (_root.Course.Char.air == true) {
if (_parent.speed > 5) {
_root.Course.Char.yspeed = _root.groundFriction(_root.Course.Char.yspeed, 0.3, 1.05);
} else {
_root.Course.Char.yspeed = _root.groundFriction(_root.Course.Char.yspeed, 0.1, 1.03);
}
_root.Course.Char.yspeed = _root.Course.Char.yspeed - (Math.sqrt((_parent.speed + 1) / 30) / 3);
}
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 1149 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1149 MovieClip Frame 2
onEnterFrame = function () {
_root.PauseGame = false;
};
_root.GetStarMusic2();
Symbol 1149 MovieClip Frame 43
onEnterFrame = function () {
_root.PauseGame = false;
_root.ZoomoutCam();
};
Symbol 1149 MovieClip Frame 80
_root.Blackout();
Symbol 1149 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 1166 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
if (_root.PauseGame == false) {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
frame = frame - (_root.Course.Char.xspeed / 2);
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 80) {
frame = 1;
}
if (frame <= 0) {
frame = 80;
}
} else {
stop();
}
};
Symbol 1177 MovieClip Frame 1
stop();
gotoAndStop(_parent.chargeframe);
onEnterFrame = function () {
if (_root.waterblast == true) {
nextFrame();
this.attachMovie("ChargeLine", "ChargeLine" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:0, _y:0});
} else {
prevFrame();
}
_parent.chargeframe = _currentframe;
};
Symbol 1177 MovieClip Frame 25
onEnterFrame = function () {
nextFrame();
_root.Course.Char.yspeed = _root.Course.Char.yspeed * 0.97;
_parent.chargeframe = _currentframe;
};
Symbol 1177 MovieClip Frame 30
_root.Power = 1;
Symbol 1177 MovieClip Frame 31
play();
_root.WaterAmount = _root.WaterAmount - 500;
_root.Power = 0;
_root.Course.Char.yspeed = Math.min((-_root.RocketBlast) + Math.max(_root.Course.Char.yspeed / 3, 0), _root.Course.Char.yspeed);
onEnterFrame = function () {
_root.Power = 0;
_root.Course.Char.yspeed = _root.Course.Char.yspeed - (_root.RocketBlast / 50);
if (_root.Course.Char.Water == true) {
_root.Course.Char.yspeed = _root.Course.Char.yspeed - (_root.RocketBlast / 45);
}
_root.Course.Char.lockon = false;
if (Key.isDown(39)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + 0.7;
_root.Course.Char._rotation = _root.Course.Char._rotation + 5;
}
if (Key.isDown(37)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - 0.7;
_root.Course.Char._rotation = _root.Course.Char._rotation - 5;
}
_parent.chargeframe = 0;
};
Symbol 1177 MovieClip Frame 39
_parent.chargeframe = 1;
gotoAndStop (1);
Symbol 1187 MovieClip Frame 1
stop();
gotoAndStop(_parent._parent.chargeframe);
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (_root.waterblast == true) {
nextFrame();
this.attachMovie("ChargeLine", "ChargeLine" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:0, _y:0});
} else {
prevFrame();
}
_parent._parent.chargeframe = _currentframe;
}
};
Symbol 1187 MovieClip Frame 25
onEnterFrame = function () {
if (_root.PauseGame == false) {
nextFrame();
_root.Course.Char.yspeed = _root.Course.Char.yspeed * 0.97;
_parent._parent.chargeframe = _currentframe;
}
};
Symbol 1187 MovieClip Frame 30
_root.Power = 1;
Symbol 1187 MovieClip Frame 31
play();
_root.WaterAmount = _root.WaterAmount - 500;
_root.Power = 0;
_root.Course.Char.yspeed = _root.Course.Char.yspeed - (Math.sin(_root.angleToRadians(_root.DiveRot)) * _root.RocketBlast);
if (_root.Course.Char._xscale > 0) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.cos(_root.angleToRadians(_root.DiveRot)) * _root.RocketBlast);
} else {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (Math.cos(_root.angleToRadians(_root.DiveRot)) * _root.RocketBlast);
}
onEnterFrame = function () {
if (_root.PauseGame == false) {
_root.Power = 0;
_root.Course.Char.yspeed = _root.Course.Char.yspeed - (Math.sin(_root.angleToRadians(_root.DiveRot)) / 3);
if (_root.Course.Char._xscale > 0) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.cos(_root.angleToRadians(_root.DiveRot)) / 3);
} else {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (Math.cos(_root.angleToRadians(_root.DiveRot)) / 3);
}
_parent._parent.chargeframe = 0;
}
};
Symbol 1187 MovieClip Frame 39
_parent._parent.chargeframe = 1;
gotoAndStop (1);
Symbol 1191 MovieClip Frame 1
rotation = 0;
rotspeed = 0;
rot2 = 0;
onEnterFrame = function () {
if (_root.PauseGame == false) {
if (_root.Course.Char.air == true) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot2 = rot2 + 10;
}
if (_root.Course.Char._xscale < 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot2 = rot2 - 10;
}
if ((!_root.Course.Platforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 5) * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((_root.Course.Char._x * _root.coursescale) / 100) + _root.Course._x, (((_root.Course.Char._y + 3) * _root.coursescale) / 100) + _root.Course._y, true))) {
if (air == false) {
air = true;
if (groundrot < 0) {
_root.Course.Char.yspeed = _root.Course.Char.yspeed - ((Math.sin(groundrot) * _root.Course.Char.xspeed) * 0.75);
}
_rotation = (groundrot * (_root.Course.Char._xscale / 100));
rotation = groundrot * (_root.Course.Char._xscale / 100);
}
if (rot > 0) {
rot = rot2;
if (rot < -90) {
rotation = rotation - 360;
}
rotspeed = (rot - rotation) / 10;
} else {
rot = rot2;
if (rot > 90) {
rotation = rotation + 360;
}
rotspeed = (rot - rotation) / 10;
}
if (rotation > 520) {
rotation = rotation - 360;
}
if (rotation < -520) {
rotation = rotation + 360;
}
rotspeed = _root.groundFriction(rotspeed, 0.1, 1.15);
rotspeed = Math.min(rotspeed, 15);
rotspeed = Math.max(rotspeed, -15);
rotation = rotation + rotspeed;
_rotation = rotation;
air = true;
} else {
if ((air == undefined) || (air == true)) {
rotation = 0;
_rotation = 0;
air = false;
}
rotation = _rotation * (_root.Course.Char._xscale / 100);
distance = 5;
frontpointX = _root.Course.Char._x - (Math.cos(_root.angleToRadians(rotation)) * distance);
frontpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, (((frontpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
frontpointY = frontpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((frontpointX * _root.coursescale) / 100) + _root.Course._x, ((frontpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
frontpointY = frontpointY - 0.5;
count++;
} while (count <= 50);
backpointX = _root.Course.Char._x + (Math.cos(_root.angleToRadians(rotation)) * distance);
backpointY = _root.Course.Char._y - (Math.sin(_root.angleToRadians(rotation)) * distance);
coint = 0;
do {
if (!(((!_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)) && (!_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true))) && (_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 25) * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, (((backpointY + 15) * _root.coursescale) / 100) + _root.Course._y, true))))) {
break;
}
backpointY = backpointY + 0.5;
count++;
} while (count <= 50);
coint = 0;
do {
if (!(_root.Course.Platforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true) || (_root.Course.BPlatforms.hitTest(((backpointX * _root.coursescale) / 100) + _root.Course._x, ((backpointY * _root.coursescale) / 100) + _root.Course._y, true)))) {
break;
}
backpointY = backpointY - 0.5;
count++;
} while (count <= 50);
rotation = _root.radiansToAngle(Math.atan2(backpointY - frontpointY, backpointX - frontpointX));
if (((rotation > groundrot) && (groundrot < 0)) && ((_root.Course.Char.xspeed * ((-_root.Course.Char._xscale) / 100)) > 5)) {
_root.Course.Char.yspeed = -1;
_root.Course.Char._y = _root.Course.Char._y - 1;
}
groundrot = rotation;
_rotation = ((rotation * (_root.Course.Char._xscale / 100)) * 0.9);
speedslide = Math.sin(_root.angleToRadians(rotation));
speedslide = speedslide * 0.9;
speedslide = Math.max(speedslide, -1);
speedslide = Math.min(speedslide, 1);
if (_root.Course.Char.Ice == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.75);
} else if (_root.Course.Char.Puddle == true) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + (speedslide * 0.9);
} else {
_root.Course.Char.xspeed = _root.Course.Char.xspeed + speedslide;
}
}
_root.DiveRot = _rotation;
if (!_root.KeyDOWN()) {
}
if (((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 5)) && (((_root.Course.Char._xscale > 0) && (_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (_root.KeyLEFT())))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "backflip";
xspeed = xspeed * 0.75;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed + 30) / 5);
} else {
xspeed = xspeed - ((xspeed - 30) / 5);
}
yspeed = Math.min((-_root.jumpspeed) - 2, yspeed);
};
}
if ((((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) > 3)) && (((_root.Course.Char._xscale > 0) && (!_root.KeyRIGHT())) || ((_root.Course.Char._xscale < 0) && (!_root.KeyLEFT())))) && (!((Math.abs(rotation) > 25) && (Ice == true)))) {
tellTarget (_root.Course.Char) {
attack = true;
attackFrame = "diveflip";
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - 15) / 5);
} else {
xspeed = xspeed - ((xspeed + 15) / 5);
}
yspeed = Math.min((-_root.jumpspeed) / 1.5, yspeed);
};
}
if (((_root.Course.Char.Ice == true) && (Math.abs(rotation) <= 3)) || (Math.abs(rotation) <= 15)) {
if ((_root.KeyUP() && (_root.Course.Char.air == false)) && (Math.abs(_root.Course.Char.xspeed) < 3)) {
play();
}
if (((_root.Course.Char.air == false) && (Math.abs(_root.Course.Char.xspeed) < 1)) && (!_root.KeyDOWN())) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
}
};
Symbol 1191 MovieClip Frame 3
stop();
Symbol 1191 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 1197 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 1197 MovieClip Frame 9
_root.Course.Char.attack = false;
Symbol 1203 MovieClip Frame 1
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 1203 MovieClip Frame 4
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 1203 MovieClip Frame 15
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
tellTarget (_root.Course.Char) {
if (_root.KeyDOWN() && (Water == false)) {
doublejump = 0;
attack = true;
attackFrame = "Dive";
yspeed = yspeed + 3;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - _root.Divespeed) / 5);
} else {
xspeed = xspeed - ((xspeed + _root.Divespeed) / 5);
}
}
if (air == false) {
attack = false;
}
};
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 1203 MovieClip Frame 22
_root.Course.Char.attack = false;
Symbol 1220 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
if (_root.PauseGame == false) {
frame = frame + Math.min(Math.round(Math.max(_parent.speed, 5)), 10);
while (frame >= 41) {
frame = frame - 40;
}
if (_parent.speed > 10) {
gotoAndStop(frame);
} else {
gotoAndStop(frame + 40);
}
if (_parent.speed > 5) {
_parent.speed = _root.groundFriction(_parent.speed, 0.3, 1.05);
} else {
_parent.speed = _root.groundFriction(_parent.speed, 0.1, 1.03);
}
_parent.speed = Math.max(_parent.speed, 1);
if ((_parent.speed <= 3) && (_root.Course.Char.air == false)) {
_root.Course.Char.attack = false;
}
if (_root.Course.Char.air == true) {
if (_parent.speed > 5) {
_root.Course.Char.yspeed = _root.groundFriction(_root.Course.Char.yspeed, 0.3, 1.05);
} else {
_root.Course.Char.yspeed = _root.groundFriction(_root.Course.Char.yspeed, 0.1, 1.03);
}
_root.Course.Char.yspeed = _root.Course.Char.yspeed - (Math.sqrt((_parent.speed + 1) / 30) / 3);
}
if (_root.KeyRIGHT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.min((_root.Course.Char.xspeed - _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyLEFT() && (_root.Controll == true)) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - (Math.max((_root.Course.Char.xspeed + _root.airwalkspeed) / (_root.airmaxWalkspeed / 3), 0) / 1.5);
}
if (_root.KeyTapRIGHT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.min((_root.Course.Char.xspeed - _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
if (_root.KeyTapLEFT()) {
_root.Course.Char.xspeed = _root.Course.Char.xspeed - Math.max((_root.Course.Char.xspeed + _root.airtapspeed) / (_root.airmaxtapWalkspeed / 3), 0);
}
} else {
stop();
}
};
Symbol 1226 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1226 MovieClip Frame 2
onEnterFrame = function () {
_root.PauseGame = false;
};
_root.GetStarMusic2();
Symbol 1226 MovieClip Frame 43
onEnterFrame = function () {
_root.PauseGame = false;
_root.ZoomoutCam();
};
Symbol 1226 MovieClip Frame 80
_root.Blackout();
Symbol 1226 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 1237 MovieClip Frame 1
if (_root.PlayingChar == "Mario") {
gotoAndStop("M" + _root.Fluddpow);
}
if (_root.PlayingChar == "Luigi") {
gotoAndStop("L" + _root.Fluddpow);
}
Symbol 1238 MovieClip Frame 1
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Mario-Faint");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 1238 MovieClip Frame 30
_root.Course.Char.attackFrame = "Respawn";
stop();
Symbol 1241 MovieClip Frame 1
_root.CharLives--;
if (_root.CharLives <= 0) {
_root.Blackout();
} else {
_root.Course.Char._y = _root.StartY;
_root.Course.Char._x = _root.StartX;
}
onEnterFrame = function () {
_root.Camspeed = 1;
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 1241 MovieClip Frame 3
onEnterFrame = function () {
if (_root.PauseGame == false) {
play();
} else {
stop();
}
};
Symbol 1241 MovieClip Frame 19
_root.CharHP = 8;
if (_root.CharLives <= 0) {
_root.gotoAndStop("GameOver");
_root.RemoveCourse();
}
Symbol 1241 MovieClip Frame 50
_root.Course.Char.attack = false;
_root.Course.Char.blink = _root.respawnblink;
Symbol 1242 MovieClip [Mario] Frame 1
stop();
Symbol 1242 MovieClip [Mario] Frame 9
speed = 15;
Symbol 1242 MovieClip [Mario] Frame 31
speed = 15;
Symbol 1242 MovieClip [Mario] Frame 40
speed = 15;
Symbol 1242 MovieClip [Mario] Frame 49
speed = 15;
Symbol 1242 MovieClip [Mario] Frame 51
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Mario-Fall");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
_root.Mariosound.onSoundComplete = function () {
_root.Course.Char.attackFrame = "Respawn";
};
Symbol 1257 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
if (Key.isDown(39)) {
frame = frame + 3;
}
if (Key.isDown(37)) {
frame = frame - 3;
}
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 80) {
frame = 1;
}
if (frame <= 0) {
frame = 80;
}
};
Symbol 1268 MovieClip Frame 1
rotation = 0;
rotspeed = 0;
rot2 = 0;
onEnterFrame = function () {
if (_root.Course.Char._xscale > 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot2 = rot2 + 10;
}
if (_root.Course.Char._xscale < 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot2 = rot2 - 10;
}
if (_root.Course.Char.air == true) {
if (rot > 0) {
rot = rot2;
if (rot < -90) {
rotation = rotation - 360;
}
rotspeed = (rot - rotation) / 10;
} else {
rot = rot2;
if (rot > 90) {
rotation = rotation + 360;
}
rotspeed = (rot - rotation) / 10;
}
if (rotation > 520) {
rotation = rotation - 360;
}
if (rotation < -520) {
rotation = rotation + 360;
}
rotspeed = _root.groundFriction(rotspeed, 0.1, 1.15);
rotspeed = Math.min(rotspeed, 15);
rotspeed = Math.max(rotspeed, -15);
rotation = rotation + rotspeed;
_rotation = rotation;
} else {
_rotation = 0;
rotation = 0;
}
_root.DiveRot = _rotation;
if (!_root.KeyDOWN) {
if ((_root.Course.Char.yspeed == 0) && (_root.Course.Char.xspeed == 0)) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
};
Symbol 1268 MovieClip Frame 3
stop();
Symbol 1268 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 1270 MovieClip Frame 3
onEnterFrame = function () {
tellTarget (_root.Course.Char) {
if (Key.isDown(40) && (Water == false)) {
doublejump = 0;
attack = true;
attackFrame = "Dive";
yspeed = yspeed + 3;
if (_xscale < 0) {
xspeed = xspeed - ((xspeed - _root.Divespeed) / 5);
} else {
xspeed = xspeed - ((xspeed + _root.Divespeed) / 5);
}
}
if (air == false) {
attack = false;
}
};
};
Symbol 1270 MovieClip Frame 26
_root.Course.Char.attack = false;
Symbol 1276 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1276 MovieClip Frame 2
onEnterFrame = null;
_root.GetStarMusic2();
Symbol 1276 MovieClip Frame 43
onEnterFrame = function () {
_root.ZoomoutCam();
};
Symbol 1276 MovieClip Frame 80
_root.Blackout();
Symbol 1276 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 1277 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1277 MovieClip Frame 2
onEnterFrame = null;
Symbol 1277 MovieClip Frame 15
_root.GetStarMusic1();
Symbol 1277 MovieClip Frame 40
_root.newstar = false;
_root.CalculateStars();
Symbol 1277 MovieClip Frame 50
_root.Course.Char.attack = false;
Symbol 1294 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
if (Key.isDown(39)) {
frame = frame + 3;
}
if (Key.isDown(37)) {
frame = frame - 3;
}
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 90) {
frame = 1;
}
if (frame <= 0) {
frame = 90;
}
};
Symbol 1307 MovieClip Frame 1
rotation = 0;
rotspeed = 0;
rot2 = 0;
onEnterFrame = function () {
if (_root.Course.Char._xscale > 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot2 = rot2 + 10;
}
if (_root.Course.Char._xscale < 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot2 = rot2 - 10;
}
if (_root.Course.Char.air == true) {
if (rot > 0) {
rot = rot2;
if (rot < -90) {
rotation = rotation - 360;
}
rotspeed = (rot - rotation) / 10;
} else {
rot = rot2;
if (rot > 90) {
rotation = rotation + 360;
}
rotspeed = (rot - rotation) / 10;
}
if (rotation > 520) {
rotation = rotation - 360;
}
if (rotation < -520) {
rotation = rotation + 360;
}
rotspeed = _root.groundFriction(rotspeed, 0.1, 1.15);
rotspeed = Math.min(rotspeed, 15);
rotspeed = Math.max(rotspeed, -15);
rotation = rotation + rotspeed;
_rotation = rotation;
} else {
_rotation = 0;
rotation = 0;
}
_root.DiveRot = _rotation;
if (!_root.KeyDOWN) {
if ((_root.Course.Char.yspeed == 0) && (_root.Course.Char.xspeed == 0)) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
};
Symbol 1307 MovieClip Frame 3
stop();
Symbol 1307 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 1313 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1313 MovieClip Frame 2
onEnterFrame = null;
_root.GetStarMusic2();
Symbol 1313 MovieClip Frame 43
onEnterFrame = function () {
_root.ZoomoutCam();
};
Symbol 1313 MovieClip Frame 80
_root.Blackout();
Symbol 1313 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 1330 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
if (Key.isDown(39)) {
frame = frame + 3;
}
if (Key.isDown(37)) {
frame = frame - 3;
}
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 90) {
frame = 1;
}
if (frame <= 0) {
frame = 90;
}
};
Symbol 1339 MovieClip Frame 1
rot = 0;
onEnterFrame = function () {
if (_root.Course.Char._xscale > 0) {
rot = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot = rot + 10;
}
if (_root.Course.Char._xscale < 0) {
rot = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot = rot - 10;
}
if (_root.Course.Char.air == true) {
_rotation = (_rotation + ((rot - _rotation) / 10));
} else {
_rotation = 0;
}
_root.DiveRot = _rotation;
if (!Key.isDown(40)) {
if ((_root.Course.Char.yspeed == 0) && (_root.Course.Char.xspeed == 0)) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
};
Symbol 1339 MovieClip Frame 3
stop();
Symbol 1339 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 1345 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1345 MovieClip Frame 2
onEnterFrame = null;
_root.GetStarMusic2();
Symbol 1345 MovieClip Frame 43
onEnterFrame = function () {
_root.ZoomoutCam();
};
Symbol 1345 MovieClip Frame 80
_root.Blackout();
Symbol 1345 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 1362 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
if (Key.isDown(39)) {
frame = frame + 3;
}
if (Key.isDown(37)) {
frame = frame - 3;
}
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 90) {
frame = 1;
}
if (frame <= 0) {
frame = 90;
}
};
Symbol 1373 MovieClip Frame 1
rotation = 0;
rotspeed = 0;
rot2 = 0;
onEnterFrame = function () {
if (_root.Course.Char._xscale > 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot2 = rot2 + 10;
}
if (_root.Course.Char._xscale < 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot2 = rot2 - 10;
}
if (_root.Course.Char.air == true) {
if (rot > 0) {
rot = rot2;
if (rot < -90) {
rotation = rotation - 360;
}
rotspeed = (rot - rotation) / 10;
} else {
rot = rot2;
if (rot > 90) {
rotation = rotation + 360;
}
rotspeed = (rot - rotation) / 10;
}
if (rotation > 520) {
rotation = rotation - 360;
}
if (rotation < -520) {
rotation = rotation + 360;
}
rotspeed = _root.groundFriction(rotspeed, 0.1, 1.15);
rotspeed = Math.min(rotspeed, 15);
rotspeed = Math.max(rotspeed, -15);
rotation = rotation + rotspeed;
_rotation = rotation;
} else {
_rotation = 0;
rotation = 0;
}
_root.DiveRot = _rotation;
if (!_root.KeyDOWN) {
if ((_root.Course.Char.yspeed == 0) && (_root.Course.Char.xspeed == 0)) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
};
Symbol 1373 MovieClip Frame 3
stop();
Symbol 1373 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 1379 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1379 MovieClip Frame 2
onEnterFrame = null;
_root.GetStarMusic2();
Symbol 1379 MovieClip Frame 43
onEnterFrame = function () {
_root.ZoomoutCam();
};
Symbol 1379 MovieClip Frame 80
_root.Blackout();
Symbol 1379 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 1396 MovieClip Frame 1
frame = 1;
onEnterFrame = function () {
frame = frame + _root.Course.Char.xspeed;
if (_root.Course.Char.Ice == true) {
if (Key.isDown(39)) {
frame = frame + 3;
}
if (Key.isDown(37)) {
frame = frame - 3;
}
}
gotoAndStop((Math.round(frame) * 1) / 1);
if (frame >= 90) {
frame = 1;
}
if (frame <= 0) {
frame = 90;
}
};
Symbol 1407 MovieClip Frame 1
rotation = 0;
rotspeed = 0;
rot2 = 0;
onEnterFrame = function () {
if (_root.Course.Char._xscale > 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, -_root.Course.Char.xspeed));
rot2 = rot2 + 10;
}
if (_root.Course.Char._xscale < 0) {
rot2 = -_root.radiansToAngle(Math.atan2(_root.Course.Char.yspeed, _root.Course.Char.xspeed));
rot2 = rot2 - 10;
}
if (_root.Course.Char.air == true) {
if (rot > 0) {
rot = rot2;
if (rot < -90) {
rotation = rotation - 360;
}
rotspeed = (rot - rotation) / 10;
} else {
rot = rot2;
if (rot > 90) {
rotation = rotation + 360;
}
rotspeed = (rot - rotation) / 10;
}
if (rotation > 520) {
rotation = rotation - 360;
}
if (rotation < -520) {
rotation = rotation + 360;
}
rotspeed = _root.groundFriction(rotspeed, 0.1, 1.15);
rotspeed = Math.min(rotspeed, 15);
rotspeed = Math.max(rotspeed, -15);
rotation = rotation + rotspeed;
_rotation = rotation;
} else {
_rotation = 0;
rotation = 0;
}
_root.DiveRot = _rotation;
if (!_root.KeyDOWN) {
if ((_root.Course.Char.yspeed == 0) && (_root.Course.Char.xspeed == 0)) {
play();
}
}
if (_root.Course.Char.Water == true) {
play();
}
};
Symbol 1407 MovieClip Frame 3
stop();
Symbol 1407 MovieClip Frame 6
_root.Course.Char.attack = false;
Symbol 1411 MovieClip Frame 1
stop();
_root.GetStarMusic1();
onEnterFrame = function () {
if (_root.Course.Char.air == false) {
play();
}
};
Symbol 1411 MovieClip Frame 2
onEnterFrame = null;
_root.GetStarMusic2();
Symbol 1411 MovieClip Frame 43
onEnterFrame = function () {
_root.ZoomoutCam();
};
Symbol 1411 MovieClip Frame 80
_root.Blackout();
Symbol 1411 MovieClip Frame 103
_root.ReturnToCastle();
onEnterFrame = null;
stop();
Symbol 1412 MovieClip Frame 34
_root.Mariosound = new Sound(this);
_root.Mariosound.attachSound("Mario-Fall");
_root.Mariosound.start(0, 1);
_root.Mariosound.setVolume(_root.MarioVolume);
_root.Mariosound.onSoundComplete = function () {
_root.Course.Char.attackFrame = "Respawn";
};
Symbol 1424 MovieClip [CastleBackGFX] Frame 1
stop();
_root.StopBGsong();
Instance of Symbol 1423 MovieClip in Symbol 1424 MovieClip [CastleBackGFX] Frame 1
onClipEvent (load) {
color = Math.round(_root.TotalStars * 1.5) + 25;
color2 = Math.abs(100 - color);
myColor = new Color(this);
colorTrans = new Object();
colorTrans = {ra:(100 - ((color2 / 2) + Math.max(color2 - 50, 0))) - (color2 / 5), rb:0, ga:color, gb:0, ba:color, bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
onClipEvent (enterFrame) {
color = color + (Math.round(((_root.TotalStars * 1.5) + 25) - color) / 7);
if (_root.CheatCastleRestore == true) {
color = 100;
}
color = Math.max(color, 0);
color = Math.min(color, 100);
color2 = Math.abs(100 - color);
colorTrans = {ra:((color * 0.75) + 25) - (color2 / 5), rb:0, ga:color - (color2 / 3), gb:0, ba:color - (color2 / 3), bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
Instance of Symbol 828 MovieClip in Symbol 1424 MovieClip [CastleBackGFX] Frame 1
onClipEvent (load) {
color = Math.round(_root.TotalStars * 1.5) + 25;
color2 = Math.abs(100 - color);
myColor = new Color(this);
colorTrans = new Object();
colorTrans = {ra:(100 - ((color2 / 2) + Math.max(color2 - 50, 0))) - (color2 / 5), rb:0, ga:color, gb:0, ba:color, bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
doorplace = "inCastle";
}
onClipEvent (enterFrame) {
color = color + (Math.round(((_root.TotalStars * 1.5) + 25) - color) / 7);
if (_root.CheatCastleRestore == true) {
color = 100;
}
color = Math.max(color, 0);
color = Math.min(color, 100);
color2 = Math.abs(100 - color);
colorTrans = {ra:((color * 0.75) + 25) - (color2 / 5), rb:0, ga:color - (color2 / 3), gb:0, ba:color - (color2 / 3), bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
Instance of Symbol 828 MovieClip in Symbol 1424 MovieClip [CastleBackGFX] Frame 1
onClipEvent (load) {
color = Math.round(_root.TotalStars * 1.5) + 25;
color2 = Math.abs(100 - color);
myColor = new Color(this);
colorTrans = new Object();
colorTrans = {ra:(100 - ((color2 / 2) + Math.max(color2 - 50, 0))) - (color2 / 5), rb:0, ga:color, gb:0, ba:color, bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
doorplace = "inCastle";
}
onClipEvent (enterFrame) {
color = color + (Math.round(((_root.TotalStars * 1.5) + 25) - color) / 7);
if (_root.CheatCastleRestore == true) {
color = 100;
}
color = Math.max(color, 0);
color = Math.min(color, 100);
color2 = Math.abs(100 - color);
colorTrans = {ra:((color * 0.75) + 25) - (color2 / 5), rb:0, ga:color - (color2 / 3), gb:0, ba:color - (color2 / 3), bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
Instance of Symbol 756 MovieClip in Symbol 1424 MovieClip [CastleBackGFX] Frame 1
onClipEvent (load) {
Xpower = 40;
Ypower = 35;
cannonsetup = true;
side = "Left";
}
Symbol 1424 MovieClip [CastleBackGFX] Frame 2
stop();
Instance of Symbol 403 MovieClip in Symbol 1424 MovieClip [CastleBackGFX] Frame 2
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 1424 MovieClip [CastleBackGFX] Frame 2
onClipEvent (load) {
_xscale = 100;
}
Instance of Symbol 403 MovieClip in Symbol 1424 MovieClip [CastleBackGFX] Frame 2
onClipEvent (load) {
_xscale = -100;
}
Instance of Symbol 1429 MovieClip [GrassandHillsBG] in Symbol 1430 MovieClip [CastleColoredBG] Frame 1
onClipEvent (load) {
color = Math.round(_root.TotalStars * 1.5) + 25;
color2 = Math.abs(100 - color);
myColor = new Color(this);
colorTrans = new Object();
colorTrans = {ra:(100 - ((color2 / 2) + Math.max(color2 - 50, 0))) - (color2 / 5), rb:0, ga:color, gb:0, ba:color, bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
onClipEvent (enterFrame) {
color = color + (Math.round(((_root.TotalStars * 1.5) + 25) - color) / 7);
if (_root.CheatCastleRestore == true) {
color = 100;
}
color = Math.max(color, 0);
color = Math.min(color, 100);
color2 = Math.abs(100 - color);
colorTrans = {ra:((color * 0.75) + 25) - (color2 / 5), rb:0, ga:color - (color2 / 3), gb:0, ba:color - (color2 / 3), bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
Instance of Symbol 1433 MovieClip [CloudBackground] in Symbol 1434 MovieClip [CastleColoredFarBG] Frame 1
onClipEvent (load) {
color = Math.round(_root.TotalStars * 1.5) + 25;
color2 = Math.abs(100 - color);
myColor = new Color(this);
colorTrans = new Object();
colorTrans = {ra:(100 - ((color2 / 2) + Math.max(color2 - 50, 0))) - (color2 / 5), rb:0, ga:color, gb:0, ba:color, bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
onClipEvent (enterFrame) {
color = color + (Math.round(((_root.TotalStars * 1.5) + 25) - color) / 7);
if (_root.CheatCastleRestore == true) {
color = 100;
}
color = Math.max(color, 0);
color = Math.min(color, 100);
color2 = Math.abs(100 - color);
colorTrans = {ra:((color * 0.75) + 25) - (color2 / 5), rb:0, ga:color - (color2 / 3), gb:0, ba:color - (color2 / 3), bb:0, aa:100, ab:0};
myColor.setTransform(colorTrans);
}
Symbol 1444 MovieClip Frame 10
_root.play();
Symbol 1485 MovieClip [__Packages.com.wiicade.WiiMote] Frame 0
class com.wiicade.WiiMote
{
static var kc5, _instance, kc0, kc1, dispatchEvent;
var lc;
function WiiMote () {
mx.events.EventDispatcher.initialize(com.wiicade.WiiMote);
lc = new LocalConnection();
lc.connect("wii");
lc.keysUpdated = mx.utils.Delegate.create(this, keysUpdated);
Mouse.addListener(this);
Key.addListener(this);
kc5 = 0;
}
static function init() {
if (_instance == null) {
_instance = new com.wiicade.WiiMote();
resetKeyMappings();
}
}
static function resetKeyMappings() {
kc0 = new Array();
kc1 = new Array();
kc0[37] = BUTTON_LEFT;
kc0[38] = BUTTON_UP;
kc0[39] = BUTTON_RIGHT;
kc0[40] = BUTTON_DOWN;
kc0[65] = BUTTON_1;
kc0[83] = BUTTON_2;
kc0[68] = BUTTON_A;
kc0[32] = BUTTON_B;
kc0[187] = BUTTON_PLUS;
kc0[189] = BUTTON_MINUS;
kc1[BUTTON_LEFT] = 37;
kc1[BUTTON_UP] = 38;
kc1[BUTTON_RIGHT] = 39;
kc1[BUTTON_DOWN] = 40;
kc1[BUTTON_1] = 65;
kc1[BUTTON_2] = 83;
kc1[BUTTON_A] = 68;
kc1[BUTTON_B] = 32;
kc1[BUTTON_PLUS] = 187;
kc1[BUTTON_MINUS] = 189;
}
static function isRotated() {
return(rotated);
}
static function setRotated(rotate) {
rotated = rotate;
}
static function getMappingForKey(kc3) {
return(kc0[kc3]);
}
static function getKeyMapping(kc4) {
return(kc1[kc4]);
}
static function setKeyMapping(kc4, kc3) {
var _local1 = kc1[kc4];
if (_local1) {
kc0[_local1] = null;
}
kc0[kc3] = kc4;
kc1[kc4] = kc3;
}
static function isDown(kc4) {
if (rotated && (allowRotate)) {
if (kc4 == BUTTON_UP) {
kc4 = BUTTON_RIGHT;
} else if (kc4 == BUTTON_RIGHT) {
kc4 = BUTTON_DOWN;
} else if (kc4 == BUTTON_DOWN) {
kc4 = BUTTON_LEFT;
} else if (kc4 == BUTTON_LEFT) {
kc4 = BUTTON_UP;
}
}
return((kc5 & kc4) > 0);
}
function keysUpdated(kc0) {
kc5 = kc0;
dispatchEvent({type:"keysUpdated"});
}
function onMouseDown() {
kc5 = kc5 | BUTTON_A;
dispatchEvent({type:"keysUpdated"});
}
function onMouseUp() {
kc5 = kc5 & (BUTTON_A ^ 1023);
dispatchEvent({type:"keysUpdated"});
}
function onKeyDown() {
var _local1 = Key.getCode();
if (kc0[_local1]) {
allowRotate = false;
kc5 = kc5 | kc0[_local1];
dispatchEvent({type:"keysUpdated"});
}
}
function onKeyUp() {
var _local1 = Key.getCode();
if (kc0[_local1]) {
kc5 = kc5 & (kc0[_local1] ^ 1023);
dispatchEvent({type:"keysUpdated"});
}
}
static var BUTTON_UP = 1;
static var BUTTON_DOWN = 2;
static var BUTTON_RIGHT = 4;
static var BUTTON_LEFT = 8;
static var BUTTON_1 = 16;
static var BUTTON_2 = 32;
static var BUTTON_A = 64;
static var BUTTON_B = 128;
static var BUTTON_PLUS = 256;
static var BUTTON_MINUS = 512;
static var rotated = false;
static var allowRotate = true;
}
Symbol 1486 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions.eventObj.type == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 1487 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 1454 MovieClip Frame 1
stop();
Symbol 1459 MovieClip Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 3);
};
Symbol 1461 Button
on (release) {
_root.play();
}
Symbol 1465 MovieClip Frame 50
gotoAndPlay (11);
Symbol 1466 MovieClip Frame 90
stop();