Frame 1
function UbunSound_Init(mc) {
_global.ubunsound = new CUbunSound(mc);
_global.ubunsound_sfx_volumen = 50;
_global.ubunsound_bkg_volumen = 50;
}
function CUbunSound(mc) {
var _local2 = 0;
var _local3;
this.mc = mc;
this.sounds = new Array();
this.muted = false;
while (_local2 < MAX_SOUND_MIX_CHANNELS) {
_local3 = mc.createEmptyMovieClip(("sfx_channel_" + _local2).toString(), BASE_DEPTH + _local2);
trace(_local3);
this.sounds[_local2] = new Sound(_local3);
this.sounds[_local2].stop();
_local2++;
}
_local3 = mc.createEmptyMovieClip("sfx_channel_bkg".toString(), BASE_DEPTH + 8);
trace("music " + _local3);
this.sounds[8] = new Sound(_local3);
}
function UbunInit() {
if (_global.ubundata != undefined) {
trace("noooooooooooooo");
return(undefined);
}
_root._quality = "HIGH";
_global.ubundata = new Object();
_global.ubundata.version = "20060405";
_global.ubundata.project = "JuniperLee";
_global.ubundata.root = this;
_global.ubundata.debug = false;
_global.ubundata.paused = false;
_global.ubundata.muted = false;
var _local4 = getVersion().split(" ")[1];
_global.ubundata.player_ver = Number(_local4.split(",")[0]);
_global.ubundata.checkpoint = "";
_global.ubundata.score = 0;
_global.ubundata.fr = new CFrameModel(24);
UbunLoadConfig();
UbunSound_Init(_root);
}
function UbunLoadConfig() {
}
function UbunSaveConfig() {
}
function CSprite(parent, mem, depth) {
this.sprite = parent.attachMovie(mem, (mem + "_") + getTimer(), (depth ? (depth) : 1));
this.x = 0;
this.y = 0;
this.lastframe = -1;
this.GetDistance = Sprite_GetDistance;
this.Update = Sprite_Update;
this.UpdateClipper = Sprite_UpdateClipper;
this.Play = Sprite_Play;
this.IsColliding = Sprite_IsColliding;
}
function Sprite_GetDistance(other) {
var _local3 = other.x - this.x;
var _local2 = other.y - this.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function Sprite_Update() {
this.sprite._x = this.x;
this.sprite._y = this.y;
this.UpdateClipper();
}
function Sprite_UpdateClipper() {
var _local3 = this.x;
var _local9 = this.y;
var _local13 = this.sprite._width;
var _local14 = this.sprite._height;
var _local5;
var _local4;
var _local10;
var _local8;
var _local7;
var _local6;
var _local12;
var _local11;
var _local2 = false;
_local5 = _local3;
_local4 = 0;
_local10 = _local3 + _local13;
_local8 = 600;
_local7 = _local9;
_local6 = 0;
_local12 = _local3 + _local14;
_local11 = 400;
if (_local12 < _local6) {
_local2 = true;
}
if (_local7 > _local11) {
_local2 = true;
}
if (_local10 < _local4) {
_local2 = true;
}
if (_local5 > _local8) {
_local2 = true;
}
if (_local2) {
this.sprite._visible = false;
} else {
this.sprite._visible = true;
}
}
function Sprite_Play(frame) {
if (frame == this.lastframe) {
return(undefined);
}
this.sprite.gotoAndStop(frame);
this.lastframe = frame;
}
function Sprite_IsColliding(other) {
var _local6 = this.x;
var _local4 = this.y;
var _local10 = this.sprite._width;
var _local8 = this.sprite._height;
var _local5 = other.x;
var _local3 = other.y;
var _local9 = other.sprite._width;
var _local7 = other.sprite._height;
var _local12 = (_local10 + _local9) - Math.abs(_local6 - _local5);
var _local11 = (_local8 + _local7) - Math.abs(_local4 - _local3);
return(null);
}
function CUbunTint(mc, r, g, b) {
this.mc = mc;
this.tint = new Color(this.mc);
this.currenttint = {rb:r, gb:g, bb:b};
this.tint.setTransform(this.currenttint);
this.Set = UbunTint_Set;
}
function UbunTint_Set(r, g, b) {
this.currenttint = {rb:r, gb:g, bb:b};
this.tint.setTransform(this.currenttint);
}
function CFrameModel(mfps) {
this.modelFPS = mfps;
this.millis = getTimer();
this.instanceList = new Array();
this.d = 0;
this.dtimer = getTimer();
this.fps = 60;
this.ticks = 0;
this.code_ep = 0;
this.frames = 0;
this.frames_timer = getTimer();
this.Update = FrameModel_Update;
this.doModelFrames = FrameModel_doModelFrames;
this.Add = FrameModel_addInstance;
}
function FrameModel_Update(parent) {
var _local4 = getTimer() - this.millis;
var _local3 = this.modelFPS * (_local4 / 1000);
if (!_global.ubundata.paused) {
this.doModelFrames(_local3, parent);
}
if (this.modelFPS > 0) {
this.millis = this.millis + ((_local3 / parseFloat(this.modelFPS)) * 1000);
}
this.d = getTimer() - this.dtimer;
this.dtimer = getTimer();
if (!_global.ubundata.paused) {
this.ticks = this.ticks + this.d;
}
if ((getTimer() - this.frames_timer) > 1000) {
this.fps = this.frames;
this.frames = 0;
this.frames_timer = getTimer();
} else {
this.frames++;
}
}
function FrameModel_doModelFrames(mframes, parent) {
var _local6 = getTimer();
var _local2 = 0;
while (_local2 < mframes) {
for (var _local3 in this.instanceList) {
this.instanceList[_local3].Update(parent);
}
updateAfterEvent();
_local2++;
}
this.code_ep = getTimer() - _local6;
}
function FrameModel_addInstance(inst) {
this.instanceList.push(inst);
}
function CInput() {
this.LEFT = false;
this.RIGHT = false;
this.UP = false;
this.DOWN = false;
this.Z = false;
this.X = false;
this.PRESS = false;
this.Update = Input_Update;
}
function Input_Update() {
this.LEFT = Key.isDown(37);
this.RIGHT = Key.isDown(39);
this.UP = Key.isDown(38);
this.DOWN = Key.isDown(40);
this.Z = Key.isDown(90);
this.X = Key.isDown(88);
this.PRESS = ((((this.LEFT || (this.RIGHT)) || (this.UP)) || (this.DOWN)) || (this.X)) || (this.Z);
}
function CStateMachine() {
this.IDLE = 0;
this.WALK = 1;
this.ATTACK = 2;
this.WAIT = 3;
this.PAIN = 4;
this.DIE = 5;
this.JUMP = 6;
this.state_idle = false;
this.state_walk = false;
this.state_attack = false;
this.state_wait = false;
this.state_pain = false;
this.state_die = false;
this.state_jump = false;
this.state = this.IDLE;
this.Update = StateMachine_Update;
}
function StateMachine_Update() {
this.state_idle = this.state == this.IDLE;
this.state_walk = this.state == this.WALK;
this.state_attack = this.state == this.ATTACK;
this.state_wait = this.state == this.WAIT;
this.state_pain = this.state == this.PAIN;
this.state_die = this.state == this.DIE;
this.state_jump = this.state == this.JUMP;
}
function CUbunClock(minutes, seconds, plus, spass) {
if (spass != undefined) {
this.spass = spass;
}
this.minutes = minutes;
this.seconds = seconds;
this.plus = plus;
this.done = false;
this.timer = getTimer();
this.Update = UbunClock_Update;
}
function UbunClock_Update() {
if (this.done) {
return(undefined);
}
if ((getTimer() - this.timer) >= 800) {
this.seconds = this.seconds + this.plus;
if (this.spass != undefined) {
this.spass();
}
if (((this.minutes <= 0) && (this.seconds <= 0)) && (this.plus < 0)) {
this.minutes = 0;
this.seconds = 0;
this.done = true;
return(undefined);
}
if (this.seconds > 59) {
this.minutes++;
this.seconds = 0;
} else if (this.seconds < 0) {
this.seconds = 59;
this.minutes--;
}
this.timer = getTimer();
}
}
function CUbunCheatMachine(code, func, id) {
this.mySpecialMove = code;
this.mySpecialIndex = 0;
this.done = false;
this.func = func;
this.id = id;
this.myListener = new Object();
this.myListener.parent = this;
this.myListener.onKeyUp = function () {
if (this.parent.done) {
return(undefined);
}
if (Key.getCode() == this.parent.mySpecialMove[this.parent.mySpecialIndex]) {
this.parent.mySpecialIndex++;
if (this.parent.mySpecialIndex >= this.parent.mySpecialMove.length) {
this.parent.done = true;
this.parent.mySpecialIndex = 0;
this.parent.func(this.parent.id);
Key.removeListener(this.parent.myListener);
}
} else {
this.parent.mySpecialIndex = 0;
}
};
Key.addListener(this.myListener);
}
function CUbunDiceMachine(total_pos) {
this.dice_array = new Array(total_pos);
var _local2 = 0;
while (_local2 < total_pos) {
this.dice_array[_local2] = 0;
_local2++;
}
this.Add = UbunDiceMachine_Add;
this.Eval = UbunDiceMachine_Eval;
}
function UbunDiceMachine_Add(pos) {
this.dice_array[pos] = this.dice_array[pos] + 0.1;
}
function UbunDiceMachine_Eval() {
var _local2;
var _local3;
var _local4;
_local4 = 0;
_local3 = _local4;
_local2 = _local3;
var _local5 = this.dice_array.length;
while (_local2 < _local5) {
if (this.dice_array[_local2] > _local3) {
_local3 = this.dice_array[_local2];
_local4 = _local2;
}
_local2++;
}
var _local6 = _local4;
if (_local3 == 0) {
_local6 = -1;
}
return(_local6);
}
function CUbunWaypoint() {
this.waypoints = new Array();
this.current = -1;
this.Add = UbunWaypoint_Add;
this.Get = UbunWaypoint_Get;
}
function UbunWaypoint_Add(x, y) {
var _local2 = new Object();
_local2._x = x;
_local2._y = y;
this.waypoints.push(_local2);
}
function UbunWaypoint_Get(j) {
var _local2 = 0;
while (_local2 < this.waypoints.length) {
if (j == _local2) {
return(this.waypoints[_local2]);
}
_local2++;
}
return(null);
}
function getDistance(x1, y1, x2, y2) {
var _local2 = x2 - x1;
var _local1 = y2 - y1;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function boxvsboxcollision(x1, y1, w1, h1, x2, y2, w2, h2) {
if ((Math.abs(x2 - x1) > (w1 + w2)) && (Math.abs(y2 - y1) > (h1 + h2))) {
return(true);
}
return(false);
}
function recursivepauseMC(mc, flag) {
if (flag) {
mc.gotoAndStop(mc._currentframe);
} else {
mc.gotoAndPlay(mc._currentframe);
}
for (var _local3 in mc) {
if (typeof(mc[_local3]) == "movieclip") {
if (flag) {
mc[_local3].gotoAndStop(mc._currentframe);
} else {
mc[_local3].gotoAndPlay(mc._currentframe);
}
recursivepauseMC(mc[_local3]);
}
}
}
function rad(x) {
return(x * 0.01745329);
}
function deg(x) {
return(x * 57.29578);
}
function randRange(min, max) {
var _local1 = Math.round(Math.random() * (max - min)) + min;
return(_local1);
}
MAX_SOUND_MIX_CHANNELS = 8;
BASE_DEPTH = 999;
CUbunSound.prototype.Load = function (num, name_str) {
this.sounds[num].attachSound(name_str);
this.sounds[num].stop(name_str);
if (num < 8) {
this.sounds[num].setVolume(_global.ubunsound_sfx_volumen);
} else {
this.sounds[8].setVolume(_global.ubunsound_bkg_volumen);
}
return(num);
};
CUbunSound.prototype.Play = function (x, loop) {
if (x < 8) {
if (this.muted) {
this.sounds[x].setVolume(0);
} else {
this.sounds[x].setVolume(_global.ubunsound_sfx_volumen);
}
if (!loop) {
this.sounds[x].start(0, 1);
} else {
this.sounds[x].start(0, 999);
}
} else {
if (this.muted) {
this.sounds[8].setVolume(0);
} else {
this.sounds[8].setVolume(_global.ubunsound_bkg_volumen);
}
this.sounds[8].start(0, 999);
}
};
CUbunSound.prototype.Reset = function () {
for (var _local5 in this.sounds) {
this.sounds[_local5].stop();
}
for (var _local4 in this.mc) {
if (typeof(this.mc[_local4]) == "movieclip") {
if (_local4.substring(0, 11) == "sfx_channel") {
this.mc[_local4].swapDepths(9999999999);
this.mc[_local4].removeMovieClip();
}
}
}
delete this.sounds;
var _local3;
var _local2 = 0;
this.sounds = new Array();
while (_local2 < MAX_SOUND_MIX_CHANNELS) {
_local3 = this.mc.createEmptyMovieClip(("sfx_channel_" + _local2).toString(), BASE_DEPTH + _local2);
this.sounds[_local2] = new Sound(_local3);
this.sounds[_local2].stop();
_local2++;
}
_local3 = this.mc.createEmptyMovieClip("sfx_channel_bkg".toString(), BASE_DEPTH + 8);
this.sounds[8] = new Sound(_local3);
};
CUbunSound.prototype.SetIndividualVolume = function (x, percent) {
if (this.muted) {
return(undefined);
}
if (x < 8) {
var _local3 = (percent * _global.ubunsound_sfx_volumen) / 100;
this.sounds[x].setVolume(_local3);
} else {
var _local3 = (percent * _global.ubunsound_bkg_volumen) / 100;
this.sounds[8].setVolume(_local3);
}
};
CUbunSound.prototype.SetSFXVolume = function (x) {
var _local3 = 0;
_global.ubunsound_sfx_volumen = x;
while (_local3 < MAX_SOUND_MIX_CHANNELS) {
this.sounds[_local3].setVolume(x);
_local3++;
}
};
CUbunSound.prototype.SetMusicVolume = function (x) {
_global.ubunsound_bkg_volumen = x;
this.sounds[8].setVolume(x);
};
CUbunSound.prototype.Mute = function (x) {
this.muted = x;
var _local3 = 0;
while (_local3 < MAX_SOUND_MIX_CHANNELS) {
if (this.muted) {
this.sounds[_local3].setVolume(0);
} else {
this.sounds[_local3].setVolume(_global.ubunsound_sfx_volumen);
}
_local3++;
}
if (this.muted) {
this.sounds[8].setVolume(0);
} else {
this.sounds[8].setVolume(_global.ubunsound_bkg_volumen);
}
};
MovieClip.prototype.UpdateZ = function () {
this.swapDepths(this._x + (this._y * _root._width));
};
MovieClip.prototype.ScrollH = function (x) {
this._x = this._x + x;
if (this._x < (-(this._width / 2))) {
this._x = this._x + (this._width / 2);
}
};
MovieClip.prototype.setRGBA = function (r, g, b, a) {
var _local2 = new Color(this);
var _local3 = {rb:r, gb:g, bb:b};
_local2.setTransform(_local3);
};
MovieClip.prototype.pauseMC = function (flag) {
_global.ubundata.root.recursivepauseMC(this, flag);
};
MovieClip.prototype.realCoords = function () {
var _local2 = new Object();
_local2.x = 0;
_local2.y = 0;
this.localToGlobal(_local2);
return(_local2);
};
MovieClip.prototype.RadiusCollision = function (other_mc, min) {
var _local3 = this.realCoords();
var _local2 = other_mc.realCoords();
if (getDistance(_local3.x, _local3.y, _local2.x, _local2.y) < min) {
return(true);
}
return(false);
};
MovieClip.prototype.Intersects = function (other_mc) {
var _local3 = this.realCoords();
var _local2 = other_mc.realCoords();
if ((Math.abs(_local2.x - _local3.x) < (this._width + other_mc._width)) && (Math.abs(_local2.y - _local3.y) < (this._height + other_mc._height))) {
return(true);
}
return(false);
};
MovieClip.prototype.GetDistance = function (other_mc) {
var _local3 = this.realCoords();
var _local2 = other_mc.realCoords();
return(getDistance(_local3.x, _local3.y, _local2.x, _local2.y));
};
MovieClip.prototype.Rewind = function () {
this.gotoAndStop(1);
for (var _local2 in this) {
if (typeof(this[_local2]) == "movieclip") {
this[_local2].gotoAndStop(1);
}
}
};
MovieClip.prototype.Play = function () {
this.gotoAndPlay(1);
for (var _local2 in this) {
if (typeof(this[_local2]) == "movieclip") {
this[_local2].gotoAndPlay(1);
}
}
};
MovieClip.prototype.FadeIn = function () {
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha - 25;
} else {
this._alpha = 100;
delete this.onEnterFrame;
}
};
};
UbunInit();
billboard_has = _root.sw1 != undefined;
billboard_time = (billboard_has ? (_root.sw2 * 1000) : 2000);
billboard_url = (billboard_has ? (_root.sw1) : "");
if (billboard_has) {
billboard_link = _root.sw4;
} else {
billboard_link = null;
}
billboard_timer = getTimer();
billboard._visible = false;
billboard.loadMovie(billboard_url);
billboard.swapDepths(99999);
getflashplayer_mc._visible = false;
_global.menu_trans = false;
version_txt.text = ("ver " + _global.ubundata.version).toString();
this.onEnterFrame = function () {
if (_global.ubundata.player_ver < 7) {
if (!getflashplayer_mc._visible) {
getflashplayer_mc._visible = true;
}
gotoAndStop(_currentframe);
return(undefined);
}
if (billboard_has) {
var _local3 = getBytesTotal() + billboard.getBytesTotal();
var _local4 = getBytesLoaded() + billboard.getBytesLoaded();
if (_local4 >= _local3) {
if (billboard_timer < getTimer()) {
gotoAndStop ("Game");
billboard.useHandCursor = false;
billboard.removeMovieClip();
delete this.onEnterFrame;
} else {
billboard.useHandCursor = true;
if (!billboard._visible) {
billboard._visible = true;
if (billboard_link) {
billboard.onRelease = function () {
getURL (billboard_link.toString(), "_blank");
};
}
}
}
} else {
billboard._visible = false;
if (load_mc._currentframe > 21) {
load_mc.gotoAndStop(22 + Math.round((_local4 / _local3) * 100));
}
billboard_timer = getTimer() + billboard_time;
}
} else {
if (getBytesLoaded() >= getBytesTotal()) {
gotoAndStop ("Game");
delete this.onEnterFrame;
}
if (load_mc._currentframe > 21) {
load_mc.gotoAndStop(22 + Math.round((getBytesLoaded() / getBytesTotal()) * 100));
}
}
};
gotoAndStop (1);
Frame 7
stop();
Frame 38
stop();
Symbol 5 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&P5_Language=English", _blank);
};
Symbol 19 MovieClip Frame 22
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 2
stop();
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 2
stop();
Symbol 63 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 2
stop();
Symbol 66 MovieClip Frame 59
stop();
Symbol 66 MovieClip Frame 100
this._parent.gotoAndStop(_global.where);
Symbol 122 MovieClip Frame 12
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 15
stop();
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 2
stop();
Symbol 139 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 2
stop();
Symbol 141 MovieClip Frame 31
stop();
Symbol 141 MovieClip Frame 61
this._parent.gotoAndStop(_global.where);
Symbol 144 MovieClip Frame 32
stop();
Symbol 144 MovieClip Frame 63
this._parent.gotoAndStop(_global.where);
Symbol 145 MovieClip Frame 1
function Cheat_Init(func) {
_global.juniperlee = new Object();
_global.juniperlee.god_mode = new _root.CUbunCheatMachine(new Array(38, 88, 40, 88, 37, 88, 39, 88), func, 1);
_global.juniperlee.monkey_mode = new _root.CUbunCheatMachine(new Array(77, 79, 78, 75, 69, 89), func, 2);
}
function Cheat_Shutdown() {
if (_global.juniperlee) {
delete _global.juniperlee.god_mode;
delete _global.juniperlee.monkey_mode;
delete _global.juniperlee;
}
}
function mainmenu_cheatcompleted(id) {
if (id == 1) {
_global.ubunsound.Play(0, false);
} else if (id == 2) {
_global.ubunsound.Play(0, false);
}
}
function mainmenu_KeyUp() {
this.UP = Key.getCode() == 38;
this.DOWN = Key.getCode() == 40;
this.SPACE = Key.getCode() == 32;
}
function MainMenu_OnRelease() {
if (locked) {
return(undefined);
}
_global.ubunsound.Play(0, false);
if (this.id == MENU_OPTIONS) {
_global.where = "Opciones";
this._parent.play();
} else if (this.id == MENU_INSTRUCTIONS) {
_global.where = "Instrucciones";
this._parent.play();
} else if (this.id == MENU_PLAY) {
trans_1_mc.gotoAndPlay(2);
locked = true;
}
Key.removeListener(keyListener);
}
function MainMenu_OnRollOver() {
_global.ubunsound.Play(1, false);
if (focusOn != this) {
focusOn.gotoAndStop(1);
}
focusOn = this;
this.gotoAndStop(2);
}
function MainMenu_OnRollOut() {
this.gotoAndStop(1);
}
function MainMenu_CheckDefaults() {
if (!intro_mnu_mc.opt_mc.onRelease) {
intro_mnu_mc.opt_mc.id = MENU_OPTIONS;
intro_mnu_mc.opt_mc.onRelease = MainMenu_OnRelease;
intro_mnu_mc.opt_mc.onRollOver = MainMenu_OnRollOver;
intro_mnu_mc.opt_mc.onRollOut = MainMenu_OnRollOut;
}
if (!intro_mnu_mc.instructions_mc.onRelease) {
intro_mnu_mc.instructions_mc.id = MENU_INSTRUCTIONS;
intro_mnu_mc.instructions_mc.onRelease = MainMenu_OnRelease;
intro_mnu_mc.instructions_mc.onRollOver = MainMenu_OnRollOver;
intro_mnu_mc.instructions_mc.onRollOut = MainMenu_OnRollOut;
}
if (!intro_mnu_mc.play_mc.onRelease) {
intro_mnu_mc.play_mc.id = MENU_PLAY;
intro_mnu_mc.play_mc.onRelease = MainMenu_OnRelease;
intro_mnu_mc.play_mc.onRollOver = MainMenu_OnRollOver;
intro_mnu_mc.play_mc.onRollOut = MainMenu_OnRollOut;
}
}
function MainMenu_HandleKeyboard() {
if (!focusOn) {
if (keyListener.UP || (keyListener.DOWN)) {
focusOn = intro_mnu_mc.opt_mc;
focusOn.onRollOver();
}
return(undefined);
}
var _local1 = focusOn;
if (focusOn.id == MENU_OPTIONS) {
if (keyListener.UP) {
focusOn = intro_mnu_mc.play_mc;
} else if (keyListener.DOWN) {
focusOn = intro_mnu_mc.instructions_mc;
} else if (keyListener.SPACE) {
focusOn.onRelease();
}
} else if (focusOn.id == MENU_INSTRUCTIONS) {
if (keyListener.UP) {
focusOn = intro_mnu_mc.opt_mc;
} else if (keyListener.DOWN) {
focusOn = intro_mnu_mc.play_mc;
} else if (keyListener.SPACE) {
focusOn.onRelease();
}
} else if (focusOn.id == MENU_PLAY) {
if (keyListener.UP) {
focusOn = intro_mnu_mc.instructions_mc;
} else if (keyListener.DOWN) {
focusOn = intro_mnu_mc.opt_mc;
} else if (keyListener.SPACE) {
focusOn.onRelease();
}
}
if (_local1 != focusOn) {
_local1.onRollOut();
focusOn.onRollOver();
}
}
MENU_PLAY = 0;
MENU_OPTIONS = 1;
MENU_INSTRUCTIONS = 2;
_global.where = "main";
Cheat_Init(mainmenu_cheatcompleted);
var keyListener = new Object();
keyListener.UP = false;
keyListener.DOWN = false;
keyListener.SPACE = false;
var locked = false;
keyListener.onKeyUp = mainmenu_KeyUp;
Key.addListener(keyListener);
var focusOn = null;
this.onEnterFrame = function () {
if (!locked) {
MainMenu_HandleKeyboard();
MainMenu_CheckDefaults();
} else {
delete intro_mnu_mc.opt_mc.onRelease;
delete intro_mnu_mc.opt_mc.onRollOver;
delete intro_mnu_mc.opt_mc.onRollOut;
delete intro_mnu_mc.instructions_mc.onRelease;
delete intro_mnu_mc.instructions_mc.onRollOver;
delete intro_mnu_mc.instructions_mc.onRollOut;
delete intro_mnu_mc.play_mc.onRelease;
delete intro_mnu_mc.play_mc.onRollOver;
delete intro_mnu_mc.play_mc.onRollOut;
if (trans_1_mc._currentframe == trans_1_mc._totalframes) {
_global.ubundata.score = 0;
_global.ubundata.checkpoint = "minigame1";
_parent.gotoAndStop("minigame1");
Cheat_Shutdown();
delete this.onEnterFrame;
return(undefined);
}
}
keyListener.UP = false;
keyListener.DOWN = false;
keyListener.SPACE = false;
};
stop();
if (_global.menu_trans) {
trans_2_mc._visible = true;
} else {
trans_2_mc._visible = false;
}
Symbol 145 MovieClip Frame 10
function mainmenu_KeyUp() {
this.UP = Key.getCode() == 38;
this.DOWN = Key.getCode() == 40;
this.SPACE = Key.getCode() == 32;
}
function MenuOptions_OnRelease() {
_global.ubunsound.Play(0, false);
if (this.id == MENU_BACK) {
_global.where = "Main";
Key.removeListener(keyListener);
this._parent.play();
} else if (this.id == MENU_MUSIC_CONTROL) {
if (!this.dragged) {
startDrag (this, true, BASE_X, this._y, BASE_X_MAX, this._y);
this.dragged = true;
}
} else if (this.id == MENU_SOUND_CONTROL) {
if (!this.dragged) {
startDrag (this, true, BASE_X, this._y, BASE_X_MAX, this._y);
this.dragged = true;
}
}
}
function MenuOptions_OnTerminate() {
var _local4 = Math.abs(BASE_X - this._x);
var _local3 = Math.floor((_local4 * 100) / 116);
_global.ubunsound.Play(0, false);
if (this.id == MENU_MUSIC_CONTROL) {
_global.ubunsound.SetMusicVolume(_local3);
} else if (this.id == MENU_SOUND_CONTROL) {
_global.ubunsound.SetSFXVolume(_local3);
}
this.stopDrag();
this.dragged = false;
}
function MenuOptions_OnRollOver() {
_global.ubunsound.Play(1, false);
this.gotoAndStop(2);
}
function MenuOptions_OnRollOut() {
this.gotoAndStop(1);
}
function MenuOptions_CheckDefaults() {
if (!opciones_mc.back_mc.onRelease) {
opciones_mc.back_mc.id = MENU_BACK;
opciones_mc.back_mc.onRelease = MenuOptions_OnRelease;
opciones_mc.back_mc.onRollOver = MenuOptions_OnRollOver;
opciones_mc.back_mc.onRollOut = MenuOptions_OnRollOut;
}
if (!opciones_mc.panel_mc.musica_mc.onPress) {
opciones_mc.panel_mc.musica_mc.id = MENU_MUSIC_CONTROL;
opciones_mc.panel_mc.musica_mc.onPress = MenuOptions_OnRelease;
opciones_mc.panel_mc.musica_mc.onRelease = MenuOptions_OnTerminate;
opciones_mc.panel_mc.musica_mc.onReleaseOutside = MenuOptions_OnTerminate;
opciones_mc.panel_mc.musica_mc.onRollOver = MenuOptions_OnRollOver;
opciones_mc.panel_mc.musica_mc.onRollOut = MenuOptions_OnRollOut;
var _local3 = (_global.ubunsound_bkg_volumen * BASE_TOTAL) / 100;
opciones_mc.panel_mc.musica_mc._x = BASE_X + _local3;
}
if (!opciones_mc.panel_mc.sonido_mc.onPress) {
opciones_mc.panel_mc.sonido_mc.id = MENU_SOUND_CONTROL;
opciones_mc.panel_mc.sonido_mc.onPress = MenuOptions_OnRelease;
opciones_mc.panel_mc.sonido_mc.onRelease = MenuOptions_OnTerminate;
opciones_mc.panel_mc.sonido_mc.onReleaseOutside = MenuOptions_OnTerminate;
opciones_mc.panel_mc.sonido_mc.onRollOver = MenuOptions_OnRollOver;
opciones_mc.panel_mc.sonido_mc.onRollOut = MenuOptions_OnRollOut;
var _local2 = (_global.ubunsound_sfx_volumen * BASE_TOTAL) / 100;
opciones_mc.panel_mc.sonido_mc._x = BASE_X + _local2;
}
}
function MainMenu_HandleKeyboard() {
if (!focusOn) {
if (keyListener.UP || (keyListener.DOWN)) {
focusOn = opciones_mc.back_mc;
focusOn.onRollOver();
}
return(undefined);
}
var _local1 = focusOn;
if (focusOn.id == MENU_BACK) {
if (keyListener.UP) {
focusOn = opciones_mc.panel_mc.sonido_mc;
} else if (keyListener.DOWN) {
focusOn = opciones_mc.panel_mc.musica_mc;
} else if (keyListener.SPACE) {
focusOn.onRelease();
}
} else if (focusOn.id == MENU_MUSIC_CONTROL) {
if (keyListener.UP) {
focusOn = opciones_mc.back_mc;
} else if (keyListener.DOWN) {
focusOn = opciones_mc.panel_mc.sonido_mc;
}
if (Key.isDown(37)) {
focusOn._x = focusOn._x - SLIDER_STEP;
if (focusOn._x < BASE_X) {
focusOn._x = BASE_X;
}
focusOn.onRelease();
} else if (Key.isDown(39)) {
focusOn._x = focusOn._x + SLIDER_STEP;
if (focusOn._x > BASE_X_MAX) {
focusOn._x = BASE_X_MAX;
}
focusOn.onRelease();
}
} else if (focusOn.id == MENU_SOUND_CONTROL) {
if (keyListener.UP) {
focusOn = opciones_mc.panel_mc.musica_mc;
} else if (keyListener.DOWN) {
focusOn = opciones_mc.back_mc;
}
if (Key.isDown(37)) {
focusOn._x = focusOn._x - SLIDER_STEP;
if (focusOn._x < BASE_X) {
focusOn._x = BASE_X;
}
focusOn.onRelease();
} else if (Key.isDown(39)) {
focusOn._x = focusOn._x + SLIDER_STEP;
if (focusOn._x > BASE_X_MAX) {
focusOn._x = BASE_X_MAX;
}
focusOn.onRelease();
}
}
if (_local1 != focusOn) {
_local1.onRollOut();
focusOn.onRollOver();
}
}
MENU_BACK = 0;
MENU_MUSIC_CONTROL = 1;
MENU_SOUND_CONTROL = 2;
BASE_X = -53;
BASE_X_MAX = 63;
BASE_TOTAL = Math.abs(BASE_X - BASE_X_MAX);
SLIDER_STEP = 4;
var keyListener = new Object();
keyListener.UP = false;
keyListener.DOWN = false;
keyListener.SPACE = false;
keyListener.onKeyUp = mainmenu_KeyUp;
Key.addListener(keyListener);
var focusOn = null;
this.onEnterFrame = function () {
MenuOptions_CheckDefaults();
MainMenu_HandleKeyboard();
keyListener.UP = false;
keyListener.DOWN = false;
keyListener.SPACE = false;
};
stop();
Symbol 145 MovieClip Frame 20
function InstMenu_KeyUp() {
this.UP = Key.getCode() == 38;
this.DOWN = Key.getCode() == 40;
this.SPACE = Key.getCode() == 32;
}
function InstMenu_OnRelease() {
_global.ubunsound.Play(0, false);
if (this.id == MENU_BACK) {
_global.where = "Main";
this._parent.play();
}
Key.removeListener(keyListener);
}
function InstMenu_OnRollOver() {
_global.ubunsound.Play(1, false);
if (focusOn != this) {
focusOn.gotoAndStop(1);
}
focusOn = this;
this.gotoAndStop(2);
}
function InstMenu_OnRollOut() {
this.gotoAndStop(1);
}
function InstMenu_CheckDefaults() {
if (!Mnu_Ins_MC.back_mc.onRelease) {
Mnu_Ins_MC.back_mc.id = MENU_BACK;
Mnu_Ins_MC.back_mc.onRelease = InstMenu_OnRelease;
Mnu_Ins_MC.back_mc.onRollOver = InstMenu_OnRollOver;
Mnu_Ins_MC.back_mc.onRollOut = InstMenu_OnRollOut;
}
}
function InstMenu_HandleKeyboard() {
if (!focusOn) {
if (keyListener.UP || (keyListener.DOWN)) {
focusOn = Mnu_Ins_MC.back_mc;
focusOn.onRollOver();
}
return(undefined);
}
var _local1 = focusOn;
if (focusOn.id == MENU_BACK) {
if (keyListener.SPACE) {
focusOn.onRelease();
}
}
if (_local1 != focusOn) {
_local1.onRollOut();
focusOn.onRollOver();
}
}
MENU_BACK = 0;
var keyListener = new Object();
keyListener.UP = false;
keyListener.DOWN = false;
keyListener.SPACE = false;
keyListener.onKeyUp = mainmenu_KeyUp;
Key.addListener(keyListener);
var focusOn = null;
this.onEnterFrame = function () {
InstMenu_HandleKeyboard();
InstMenu_CheckDefaults();
keyListener.UP = false;
keyListener.DOWN = false;
keyListener.SPACE = false;
};
stop();
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 5
stop();
Symbol 278 MovieClip Frame 6
gotoAndPlay (1);
Symbol 278 MovieClip Frame 8
stop();
Symbol 278 MovieClip Frame 10
stop();
Symbol 302 MovieClip Frame 10
stop();
Symbol 304 MovieClip Frame 5
stop();
Symbol 323 MovieClip Frame 60
stop();
Symbol 324 MovieClip Frame 1
stop();
Symbol 324 MovieClip Frame 2
stop();
Symbol 324 MovieClip Frame 3
stop();
Symbol 324 MovieClip Frame 4
stop();
Symbol 324 MovieClip Frame 5
stop();
Symbol 324 MovieClip Frame 6
stop();
Symbol 324 MovieClip Frame 7
stop();
Symbol 324 MovieClip Frame 8
stop();
Symbol 341 MovieClip Frame 1
stop();
Symbol 341 MovieClip Frame 2
stop();
Symbol 346 MovieClip Frame 1
stop();
Symbol 346 MovieClip Frame 2
stop();
Symbol 351 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 2
stop();
Symbol 360 MovieClip Frame 41
stop();
Symbol 360 MovieClip Frame 81
stop();
Symbol 361 MovieClip Frame 1
function buildLevel(parent) {
var _local2 = parent;
var _local1 = 2;
_local2.spacebetween = new Array(200, 200, 200, 200, 350, 350, 200, 200, 300, 200, 200, 200, 200, 0, 0);
_local2.checkpoints[0] = 0;
while (_local1 < 15) {
_local2["block" + _local1]._x = (_local2["block" + (_local1 - 1)]._x + _local2["block" + (_local1 - 1)]._width) + _local2.spacebetween[_local1 - 1];
ground_bitmap["block" + _local1]._x = _local2["block" + _local1]._x;
_local2.checkpoints[_local1 - 1] = -_local2["block" + _local1]._x;
if ((_local1 - 1) == 6) {
_local2.checkpoints[_local1 - 1] = (-_local2["block" + _local1]._x) + 100;
}
if (_local1 == 6) {
ground_bitmap.item._x = _local2["block" + _local1]._x - 215;
ground_bitmap.item._y = 265;
}
_local1++;
}
}
function showlives() {
lives_txt.text = lives;
}
function Generic_Input(type) {
var _local3 = Math.abs;
if (ground._actor) {
this.dx = this.dx + 0.3;
mydir = 1;
accelerating = true;
return(undefined);
}
if (bmx_jl.foul_time > frameMeter.ticks) {
if (type == INPUT_WHEEL) {
this.dx = 0;
}
return(undefined);
}
accelerating = true;
if (!inst_done) {
if (type == INPUT_WHEEL) {
if (inst_right && (oneOnGround)) {
this.dx = this.dx + WHEEL_ACC;
mydir = 1;
} else if (inst_left && (oneOnGround)) {
this.dx = this.dx - WHEEL_ACC;
mydir = -1;
} else if (((!(inst_right && (inst_left))) && (oneOnGround)) && (_local3(this.dx) < WHEEL_ACC)) {
this.dx = WHEEL_ACC;
mydir = 1;
}
} else if (type == INPUT_BIKE) {
if (inst_jump && (oneOnGround)) {
if (mydir == -1) {
wheel0.dy = -11;
wheel1.dy = -10;
} else {
wheel0.dy = -10;
wheel1.dy = -11;
}
bmx_jl.jumping = true;
controlKeyDown = true;
}
}
return(undefined);
}
if (type == INPUT_WHEEL) {
if (keyboard_control.RIGHT && (oneOnGround)) {
this.dx = this.dx + WHEEL_ACC;
mydir = 1;
} else if (keyboard_control.LEFT && (oneOnGround)) {
this.dx = this.dx - WHEEL_ACC;
mydir = -1;
} else if (((!(keyboard_control.RIGHT && (keyboard_control.LEFT))) && (oneOnGround)) && (_local3(this.dx) < WHEEL_ACC)) {
this.dx = WHEEL_ACC;
mydir = 1;
}
} else if (type == INPUT_BIKE) {
if (!controlKeyDown) {
if (keyboard_control.UP && (oneOnGround)) {
if (mydir == -1) {
wheel0.dy = -11;
wheel1.dy = -10;
} else {
wheel0.dy = -10;
wheel1.dy = -11;
}
bmx_jl.jumping = true;
controlKeyDown = true;
}
} else if (!keyboard_control.UP) {
controlKeyDown = false;
}
}
}
function Wheel_Update() {
var _local4 = Math.abs;
this._y = this._y + this.dy;
accelerating = false;
this.UpdateInput(INPUT_WHEEL);
if (oneOnGround) {
this.dx = this.dx * WORLD_FRICTION;
}
this.dy = this.dy + WORLD_GRAVITY;
if (ground.hitTest(this._x, this._y + this.dy, true)) {
var _local2 = this._y + this.dy;
var _local3 = 0;
bmx_jl.jumping = false;
while (ground.hitTest(this._x, _local2, true)) {
_local2--;
_local3++;
}
if (_local3 > 70) {
wheel0.dx = wheel0.dx * -1;
wheel1.dx = wheel1.dx * -1;
ground._x = ground._x - this.dx;
} else {
if (_local3 < 5) {
_local3 = 0;
}
this._y = _local2;
this.dy = this.dy + ((-_local3) / 4);
this.onGround = true;
}
this.speed = this.dx;
} else {
this.onGround = false;
if (this.speed > 0.5) {
this.speed = this.speed - 0.01;
} else if (this.speed < -0.5) {
this.speed = this.speed + 0.01;
} else {
this.speed = 0;
}
}
if (this.dy > 15) {
this.dy = 15;
} else if (this.dy < -15) {
this.dy = -15;
}
}
function Terrain_Update(parent) {
ground_bitmap._x = this._x;
ground_bitmap._y = this._y;
if (this._actor && (this._real)) {
return(undefined);
}
var _local3 = 1;
var _local4 = new Object();
while (_local3 < 15) {
_local4.x = 0;
_local4.y = 0;
this["block" + _local3].localToGlobal(_local4);
if ((_local4.x > 600) || ((_local4.x + this["block" + _local3]._width) < 0)) {
this["block" + _local3]._visible = false;
} else {
this["block" + _local3]._visible = true;
}
_local3++;
}
if (!this._actor) {
this._x = this._x - wheel1.dx;
}
var _local6 = ((-this._x) / this._width) * 600;
var _local5 = Math.floor((_local6 * 100) / 600);
if (_local5 < 1) {
_local5 = 1;
} else if (_local5 > 100) {
_local5 = 100;
}
interface.distance_mc.gotoAndStop(_local5);
if (this._x < this.checkpoints[this.checkpoint + 1]) {
this.checkpoint++;
if (this.checkpoint > this.checkpoints.length) {
this.checkpoint = this.checkpoints.length;
}
}
if (this._x > 0) {
this._x = 0;
wheel1.dx = 0;
wheel0.dx = 0;
}
if ((clock_complete.done && (clock_complete.minutes <= 0)) && (clock_complete.seconds <= 0)) {
locked2 = true;
return(false);
}
if (wheel1._y > 600) {
if (lives == 0) {
delete wheel0.Update;
delete wheel1.Update;
delete this.Update;
delete bmx_jl.Update;
_global.reason = "life";
parent._parent.gotoAndStop("lose");
return(false);
}
wheel1._y = 100;
wheel1.dx = 0;
wheel1.dy = 0;
wheel0._y = 100;
wheel0.dx = 0;
wheel0.dy = 0;
this._x = this.checkpoints[this.checkpoint];
bmx_jl.WasteTime();
if (PLAYER_HAS_LIFES) {
lives--;
}
showlives();
}
if ((-this._x) > (this._width - 1850)) {
trace((("time " + clock_record.minutes) + ":") + clock_record.seconds);
this._actor = true;
this._gettinok = true;
trace("actor mode");
}
}
function Rock_Update(parent) {
if (this.colbox.hitTest(this.player.colbox)) {
this.player.Pain(this, WORLD_DAMAGE);
}
}
function Item_TimeUpdate(parent) {
if (this._currentframe != 1) {
return(undefined);
}
if (this.hitTest(this.player)) {
clock_complete.seconds = clock_complete.seconds + 45;
if (clock_complete.seconds > 59) {
clock_complete.minutes++;
clock_complete.seconds = clock_complete.seconds - 59;
if (clock_complete.seconds < 0) {
clock_complete.seconds = 0;
}
}
_global.ubunsound.Play(SFX_ITEM, false);
interface.flick = getTimer() + 200;
this.play();
}
}
function Bike_Update(parent) {
var _local4 = Math.abs;
var _local10 = Math.round;
var _local14 = Math.atan2;
var _local17 = Math.sqrt;
var _local8 = Math.cos;
var _local12 = Math.sin;
this._alpha = 100;
if (!this.jumping) {
var _local16 = _global.ubunsound_sfx_volumen;
var _local15 = _local4(wheel1.dx);
var _local5 = (_local15 * _local16) / 19;
_local5 = _local5 + 60;
if (_local5 > 100) {
_local5 = 100;
}
_global.ubunsound.SetIndividualVolume(SFX_LOOP, _local5);
}
if (ground._actor && (ground._real)) {
if (keyboard_control.RIGHT || (keyboard_control.LEFT)) {
if (this.pedal_time < frameMeter.ticks) {
this.pedal = this.pedal + 1;
if (this.pedal > PLAYER_PEDAL_MAX) {
this.pedal = 1;
} else if (this.pedal < 1) {
this.pedal = PLAYER_PEDAL_MAX;
}
this.pose.mda._rotation = this.pedal * 18;
this.pose.atras._rotation = this.pose.atras._rotation + wheel1.speed;
this.pose.adelante._rotation = this.pose.adelante._rotation + wheel0.speed;
this.pedal_time = frameMeter.ticks + PLAYER_PEDAL_TIME;
}
}
if (_local4(wheel1.dx) > 5) {
if (this.hcontroller_time < frameMeter.ticks) {
this.hcontroller = this.hcontroller + ((wheel1.dx > 0) ? 1 : -1);
if (this.hcontroller > 6) {
this.hcontroller = 1;
} else if (this.hcontroller < 0) {
this.hcontroller = 6;
}
this.hcontroller_time = frameMeter.ticks + PLAYER_HAIR_TIME;
}
if (wheel1.dx < 0) {
this.pose.hair.gotoAndStop(9);
} else {
this.pose.hair.gotoAndStop(this.hcontroller);
}
} else {
this.pose.hair.gotoAndStop(7);
}
if (this.paintimer > frameMeter.ticks) {
this.gotoAndStop(ANIM_PLAYER_WALK_HIT);
} else {
this.gotoAndStop(ANIM_PLAYER_WALK);
}
this.pose.gotoAndStop(this.pedal);
this.Scroll();
return(undefined);
}
Generic_Input(INPUT_BIKE);
var _local13 = (wheel1._y + wheel0._y) / 2;
var _local11 = this._y;
this._x = 189.1;
this._y = _local10(_local13);
var _local7 = wheel1._x - wheel0._x;
var _local6 = wheel1._y - wheel0._y;
var _local3 = _local14(_local6, _local7);
var _local9 = 180 * (_local3 / Math.PI);
if (_local4(_local9 - this._rotation) > 3) {
this._rotation = _local10(_local9);
}
allOnGround = wheel0.onGround & wheel1.onGround;
oneOnGround = wheel0.onGround | wheel1.onGround;
if ((allOnGround && (!accelerating)) && ((_local3 < -0.1) || (_local3 > 0.1))) {
wheel0.dx = wheel0.dx + (_local3 / 2);
wheel1.dx = wheel1.dx + (_local3 / 2);
}
if (_local3 < -1.4) {
_local3 = -1.4;
}
if (_local3 > 1.4) {
_local3 = 1.4;
}
var _local18 = _local17((_local7 * _local7) + (_local6 * _local6));
wheel0._x = this._x - (_local8(_local3) * 35);
wheel0._y = this._y - (_local12(_local3) * 35);
wheel1._x = this._x + (_local8(_local3) * 40);
wheel1._y = this._y + (_local12(_local3) * 40);
this._y = this._y - 20;
if (_local4(this._y - _local11) < 2) {
this._y = _local11;
}
if ((this.paintimer < frameMeter.ticks) && (this.paintimer != 0)) {
this.paintimer = 0;
this.ignoretimer = frameMeter.ticks + PLAYER_IGNORE_TIME;
} else if (!this.jumping) {
if (this.foul_time < frameMeter.ticks) {
if (!inst_done) {
if (inst_right || (inst_left)) {
if (this.pedal_time < frameMeter.ticks) {
if (wheel1.dx > 0) {
this.pedal++;
} else {
this.pedal--;
}
if (this.pedal > PLAYER_PEDAL_MAX) {
this.pedal = 1;
} else if (this.pedal < 1) {
this.pedal = PLAYER_PEDAL_MAX;
}
this.pose.mda._rotation = this.pedal * 18;
this.pedal_time = frameMeter.ticks + PLAYER_PEDAL_TIME;
}
}
} else if (keyboard_control.RIGHT || (keyboard_control.LEFT)) {
if (this.pedal_time < frameMeter.ticks) {
if (wheel1.dx > 0) {
this.pedal++;
} else {
this.pedal--;
}
if (this.pedal > PLAYER_PEDAL_MAX) {
this.pedal = 1;
} else if (this.pedal < 1) {
this.pedal = PLAYER_PEDAL_MAX;
}
this.pose.mda._rotation = this.pedal * 18;
this.pedal_time = frameMeter.ticks + PLAYER_PEDAL_TIME;
}
}
}
if (_local4(wheel1.dx) > 5) {
if (this.hcontroller_time < frameMeter.ticks) {
this.hcontroller = this.hcontroller + ((wheel1.dx > 0) ? 1 : -1);
if (this.hcontroller > 6) {
this.hcontroller = 1;
} else if (this.hcontroller < 0) {
this.hcontroller = 6;
}
this.hcontroller_time = frameMeter.ticks + PLAYER_HAIR_TIME;
}
if (wheel1.dx < 0) {
this.pose.hair.gotoAndStop(9);
} else {
this.pose.hair.gotoAndStop(this.hcontroller);
}
} else {
this.pose.hair.gotoAndStop(7);
}
if (this.paintimer > frameMeter.ticks) {
this.gotoAndStop(ANIM_PLAYER_WALK_HIT);
} else {
this.gotoAndStop(ANIM_PLAYER_WALK);
}
this.pose.gotoAndStop(this.pedal);
} else if (((this._currentframe != ANIM_PLAYER_JUMP_PRE) || (this._currentframe != ANIM_PLAYER_JUMP)) || (this._currentframe != ANIM_PLAYER_JUMP_POST)) {
this.gotoAndStop(ANIM_PLAYER_JUMP_PRE);
}
if ((this.paintimer > frameMeter.ticks) || (this.ignoretimer > frameMeter.ticks)) {
this._alpha = (this.flicklast ? 100 : 0);
if (this.flicktimer < frameMeter.ticks) {
this.flicklast = !this.flicklast;
this.flicktimer = frameMeter.ticks + PLAYER_FLICK_TIME;
}
} else if (bmx_jl.life <= 0) {
_global.reason = "life";
self._parent.gotoAndStop("lose");
return(undefined);
}
this.pose.atras._rotation = this.pose.atras._rotation + wheel1.speed;
this.pose.adelante._rotation = this.pose.adelante._rotation + wheel0.speed;
this.Update_Hud();
this.Scroll();
wheel2._x = this._x;
wheel2._y = this._y + 10;
}
function Bike_Pain(inflictor, quantity) {
if ((this.paintimer > frameMeter.ticks) || (this.ignoretimer > frameMeter.ticks)) {
return(undefined);
}
this.paintimer = frameMeter.ticks + PLAYER_PAIN_TIME;
var _local3 = new Object();
_local3.x = 0;
_local3.y = 0;
inflictor.localToGlobal(_local3);
if (_local3.x > this._x) {
wheel1.dx = -5;
} else {
wheel1.dx = 5;
}
wheel1.dy = -8;
wheel0.dy = -8;
_global.ubunsound.Play(SFX_HIT, false);
this.life = this.life - (quantity * 0.22);
this.Update_Hud();
}
function Bike_Scroll() {
bkg_0._x = bkg_0._x - (wheel1.dx * 0.01);
bkg_1._x = bkg_1._x - (wheel1.dx * 0.04);
bkg_3._x = bkg_3._x - (wheel1.dx * 2);
if (bkg_0._x <= (-(bkg_0._width / 2))) {
bkg_0._x = bkg_0._x + (bkg_0._width / 2);
}
if (bkg_1._x <= (-(bkg_1._width / 2))) {
bkg_1._x = bkg_1._x + (bkg_1._width / 2);
}
if (bkg_3._x <= (-(bkg_3._width / 2))) {
bkg_3._x = bkg_3._x + (bkg_3._width / 2);
}
if (bkg_0._x > 0) {
bkg_0._x = bkg_0._x - (bkg_0._width / 2);
}
if (bkg_1._x > 0) {
bkg_1._x = bkg_1._x - (bkg_1._width / 2);
}
if (bkg_3._x > 0) {
bkg_3._x = bkg_3._x - (bkg_3._width / 2);
}
}
function Bike_UpdateHud() {
var _local3 = Math.abs(this.life_inter - this.life) * 0.2;
this.life_inter = this.life_inter - _local3;
this.bar._width = this.life_inter;
var _local2 = Math.floor((this.life_inter * 100) / PLAYER_LIFE);
if (_local2 == 100) {
_local2 = 99;
}
interface.juniperlee_mc.life_mc.gotoAndStop(100 - _local2);
}
function Bike_WasteOfTime() {
this.foul_time = frameMeter.ticks + (PLAYER_PAIN_TIME * 2);
this.paintimer = frameMeter.ticks + (PLAYER_PAIN_TIME * 2);
clock_complete.seconds = clock_complete.seconds - 10;
if (clock_complete.seconds < 0) {
if (clock_complete.minutes > 0) {
clock_complete.minutes--;
clock_complete.seconds = 59;
} else {
clock_complete.seconds = 0;
}
}
}
function Update_MainClock() {
if (!inst_done) {
return(undefined);
}
clock_complete.Update();
if (_global.juniperlee.god_mode.done) {
clock_complete.minutes = 1;
clock_complete.seconds = 0;
}
var _local3 = clock_complete.minutes.toString();
var _local2 = ((clock_complete.seconds < 10) ? ("0" + clock_complete.seconds.toString()) : (clock_complete.seconds.toString()));
interface.time_mc.time_txt.text = (_local3 + ":") + _local2;
if (interface.flick < getTimer()) {
interface.time_mc.setRGBA(0, 0, 0, 0);
} else {
interface.time_mc.setRGBA(255, 255, 255, 0);
}
}
function Clock_SecondComplete() {
var _local3 = clock_complete.minutes.toString();
var _local2 = ((clock_complete.seconds < 10) ? ("0" + clock_complete.seconds.toString()) : (clock_complete.seconds.toString()));
if ((_local3 > 0) || (_local2 > 11)) {
return(undefined);
}
_global.ubunsound.Play(4, false);
interface.flick = getTimer() + 200;
}
function Update_GaugeControls() {
var _local2 = Math.abs(wheel1.dx);
var _local3 = (_local2 * 250) / 14;
var _local1 = Math.round((_local2 * 29) / 14);
meter.txt.text = ((_local1 < 10) ? ("0" + _local1.toString()) : (_local1.toString())) + "KH";
meter.gauge._rotation = _local3;
}
function Update_Actor() {
if (!ground._actor) {
return(undefined);
}
ground._visible = false;
ground._x = ground._x - 15;
if (((!ground.hitTest(wheel1._x, wheel1._y + 3, true)) || (!ground.hitTest(wheel0._x, wheel0._y + 3, true))) || (!ground.hitTest(wheel2._x, wheel2._y + 16, true))) {
return(undefined);
}
ground._real = true;
keyboard_control.LEFT = true;
if (bmx_jl._x < 650) {
bmx_jl._x = bmx_jl._x + 5;
} else {
trace((("record time " + clock_record.minutes) + ":") + clock_record.seconds);
if (trans_1_mc._currentframe == 1) {
trans_1_mc.gotoAndPlay(2);
locked = true;
}
}
}
function Center_Bike_Update() {
if (ground.hitTest(this._x, this._y, true)) {
var _local2 = this._y;
var _local4 = this._y;
var _local3 = 0;
while (ground.hitTest(this._x, _local2, true)) {
_local2--;
_local3++;
}
if (_local3 > 70) {
wheel0.dx = wheel0.dx * -1;
wheel1.dx = wheel1.dx * -1;
ground._x = ground._x - this.dx;
} else {
if (_local3 < 5) {
_local3 = 0;
}
if (wheel0._y > wheel1._y) {
wheel0._y = wheel0._y - (_local4 - _local2);
wheel0.dy = 0;
} else {
wheel1._y = wheel1._y - (_local4 - _local2);
wheel1.dy = 0;
}
this._y = _local2;
this.dy = this.dy + ((-_local3) / 4);
this.onGround = true;
}
} else {
this.onGround = false;
if (this.speed > 0.5) {
this.speed = this.speed - 0.01;
} else if (this.speed < -0.5) {
this.speed = this.speed + 0.01;
} else {
this.speed = 0;
}
}
}
function Game_Init() {
controlKeyDown = false;
lives = 10;
showlives();
delete keyboard_control;
keyboard_control = new _global.ubundata.root.CInput();
delete clock_record;
clock_record = new _global.ubundata.root.CUbunClock(0, 0, 1);
delete clock_complete;
clock_complete = new _global.ubundata.root.CUbunClock(0, 45, -1, Clock_SecondComplete);
delete frameMeter;
frameMeter = new _global.ubundata.root.CFrameModel(40);
accelerating = false;
restore = false;
can_do_actor = false;
bmx_jl.life = PLAYER_LIFE;
bmx_jl.life_inter = PLAYER_LIFE;
bmx_jl.bar = life_bar;
bmx_jl.Update = Bike_Update;
bmx_jl.Update_Hud = Bike_UpdateHud;
bmx_jl.Pain = Bike_Pain;
bmx_jl.WasteTime = Bike_WasteOfTime;
bmx_jl.Scroll = Bike_Scroll;
bmx_jl.jumping = false;
bmx_jl.paintimer = 0;
bmx_jl.ignoretimer = 0;
bmx_jl.flicktimer = 0;
bmx_jl.flicklast = false;
bmx_jl.pedal = 1;
bmx_jl.pedal_time = 0;
bmx_jl.hcontroller = 1;
bmx_jl.hcontroller_time = 0;
bmx_jl.foul_time = 0;
bmx_jl._x = bmx_jl.ox;
bmx_jl._y = bmx_jl.oy;
wheel1.code = 1;
wheel1.dx = 0;
wheel1.dy = 0;
wheel1.speed = 0;
wheel1.Update = Wheel_Update;
wheel1.UpdateInput = Generic_Input;
wheel1._visible = false;
wheel1._x = wheel1.ox;
wheel1._y = wheel1.oy;
wheel0.code = 0;
wheel0.dx = 0;
wheel0.dy = 0;
wheel0.speed = 0;
wheel0.Update = Wheel_Update;
wheel0.UpdateInput = Generic_Input;
wheel0._visible = false;
wheel0._x = wheel0.ox;
wheel0._y = wheel0.oy;
wheel2.code = 0;
wheel2.dx = 0;
wheel2.dy = 0;
wheel2.speed = 0;
wheel2.Update = Center_Bike_Update;
wheel2._visible = false;
wheel2._x = wheel2.ox;
wheel2._y = wheel2.oy;
ground.spacebetween = null;
ground.checkpoint = 0;
ground.checkpoints = new Array();
buildLevel(ground);
ground.Update = Terrain_Update;
ground._gettinok = false;
ground._x = 0;
ground._y = -185;
ground._actor = false;
ground._real = false;
ground._visible = false;
ground.block1.ob1.Update = Rock_Update;
ground.block1.ob1.player = bmx_jl;
ground.block6.ob1.Update = Rock_Update;
ground.block6.ob1.player = bmx_jl;
ground.block10.ob1.Update = Rock_Update;
ground.block10.ob1.player = bmx_jl;
ground.block13.ob1.Update = Rock_Update;
ground.block13.ob1.player = bmx_jl;
ground.block3.ob1.Update = Rock_Update;
ground.block3.ob1.player = bmx_jl;
ground.block4.ob1.Update = Rock_Update;
ground.block4.ob1.player = bmx_jl;
ground.block5.ob1.Update = Rock_Update;
ground.block5.ob1.player = bmx_jl;
ground.block6.ob2.Update = Rock_Update;
ground.block6.ob2.player = bmx_jl;
ground.block7.ob1.Update = Rock_Update;
ground.block7.ob1.player = bmx_jl;
ground.block10.ob2.Update = Rock_Update;
ground.block10.ob2.player = bmx_jl;
ground_bitmap.item.Update = Item_TimeUpdate;
ground_bitmap.item.player = bmx_jl;
interface.timer = 0;
interface.flick = 0;
frameMeter.Add(wheel0);
frameMeter.Add(wheel1);
frameMeter.Add(wheel2);
frameMeter.Add(bmx_jl);
frameMeter.Add(ground);
frameMeter.Add(ground.block1.ob1);
frameMeter.Add(ground.block6.ob1);
frameMeter.Add(ground.block10.ob1);
frameMeter.Add(ground.block10.ob2);
frameMeter.Add(ground.block13.ob1);
frameMeter.Add(ground.block3.ob1);
frameMeter.Add(ground.block4.ob1);
frameMeter.Add(ground.block5.ob1);
frameMeter.Add(ground.block6.ob2);
frameMeter.Add(ground_bitmap.item);
}
function Inst_Init(mc) {
mc.onEnterFrame = Inst_Update;
}
function Inst_Update() {
if (this._currentframe == 40) {
frameMeter.ticks = 0;
}
if (this._currentframe == 41) {
if (Key.isDown(32)) {
inst_left = false;
inst_right = false;
inst_jump = false;
inst_mc.play();
}
if (inst_sequence[inst_index] != this.btns_mc.btn_right) {
this.btns_mc.btn_right.gotoAndStop(1);
inst_right = false;
} else {
inst_right = true;
}
if (inst_sequence[inst_index] != this.btns_mc.btn_left) {
this.btns_mc.btn_left.gotoAndStop(1);
inst_left = false;
} else {
inst_left = true;
}
if (inst_sequence[inst_index] != this.btns_mc.btn_up) {
this.btns_mc.btn_up.gotoAndStop(1);
inst_jump = false;
}
inst_sequence[inst_index].gotoAndStop(inst_flick_intance);
if (inst_flick_timer < frameMeter.ticks) {
if (inst_flick_intance == 1) {
if (inst_sequence[inst_index] == this.btns_mc.btn_up) {
inst_jump = true;
}
inst_flick_intance = 2;
} else {
if (inst_sequence[inst_index] == this.btns_mc.btn_up) {
inst_jump = false;
}
inst_flick_intance = 1;
}
inst_flick_timer = frameMeter.ticks + INST_FLICK_TIMER;
}
if (inst_timer < frameMeter.ticks) {
inst_index++;
if (inst_sequence[inst_index] == undefined) {
inst_index = 0;
inst_timer = frameMeter.ticks + inst_sequence_timer[inst_index];
inst_left = false;
inst_right = false;
inst_jump = false;
} else {
inst_timer = frameMeter.ticks + inst_sequence_timer[inst_index];
}
}
} else if (this._currentframe == 80) {
inst_left = false;
inst_right = false;
inst_jump = false;
Game_Init();
} else if (this._currentframe == 81) {
inst_done = true;
}
}
WORLD_FRICTION = 0.969;
WORLD_GRAVITY = 0.5;
WORLD_DAMAGE = 200;
WORLD_SPACE_BETWEEN_BLOCKS = 200;
INPUT_WHEEL = 0;
INPUT_BIKE = 1;
WHEEL_ACC = 0.3;
ANIM_PLAYER_IDLE = 1;
ANIM_PLAYER_IDLE_HIT = 2;
ANIM_PLAYER_WALK = 3;
ANIM_PLAYER_WALK_HIT = 4;
ANIM_PLAYER_JUMP_PRE = 5;
ANIM_PLAYER_JUMP = 6;
ANIM_PLAYER_JUMP_POST = 7;
ANIM_PLAYER_PAIN = 8;
PLAYER_LIFE = 300;
PLAYER_PAIN_TIME = 500;
PLAYER_IGNORE_TIME = 30;
PLAYER_FLICK_TIME = 2;
PLAYER_PEDAL_MAX = 20;
PLAYER_PEDAL_TIME = 20;
PLAYER_HAIR_TIME = 20;
PLAYER_HAS_LIFES = false;
SFX_HIT = 0;
SFX_LOOP = 1;
SFX_ITEM = 2;
var self = this;
_global.menu_trans = true;
var interface = this._parent.inteface_mc;
var controls = this._parent.controls_mc;
interface.gotoAndStop(1);
interface._alpha = 0;
controls._alpha = 0;
var controlKeyDown = false;
var lives = 10;
showlives();
var keyboard_control = (new _global.ubundata.root.CInput());
var clock_record = (new _global.ubundata.root.CUbunClock(0, 0, 1));
var clock_complete = (new _global.ubundata.root.CUbunClock(0, 45, -1, Clock_SecondComplete));
var frameMeter = (new _global.ubundata.root.CFrameModel(40));
var accelerating = false;
var restore = false;
var can_do_actor = false;
var locked = false;
var locked2 = false;
bmx_jl.ox = bmx_jl._x;
bmx_jl.oy = bmx_jl._y;
wheel1.ox = wheel1._x;
wheel1.oy = wheel1._y;
wheel0.ox = wheel0._x;
wheel0.oy = wheel0._y;
wheel2.ox = wheel2._x;
wheel2.oy = wheel2._y;
bkg_3._x = -300;
INST_TIMER = 2000;
INST_FLICK_TIMER = 200;
var inst_done = false;
var inst_sequence = new Array(inst_mc.btns_mc.btn_right, inst_mc.btns_mc.btn_left, inst_mc.btns_mc.btn_up);
var inst_sequence_timer = new Array(INST_TIMER, INST_TIMER - 500, INST_TIMER / 2);
var inst_index = 0;
var inst_timer = (frameMeter.ticks + INST_TIMER);
var inst_flick_timer = (frameMeter.ticks + INST_FLICK_TIMER);
var inst_flick_intance = 1;
var inst_left = false;
var inst_right = false;
var inst_jump = false;
inst_mc.button_mc.onRelease = function () {
inst_left = false;
inst_right = false;
inst_jump = false;
inst_mc.play();
};
Inst_Init(inst_mc);
Game_Init();
_global.ubunsound.Reset();
_global.ubunsound.Load(SFX_LOOP, "sfx_loopbike");
_global.ubunsound.Load(SFX_HIT, "sfx_bike_hit");
_global.ubunsound.Load(SFX_ITEM, "sfx_item");
_global.ubunsound.Load(3, "sfx_bosque");
_global.ubunsound.Load(4, "sfx_time");
_global.ubunsound.Load(8, "sfx_bici");
_global.ubunsound.Play(8);
_global.ubunsound.Play(SFX_LOOP, true);
_global.ubunsound.Play(3, true);
_global.ubunsound.SetIndividualVolume(3, 10);
_global.ubunsound.SetIndividualVolume(SFX_HIT, 50);
this.onEnterFrame = function () {
Update_Actor();
if (locked) {
if (interface._alpha > 0) {
interface._alpha = interface._alpha - 25;
} else {
interface._alpha = 0;
}
if (trans_1_mc._currentframe == trans_1_mc._totalframes) {
_global.ubundata.checkpoint = "minigame2";
this._parent.gotoAndStop("minigame2");
delete frameMeter;
delete this.onEnterFrame;
return(undefined);
}
}
if (locked2) {
if (interface._alpha > 0) {
interface._alpha = interface._alpha - 25;
} else {
interface._alpha = 0;
}
if (trans_1_mc._currentframe == 1) {
trans_1_mc.gotoAndPlay(2);
} else if (trans_1_mc._currentframe == trans_1_mc._totalframes) {
delete wheel0.Update;
delete wheel1.Update;
delete this.Update;
delete bmx_jl.Update;
_global.reason = "time";
this._parent.gotoAndStop("lose");
}
}
if ((inst_done && (interface._alpha < 100)) && (!locked)) {
interface._alpha = interface._alpha + 25;
controls._alpha = controls._alpha + 25;
if (interface._alpha >= 100) {
interface._alpha = 100;
controls._alpha = 100;
}
}
if (_global.ubundata.paused) {
bmx_jl.pose.pauseMC(true);
restore = true;
} else if (restore) {
bmx_jl.pose.pauseMC(false);
restore = false;
}
frameMeter.Update(this);
fps.text = "FPS " + frameMeter.fps.toString();
if (!ground._actor) {
keyboard_control.Update();
}
if (!_global.ubundata.paused) {
clock_record.Update();
}
if (!_global.ubundata.paused) {
Update_MainClock();
}
Update_GaugeControls();
};
Symbol 368 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 2
stop();
Symbol 374 MovieClip Frame 1
function IGC_Release() {
if (this.id == ID_PAUSE) {
_global.ubundata.paused = !pause_state;
pause_state = !pause_state;
UbunSaveConfig();
} else if (this.id == ID_SND) {
if (!mute_state) {
_global.ubunsound.Mute(true);
} else {
_global.ubunsound.Mute(false);
}
UbunSaveConfig();
mute_state = !mute_state;
_global.ubundata.muted = _global.ubunsound.muted;
}
}
function IGC_OnRollOver() {
}
function IGC_OnRollOut() {
}
ID_SND = 0;
ID_PAUSE = 1;
pause_down = false;
pause_state = _global.ubundata.paused;
mute_down = false;
mute_state = _global.ubundata.muted;
snd_mc.id = ID_SND;
snd_mc.onRelease = IGC_Release;
snd_mc.onRollOver = IGC_OnRollOver;
snd_mc.onRollOut = IGC_OnRollOut;
pause_mc.id = ID_PAUSE;
pause_mc.onRelease = IGC_Release;
pause_mc.onRollOver = IGC_OnRollOver;
pause_mc.onRollOut = IGC_OnRollOut;
this.onEnterFrame = function () {
if (Key.isDown(80)) {
if (!pause_down) {
_global.ubundata.paused = !pause_state;
pause_state = !pause_state;
UbunSaveConfig();
pause_down = true;
}
} else {
pause_down = false;
}
if (Key.isDown(77)) {
if (!mute_down) {
if (!mute_state) {
_global.ubunsound.Mute(true);
} else {
_global.ubunsound.Mute(false);
}
UbunSaveConfig();
mute_state = !mute_state;
mute_down = true;
}
} else {
mute_down = false;
}
if (mute_state) {
snd_mc.gotoAndStop(1);
} else {
snd_mc.gotoAndStop(2);
}
if (!pause_state) {
pause_mc.gotoAndStop(1);
} else {
pause_mc.gotoAndStop(2);
}
};
Symbol 386 MovieClip Frame 100
stop();
Symbol 409 MovieClip Frame 1
stop();
Symbol 409 MovieClip Frame 2
stop();
Symbol 409 MovieClip Frame 3
stop();
Symbol 439 MovieClip Frame 18
stop();
Symbol 443 MovieClip Frame 12
stop();
Symbol 445 MovieClip Frame 12
stop();
Symbol 448 MovieClip Frame 13
stop();
Symbol 449 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 2
stop();
Symbol 449 MovieClip Frame 3
stop();
Symbol 449 MovieClip Frame 4
stop();
Symbol 449 MovieClip Frame 5
stop();
Symbol 449 MovieClip Frame 6
stop();
Symbol 449 MovieClip Frame 7
stop();
Symbol 449 MovieClip Frame 8
stop();
Symbol 449 MovieClip Frame 9
stop();
Symbol 449 MovieClip Frame 10
stop();
Symbol 449 MovieClip Frame 11
stop();
Symbol 449 MovieClip Frame 12
stop();
Symbol 449 MovieClip Frame 13
stop();
Symbol 449 MovieClip Frame 14
stop();
Symbol 452 MovieClip Frame 23
stop();
Symbol 455 MovieClip Frame 21
stop();
Symbol 458 MovieClip Frame 24
stop();
Symbol 459 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 26
stop();
Symbol 461 MovieClip Frame 29
stop();
Symbol 462 MovieClip Frame 30
stop();
Symbol 463 MovieClip Frame 1
stop();
Symbol 483 MovieClip Frame 19
stop();
Symbol 498 MovieClip Frame 23
stop();
Symbol 501 MovieClip Frame 18
stop();
Symbol 506 MovieClip Frame 18
stop();
Symbol 514 MovieClip Frame 19
stop();
Symbol 517 MovieClip Frame 18
stop();
Symbol 518 MovieClip Frame 1
stop();
Symbol 518 MovieClip Frame 2
stop();
Symbol 518 MovieClip Frame 3
stop();
Symbol 518 MovieClip Frame 4
stop();
Symbol 518 MovieClip Frame 5
stop();
Symbol 518 MovieClip Frame 6
stop();
Symbol 518 MovieClip Frame 7
stop();
Symbol 518 MovieClip Frame 8
stop();
Symbol 518 MovieClip Frame 9
stop();
Symbol 518 MovieClip Frame 10
stop();
Symbol 518 MovieClip Frame 11
stop();
Symbol 518 MovieClip Frame 12
stop();
Symbol 518 MovieClip Frame 13
stop();
Symbol 518 MovieClip Frame 14
stop();
Symbol 524 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 50
gotoAndStop (1);
Symbol 537 MovieClip Frame 18
stop();
Symbol 541 MovieClip Frame 12
stop();
Symbol 543 MovieClip Frame 12
stop();
Symbol 546 MovieClip Frame 13
stop();
Symbol 547 MovieClip Frame 1
stop();
Symbol 547 MovieClip Frame 2
stop();
Symbol 547 MovieClip Frame 3
stop();
Symbol 547 MovieClip Frame 4
stop();
Symbol 547 MovieClip Frame 5
stop();
Symbol 547 MovieClip Frame 6
stop();
Symbol 547 MovieClip Frame 7
stop();
Symbol 547 MovieClip Frame 8
stop();
Symbol 547 MovieClip Frame 9
stop();
Symbol 547 MovieClip Frame 10
stop();
Symbol 547 MovieClip Frame 11
stop();
Symbol 547 MovieClip Frame 12
stop();
Symbol 547 MovieClip Frame 13
stop();
Symbol 547 MovieClip Frame 14
stop();
Symbol 555 MovieClip Frame 1
stop();
Symbol 555 MovieClip Frame 10
gotoAndStop (1);
Symbol 561 MovieClip Frame 1
stop();
Symbol 561 MovieClip Frame 5
stop();
Symbol 575 MovieClip Frame 1
stop();
Symbol 575 MovieClip Frame 2
stop();
Symbol 577 MovieClip Frame 45
stop();
Symbol 577 MovieClip Frame 89
stop();
Symbol 578 MovieClip Frame 1
function Boss_Update(parent) {
if (locked || (locked2)) {
return(undefined);
}
var _local6 = Math.abs;
this.state.Update();
this.arms.gotoAndStop(this._currentframe);
if (this.state.state_idle) {
if (this.timer < frameMeter.ticks) {
var _local8 = true;
if (this.health_interpolation < 30) {
_local8 = false;
}
var _local5 = BOSS_ANIM_HIT_SIDE_2;
if (random(100) > 50) {
_local5 = BOSS_ANIM_HIT_SIDE;
}
this.state.state = this.state.ATTACK;
if (this.predict) {
if (((this._parent.player._currentframe == PLAYER_ANIM_LEFT_HEAD) || (this._parent.player._currentframe == PLAYER_ANIM_RIGHT_HEAD)) || (this._parent.player._currentframe == PLAYER_ANIM_NOSE_HEAD)) {
if (random(100) > 50) {
this.gotoAndStop(BOSS_ANIM_HIT_HEAD);
} else {
this.gotoAndStop(_local5);
}
} else if (this._parent.player._currentframe == PLAYER_ANIM_HEAD_NOSE) {
this.gotoAndStop(BOSS_ANIM_HIT_NOSE);
} else if (this._parent.player._currentframe == PLAYER_ANIM_HEAD_LEFT) {
this.gotoAndStop(BOSS_ANIM_HIT_LEFT);
} else if (this._parent.player._currentframe == PLAYER_ANIM_HEAD_RIGHT) {
this.gotoAndStop(BOSS_ANIM_HIT_RIGHT);
} else if (this._parent.player._currentframe == PLAYER_ANIM_IDLE_HEAD) {
if (random(100) > 50) {
this.gotoAndStop(BOSS_ANIM_HIT_SIDE);
} else {
this.gotoAndStop(BOSS_ANIM_HIT_SIDE_2);
}
} else {
trace("cf " + this._parent.player._currentframe);
}
} else if (this._parent.player.pos == PLAYER_POSITION_HEAD) {
if (random(100) > 50) {
this.gotoAndStop(BOSS_ANIM_HIT_HEAD);
} else {
this.gotoAndStop(_local5);
}
} else if (this._parent.player.pos == PLAYER_POSITION_NOSE) {
this.gotoAndStop(BOSS_ANIM_HIT_NOSE);
} else if (this._parent.player.pos == PLAYER_POSITION_LEFT) {
this.gotoAndStop(BOSS_ANIM_HIT_LEFT);
} else if (this._parent.player.pos == PLAYER_POSITION_RIGHT) {
this.gotoAndStop(BOSS_ANIM_HIT_RIGHT);
} else {
trace("pos " + this._parent.player.pos);
}
if (this._currentframe == 1) {
if (this._parent.player.pos == PLAYER_POSITION_HEAD) {
if (random(100) > 50) {
this.gotoAndStop(BOSS_ANIM_HIT_HEAD);
} else {
this.gotoAndStop(_local5);
}
} else if (this._parent.player.pos == PLAYER_POSITION_NOSE) {
this.gotoAndStop(BOSS_ANIM_HIT_NOSE);
} else if (this._parent.player.pos == PLAYER_POSITION_LEFT) {
this.gotoAndStop(BOSS_ANIM_HIT_LEFT);
} else if (this._parent.player.pos == PLAYER_POSITION_RIGHT) {
this.gotoAndStop(BOSS_ANIM_HIT_RIGHT);
} else {
this.gotoAndStop(BOSS_ANIM_HIT_RIGHT);
}
}
_global.hitanim = this._currentframe;
this.sound_played = false;
this.smoke_done = false;
} else if (this._parent.player.pos == PLAYER_POSITION_NOSE) {
this.timer = this.timer - 10;
}
this.self_damage = false;
this.check_complete = false;
if ((_local6(frameMeter.ticks - this.timer) > 2) && (_local6(frameMeter.ticks - this.timer) < 400)) {
if (this.flicktimer < frameMeter.ticks) {
if (this.flicklast) {
this.tint.Set(50, 0, 0);
this.arms.tint.Set(50, 0, 0);
} else {
this.tint.Set(0, 0, 50);
this.arms.tint.Set(0, 0, 50);
}
this.flicklast = !this.flicklast;
this.flicktimer = frameMeter.ticks + PLAYER_FLICK_TIME;
}
} else {
this.tint.Set(0, 0, 0);
this.arms.tint.Set(0, 0, 0);
}
} else if (this.state.state_attack) {
this.tint.Set(0, 0, 0);
this.arms.tint.Set(0, 0, 0);
var _local3 = 0;
if (this._currentframe == BOSS_ANIM_HIT_HEAD) {
_local3 = 2;
} else if (this._currentframe == BOSS_ANIM_HIT_NOSE) {
_local3 = 3;
} else if (this._currentframe == BOSS_ANIM_HIT_LEFT) {
_local3 = 3;
} else if (this._currentframe == BOSS_ANIM_HIT_RIGHT) {
_local3 = 3;
} else if (this._currentframe == BOSS_ANIM_HIT_SIDE) {
_local3 = 1;
} else if (this._currentframe == BOSS_ANIM_HIT_SIDE_2) {
_local3 = 1;
}
if (!this.sound_played) {
if (this.pose._currentframe == _local3) {
if (!this._parent.player.Pain(this, 2, this._currentframe)) {
this.self_damage = true;
if (this._currentframe == BOSS_ANIM_HIT_HEAD) {
_global.ubunsound.Play(this.sfx_critical_hit, false);
} else if ((this._currentframe == BOSS_ANIM_HIT_NOSE) || ((this._currentframe == BOSS_ANIM_HIT_SIDE) || (this._currentframe == BOSS_ANIM_HIT_SIDE_2))) {
_global.ubunsound.Play(this.sfx_hit, false);
} else if ((this._currentframe == BOSS_ANIM_HIT_LEFT) || (this._currentframe == BOSS_ANIM_HIT_RIGHT)) {
_global.ubunsound.Play(this.sfx_hitfloor, false);
}
}
this.sound_played = true;
}
}
if (!this.smoke_done) {
if (this.pose._currentframe == 7) {
if (this._currentframe == BOSS_ANIM_HIT_LEFT) {
smoke_left_mc.play();
} else if (this._currentframe == BOSS_ANIM_HIT_RIGHT) {
smoke_right_mc.play();
}
this.smoke_done = true;
}
}
if (this.pose._currentframe >= this.pose._totalframes) {
this.predict = false;
if ((((this.self_damage && (this._currentframe != BOSS_ANIM_HIT_SIDE)) && (this._currentframe != BOSS_ANIM_HIT_SIDE_2)) && (this._currentframe != BOSS_ANIM_HIT_LEFT)) && (this._currentframe != BOSS_ANIM_HIT_RIGHT)) {
if (inst_done) {
this.health = this.health - (15 + random(20));
this.hit_counter++;
}
}
if (((!this.self_damage) && (this._currentframe != BOSS_ANIM_HIT_SIDE)) && (this._currentframe != BOSS_ANIM_HIT_SIDE_2)) {
if (!_global.juniperlee.god_mode.done) {
this.player.health = this.player.health - PLAYER_PAIN_QUANTITY;
}
} else if ((((this._currentframe != BOSS_ANIM_HIT_LEFT) && (this._currentframe != BOSS_ANIM_HIT_RIGHT)) && (this._currentframe != BOSS_ANIM_HIT_SIDE)) && (this._currentframe != BOSS_ANIM_HIT_SIDE_2)) {
this.smoke.gotoAndPlay(2);
}
if ((this._currentframe == BOSS_ANIM_HIT_LEFT) || (this._currentframe == BOSS_ANIM_HIT_RIGHT)) {
_global.ubunsound.Play(this.sfx_superhit, false);
}
this.gotoAndStop(BOSS_ANIM_IDLE);
this.state.state = this.state.IDLE;
this.timer = frameMeter.ticks + BOSS_ATTACK_TIME;
if (this.hit_counter >= BOSS_LIMIT_BREAK) {
this.timer = frameMeter.ticks + (BOSS_ATTACK_TIME / 3);
this.hit_counter = ((this.health_mc._width > 50) ? 0 : (BOSS_LIMIT_BREAK - 1));
if (this.timer == (frameMeter.ticks + (BOSS_ATTACK_TIME / 3))) {
this.predict = true;
} else {
this.predict = false;
}
}
}
if ((((this._currentframe == BOSS_ANIM_HIT_LEFT) || (this._currentframe == BOSS_ANIM_HIT_RIGHT)) && (this.pose._currentframe == 6)) && (this._parent.bkg.rumble_time < frameMeter.ticks)) {
this._parent.bkg.rumble_time = frameMeter.ticks + BKG_RUMBLE_TIME;
}
}
var _local7 = (this.health_interpolation - this.health) * 0.2;
this.health_interpolation = this.health_interpolation - _local7;
this.health_mc._width = this.health_interpolation;
var _local4 = Math.floor((this.health_mc._width * 100) / BOSS_MAX_HEALTH);
if (_local4 < 1) {
_local4 = 1;
} else if (_local4 >= 100) {
_local4 = 99;
}
interface.rakta_life_mc.bar_mc.gotoAndStop(100 - _local4);
if (_local6(this.health - this.health_interpolation) < 1) {
this.health_interpolation = this.health;
}
}
function Player_Update(parent) {
if (locked || (locked2)) {
return(undefined);
}
this.state.Update();
this._alpha = 100;
if (this.state.state_idle) {
if ((this._currentframe == PLAYER_ANIM_IDLE_HEAD) || (this._currentframe == PLAYER_ANIM_IDLE_NOSE)) {
this.pose.gotoAndStop(this._parent.boss.pose._currentframe);
}
if (!inst_done) {
if (this.pos == PLAYER_POSITION_HEAD) {
if (inst_left) {
this.gotoAndStop(PLAYER_ANIM_HEAD_LEFT);
this.state.state = this.state.WALK;
} else if (inst_right) {
this.gotoAndStop(PLAYER_ANIM_HEAD_RIGHT);
this.state.state = this.state.WALK;
} else if (inst_down) {
this.gotoAndStop(PLAYER_ANIM_HEAD_NOSE);
this.state.state = this.state.WALK;
}
} else if (this.pos == PLAYER_POSITION_NOSE) {
if (inst_up) {
this.gotoAndStop(PLAYER_ANIM_NOSE_HEAD);
this.state.state = this.state.WALK;
}
} else if (this.pos == PLAYER_POSITION_LEFT) {
if (inst_right) {
this.gotoAndStop(PLAYER_ANIM_LEFT_HEAD);
this.state.state = this.state.WALK;
}
} else if (this.pos == PLAYER_POSITION_RIGHT) {
if (inst_left) {
this.gotoAndStop(PLAYER_ANIM_RIGHT_HEAD);
this.state.state = this.state.WALK;
}
}
} else if (this.pos == PLAYER_POSITION_HEAD) {
if (keyboard_control.LEFT) {
this.gotoAndStop(PLAYER_ANIM_HEAD_LEFT);
this.state.state = this.state.WALK;
} else if (keyboard_control.RIGHT) {
this.gotoAndStop(PLAYER_ANIM_HEAD_RIGHT);
this.state.state = this.state.WALK;
} else if (keyboard_control.DOWN) {
this.gotoAndStop(PLAYER_ANIM_HEAD_NOSE);
this.state.state = this.state.WALK;
}
} else if (this.pos == PLAYER_POSITION_NOSE) {
if (keyboard_control.UP) {
this.gotoAndStop(PLAYER_ANIM_NOSE_HEAD);
this.state.state = this.state.WALK;
}
} else if (this.pos == PLAYER_POSITION_LEFT) {
if (keyboard_control.RIGHT) {
this.gotoAndStop(PLAYER_ANIM_LEFT_HEAD);
this.state.state = this.state.WALK;
}
} else if (this.pos == PLAYER_POSITION_RIGHT) {
if (keyboard_control.LEFT) {
this.gotoAndStop(PLAYER_ANIM_RIGHT_HEAD);
this.state.state = this.state.WALK;
}
}
} else if (this.state.state_walk) {
if (this.pose._currentframe >= this.pose._totalframes) {
if ((this._currentframe == PLAYER_ANIM_LEFT_HEAD) || (this._currentframe == PLAYER_ANIM_RIGHT_HEAD)) {
this.pos = PLAYER_POSITION_HEAD;
if (bat_turn == 0) {
bat_mc.greenlight = true;
bat_mc.timer = frameMeter.ticks + MINIGAME2_BAT_SPAWN;
} else {
bat2_mc.greenlight = true;
bat2_mc.timer = frameMeter.ticks + MINIGAME2_BAT_SPAWN;
}
} else if (this._currentframe == PLAYER_ANIM_HEAD_NOSE) {
this.pos = PLAYER_POSITION_NOSE;
} else if (this._currentframe == PLAYER_ANIM_NOSE_HEAD) {
this.pos = PLAYER_POSITION_HEAD;
if (bat_turn == 0) {
bat_mc.greenlight = true;
bat_mc.timer = frameMeter.ticks + MINIGAME2_BAT_SPAWN;
} else {
bat2_mc.greenlight = true;
bat2_mc.timer = frameMeter.ticks + MINIGAME2_BAT_SPAWN;
}
} else if (this._currentframe == PLAYER_ANIM_HEAD_RIGHT) {
rocks2_mc.greenlight = true;
rocks2_mc.timer = frameMeter.ticks + MINIGAME2_ROCKS_SPAWN;
this.pos = PLAYER_POSITION_RIGHT;
} else if (this._currentframe == PLAYER_ANIM_HEAD_LEFT) {
rocks1_mc.greenlight = true;
rocks1_mc.timer = frameMeter.ticks + MINIGAME2_ROCKS_SPAWN;
this.pos = PLAYER_POSITION_LEFT;
}
if (this.pos == PLAYER_POSITION_HEAD) {
this.gotoAndStop(PLAYER_ANIM_IDLE_HEAD);
} else if (this.pos == PLAYER_POSITION_NOSE) {
this.gotoAndStop(PLAYER_ANIM_IDLE_NOSE);
} else if (this.pos == PLAYER_POSITION_RIGHT) {
this.gotoAndStop(PLAYER_ANIM_IDLE_RIGHT);
} else if (this.pos == PLAYER_POSITION_LEFT) {
this.gotoAndStop(PLAYER_ANIM_IDLE_LEFT);
}
this.state.state = this.state.IDLE;
}
}
if (this.paintimer > frameMeter.ticks) {
this._alpha = (this.flicklast ? 100 : 0);
if (this.flicktimer < frameMeter.ticks) {
this.flicklast = !this.flicklast;
this.flicktimer = frameMeter.ticks + PLAYER_FLICK_TIME;
}
}
this.Update_Hud();
}
function Player_Pain(other, quantity, anim, x) {
if (this.paintimer > frameMeter.ticks) {
return(true);
}
var _local4 = false;
if (x != undefined) {
this.paintimer = frameMeter.ticks + PLAYER_PAIN_TIME;
_global.ubunsound.Play(this.sfx_hit, false);
return(undefined);
}
if (((anim == BOSS_ANIM_HIT_SIDE) || (anim == BOSS_ANIM_HIT_SIDE_2)) && (this._currentframe == PLAYER_ANIM_IDLE_HEAD)) {
if (anim == BOSS_ANIM_HIT_SIDE_2) {
this.gotoAndStop(PLAYER_ANIM_HEAD_LEFT);
} else {
this.gotoAndStop(PLAYER_ANIM_HEAD_RIGHT);
}
this.state.state = this.state.WALK;
this.paintimer = frameMeter.ticks + PLAYER_PAIN_TIME;
_global.ubunsound.Play(this.sfx_hit, false);
this.health = this.health - PLAYER_PAIN_QUANTITY;
return(true);
}
if ((((anim == BOSS_ANIM_HIT_HEAD) || (anim == BOSS_ANIM_HIT_SIDE)) || (anim == BOSS_ANIM_HIT_SIDE_2)) && ((((this._currentframe == PLAYER_ANIM_IDLE_NOSE) || (this._currentframe == PLAYER_ANIM_IDLE_HEAD)) || (this._currentframe == PLAYER_ANIM_LEFT_HEAD)) || (this._currentframe == PLAYER_ANIM_RIGHT_HEAD))) {
_local4 = true;
trace("me la puso! 1");
} else if ((anim == BOSS_ANIM_HIT_NOSE) && (this._currentframe == PLAYER_ANIM_IDLE_NOSE)) {
trace("me la puso! 2");
_local4 = true;
} else if ((anim == BOSS_ANIM_HIT_LEFT) && ((this._currentframe == PLAYER_ANIM_HEAD_LEFT) || (this._currentframe == PLAYER_ANIM_IDLE_LEFT))) {
_local4 = true;
trace("me la puso! 3");
} else if ((anim == BOSS_ANIM_HIT_RIGHT) && ((this._currentframe == PLAYER_ANIM_HEAD_RIGHT) || (this._currentframe == PLAYER_ANIM_IDLE_RIGHT))) {
_local4 = true;
trace("me la puso! 4");
}
if (!_local4) {
trace("si te la puede ponerr!!!");
return(false);
}
this.paintimer = frameMeter.ticks + PLAYER_PAIN_TIME;
_global.ubunsound.Play(this.sfx_hit, false);
return(true);
}
function Player2_UpdateHud() {
var _local3 = (this.health_interpolation - this.health) * 0.2;
this.health_interpolation = this.health_interpolation - _local3;
this.health_mc._width = this.health_interpolation;
if (Math.abs(this.health - this.health_interpolation) < 1) {
this.health_interpolation = this.health;
}
var _local2 = Math.floor((this.health_mc._width * 100) / PLAYER_MAX_HEALTH);
if (_local2 < 1) {
_local2 = 1;
} else if (_local2 >= 100) {
_local2 = 99;
}
interface.juniperlee_mc.life_mc.gotoAndStop(100 - _local2);
}
function Background_Update() {
if (this.rumble_time < frameMeter.ticks) {
this._rotation = 0;
return(undefined);
}
this._rotation = ((frameMeter.ticks - this.rumble_time) * ((random(100) > 50) ? -1 : 1)) * 0.05;
}
function Item_Update() {
if (this.oy != undefined) {
item_shadow_mc._x = this._x + 3;
item_shadow_mc._y = this.oy + 25;
var _local3 = Math.abs(this.oy - this._y);
item_shadow_mc._xscale = 100 - _local3;
item_shadow_mc._yscale = 100 - _local3;
}
if (((!inst_done) || (locked)) || (locked2)) {
return(undefined);
}
if (this.done) {
return(undefined);
}
if (!this.setted) {
if (player.health < 100) {
if (this._parent.player.pos == PLAYER_POSITION_RIGHT) {
this._x = smoke_left_mc._x - 25;
this._y = smoke_left_mc._y;
} else {
return(undefined);
}
this._y = this._y - 25;
this.oy = this._y;
this._alpha = 0;
this.angle = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 20;
} else {
this._alpha = 100;
delete this.onEnterFrame;
}
};
this.setted = true;
}
return(undefined);
}
var _local4 = (this.angle * Math.PI) / 180;
this._y = this.oy - (Math.abs(Math.sin(_local4)) * 10);
this.angle++;
if (this.angle > 359) {
this.angle = 0;
}
if (this.hitTest(player)) {
player.health = player.health + MINIGAME2_ITEM_PLUS_HEALTH;
_global.ubunsound.Play(5, false);
this.play();
this.done = true;
}
}
function Rocks_Update() {
if (((!inst_done) || (locked)) || (locked2)) {
return(undefined);
}
if (!this.greenlight) {
return(undefined);
}
if (this.timer > frameMeter.ticks) {
return(undefined);
}
if (!this.played) {
this.index = 0;
this.sequence_timer = frameMeter.ticks + 500;
this.played = true;
}
if (!this.checked) {
if (this.index == 0) {
if (this.sequence_timer < frameMeter.ticks) {
this.sequence[this.index].Play();
this.sequence_timer = frameMeter.ticks + 300;
this.index = 1;
}
} else if (this.index == 1) {
if (this.sequence_timer < frameMeter.ticks) {
this.sequence[this.index].Play();
this.sequence_timer = frameMeter.ticks + 300;
this.index = 2;
}
} else if (this.index == 2) {
if (this.sequence_timer < frameMeter.ticks) {
this.sequence[this.index].Play();
this.sequence_timer = frameMeter.ticks + 300;
this.index = 3;
}
}
if (!this.collide) {
if ((this.controller_mc._currentframe == 12) || (this.controller_mc._currentframe == 13)) {
if (this._parent.player.pos == PLAYER_POSITION_LEFT) {
if (!_global.juniperlee.god_mode.done) {
player.health = player.health - PLAYER_PAIN_QUANTITY;
}
player.Pain(this, 2, BOSS_ANIM_HIT_LEFT);
this.collide = true;
}
}
}
if (this.r1._currentframe >= this.r1._totalframes) {
this.checked = true;
}
} else if (((this.controller_mc._currentframe >= this.controller_mc._totalframes) && (this.r1._currentframe >= this.r1._totalframes)) && (this.r2._currentframe >= this.r2._totalframes)) {
this.Rewind();
this.checked = false;
this.greenlight = false;
this.played = false;
this.collide = false;
}
}
function Rocks2_Update() {
if (((!inst_done) || (locked)) || (locked2)) {
return(undefined);
}
if (!this.greenlight) {
return(undefined);
}
if (this.timer > frameMeter.ticks) {
return(undefined);
}
if (!this.played) {
this.index = 0;
this.sequence_timer = frameMeter.ticks + 500;
this.played = true;
}
if (!this.checked) {
if (this.index == 0) {
if (this.sequence_timer < frameMeter.ticks) {
this.sequence[this.index].Play();
this.sequence_timer = frameMeter.ticks + 300;
this.index = 1;
}
} else if (this.index == 1) {
if (this.sequence_timer < frameMeter.ticks) {
this.sequence[this.index].Play();
this.sequence_timer = frameMeter.ticks + 300;
this.index = 2;
}
} else if (this.index == 2) {
if (this.sequence_timer < frameMeter.ticks) {
this.sequence[this.index].Play();
this.sequence_timer = frameMeter.ticks + 300;
this.index = 3;
}
}
if (!this.collide) {
if ((this.controller_mc._currentframe == 14) || (this.controller_mc._currentframe == 15)) {
if (this._parent.player.pos == PLAYER_POSITION_RIGHT) {
if (!_global.juniperlee.god_mode.done) {
player.health = player.health - PLAYER_PAIN_QUANTITY;
}
player.Pain(this, 2, BOSS_ANIM_HIT_RIGHT);
this.collide = true;
}
}
}
if (this.r1._currentframe >= this.r1._totalframes) {
this.checked = true;
}
} else if (((this.controller_mc._currentframe >= this.controller_mc._totalframes) && (this.r1._currentframe >= this.r1._totalframes)) && (this.r2._currentframe >= this.r2._totalframes)) {
this.Rewind();
this.checked = false;
this.greenlight = false;
this.played = false;
this.collide = false;
}
}
function Bat_Update() {
if (((!inst_done) || (locked)) || (locked2)) {
return(undefined);
}
if (!this.greenlight) {
return(undefined);
}
if (this.timer > frameMeter.ticks) {
return(undefined);
}
if (!this.played) {
this.gotoAndPlay(2);
this.played = true;
}
if (!this.checked) {
if (!this.collide) {
if (this._currentframe == 38) {
if (player._currentframe == PLAYER_ANIM_IDLE_HEAD) {
if (!_global.juniperlee.god_mode.done) {
player.health = player.health - PLAYER_PAIN_QUANTITY;
}
player.Pain(this, 2, BOSS_ANIM_HIT_RIGHT, 1);
this.collide = true;
}
}
}
if (this._currentframe >= this._totalframes) {
this.checked = true;
}
} else {
bat_turn = this.id;
this.Rewind();
this.checked = false;
this.greenlight = false;
this.played = false;
this.collide = false;
}
}
function Game_Init() {
delete frameMeter;
frameMeter = new _global.ubundata.root.CFrameModel(40);
delete keyboard_control;
keyboard_control = new _global.ubundata.root.CInput();
boss.Update = Boss_Update;
boss.health = BOSS_MAX_HEALTH;
boss.health_interpolation = BOSS_MAX_HEALTH;
boss.health_mc = boss_health;
boss.self_damage = false;
boss.check_complete = false;
boss.arms = arms;
boss.sound_played = false;
boss.arms.tint = new _global.ubundata.root.CUbunTint(boss.arms, 0, 0, 0);
boss.hit_counter = 0;
boss.predict = false;
boss.flicktimer = 0;
boss.flicklast = false;
boss.smoke = smoke;
boss.player = player;
boss.tint = new _global.ubundata.root.CUbunTint(boss, 0, 0, 0);
boss.state = new _global.ubundata.root.CStateMachine();
boss.timer = frameMeter.ticks + BOSS_ATTACK_TIME;
boss.gotoAndStop(1);
player.Update = Player_Update;
player.Pain = Player_Pain;
player.state = new _global.ubundata.root.CStateMachine();
player.pos = PLAYER_POSITION_LEFT;
player.paintimer = 0;
player.lives = PLAYER_LIVES;
player.live1_mc = live1;
player.live2_mc = live2;
player.live3_mc = live3;
player.flicktimer = 0;
player.flicklast = false;
player.health_mc = player_health;
player.health_interpolation = PLAYER_MAX_HEALTH;
player.health = PLAYER_MAX_HEALTH;
player.Update_Hud = Player2_UpdateHud;
player.gotoAndStop(1);
bkg.Update = Background_Update;
bkg.rumble_time = 0;
item_mc.done = false;
item_mc.setted = false;
item_mc.Update = Item_Update;
rocks1_mc.Rewind();
rocks1_mc.greenlight = false;
rocks1_mc.checked = false;
rocks1_mc.Update = Rocks_Update;
rocks1_mc.timer = 0;
rocks1_mc.index = 0;
rocks1_mc.sequence = new Array(rocks1_mc.controller_mc, rocks1_mc.r2, rocks1_mc.r1);
rocks2_mc.Rewind();
rocks2_mc.greenlight = false;
rocks2_mc.checked = false;
rocks2_mc.Update = Rocks2_Update;
rocks2_mc.timer = 0;
rocks2_mc.index = 0;
rocks2_mc.sequence = new Array(rocks2_mc.controller_mc, rocks2_mc.r2, rocks2_mc.r1);
bat_mc.Rewind();
bat_mc.greenlight = false;
bat_mc.checked = false;
bat_mc.Update = Bat_Update;
bat_mc.timer = 0;
bat_mc.id = 1;
bat2_mc.Rewind();
bat2_mc.greenlight = false;
bat2_mc.checked = false;
bat2_mc.Update = Bat_Update;
bat2_mc.timer = 0;
bat2_mc.id = 0;
bat_turn = 0;
frameMeter.Add(boss);
frameMeter.Add(player);
frameMeter.Add(bkg);
frameMeter.Add(item_mc);
frameMeter.Add(rocks1_mc);
frameMeter.Add(rocks2_mc);
frameMeter.Add(bat_mc);
frameMeter.Add(bat2_mc);
}
function Inst_Init(mc) {
mc.onEnterFrame = Inst_Update;
}
function Inst_Update() {
if (this._currentframe == 44) {
frameMeter.ticks = 0;
}
if (this._currentframe == 45) {
if (Key.isDown(32)) {
inst_left = false;
inst_right = false;
inst_up = false;
inst_down = false;
inst_mc.play();
}
if (inst_sequence[inst_index] != this.btns_mc.btn_right) {
this.btns_mc.btn_right.gotoAndStop(1);
inst_right = false;
} else {
inst_right = true;
}
if (inst_sequence[inst_index] != this.btns_mc.btn_left) {
this.btns_mc.btn_left.gotoAndStop(1);
inst_left = false;
} else {
inst_left = true;
}
if (inst_sequence[inst_index] != this.btns_mc.btn_up) {
this.btns_mc.btn_up.gotoAndStop(1);
inst_up = false;
} else {
inst_up = true;
}
if (inst_sequence[inst_index] != this.btns_mc.btn_down) {
this.btns_mc.btn_down.gotoAndStop(1);
inst_down = false;
} else {
inst_down = true;
}
inst_sequence[inst_index].gotoAndStop(inst_flick_intance);
if (inst_flick_timer < frameMeter.ticks) {
if (inst_flick_intance == 1) {
inst_flick_intance = 2;
} else {
inst_flick_intance = 1;
}
inst_flick_timer = frameMeter.ticks + INST_FLICK_TIMER;
}
if (inst_timer < frameMeter.ticks) {
inst_index++;
if (inst_sequence[inst_index] == undefined) {
inst_index = 0;
inst_timer = frameMeter.ticks + inst_sequence_timer[inst_index];
inst_left = false;
inst_right = false;
inst_up = false;
inst_down = false;
} else {
inst_timer = frameMeter.ticks + inst_sequence_timer[inst_index];
}
}
} else if (this._currentframe == 88) {
inst_left = false;
inst_right = false;
inst_up = false;
inst_down = false;
Game_Init();
} else if (this._currentframe == 89) {
inst_done = true;
}
}
var interface = this._parent.inteface_mc;
var controls = this._parent.controls_mc;
interface.gotoAndStop(2);
interface._alpha = 0;
controls._alpha = 0;
MINIGAME2_ITEM_PLUS_HEALTH = 100;
MINIGAME2_ROCKS_SPAWN = 500;
BKG_RUMBLE_TIME = 200;
BOSS_ATTACK_TIME = 3000;
BOSS_ATTACK_DISCOUNT = 1;
BOSS_MAX_HEALTH = 300;
BOSS_LIMIT_BREAK = 4;
BOSS_ANIM_IDLE = 1;
BOSS_ANIM_HIT_HEAD = 4;
BOSS_ANIM_HIT_NOSE = 6;
BOSS_ANIM_HIT_LEFT = 2;
BOSS_ANIM_HIT_RIGHT = 9;
BOSS_ANIM_HIT_SIDE = 7;
BOSS_ANIM_HIT_SIDE_2 = 14;
PLAYER_LIVES = 3;
PLAYER_MAX_HEALTH = 300;
PLAYER_PAIN_QUANTITY = 30;
PLAYER_PAIN_TIME = 600;
PLAYER_FLICK_TIME = 40;
PLAYER_POSITION_HEAD = 1;
PLAYER_POSITION_NOSE = 2;
PLAYER_POSITION_LEFT = 3;
PLAYER_POSITION_RIGHT = 4;
PLAYER_ANIM_IDLE_HEAD = 3;
PLAYER_ANIM_IDLE_NOSE = 5;
PLAYER_ANIM_IDLE_LEFT = 1;
PLAYER_ANIM_IDLE_RIGHT = 8;
PLAYER_ANIM_LEFT_HEAD = 2;
PLAYER_ANIM_RIGHT_HEAD = 9;
PLAYER_ANIM_HEAD_NOSE = 4;
PLAYER_ANIM_NOSE_HEAD = 6;
PLAYER_ANIM_HEAD_RIGHT = 7;
PLAYER_ANIM_HEAD_LEFT = 14;
MINIGAME2_BAT_SPAWN = 1500;
var bat_turn = 0;
var frameMeter = (new _global.ubundata.root.CFrameModel(40));
var keyboard_control = (new _global.ubundata.root.CInput());
var locked = false;
var locked2 = false;
Game_Init();
_global.ubundata.root.inter_mc.gotoAndPlay(16);
_global.ubunsound.Reset();
_global.ubunsound.Load(8, "sfx_autogolpe");
_global.hitanim = -1;
boss.sfx_critical_hit = _global.ubunsound.Load(0, "sfx_rakatan_criticalhit");
boss.sfx_hit = _global.ubunsound.Load(1, "sfx_rakatan_hit");
boss.sfx_hitfloor = _global.ubunsound.Load(2, "sfx_rakatan_hitfloor");
boss.sfx_superhit = _global.ubunsound.Load(4, "sfx_superhit");
_global.ubunsound.Load(5, "sfx_item");
player.sfx_hit = _global.ubunsound.Load(3, "sfx_juniperhit");
_global.ubunsound.Play(8);
INST_TIMER = 1500;
INST_FLICK_TIMER = 50;
var inst_done = false;
var inst_sequence = new Array(inst_mc.btns_mc.btn_right, inst_mc.btns_mc.btn_right, inst_mc.btns_mc.btn_left, inst_mc.btns_mc.btn_down, inst_mc.btns_mc.btn_up, inst_mc.btns_mc.btn_left);
var inst_sequence_timer = new Array(INST_TIMER, INST_TIMER, INST_TIMER / 4, INST_TIMER, INST_TIMER, INST_TIMER);
var inst_index = 0;
var inst_timer = (frameMeter.ticks + INST_TIMER);
var inst_flick_timer = (frameMeter.ticks + INST_FLICK_TIMER);
var inst_flick_intance = 1;
var inst_left = false;
var inst_right = false;
var inst_up = false;
var inst_down = false;
inst_mc.button_mc.onRelease = function () {
inst_left = false;
inst_right = false;
inst_up = false;
inst_down = false;
inst_mc.play();
};
Inst_Init(inst_mc);
this.onEnterFrame = function () {
if (((inst_done && (interface._alpha < 100)) && (!locked)) && (!locked2)) {
interface._alpha = interface._alpha + 25;
controls._alpha = controls._alpha + 25;
if (interface._alpha >= 100) {
interface._alpha = 100;
controls._alpha = 100;
}
}
if (_global.ubundata.paused) {
boss.pose.pauseMC(true);
player.pose.pauseMC(true);
boss.arms.pose.pauseMC(true);
restore = true;
} else if (restore) {
boss.pose.pauseMC(false);
player.pose.pauseMC(false);
boss.arms.pose.pauseMC(false);
restore = false;
}
if (locked2) {
if (trans_1_mc._currentframe == 1) {
trans_1_mc.gotoAndPlay(2);
} else if (trans_1_mc._currentframe == trans_1_mc._totalframes) {
this._parent.gotoAndStop("lose");
delete frameMeter;
delete this.onEnterFrame;
}
return(undefined);
}
if (Key.isDown(36)) {
boss.health_mc._width = 9;
}
if ((boss.health_mc._width < 10) || (locked)) {
if (trans_1_mc._currentframe == 1) {
locked = true;
trans_1_mc.gotoAndPlay(2);
} else if (trans_1_mc._currentframe == trans_1_mc._totalframes) {
_global.ubundata.checkpoint = "minigame3";
this._parent.gotoAndStop("minigame3");
delete frameMeter;
delete this.onEnterFrame;
return(undefined);
}
} else if (player.health <= 0) {
locked2 = true;
return(undefined);
}
frameMeter.Update(this);
keyboard_control.Update();
fps.text = "FPS " + frameMeter.fps.toString();
};
Symbol 589 MovieClip Frame 1
stop();
Symbol 589 MovieClip Frame 2
stop();
Symbol 612 MovieClip Frame 3
stop();
Symbol 642 MovieClip Frame 15
stop();
Symbol 643 MovieClip Frame 1
stop();
trace("animacion 1");
Symbol 643 MovieClip Frame 2
trace("animacion 2");
Symbol 643 MovieClip Frame 3
trace("animacion 3");
Symbol 643 MovieClip Frame 4
trace("animacion 4");
Symbol 670 MovieClip [rock_mc] Frame 1
stop();
Symbol 670 MovieClip [rock_mc] Frame 2
stop();
Symbol 670 MovieClip [rock_mc] Frame 3
stop();
Symbol 670 MovieClip [rock_mc] Frame 4
stop();
Symbol 670 MovieClip [rock_mc] Frame 5
stop();
Symbol 670 MovieClip [rock_mc] Frame 6
stop();
Symbol 687 MovieClip Frame 6
stop();
Symbol 711 MovieClip Frame 5
stop();
Symbol 728 MovieClip Frame 19
stop();
Symbol 729 MovieClip Frame 1
stop();
Symbol 729 MovieClip Frame 2
stop();
Symbol 729 MovieClip Frame 3
stop();
Symbol 729 MovieClip Frame 4
stop();
Symbol 729 MovieClip Frame 5
stop();
Symbol 729 MovieClip Frame 6
stop();
Symbol 729 MovieClip Frame 7
stop();
Symbol 729 MovieClip Frame 8
stop();
Symbol 729 MovieClip Frame 9
stop();
Symbol 729 MovieClip Frame 10
stop();
Symbol 740 MovieClip Frame 43
stop();
Symbol 740 MovieClip Frame 84
stop();
Symbol 745 MovieClip Frame 6
stop();
Symbol 747 MovieClip Frame 15
stop();
Symbol 748 MovieClip Frame 1
stop();
Symbol 748 MovieClip Frame 11
stop();
Symbol 749 MovieClip Frame 1
function Background3_Update(parent, mult) {
ttttt = parent;
var _local3 = Math.abs;
var _local7 = _local3(parent.frame._rot - MINIGAME3_BASE_ANGLE);
var _local4 = 4 + (_local7 * MINIGAME3_BASE_GLOBAL_DIFF_MULTIPLIER);
var _local5 = 1;
if ((mult != undefined) || (mult != null)) {
_local5 = mult;
}
this._x = this._x - ((MINIGAME3_SCROLLSPEED * _local4) * _local5);
CURRENT_SPEED = MINIGAME3_SCROLLSPEED * _local4;
fbkg_mc._x = fbkg_mc._x - (((MINIGAME3_SCROLLSPEED * _local4) * 0.05) * _local5);
if (fbkg_mc._x < (-(fbkg_mc._width / 2))) {
fbkg_mc._x = fbkg_mc._x + (fbkg_mc._width / 2);
}
if (this._x < -1211) {
this._x = -300;
if (_global.ubundata.root.randRange(0, 100) > 50) {
this.tree.gotoAndStop(1);
} else {
this.tree.gotoAndStop(2);
}
if (this.tree_accum > 3) {
this.tree._visible = true;
this.tree_accum = Math.floor(Math.random() * 2);
} else {
this.tree._visible = false;
this.tree_accum++;
}
}
if (this._parent._parent.sky._x < (-(this._parent._parent.sky._width / 2))) {
this._parent._parent.sky._x = 0;
}
frame.leaf_mc._x = frame.leaf_mc._x - (((MINIGAME3_SCROLLSPEED * _local4) * 2) * _local5);
if (frame.leaf_mc._x < (-(frame.leaf_mc._width + 300))) {
frame.leaf_mc.accum++;
if (frame.leaf_mc._visible) {
frame.leaf_mc._visible = false;
frame.leaf_mc.accum = 0;
} else if (frame.leaf_mc.accum > 8) {
frame.leaf_mc._visible = true;
frame.leaf_mc.accum = 0;
} else {
frame.leaf_mc.accum++;
}
frame.leaf_mc._x = frame.leaf_mc._x + (frame.leaf_mc._width + 600);
}
if (frame.boss._currentframe != BOSS_ANIM_HIT) {
if (_local3(CURRENT_SPEED) < 6) {
this.boss.gotoAndStop(BOSS_ANIM_SLOW);
} else if (_local3(CURRENT_SPEED) < 15) {
this.boss.gotoAndStop(BOSS_ANIM_MEDIUM);
} else if (_local3(CURRENT_SPEED) < 30) {
this.boss.gotoAndStop(BOSS_ANIM_HARD);
}
} else if (frame.boss.pose._currentframe >= frame.boss.pose._totalframes) {
if (_local3(CURRENT_SPEED) < 6) {
this.boss.gotoAndStop(BOSS_ANIM_SLOW);
} else if (_local3(CURRENT_SPEED) < 15) {
this.boss.gotoAndStop(BOSS_ANIM_MEDIUM);
} else if (_local3(CURRENT_SPEED) < 30) {
this.boss.gotoAndStop(BOSS_ANIM_HARD);
}
}
}
function Player3_Update() {
var _local3 = Math.abs;
frame.player_colarea_mc._x = this._x - 20;
frame.player_colarea_mc._y = this._y - frame.player_colarea_mc._height;
frame.player_colarea_mc._visible = false;
this.colarea._visible = false;
this.Update_Hud();
this.state_machine.Update();
this.shadow._x = this._x;
this._alpha = 100;
if (this.actor) {
this.gotoAndStop(PLAYER_ANIM_PAIN);
this._x = this._x - 5;
return(undefined);
}
if (game_actor) {
keyboard_control.LEFT = false;
keyboard_control.RIGHT = false;
keyboard_control.UP = false;
keyboard_control.DOWN = false;
}
if (this.state_machine.state_idle) {
this._y = this.base._y;
this.gravity = MINIGAME3_GRAVITY;
if (!inst_done) {
this.crouch = inst_down;
} else {
this.crouch = Key.isDown(40);
}
if (this.crouch) {
if (this.boss._currentframe == BOSS_ANIM_SLOW) {
this.gotoAndStop(PLAYER_ANIM_IDLE_CROUCH_SLOW);
} else if (this.boss._currentframe == BOSS_ANIM_MEDIUM) {
this.gotoAndStop(PLAYER_ANIM_IDLE_CROUCH_MEDIUM);
} else if (this.boss._currentframe == BOSS_ANIM_HARD) {
this.gotoAndStop(PLAYER_ANIM_IDLE_CROUCH_HARD);
}
this.pose.gotoAndStop(this.boss.pose._currentframe);
if (((this._currentframe != PLAYER_ANIM_IDLE_CROUCH_SLOW) && (this._currentframe != PLAYER_ANIM_IDLE_CROUCH_MEDIUM)) && (this._currentframe != PLAYER_ANIM_IDLE_CROUCH_HARD)) {
this.state_machine.state = this.state_machine.WAIT;
this.gotoAndStop(PLAYER_ANIM_CROUCH);
this.pose.gotoAndStop(1);
this.dx = 1;
return(undefined);
}
}
last = 0;
if (!inst_done) {
if ((inst_left && (last != -1)) && ((this._x + (PLAYER_STEP_SIZE * -1)) > frame.pos1._x)) {
this.gotoAndStop(PLAYER_ANIM_WALK);
this.dir = -1;
this.step = 1;
last = -1;
this.state_machine.state = this.state_machine.WALK;
return(undefined);
}
if ((inst_right && (last != 1)) && ((this._x + (PLAYER_STEP_SIZE * 1)) < frame.pos2._x)) {
this.gotoAndStop(PLAYER_ANIM_WALK);
this.dir = 1;
this.step = 1;
last = 1;
this.state_machine.state = this.state_machine.WALK;
return(undefined);
}
if (!this.crouch) {
if ((!inst_left) && (!inst_right)) {
last = 0;
}
if (this.boss._currentframe == BOSS_ANIM_SLOW) {
this.gotoAndStop(PLAYER_ANIM_IDLE_SLOW);
} else if (this.boss._currentframe == BOSS_ANIM_MEDIUM) {
this.gotoAndStop(PLAYER_ANIM_IDLE_MEDIUM);
} else if (this.boss._currentframe == BOSS_ANIM_HARD) {
this.gotoAndStop(PLAYER_ANIM_IDLE_HARD);
}
this.pose.gotoAndStop(this.boss.pose._currentframe);
if ((!this.crouch) && (((this._currentframe != PLAYER_ANIM_IDLE_SLOW) && (this._currentframe != PLAYER_ANIM_IDLE_MEDIUM)) && (this._currentframe != PLAYER_ANIM_IDLE_HARD))) {
this.state_machine.state = this.state_machine.WAIT;
this.gotoAndStop(PLAYER_ANIM_CROUCH);
this.pose.gotoAndStop(this.pose._totalframes);
this.dx = -1;
return(undefined);
}
}
if (inst_up) {
this.dx = 0;
this.gravity = -_local3((this.pos2._x - this.pos1._x) / 3);
this.dy = (this.pos2._x - this.pos1._x) * 0.06;
this.state_machine.state = this.state_machine.JUMP;
this.dest = this.base;
dicemachine.Add(2);
this.gotoAndStop(PLAYER_ANIM_JUMP);
}
} else {
if ((keyboard_control.LEFT && (last != -1)) && ((this._x + (PLAYER_STEP_SIZE * -1)) > frame.pos1._x)) {
this.gotoAndStop(PLAYER_ANIM_WALK);
this.dir = -1;
this.step = 1;
last = -1;
this.state_machine.state = this.state_machine.WALK;
return(undefined);
}
if ((keyboard_control.RIGHT && (last != 1)) && ((this._x + (PLAYER_STEP_SIZE * 1)) < frame.pos2._x)) {
this.gotoAndStop(PLAYER_ANIM_WALK);
this.dir = 1;
this.step = 1;
last = 1;
this.state_machine.state = this.state_machine.WALK;
return(undefined);
}
if (!this.crouch) {
if ((!keyboard_control.LEFT) && (!keyboard_control.RIGHT)) {
last = 0;
}
if (this.boss._currentframe == BOSS_ANIM_SLOW) {
this.gotoAndStop(PLAYER_ANIM_IDLE_SLOW);
} else if (this.boss._currentframe == BOSS_ANIM_MEDIUM) {
this.gotoAndStop(PLAYER_ANIM_IDLE_MEDIUM);
} else if (this.boss._currentframe == BOSS_ANIM_HARD) {
this.gotoAndStop(PLAYER_ANIM_IDLE_HARD);
}
this.pose.gotoAndStop(this.boss.pose._currentframe);
if ((!this.crouch) && (((this._currentframe != PLAYER_ANIM_IDLE_SLOW) && (this._currentframe != PLAYER_ANIM_IDLE_MEDIUM)) && (this._currentframe != PLAYER_ANIM_IDLE_HARD))) {
this.state_machine.state = this.state_machine.WAIT;
this.gotoAndStop(PLAYER_ANIM_CROUCH);
this.pose.gotoAndStop(this.pose._totalframes);
this.dx = -1;
return(undefined);
}
}
if (keyboard_control.UP) {
this.dx = 0;
this.gravity = -_local3((this.pos2._x - this.pos1._x) / 3);
this.dy = (this.pos2._x - this.pos1._x) * 0.06;
this.state_machine.state = this.state_machine.JUMP;
this.dest = this.base;
dicemachine.Add(2);
this.gotoAndStop(PLAYER_ANIM_JUMP);
keyboard_control.UP = false;
}
}
} else if (this.state_machine.state_walk) {
var _local2 = false;
this._x = this._x + (PLAYER_STEP_SIZE * this.dir);
if (this.dir < 0) {
if (this._x < frame.pos1._x) {
this._x = frame.pos1._x;
_local2 = true;
}
} else if (this._x > frame.pos2._x) {
this._x = frame.pos2._x;
_local2 = true;
}
if ((this.pose._currentframe >= this.pose._totalframes) || (_local2)) {
this.state_machine.state = this.state_machine.IDLE;
return(undefined);
}
} else if (this.state_machine.state_jump) {
if (this.jump_timer < frameMeter.ticks) {
this._x = this._x + this.dx;
this._y = this._y + this.gravity;
this.gravity = this.gravity + this.dy;
if ((getDistance(this._x, this._y, this.dest._x, this.dest._y) < 10) || (this._y >= this.dest._y)) {
this.base = this.dest;
this.state_machine.state = this.state_machine.IDLE;
}
this.jump_timer = frameMeter.ticks + MINIGAME3_PLAYER_JUMP_TIME;
}
} else if (this.state_machine.state_wait) {
if (this.dx > 0) {
this.pose.gotoAndStop(this.pose._currentframe + this.dx);
if (this.pose._currentframe >= this.pose._totalframes) {
if (this.boss._currentframe == BOSS_ANIM_SLOW) {
this.gotoAndStop(PLAYER_ANIM_IDLE_CROUCH_SLOW);
} else if (this.boss._currentframe == BOSS_ANIM_MEDIUM) {
this.gotoAndStop(PLAYER_ANIM_IDLE_CROUCH_MEDIUM);
} else if (this.boss._currentframe == BOSS_ANIM_HARD) {
this.gotoAndStop(PLAYER_ANIM_IDLE_CROUCH_HARD);
}
this.pose.gotoAndStop(this.boss.pose._currentframe);
this.state_machine.state = this.state_machine.IDLE;
}
} else {
this.pose.gotoAndStop(this.pose._currentframe + this.dx);
if (this.pose._currentframe <= 1) {
if (this.boss._currentframe == BOSS_ANIM_SLOW) {
this.gotoAndStop(PLAYER_ANIM_IDLE_SLOW);
} else if (this.boss._currentframe == BOSS_ANIM_MEDIUM) {
this.gotoAndStop(PLAYER_ANIM_IDLE_MEDIUM);
} else if (this.boss._currentframe == BOSS_ANIM_HARD) {
this.gotoAndStop(PLAYER_ANIM_IDLE_HARD);
}
this.pose.gotoAndStop(this.boss.pose._currentframe);
this.state_machine.state = this.state_machine.IDLE;
}
}
}
if (this.pain_timer > frameMeter.ticks) {
this._alpha = (this.flick_state ? 100 : 0);
if (this.flick_timer < frameMeter.ticks) {
this.flick_state = !this.flick_state;
this.flick_timer = frameMeter.ticks + MINIGAME3_FLICK_TIME;
}
}
}
function Player3_Damage(flag) {
if (_global.juniperlee.god_mode.done || (game_actor)) {
return(undefined);
}
if (!flag) {
if ((this.state_machine.state_pain || (this.state_machine.state_jump)) || (this.state_machine.state_wait)) {
return(undefined);
}
} else if (this.state_machine.state_pain || (this.state_machine.state_wait)) {
return(undefined);
}
this.pain_timer = frameMeter.ticks + MINIGAME3_PLAYER_PAIN_TIME;
this.health = this.health - MINIGAME3_PLAYER_DAMAGE;
}
function Player3_UpdateHud() {
var _local3 = (this.health_interpolation - this.health) * 0.2;
this.health_interpolation = this.health_interpolation - _local3;
this.life_bar._width = this.health_interpolation;
if (Math.abs(this.health - this.health_interpolation) < 1) {
this.health_interpolation = this.health;
}
var _local2 = Math.floor((this.life_bar._width * 100) / MINIGAME3_PLAYER_MAX_HEALTH);
if (_local2 < 1) {
_local2 = 1;
} else if (_local2 >= 100) {
_local2 = 99;
}
interface.juniperlee_mc.life_mc.gotoAndStop(100 - _local2);
}
function Minigame3_Update() {
if (((this.spawntime < frameMeter.ticks) && (!this.rock_mc.go)) && (!this.tree_leaf.go)) {
if (this.spawntime2 < frameMeter.ticks) {
if (this.current == 0) {
var _local2 = dicemachine.Eval();
this.rock_mc.go = true;
this.rock_mc.go_down = _local2 == 2;
this.rock_mc.go_up = _local2 != 5;
if (_local2 == 0) {
this.rock_mc.go_farnear = true;
} else if (_local2 == 1) {
this.rock_mc.go_farnear = false;
} else {
this.rock_mc.go_farnear = true;
}
this.current = 1;
} else if (this.current == 1) {
if ((random(100) > 50) && (CURRENT_SPEED < 9)) {
this.tree_leaf.go = true;
}
this.current = 2;
} else if (this.current == 2) {
this.tree_noleaf.go = true;
this.spawntime = frameMeter.ticks + (MINIGAME3_FRAME_WAIT_TIME * frame.instances);
frame.instances--;
this.current = 0;
}
this.spawntime2 = frameMeter.ticks + (MINIGAME3_FRAME_WAIT_TIME * 2);
}
} else if ((frame.spawntime2 < frameMeter.ticks) && (!this.tree_leaf.go)) {
}
this.UpdateRotation();
}
function Minigame3_UpdateRotation() {
if (Math.abs(this.rotation_angle - this._rot) > 2) {
var _local2 = (this.rotation_angle - this._rot) * 0.009;
this._rot = this._rot + _local2;
}
if (this.rotation_timer > frameMeter.ticks) {
return(undefined);
}
this.rotation_angle = MINIGAME3_BASE_ANGLE + random(MINIGAME3_PLUS_ANGLE);
this.rotation_timer = (frameMeter.ticks + MINIGAME3_CREATIONTIME) + random(MINIGAME3_CREATIONTIME * 2);
}
function TreeLeaf_Update(parent) {
if (!inst_done) {
return(undefined);
}
if (!this.go) {
return(undefined);
}
var _local3 = Math.abs(parent.frame._rot - MINIGAME3_BASE_ANGLE);
var _local4 = 4 + (_local3 * MINIGAME3_BASE_GLOBAL_DIFF_MULTIPLIER);
this._x = this._x - (MINIGAME3_SCROLLSPEED * _local4);
this.leaf._x = this._x;
frame.item_mc._x = this._x - 50;
if (!this.swapthedepth) {
if (this._x < -31) {
this.swapthedepth = true;
}
this.leaf.swapDepths(99999);
} else {
this.leaf.swapDepths(10);
}
if (!this.checked) {
if (this._x < -61) {
if (((!this.player.state_machine.state_jump) && (!this.player.crouch)) || (this.player.state_machine.state_jump && (this.player.gravity >= 0))) {
_global.ubunsound.Play(4, false);
this.player.Damage();
}
if (this.player.crouch) {
dicemachine.Add(5);
}
this.checked = true;
}
}
if (this._x < -600) {
this.go = false;
this.swapthedepth = false;
this.checked = false;
this._x = 400;
}
}
function TreeNoLeaf_Update(parent) {
if (!this.go) {
return(undefined);
}
var _local2 = Math.abs(parent.frame._rot - MINIGAME3_BASE_ANGLE);
var _local3 = 4 + (_local2 * MINIGAME3_BASE_GLOBAL_DIFF_MULTIPLIER);
this._x = this._x - (MINIGAME3_SCROLLSPEED * _local3);
if (this._x < -600) {
this._x = 400;
this.go = false;
}
}
function ThrowingRock_Update() {
if (_global.ubundata.paused) {
return(undefined);
}
if (this.timer > frameMeter.ticks) {
return(undefined);
}
this.timer = frameMeter.ticks + 10;
this._x = this._x - (this.delta * 5);
this._y = this._y + this.gravity;
this.gravity = this.gravity + this.delta_g;
this._rotation = this._rotation - (this.delta * 5);
if (!this.checked) {
var _local5 = frame.player.colarea.realCoords();
var _local4 = this.colbox.realCoords();
if ((Math.abs(frame.player_colarea_mc._x - this._x) < frame.player_colarea_mc._width) && (Math.abs(frame.player_colarea_mc._y - this._y) < frame.player_colarea_mc._height)) {
this.player.Damage(true);
_global.ubunsound.Play(4, false);
this.checked = true;
}
}
if (this._y > 400) {
var _local3 = 0;
while (_local3 < rock_list.length) {
if (rock_list[_local3].id == this.id) {
rock_list.splice(_local3, 1);
this.swapDepths(2048);
this.removeMovieClip();
this.mother.total--;
break;
}
_local3++;
}
}
}
function Rock_Update(parent) {
if (!inst_done) {
return(undefined);
}
if (this.iwannariot) {
return(undefined);
}
if (((!this.go) || (rock_list.length > 0)) || (!frame.rockbroken_mc.done)) {
return(undefined);
}
var _local8 = Math.abs(parent.frame._rot - MINIGAME3_BASE_ANGLE);
var _local7 = 4 + (_local8 * MINIGAME3_BASE_GLOBAL_DIFF_MULTIPLIER);
this._x = this._x - (MINIGAME3_SCROLLSPEED * _local7);
if ((this._x < 220) && (this._x > 210)) {
if (frame.boss._currentframe != BOSS_ANIM_HIT) {
frame.boss.gotoAndStop(BOSS_ANIM_HIT);
}
}
if (this._x < 200) {
this.total = (2 + random(2)) + 1;
var _local9 = random(100) > 50;
var _local4 = 0;
var _local3;
while (_local4 < this.total) {
_local3 = this._parent.attachMovie("rock_mc", ("rock_" + getTimer()).toString(), this._parent.getNextHighestDepth());
_local3.Update = ThrowingRock_Update;
_local3.id = _local4;
rock_list.push(_local3);
_local3.gotoAndStop(2 + Math.floor(Math.random() * 3));
_local3.colbox._visible = false;
_local3.player = this.player;
_local3.checked = false;
_local3.timer = frameMeter.ticks;
var _local6 = ((random(100) > 50) ? -1 : -2);
var _local5 = ((random(100) > 50) ? -1 : -2);
_local3._x = this._x + _local6;
_local3._y = this._y + _local5;
_local3.mother = this;
if (frame.player._x < -81) {
this.go_farnear = true;
} else {
this.go_farnear = false;
}
if (_local4 == 0) {
_local3.delta = (this.go_farnear ? 1.2 : 0.95);
_local3.delta_g = 1;
_local3.gravity = -30;
} else {
_local3.delta = (this.go_farnear ? 1.2 : 0.95);
if (_local3.delta == 0.95) {
_local3.delta = _local3.delta - (_global.ubundata.root.randRange(0, 10) * 0.08);
} else {
_local3.delta = _local3.delta + (_global.ubundata.root.randRange(0, 10) * 0.2);
}
_local3.delta_g = 1;
_local3.gravity = -(30 - _global.ubundata.root.randRange(0, 10));
}
_local4++;
}
if (Math.abs(frameMeter.ticks - game_time) > 8000) {
_global.ubunsound.Play(0, false);
_global.ubunsound.Play(1, false);
frame.rockbroken_mc._x = this._x;
frame.rockbroken_mc._y = this._y;
frame.rockbroken_mc.gotoAndPlay(1);
frame.rockbroken_mc.dx = -(MINIGAME3_SCROLLSPEED * _local7);
this.go = false;
this._x = 350.1;
} else {
this._x = 350.1;
this.iwannariot = true;
}
}
}
function RockBroken_Update(parent) {
this._x = this._x + this.dx;
if (this._x < -350) {
var _local2 = 0;
while (_local2 < rock_list.length) {
if (rock_list[_local2].id == this.id) {
rock_list.splice(_local2, 1);
this.swapDepths(2048);
this.removeMovieClip();
this.mother.total--;
break;
}
_local2++;
}
}
}
function Item_Update(parent) {
if (this.done) {
return(undefined);
}
if (!this.setted) {
if (frame.player.health < 100) {
trace("menor que 100");
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 20;
} else {
this._alpha = 100;
delete this.onEnterFrame;
}
};
this.setted = true;
}
return(undefined);
}
if (this.colbox.hitTest(frame.player)) {
frame.player.health = frame.player.health + MINIGAME2_ITEM_PLUS_HEALTH;
_global.ubunsound.Play(5, false);
this.play();
this.done = true;
}
}
function Boss_Update() {
if (!game_actor) {
smoke_mc._x = this._x;
smoke_mc._y = this._y;
}
}
function Game_Init() {
Key.removeListener(keyboard_control);
delete keyboard_control;
keyboard_control = new Object();
keyboard_control.LEFT = false;
keyboard_control.RIGHT = false;
keyboard_control.UP = false;
keyboard_control.DOWN = false;
keyboard_control.VLEFT = false;
keyboard_control.VRIGHT = false;
keyboard_control.VUP = false;
keyboard_control.VDOWN = false;
keyboard_control.onKeyUp = function () {
if (Key.getCode() == 37) {
this.LEFT = false;
}
if (Key.getCode() == 39) {
this.RIGHT = false;
}
if (Key.getCode() == 38) {
this.UP = false;
}
if (Key.getCode() == 40) {
this.DOWN = false;
}
};
keyboard_control.onKeyDown = function () {
this.LEFT = Key.getCode() == 37;
this.RIGHT = Key.getCode() == 39;
this.UP = Key.getCode() == 38;
this.DOWN = Key.getCode() == 40;
};
Key.addListener(keyboard_control);
delete frameMeter;
frameMeter = new _global.ubundata.root.CFrameModel(MINIGAME3_BASE_FRAMEMODEL);
delete dicemachine;
dicemachine = new _global.ubundata.root.CUbunDiceMachine(6);
frame.boss.gotoAndStop(BOSS_ANIM_SLOW);
frame.boss.Update = Boss_Update;
delete frame.player.state_machine;
frame.player.state_machine = new _global.ubundata.root.CStateMachine();
frame.player.dy = 0;
frame.player.dx = 0;
frame.player.gravity = MINIGAME3_GRAVITY;
frame.player.Update = Player3_Update;
frame.player.Damage = Player3_Damage;
frame.player.gotoAndStop(PLAYER_ANIM_IDLE_SLOW);
frame.player.shadow = frame.shadow;
frame.player.boss = frame.boss;
frame.player.jump_timer = 0;
frame.player.pain_timer = 0;
frame.player.flick_timer = 0;
frame.player.flick_state = false;
frame.player.crouch = false;
frame.player.pos1 = frame.pos1;
frame.player.pos2 = frame.pos2;
frame.player.base = frame.pos1;
frame.player.dest = null;
frame.player.health_interpolation = MINIGAME3_PLAYER_MAX_HEALTH;
frame.player.health = MINIGAME3_PLAYER_MAX_HEALTH;
frame.player.Update_Hud = Player3_UpdateHud;
frame.player.life_bar = life_bar;
frame.player.actor = false;
frame.bkg.Update = Background3_Update;
frame.bkg.boss = frame.boss;
frame.bkg.tree = frame.bkg.trees;
frame.bkg.tree_accum = 0;
if (_global.juniperlee.monkey_mode.done) {
frame.bkg.monkey_mc._visible = true;
} else {
frame.bkg.monkey_mc._visible = false;
}
frame.bkg.monkey_mc = Monkey_Update;
frame.bkg._x = -300;
frame.player_height = frame.player._height;
frame.player_y = frame.player._y;
frame.rotation_timer = (frameMeter.ticks + MINIGAME3_CREATIONTIME) + random(MINIGAME3_CREATIONTIME * 20);
frame.rotation_angle = MINIGAME3_BASE_ANGLE;
frame._rot = MINIGAME3_BASE_ANGLE;
frame.UpdateRotation = Minigame3_UpdateRotation;
frame.Update = Minigame3_Update;
frame.cando = false;
frame.instances = 10;
frame.current = 0;
frame.spawntime = frameMeter.ticks + (MINIGAME3_FRAME_WAIT_TIME * frame.instances);
frame.spawntime2 = frameMeter.ticks + ((MINIGAME3_FRAME_WAIT_TIME * frame.instances) / 2);
frame.tree_leaf.Update = TreeLeaf_Update;
frame.tree_leaf.leaf = frame.solid_mc;
frame.tree_leaf.player = frame.player;
frame.tree_leaf.swapthedepth = false;
frame.tree_leaf.go = false;
frame.tree_leaf.checked = false;
frame.tree_noleaf.Update = TreeNoLeaf_Update;
frame.tree_noleaf.spawntime = frameMeter.ticks + (MINIGAME3_TREE_SPAWN_TIME + (MINIGAME3_TREE_SPAWN_TIME / 2));
frame.tree_noleaf.solid_mc._visible = false;
frame.tree_noleaf.go = false;
frame.rock_mc.Update = Rock_Update;
frame.rock_mc.player = frame.player;
frame.rock_mc.iwannariot = false;
frame.rock_mc.total = 0;
frame.rock_mc.go = false;
frame.rock_mc.go_down = false;
frame.rock_mc.go_up = false;
frame.rock_mc.go_farnear = false;
frame.leaf_mc.accum = 0;
frame.rockbroken_mc.done = true;
frame.rockbroken_mc.Update = RockBroken_Update;
frame.item_mc.Update = Item_Update;
frame.item_mc.colbox._visible = false;
frame.item_mc._alpha = 0;
CURRENT_SPEED = 0;
delete rock_list;
rock_list = new Array();
game_time = frameMeter.ticks + MINIGAME3_TOTALTIME;
game_actor = false;
frameMeter.Add(frame.player);
frameMeter.Add(frame.bkg);
frameMeter.Add(frame);
frameMeter.Add(frame.tree_leaf);
frameMeter.Add(frame.tree_noleaf);
frameMeter.Add(frame.rock_mc);
frameMeter.Add(frame.rockbroken_mc);
frameMeter.Add(frame.boss);
frameMeter.Add(frame.item_mc);
restore = false;
}
function Inst_Go() {
inst_left = false;
inst_right = false;
inst_up = false;
inst_down = false;
inst_mc.play();
}
function Inst_Init(mc) {
mc.onEnterFrame = Inst_Update;
}
function Inst_Update() {
trace(inst_index);
if (this._currentframe == 42) {
frameMeter.ticks = 0;
}
if (this._currentframe == 43) {
if (Key.isDown(32)) {
inst_left = false;
inst_right = false;
inst_jump = false;
inst_mc.play();
}
if (inst_sequence[inst_index] != this.btns_mc.btn_right) {
this.btns_mc.btn_right.gotoAndStop(1);
inst_right = false;
} else {
inst_right = true;
}
if (inst_sequence[inst_index] != this.btns_mc.btn_left) {
this.btns_mc.btn_left.gotoAndStop(1);
inst_left = false;
} else {
inst_left = true;
}
if (inst_sequence[inst_index] != this.btns_mc.btn_up) {
this.btns_mc.btn_up.gotoAndStop(1);
inst_up = false;
} else {
inst_up = true;
}
if (inst_sequence[inst_index] != this.btns_mc.btn_down) {
this.btns_mc.btn_down.gotoAndStop(1);
inst_down = false;
} else {
inst_down = true;
}
inst_sequence[inst_index].gotoAndStop(inst_flick_intance);
if (inst_flick_timer < frameMeter.ticks) {
if (inst_flick_intance == 1) {
inst_flick_intance = 2;
} else {
inst_flick_intance = 1;
}
inst_flick_timer = frameMeter.ticks + INST_FLICK_TIMER;
}
if (inst_timer < frameMeter.ticks) {
inst_index++;
if (inst_sequence[inst_index] == undefined) {
inst_index = 0;
inst_timer = frameMeter.ticks + inst_sequence_timer[inst_index];
inst_left = false;
inst_right = false;
inst_up = false;
inst_down = false;
} else {
inst_timer = frameMeter.ticks + inst_sequence_timer[inst_index];
}
}
} else if (this._currentframe == 83) {
inst_left = false;
inst_right = false;
inst_up = false;
inst_down = false;
Game_Init();
} else if (this._currentframe == 84) {
inst_done = true;
}
}
MINIGAME3_BASE_FRAMEMODEL = 40;
MINIGAME3_BASE_GLOBAL_DIFF_MULTIPLIER = 0.5;
MINIGAME2_ITEM_PLUS_HEALTH = 100;
MINIGAME3_SCROLLSPEED = 1;
MINIGAME3_CREATIONTIME = 1000;
MINIGAME3_PARTICLEMAX = 20;
MINIGAME3_PARTICLELIFE = 2000;
MINIGAME3_PARTICLETIME = 400;
MINIGAME3_GRAVITY = -18;
MINIGAME3_TOTALTIME = 60000;
MINIGAME3_FRAME_WAIT_TIME = 100;
MINIGAME3_TREE_SPAWN_TIME = 5000;
MINIGAME3_OBJECTTIME = 200;
MINIGAME3_ROCKTIME = 200;
MINIGAME3_WAITTIME = 1000;
MINIGAME3_FLICK_TIME = 40;
MINIGAME3_PLAYER_PAIN_TIME = 500;
MINIGAME3_PLAYER_JUMP_TIME = 25;
MINIGAME3_PLAYER_JUMP_HEIGHT = 10;
MINIGAME3_PLAYER_JUMP_STEP = 0.5;
MINIGAME3_PLAYER_MAX_HEALTH = 300;
MINIGAME3_PLAYER_DAMAGE = 30;
MINIGAME3_BASE_ANGLE = 25;
MINIGAME3_PLUS_ANGLE = 10;
MINIGAME3_MIN_PARTICLE_DISTANCE = 50;
MINIGAME3_MIN_OBJECT_DISTANCE = 20;
BOSS_ANIM_SLOW = 1;
BOSS_ANIM_MEDIUM = 2;
BOSS_ANIM_HARD = 3;
BOSS_ANIM_HIT = 4;
PLAYER_STEP_SIZE = 1.3;
PLAYER_ANIM_IDLE_SLOW = 1;
PLAYER_ANIM_IDLE_MEDIUM = 2;
PLAYER_ANIM_IDLE_HARD = 3;
PLAYER_ANIM_CROUCH = 4;
PLAYER_ANIM_IDLE_CROUCH_SLOW = 5;
PLAYER_ANIM_IDLE_CROUCH_MEDIUM = 6;
PLAYER_ANIM_IDLE_CROUCH_HARD = 7;
PLAYER_ANIM_JUMP = 8;
PLAYER_ANIM_PAIN = 9;
PLAYER_ANIM_WALK = 10;
var last = 0;
var self = this;
var ttttt = null;
_global.dumb_sound = new Sound(frame.leaf_mc);
_global.dumb_sound.stop();
_global.dumb_sound.attachSound("sfx_hittt.wav");
_global.dumb_sound.stop("sfx_hittt.wav");
_global.dumb_sound.setVolume(_global.ubunsound_sfx_volumen);
var interface = this._parent.inteface_mc;
var controls = this._parent.controls_mc;
interface.gotoAndStop(3);
interface._alpha = 0;
controls._alpha = 0;
var keyboard_control = new Object();
var frameMeter = (new _global.ubundata.root.CFrameModel(MINIGAME3_BASE_FRAMEMODEL));
var dicemachine = (new _global.ubundata.root.CUbunDiceMachine(6));
var CURRENT_SPEED = 0;
var rock_list = new Array();
var game_time = (frameMeter.ticks + MINIGAME3_TOTALTIME);
var game_actor = false;
Game_Init();
_global.ubunsound.Reset();
_global.ubunsound.Load(0, "sfx_superhit");
_global.ubunsound.Load(1, "sfx_bike_hit");
_global.ubunsound.Load(2, "sfx_raktaloop");
_global.ubunsound.Load(3, "sfx_treehit");
_global.ubunsound.Load(4, "sfx_rockhit");
_global.ubunsound.Load(5, "sfx_item");
_global.ubunsound.Load(8, "sfx_surfing");
_global.ubunsound.Play(8);
_global.ubunsound.Play(2, true);
_global.ubunsound.SetIndividualVolume(2, 40);
_global.ubundata.root.inter_mc.gotoAndPlay(16);
INST_TIMER = 1500;
INST_FLICK_TIMER = 50;
var inst_done = false;
var inst_sequence = new Array(inst_mc.btns_mc.btn_right, inst_mc.btns_mc.btn_right, inst_mc.btns_mc.btn_left, inst_mc.btns_mc.btn_down, inst_mc.btns_mc.btn_up);
var inst_sequence_timer = new Array(INST_TIMER, INST_TIMER, INST_TIMER / 4, INST_TIMER, INST_TIMER);
var inst_index = 0;
var inst_timer = (frameMeter.ticks + INST_TIMER);
var inst_flick_timer = (frameMeter.ticks + INST_FLICK_TIMER);
var inst_flick_intance = 1;
var inst_left = false;
var inst_right = false;
var inst_up = false;
var inst_down = false;
inst_mc.button_mc.onRelease = Inst_Go;
Inst_Init(inst_mc);
var xxxxxxxxxxxxxxxxxx = 1;
this.onEnterFrame = function () {
_global.ubunsound.SetIndividualVolume(8, 60);
if (inst_done && (interface._alpha < 100)) {
interface._alpha = interface._alpha + 25;
controls._alpha = controls._alpha + 25;
if (interface._alpha >= 100) {
interface._alpha = 100;
controls._alpha = 100;
}
}
if (!game_actor) {
if (game_time < frameMeter.ticks) {
game_actor = true;
frame.player.gotoAndStop(11);
}
} else {
frame.shadow._visible = false;
frame.bkg.Update(ttttt, xxxxxxxxxxxxxxxxxx);
if (frame.player._currentframe != 11) {
frame.player.gotoAndStop(11);
}
if (!frame.ttttttttttttttttt) {
frame.ttttttttttttttttt = 10;
}
if (frame.player.pose._currentframe < 8) {
} else if (frame.boss._x < 734) {
frame.boss._x = frame.boss._x + frame.ttttttttttttttttt;
frame.smoke_mc._x = frame.smoke_mc._x + frame.ttttttttttttttttt;
frame.ttttttttttttttttt = frame.ttttttttttttttttt + 0.5;
xxxxxxxxxxxxxxxxxx = xxxxxxxxxxxxxxxxxx - 0.03;
if (xxxxxxxxxxxxxxxxxx < 0) {
xxxxxxxxxxxxxxxxxx = 0;
}
if ((frame.boss._x > 430) && (frame.boss._x < 450)) {
if (_global.ubunsound.muted) {
_global.dumb_sound.setVolume(0);
} else {
_global.dumb_sound.setVolume(_global.ubunsound_sfx_volumen);
}
_global.dumb_sound.start(0, 1);
}
if (frame.boss._x > 500) {
if (juniiiiiiii._currentframe == 1) {
juniiiiiiii.gotoAndPlay(2);
}
}
} else if (trans_1_mc._currentframe == 1) {
trans_1_mc.gotoAndPlay(2);
} else if (trans_1_mc._currentframe == trans_1_mc._totalframes) {
trace("terminoooooooo");
Key.removeListener(keyboard_control);
delete frameMeter;
delete keyboard_control;
self._parent.gotoAndStop("win");
}
for (var _local4 in rock_list) {
rock_list[_local4].Update();
}
return(undefined);
}
if (locked) {
if (trans_1_mc._currentframe == 1) {
trans_1_mc.gotoAndPlay(2);
} else if (trans_1_mc._currentframe == trans_1_mc._totalframes) {
Key.removeListener(keyboard_control);
delete frameMeter;
delete keyboard_control;
this._parent.gotoAndStop("lose");
}
}
if (_global.ubundata.paused) {
frame.boss.pauseMC(true);
frame.player.pauseMC(true);
restore = true;
} else if (restore) {
frame.boss.pauseMC(false);
frame.player.pauseMC(false);
restore = false;
}
if (frame.player.health < 0) {
frame.player.actor = true;
}
if (frame.player._x < -600) {
locked = true;
return(undefined);
}
for (var _local4 in rock_list) {
rock_list[_local4].Update();
}
var _local5 = game_time - frameMeter.ticks;
var _local3 = Math.floor((_local5 * 100) / MINIGAME3_TOTALTIME);
if (_local3 <= 1) {
_local3 = 1;
} else if (_local3 >= 100) {
_local3 = 99;
}
interface.distance_mc.gotoAndStop(100 - _local3);
frameMeter.Update(this);
fps.text = "FPS " + frameMeter.fps.toString();
keyboard_control.Update();
};
Symbol 759 MovieClip Frame 1
stop();
Symbol 759 MovieClip Frame 2
stop();
Symbol 762 MovieClip Frame 31
stop();
Symbol 762 MovieClip Frame 63
this._parent._parent._parent.gotoAndStop("Menu");
Symbol 795 MovieClip Frame 40
stop();
Symbol 798 MovieClip Frame 40
stop();
Symbol 802 MovieClip Frame 40
stop();
Symbol 828 MovieClip Frame 47
stop();
Symbol 831 MovieClip Frame 1
stop();
Symbol 831 MovieClip Frame 2
stop();
Symbol 832 MovieClip Frame 31
stop();
Symbol 832 MovieClip Frame 63
this._parent._parent._parent.gotoAndStop("Menu");
Symbol 833 MovieClip Frame 40
stop();
Symbol 834 MovieClip Frame 1
function UbunSound_Init(mc) {
_global.ubunsound = new CUbunSound(mc);
_global.ubunsound_sfx_volumen = 50;
_global.ubunsound_bkg_volumen = 50;
}
function CUbunSound(mc) {
var _local2 = 0;
var _local3;
this.mc = mc;
this.sounds = new Array();
this.muted = false;
while (_local2 < MAX_SOUND_MIX_CHANNELS) {
_local3 = mc.createEmptyMovieClip(("sfx_channel_" + _local2).toString(), BASE_DEPTH + _local2);
trace(_local3);
this.sounds[_local2] = new Sound(_local3);
this.sounds[_local2].stop();
_local2++;
}
_local3 = mc.createEmptyMovieClip("sfx_channel_bkg".toString(), BASE_DEPTH + 8);
trace("music " + _local3);
this.sounds[8] = new Sound(_local3);
}
function UbunInit() {
if (_global.ubundata != undefined) {
trace("noooooooooooooo");
return(undefined);
}
_root._quality = "HIGH";
_global.ubundata = new Object();
_global.ubundata.version = "20060405";
_global.ubundata.project = "JuniperLee";
_global.ubundata.root = this;
_global.ubundata.debug = false;
_global.ubundata.paused = false;
_global.ubundata.muted = false;
var _local4 = getVersion().split(" ")[1];
_global.ubundata.player_ver = Number(_local4.split(",")[0]);
_global.ubundata.checkpoint = "";
_global.ubundata.score = 0;
_global.ubundata.fr = new CFrameModel(24);
UbunLoadConfig();
UbunSound_Init(_root);
}
function UbunLoadConfig() {
}
function UbunSaveConfig() {
}
function CSprite(parent, mem, depth) {
this.sprite = parent.attachMovie(mem, (mem + "_") + getTimer(), (depth ? (depth) : 1));
this.x = 0;
this.y = 0;
this.lastframe = -1;
this.GetDistance = Sprite_GetDistance;
this.Update = Sprite_Update;
this.UpdateClipper = Sprite_UpdateClipper;
this.Play = Sprite_Play;
this.IsColliding = Sprite_IsColliding;
}
function Sprite_GetDistance(other) {
var _local3 = other.x - this.x;
var _local2 = other.y - this.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function Sprite_Update() {
this.sprite._x = this.x;
this.sprite._y = this.y;
this.UpdateClipper();
}
function Sprite_UpdateClipper() {
var _local3 = this.x;
var _local9 = this.y;
var _local13 = this.sprite._width;
var _local14 = this.sprite._height;
var _local5;
var _local4;
var _local10;
var _local8;
var _local7;
var _local6;
var _local12;
var _local11;
var _local2 = false;
_local5 = _local3;
_local4 = 0;
_local10 = _local3 + _local13;
_local8 = 600;
_local7 = _local9;
_local6 = 0;
_local12 = _local3 + _local14;
_local11 = 400;
if (_local12 < _local6) {
_local2 = true;
}
if (_local7 > _local11) {
_local2 = true;
}
if (_local10 < _local4) {
_local2 = true;
}
if (_local5 > _local8) {
_local2 = true;
}
if (_local2) {
this.sprite._visible = false;
} else {
this.sprite._visible = true;
}
}
function Sprite_Play(frame) {
if (frame == this.lastframe) {
return(undefined);
}
this.sprite.gotoAndStop(frame);
this.lastframe = frame;
}
function Sprite_IsColliding(other) {
var _local6 = this.x;
var _local4 = this.y;
var _local10 = this.sprite._width;
var _local8 = this.sprite._height;
var _local5 = other.x;
var _local3 = other.y;
var _local9 = other.sprite._width;
var _local7 = other.sprite._height;
var _local12 = (_local10 + _local9) - Math.abs(_local6 - _local5);
var _local11 = (_local8 + _local7) - Math.abs(_local4 - _local3);
return(null);
}
function CUbunTint(mc, r, g, b) {
this.mc = mc;
this.tint = new Color(this.mc);
this.currenttint = {rb:r, gb:g, bb:b};
this.tint.setTransform(this.currenttint);
this.Set = UbunTint_Set;
}
function UbunTint_Set(r, g, b) {
this.currenttint = {rb:r, gb:g, bb:b};
this.tint.setTransform(this.currenttint);
}
function CFrameModel(mfps) {
this.modelFPS = mfps;
this.millis = getTimer();
this.instanceList = new Array();
this.d = 0;
this.dtimer = getTimer();
this.fps = 60;
this.ticks = 0;
this.code_ep = 0;
this.frames = 0;
this.frames_timer = getTimer();
this.Update = FrameModel_Update;
this.doModelFrames = FrameModel_doModelFrames;
this.Add = FrameModel_addInstance;
}
function FrameModel_Update(parent) {
var _local4 = getTimer() - this.millis;
var _local3 = this.modelFPS * (_local4 / 1000);
if (!_global.ubundata.paused) {
this.doModelFrames(_local3, parent);
}
if (this.modelFPS > 0) {
this.millis = this.millis + ((_local3 / parseFloat(this.modelFPS)) * 1000);
}
this.d = getTimer() - this.dtimer;
this.dtimer = getTimer();
if (!_global.ubundata.paused) {
this.ticks = this.ticks + this.d;
}
if ((getTimer() - this.frames_timer) > 1000) {
this.fps = this.frames;
this.frames = 0;
this.frames_timer = getTimer();
} else {
this.frames++;
}
}
function FrameModel_doModelFrames(mframes, parent) {
var _local6 = getTimer();
var _local2 = 0;
while (_local2 < mframes) {
for (var _local3 in this.instanceList) {
this.instanceList[_local3].Update(parent);
}
updateAfterEvent();
_local2++;
}
this.code_ep = getTimer() - _local6;
}
function FrameModel_addInstance(inst) {
this.instanceList.push(inst);
}
function CInput() {
this.LEFT = false;
this.RIGHT = false;
this.UP = false;
this.DOWN = false;
this.Z = false;
this.X = false;
this.PRESS = false;
this.Update = Input_Update;
}
function Input_Update() {
this.LEFT = Key.isDown(37);
this.RIGHT = Key.isDown(39);
this.UP = Key.isDown(38);
this.DOWN = Key.isDown(40);
this.Z = Key.isDown(90);
this.X = Key.isDown(88);
this.PRESS = ((((this.LEFT || (this.RIGHT)) || (this.UP)) || (this.DOWN)) || (this.X)) || (this.Z);
}
function CStateMachine() {
this.IDLE = 0;
this.WALK = 1;
this.ATTACK = 2;
this.WAIT = 3;
this.PAIN = 4;
this.DIE = 5;
this.JUMP = 6;
this.state_idle = false;
this.state_walk = false;
this.state_attack = false;
this.state_wait = false;
this.state_pain = false;
this.state_die = false;
this.state_jump = false;
this.state = this.IDLE;
this.Update = StateMachine_Update;
}
function StateMachine_Update() {
this.state_idle = this.state == this.IDLE;
this.state_walk = this.state == this.WALK;
this.state_attack = this.state == this.ATTACK;
this.state_wait = this.state == this.WAIT;
this.state_pain = this.state == this.PAIN;
this.state_die = this.state == this.DIE;
this.state_jump = this.state == this.JUMP;
}
function CUbunClock(minutes, seconds, plus, spass) {
if (spass != undefined) {
this.spass = spass;
}
this.minutes = minutes;
this.seconds = seconds;
this.plus = plus;
this.done = false;
this.timer = getTimer();
this.Update = UbunClock_Update;
}
function UbunClock_Update() {
if (this.done) {
return(undefined);
}
if ((getTimer() - this.timer) >= 800) {
this.seconds = this.seconds + this.plus;
if (this.spass != undefined) {
this.spass();
}
if (((this.minutes <= 0) && (this.seconds <= 0)) && (this.plus < 0)) {
this.minutes = 0;
this.seconds = 0;
this.done = true;
return(undefined);
}
if (this.seconds > 59) {
this.minutes++;
this.seconds = 0;
} else if (this.seconds < 0) {
this.seconds = 59;
this.minutes--;
}
this.timer = getTimer();
}
}
function CUbunCheatMachine(code, func, id) {
this.mySpecialMove = code;
this.mySpecialIndex = 0;
this.done = false;
this.func = func;
this.id = id;
this.myListener = new Object();
this.myListener.parent = this;
this.myListener.onKeyUp = function () {
if (this.parent.done) {
return(undefined);
}
if (Key.getCode() == this.parent.mySpecialMove[this.parent.mySpecialIndex]) {
this.parent.mySpecialIndex++;
if (this.parent.mySpecialIndex >= this.parent.mySpecialMove.length) {
this.parent.done = true;
this.parent.mySpecialIndex = 0;
this.parent.func(this.parent.id);
Key.removeListener(this.parent.myListener);
}
} else {
this.parent.mySpecialIndex = 0;
}
};
Key.addListener(this.myListener);
}
function CUbunDiceMachine(total_pos) {
this.dice_array = new Array(total_pos);
var _local2 = 0;
while (_local2 < total_pos) {
this.dice_array[_local2] = 0;
_local2++;
}
this.Add = UbunDiceMachine_Add;
this.Eval = UbunDiceMachine_Eval;
}
function UbunDiceMachine_Add(pos) {
this.dice_array[pos] = this.dice_array[pos] + 0.1;
}
function UbunDiceMachine_Eval() {
var _local2;
var _local3;
var _local4;
_local4 = 0;
_local3 = _local4;
_local2 = _local3;
var _local5 = this.dice_array.length;
while (_local2 < _local5) {
if (this.dice_array[_local2] > _local3) {
_local3 = this.dice_array[_local2];
_local4 = _local2;
}
_local2++;
}
var _local6 = _local4;
if (_local3 == 0) {
_local6 = -1;
}
return(_local6);
}
function CUbunWaypoint() {
this.waypoints = new Array();
this.current = -1;
this.Add = UbunWaypoint_Add;
this.Get = UbunWaypoint_Get;
}
function UbunWaypoint_Add(x, y) {
var _local2 = new Object();
_local2._x = x;
_local2._y = y;
this.waypoints.push(_local2);
}
function UbunWaypoint_Get(j) {
var _local2 = 0;
while (_local2 < this.waypoints.length) {
if (j == _local2) {
return(this.waypoints[_local2]);
}
_local2++;
}
return(null);
}
function getDistance(x1, y1, x2, y2) {
var _local2 = x2 - x1;
var _local1 = y2 - y1;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function boxvsboxcollision(x1, y1, w1, h1, x2, y2, w2, h2) {
if ((Math.abs(x2 - x1) > (w1 + w2)) && (Math.abs(y2 - y1) > (h1 + h2))) {
return(true);
}
return(false);
}
function recursivepauseMC(mc, flag) {
if (flag) {
mc.gotoAndStop(mc._currentframe);
} else {
mc.gotoAndPlay(mc._currentframe);
}
for (var _local3 in mc) {
if (typeof(mc[_local3]) == "movieclip") {
if (flag) {
mc[_local3].gotoAndStop(mc._currentframe);
} else {
mc[_local3].gotoAndPlay(mc._currentframe);
}
recursivepauseMC(mc[_local3]);
}
}
}
function rad(x) {
return(x * 0.01745329);
}
function deg(x) {
return(x * 57.29578);
}
function randRange(min, max) {
var _local1 = Math.round(Math.random() * (max - min)) + min;
return(_local1);
}
function mainmenu_KeyUp() {
this.UP = Key.getCode() == 38;
this.DOWN = Key.getCode() == 40;
this.SPACE = Key.getCode() == 32;
}
function LoseMenu_OnRelease() {
_global.ubunsound.Play(0, false);
if (this.id == MENU_BACK) {
gomenu_set = true;
}
Key.removeListener(keyListener);
}
function LoseMenu_OnRollOver() {
_global.ubunsound.Play(1, false);
if (focusOn != this) {
focusOn.gotoAndStop(1);
}
focusOn = this;
this.gotoAndStop(2);
}
function LoseMenu_OnRollOut() {
this.gotoAndStop(1);
}
function LoseMenu_HandleKeyboard() {
if (!focusOn) {
if (keyListener.UP || (keyListener.DOWN)) {
focusOn = scr_mc.panel_mc.back_mc;
focusOn.onRollOver();
}
return(undefined);
}
var _local1 = focusOn;
if (focusOn.id == MENU_BACK) {
if (keyListener.SPACE) {
focusOn.onRelease();
}
}
if (_local1 != focusOn) {
_local1.onRollOut();
focusOn.onRollOver();
}
}
MAX_SOUND_MIX_CHANNELS = 8;
BASE_DEPTH = 999;
CUbunSound.prototype.Load = function (num, name_str) {
this.sounds[num].attachSound(name_str);
this.sounds[num].stop(name_str);
if (num < 8) {
this.sounds[num].setVolume(_global.ubunsound_sfx_volumen);
} else {
this.sounds[8].setVolume(_global.ubunsound_bkg_volumen);
}
return(num);
};
CUbunSound.prototype.Play = function (x, loop) {
if (x < 8) {
if (this.muted) {
this.sounds[x].setVolume(0);
} else {
this.sounds[x].setVolume(_global.ubunsound_sfx_volumen);
}
if (!loop) {
this.sounds[x].start(0, 1);
} else {
this.sounds[x].start(0, 999);
}
} else {
if (this.muted) {
this.sounds[8].setVolume(0);
} else {
this.sounds[8].setVolume(_global.ubunsound_bkg_volumen);
}
this.sounds[8].start(0, 999);
}
};
CUbunSound.prototype.Reset = function () {
for (var _local5 in this.sounds) {
this.sounds[_local5].stop();
}
for (var _local4 in this.mc) {
if (typeof(this.mc[_local4]) == "movieclip") {
if (_local4.substring(0, 11) == "sfx_channel") {
this.mc[_local4].swapDepths(9999999999);
this.mc[_local4].removeMovieClip();
}
}
}
delete this.sounds;
var _local3;
var _local2 = 0;
this.sounds = new Array();
while (_local2 < MAX_SOUND_MIX_CHANNELS) {
_local3 = this.mc.createEmptyMovieClip(("sfx_channel_" + _local2).toString(), BASE_DEPTH + _local2);
this.sounds[_local2] = new Sound(_local3);
this.sounds[_local2].stop();
_local2++;
}
_local3 = this.mc.createEmptyMovieClip("sfx_channel_bkg".toString(), BASE_DEPTH + 8);
this.sounds[8] = new Sound(_local3);
};
CUbunSound.prototype.SetIndividualVolume = function (x, percent) {
if (this.muted) {
return(undefined);
}
if (x < 8) {
var _local3 = (percent * _global.ubunsound_sfx_volumen) / 100;
this.sounds[x].setVolume(_local3);
} else {
var _local3 = (percent * _global.ubunsound_bkg_volumen) / 100;
this.sounds[8].setVolume(_local3);
}
};
CUbunSound.prototype.SetSFXVolume = function (x) {
var _local3 = 0;
_global.ubunsound_sfx_volumen = x;
while (_local3 < MAX_SOUND_MIX_CHANNELS) {
this.sounds[_local3].setVolume(x);
_local3++;
}
};
CUbunSound.prototype.SetMusicVolume = function (x) {
_global.ubunsound_bkg_volumen = x;
this.sounds[8].setVolume(x);
};
CUbunSound.prototype.Mute = function (x) {
this.muted = x;
var _local3 = 0;
while (_local3 < MAX_SOUND_MIX_CHANNELS) {
if (this.muted) {
this.sounds[_local3].setVolume(0);
} else {
this.sounds[_local3].setVolume(_global.ubunsound_sfx_volumen);
}
_local3++;
}
if (this.muted) {
this.sounds[8].setVolume(0);
} else {
this.sounds[8].setVolume(_global.ubunsound_bkg_volumen);
}
};
MovieClip.prototype.UpdateZ = function () {
this.swapDepths(this._x + (this._y * _root._width));
};
MovieClip.prototype.ScrollH = function (x) {
this._x = this._x + x;
if (this._x < (-(this._width / 2))) {
this._x = this._x + (this._width / 2);
}
};
MovieClip.prototype.setRGBA = function (r, g, b, a) {
var _local2 = new Color(this);
var _local3 = {rb:r, gb:g, bb:b};
_local2.setTransform(_local3);
};
MovieClip.prototype.pauseMC = function (flag) {
_global.ubundata.root.recursivepauseMC(this, flag);
};
MovieClip.prototype.realCoords = function () {
var _local2 = new Object();
_local2.x = 0;
_local2.y = 0;
this.localToGlobal(_local2);
return(_local2);
};
MovieClip.prototype.RadiusCollision = function (other_mc, min) {
var _local3 = this.realCoords();
var _local2 = other_mc.realCoords();
if (getDistance(_local3.x, _local3.y, _local2.x, _local2.y) < min) {
return(true);
}
return(false);
};
MovieClip.prototype.Intersects = function (other_mc) {
var _local3 = this.realCoords();
var _local2 = other_mc.realCoords();
if ((Math.abs(_local2.x - _local3.x) < (this._width + other_mc._width)) && (Math.abs(_local2.y - _local3.y) < (this._height + other_mc._height))) {
return(true);
}
return(false);
};
MovieClip.prototype.GetDistance = function (other_mc) {
var _local3 = this.realCoords();
var _local2 = other_mc.realCoords();
return(getDistance(_local3.x, _local3.y, _local2.x, _local2.y));
};
MovieClip.prototype.Rewind = function () {
this.gotoAndStop(1);
for (var _local2 in this) {
if (typeof(this[_local2]) == "movieclip") {
this[_local2].gotoAndStop(1);
}
}
};
MovieClip.prototype.Play = function () {
this.gotoAndPlay(1);
for (var _local2 in this) {
if (typeof(this[_local2]) == "movieclip") {
this[_local2].gotoAndPlay(1);
}
}
};
MovieClip.prototype.FadeIn = function () {
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha - 25;
} else {
this._alpha = 100;
delete this.onEnterFrame;
}
};
};
continue_set = false;
gomenu_set = false;
parent = this._parent;
MENU_BACK = 0;
_global.ubunsound.Reset();
_global.ubunsound.Load(8, "sfx_pierde");
_global.ubunsound.Play(8);
if (_global.ubundata.checkpoint == "minigame1") {
if (_global.reason == "time") {
gotoAndStop (4);
} else {
gotoAndStop (2);
}
} else if (_global.ubundata.checkpoint == "minigame2") {
gotoAndStop (3);
} else if (_global.ubundata.checkpoint == "minigame3") {
gotoAndStop (1);
}
var keyListener = new Object();
keyListener.UP = false;
keyListener.DOWN = false;
keyListener.SPACE = false;
keyListener.onKeyUp = mainmenu_KeyUp;
Key.addListener(keyListener);
var focusOn = null;
var locked = false;
if (!scr_mc.panel_mc.back_mc.onRelease) {
scr_mc.panel_mc.back_mc.id = MENU_BACK;
scr_mc.panel_mc.back_mc.onRelease = LoseMenu_OnRelease;
scr_mc.panel_mc.back_mc.onRollOver = LoseMenu_OnRollOver;
scr_mc.panel_mc.back_mc.onRollOut = LoseMenu_OnRollOut;
}
this.onEnterFrame = function () {
if (locked) {
delete scr_mc.panel_mc.back_mc.onRelease;
delete scr_mc.panel_mc.back_mc.onRollOver;
delete scr_mc.panel_mc.back_mc.onRollOut;
if (scr_mc.panel_mc._currentframe == 50) {
trans_1_mc.gotoAndPlay(2);
}
delete this.onEnterFrame;
return(undefined);
}
LoseMenu_HandleKeyboard();
if (gomenu_set) {
locked = true;
_global.ubundata.checkpoint = "";
scr_mc.panel_mc.play();
}
};
stop();
stop();
Symbol 846 MovieClip Frame 1
stop();
Symbol 864 MovieClip Frame 1
stop();
Symbol 864 MovieClip Frame 2
stop();
Symbol 867 MovieClip Frame 92
stop();
Symbol 867 MovieClip Frame 122
this._parent._parent._parent.gotoAndStop("Menu");
Symbol 869 MovieClip Frame 1
function WinMenu_KeyUp() {
this.UP = Key.getCode() == 38;
this.DOWN = Key.getCode() == 40;
this.SPACE = Key.getCode() == 32;
}
function WinMenu_OnRelease() {
_global.ubunsound.Play(0, false);
if (this.id == MENU_BACK) {
gomenu_set = true;
}
Key.removeListener(keyListener);
}
function WinMenu_OnRollOver() {
_global.ubunsound.Play(1, false);
if (focusOn != this) {
focusOn.gotoAndStop(1);
}
focusOn = this;
this.gotoAndStop(2);
}
function WinMenu_OnRollOut() {
this.gotoAndStop(1);
}
function WinMenu_CheckDefaults() {
if (!win_mc.panel_mc.back_mc.onRelease) {
win_mc.panel_mc.back_mc.id = MENU_BACK;
win_mc.panel_mc.back_mc.onRelease = WinMenu_OnRelease;
win_mc.panel_mc.back_mc.onRollOver = WinMenu_OnRollOver;
win_mc.panel_mc.back_mc.onRollOut = WinMenu_OnRollOut;
}
}
function WinMenu_HandleKeyboard() {
if (!focusOn) {
if (keyListener.UP || (keyListener.DOWN)) {
focusOn = win_mc.panel_mc.back_mc;
focusOn.onRollOver();
}
return(undefined);
}
var _local1 = focusOn;
if (focusOn.id == MENU_BACK) {
if (keyListener.SPACE) {
focusOn.onRelease();
}
}
if (_local1 != focusOn) {
_local1.onRollOut();
focusOn.onRollOver();
}
}
MENU_BACK = 0;
var keyListener = new Object();
keyListener.UP = false;
keyListener.DOWN = false;
keyListener.SPACE = false;
keyListener.onKeyUp = WinMenu_KeyUp;
Key.addListener(keyListener);
var focusOn = null;
_global.ubundata.root.inter_mc.gotoAndPlay(16);
_global.ubunsound.Reset();
_global.ubunsound.Load(8, "sfx_gana");
_global.ubunsound.Play(8);
var locked = false;
var locked2 = false;
this.onEnterFrame = function () {
_global.menu_trans = true;
if (locked2) {
delete win_mc.panel_mc.back_mc.onRelease;
delete win_mc.panel_mc.back_mc.onRollOver;
delete win_mc.panel_mc.back_mc.onRollOut;
if (win_mc.panel_mc._currentframe == 108) {
trans_1_mc.gotoAndPlay(2);
delete this.onEnterFrame;
}
return(undefined);
}
if (locked) {
delete win_mc.panel_mc.back_mc.onRelease;
delete win_mc.panel_mc.back_mc.onRollOver;
delete win_mc.panel_mc.back_mc.onRollOut;
if (trans_1_mc._currentframe == 1) {
trans_1_mc.gotoAndPlay(2);
} else if (trans_1_mc._currentframe == trans_1_mc._totalframes) {
trace(_global.ubundata.checkpoint);
this._parent.gotoAndStop(_global.ubundata.checkpoint);
delete this.onEnterFrame;
}
return(undefined);
}
WinMenu_HandleKeyboard();
WinMenu_CheckDefaults();
if (continue_set) {
locked = true;
} else if (gomenu_set) {
locked2 = true;
_global.ubundata.checkpoint = "";
win_mc.panel_mc.play();
}
keyListener.UP = false;
keyListener.DOWN = false;
keyListener.SPACE = false;
};
Symbol 870 MovieClip Frame 1
_global.ubunsound.Reset();
_global.ubunsound.Load(8, "sfx_intro");
_global.ubunsound.Load(0, "sfx_fx2");
_global.ubunsound.Load(1, "sfx_rollover2");
_global.ubunsound.Play(8);
stop();
Symbol 870 MovieClip Frame 11
stop();
Symbol 870 MovieClip Frame 21
stop();
Symbol 870 MovieClip Frame 31
stop();
Symbol 870 MovieClip Frame 41
stop();
Symbol 870 MovieClip Frame 51
stop();