Frame 1
function doLoader() {
ratio = getBytesLoaded() / getBytesTotal();
if (ratio == 1) {
clearInterval(loader_int);
gotoAndStop ("game");
}
}
var ratio;
var FRAMES = 100;
loader_int = setInterval(doLoader, 5);
Frame 5
project.init();
Symbol 14 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 10
stop();
Symbol 49 Button
on (release) {
smashing.keithm.Messenger.sendMessage("screen", "onPressHelpOpen");
}
Symbol 77 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 23
stop();
Symbol 77 MovieClip Frame 39
stop();
Symbol 174 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 32
stop();
Symbol 189 MovieClip Frame 33
play();
Symbol 189 MovieClip Frame 45
stop();
Symbol 189 MovieClip Frame 58
stop();
Symbol 189 MovieClip Frame 59
play();
Symbol 189 MovieClip Frame 71
stop();
Symbol 189 MovieClip Frame 82
stop();
Symbol 283 MovieClip Frame 120
stop();
Symbol 283 MovieClip Frame 143
stop();
Symbol 290 Button
on (release) {
nextFrame();
}
Symbol 309 Button
on (release) {
prevFrame();
}
Symbol 312 Button
on (release) {
smashing.keithm.Messenger.sendMessage("screen", "onPressPlay");
}
Symbol 314 MovieClip Frame 1
stop();
Symbol 314 MovieClip Frame 2
stop();
Symbol 314 MovieClip Frame 3
stop();
Symbol 314 MovieClip Frame 4
stop();
Symbol 324 Button
on (release) {
smashing.keithm.Messenger.sendMessage("screen", "onPressHelpClose");
}
Symbol 327 Button
on (release) {
smashing.keithm.Messenger.sendMessage("engine", "onGameOver");
}
Symbol 329 Button
on (release) {
disney.rabbitRivalry.Sounds.getInstance().musicOn();
gotoAndStop ("off");
}
Symbol 331 Button
on (release) {
disney.rabbitRivalry.Sounds.getInstance().musicOff();
gotoAndStop ("on");
}
Symbol 332 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 10
trace("Wtf : " + hideQuit);
if (hideQuit == true) {
quit_btn._visible = false;
}
if (disney.rabbitRivalry.Sounds.getInstance().muteMusic == false) {
music_btn.gotoAndStop("off");
}
stop();
Symbol 333 MovieClip Frame 27
stop();
Symbol 337 MovieClip Frame 10
stop();
Symbol 337 MovieClip Frame 25
stop();
Symbol 345 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 2
stop();
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 2
stop();
Symbol 373 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 2
stop();
Symbol 373 MovieClip Frame 3
stop();
Symbol 373 MovieClip Frame 4
stop();
Symbol 383 Button
on (release) {
smashing.keithm.Messenger.sendMessage("engine", "onHighscore");
}
Symbol 384 Button
on (release) {
smashing.keithm.Messenger.sendMessage("engine", "onStartOver");
}
Symbol 385 MovieClip Frame 1
if (disney.rabbitRivalry.GameState.getInstance().isYang) {
bg_color.gotoAndStop(2);
} else {
bg_color.gotoAndStop(1);
}
Symbol 385 MovieClip Frame 3
if (disney.rabbitRivalry.GameState.getInstance().isYang) {
char.gotoAndStop(1);
} else {
char.gotoAndStop(2);
}
Symbol 385 MovieClip Frame 47
Symbol 385 MovieClip Frame 48
stop();
Symbol 393 MovieClip Frame 1
stop();
Symbol 393 MovieClip Frame 2
stop();
Symbol 412 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 2
stop();
Symbol 421 MovieClip Frame 1
if (disney.rabbitRivalry.GameState.getInstance().isYang) {
bg_color.gotoAndStop(1);
} else {
bg_color.gotoAndStop(2);
}
Symbol 421 MovieClip Frame 4
if (disney.rabbitRivalry.GameState.getInstance().isYang) {
char.gotoAndStop(2);
} else {
char.gotoAndStop(1);
}
Symbol 421 MovieClip Frame 13
disney.rabbitRivalry.Sounds.getInstance().playLevelEndSound();
Symbol 421 MovieClip Frame 26
stop();
Symbol 454 MovieClip Frame 39
Symbol 454 MovieClip Frame 40
stop();
Symbol 458 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 2
btn_invis.useHandCursor = false;
Symbol 458 MovieClip Frame 9
stop();
Symbol 459 MovieClip [Project] Frame 1
#initclip 32
Object.registerClass("Project", disney.rabbitRivalry.Engine);
#endinitclip
Symbol 821 MovieClip [__Packages.smashing.keithm.Messenger] Frame 0
class smashing.keithm.Messenger
{
static var __addresses;
function Messenger () {
}
static function registerAddress(id, obj) {
if (__addresses == undefined) {
__addresses = {};
}
__addresses[id] = obj;
}
static function removeAddress(id) {
__addresses[id] = "";
}
static function sendMessage(id, message, args) {
if ((__addresses[id] != "") && (__addresses[id] != undefined)) {
__addresses[id].onMessageReceived(message, args);
return(undefined);
}
trace("[Messenger] Error locating message recipient " + id);
}
}
Symbol 822 MovieClip [__Packages.smashing.sound.SoundEngine] Frame 0
class smashing.sound.SoundEngine
{
var __mc, o_sounds, o_groups, __a_soundQueue, __flag_muted, __flag_overwrite, __groupCount, __callbackPath, __callbackFunc;
function SoundEngine () {
}
function generateSounds(t_path, t_depth, t_overwrite) {
__mc = t_path.createEmptyMovieClip(__DEFAULTMCNAME, t_depth);
o_sounds = {};
o_groups = {};
__a_soundQueue = [];
__flag_muted = false;
if (t_overwrite == undefined) {
t_overwrite = false;
}
__flag_overwrite = t_overwrite;
__groupCount = 0;
createGroup(__DEFAULTGROUPNAME);
trace("-- Init Sound Engine -- ");
}
function setCallback(path, func) {
__callbackPath = path;
__callbackFunc = func;
}
function createGroup(t_name) {
__groupCount++;
var _local2 = __mc.createEmptyMovieClip(t_name, __groupCount);
_local2.soundObject = new Sound(_local2);
o_groups[t_name] = _local2;
}
function createSound(t_name, t_assetID, t_groupName, doCallback) {
var _local4;
if (((t_groupName == undefined) || (t_groupName == "")) || (t_groupName == null)) {
_local4 = o_groups[__DEFAULTGROUPNAME];
} else {
_local4 = o_groups[t_groupName];
}
if (_local4 != undefined) {
var _local2 = {};
_local2.soundEffect = new Sound(_local4);
_local2.soundEffect.attachSound(t_assetID);
if (doCallback == undefined) {
doCallback = false;
}
_local2.doCallback = doCallback;
o_sounds[t_name] = _local2;
} else {
trace(("Error Locating Group " + t_groupName) + " for create Sound");
}
}
function playSound(t_soundName, t_loops, t_queued) {
if (__flag_muted) {
return(undefined);
}
var _local2 = o_sounds[t_soundName];
if (_local2 != undefined) {
if (t_loops == undefined) {
t_loops = 1;
} else if (t_loops == 0) {
t_loops = 100000 /* 0x0186A0 */;
}
if (__flag_overwrite) {
_local2.soundEffect.stop();
}
if (t_queued == true) {
__a_soundQueue[0].doCallback = _local2.doCallback;
_local2.soundEffect.onSoundComplete = mx.utils.Delegate.create(this, onQueuedSoundComplete);
} else if (_local2.doCallback) {
_local2.soundEffect.owner = this;
_local2.soundEffect.myName = t_soundName;
_local2.soundEffect.onSoundComplete = function () {
this.owner.onCallbackSoundComplete(this.myName);
};
}
_local2.soundEffect.start(0, t_loops);
} else {
trace(("Error - sound " + t_soundName) + " not found");
}
}
function stopSound(t_soundName) {
o_sounds[t_soundName].soundEffect.stop();
}
function stopAll() {
clearQueue();
stopAllSounds();
}
function changeVolume(t_vol, t_groupName) {
if (t_groupName == undefined) {
t_groupName = __DEFAULTGROUPNAME;
}
o_groups[t_groupName].soundObject.setVolume(t_vol);
}
function toggleSound() {
if (__flag_muted) {
soundOn();
} else {
soundOff();
}
return(!__flag_muted);
}
function soundOff() {
__flag_muted = true;
}
function soundOn() {
__flag_muted = false;
}
function callbackSound(t_soundName, t_loops, path, func) {
playSound(t_soundName, t_loops, false);
var _local2 = o_sounds[t_soundName];
_local2.soundEffect.cbpath = path;
_local2.soundEffect.cbfunc = func;
_local2.soundEffect.onSoundComplete = function () {
this.onSoundComplete = null;
this.cbpath[func]();
};
}
function onCallbackSoundComplete(name) {
__callbackPath[__callbackFunc](name);
}
function queueSound(t_soundName, t_isMusic) {
if (t_isMusic == undefined) {
t_isMusic = false;
}
__a_soundQueue.push({soundName:t_soundName, isMusic:t_isMusic, isPlaying:false, doCallback:false});
__playQueue();
}
function __playQueue() {
if (__a_soundQueue.length == 0) {
return(undefined);
}
if (!__a_soundQueue[0].isPlaying) {
if (__a_soundQueue[0].isMusic == true) {
playMusic(__a_soundQueue[0].soundName);
clearQueue();
} else {
playSound(__a_soundQueue[0].soundName, 1, true);
__a_soundQueue[0].isPlaying = true;
}
}
}
function onQueuedSoundComplete() {
if (__a_soundQueue[0].doCallback) {
onCallbackSoundComplete(__a_soundQueue[0].soundName);
}
__a_soundQueue.splice(0, 1);
trace("Finish sound");
__playQueue();
}
function clearQueue() {
__a_soundQueue = [__a_soundQueue[0]];
}
function get queueLength() {
return(__a_soundQueue.length);
}
function playMusic(name) {
}
function get isQueuePlaying() {
if (__a_soundQueue.length == 0) {
return(false);
}
return(true);
}
var __DEFAULTMCNAME = "soundEngine_MC";
var __DEFAULTGROUPNAME = "sound";
}
Symbol 823 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 824 MovieClip [__Packages.disney.rabbitRivalry.Sounds] Frame 0
class disney.rabbitRivalry.Sounds extends smashing.sound.SoundEngine
{
static var __instance;
var createGroup, createSound, changeVolume, __currentMusic, muteMusic, muteSound, queueSound, callbackSound, stopSound, __get__isQueuePlaying, __currentVO;
function Sounds () {
super();
}
static function init() {
__instance = new disney.rabbitRivalry.Sounds();
}
static function getInstance() {
return(__instance);
}
function generateSounds(path) {
super.generateSounds(path, __DEPTH, __DO_OVERWRITE);
createGroup("music");
createSound("splash", "Splash_loop.wav", "music");
createSound("game", "Game_loop.wav", "music");
changeVolume(50, "music");
createSound("yinyangyo", "YinYangYo_Intro_short.wav");
createSound("bonk", "roach_hit.wav");
createSound("yoHit1", "Yo_hey.wav");
createSound("yoHit2", "Yo_what-the-heck.wav");
createSound("yangattack", "yang_attack.wav");
createSound("yinattack", "yin_attack.wav");
createSound("yoWin1", "Yo_i-hope-you-got-your-learing-caps-on.wav");
createSound("yoWin2", "Yo_responsibility.wav");
createSound("yoWin3", "Yo_material-posessions.wav");
createSound("yoWin4", "Yo_self-sacrifice.wav");
createSound("bash", "CRASH R.wav");
createSound("yin_attack1", "Yin_ha-yee.wav");
createSound("yin_attack2", "Yin_yincinerate.wav");
createSound("yin_attack3", "Yin_foofield.wav");
createSound("yang_attack1", "Yang_he-hoo-ha.wav");
createSound("yang_attack2", "Yang_ah-yeah.wav");
createSound("yang_attack3", "Yang_foonado.wav");
__currentMusic = "";
muteMusic = false;
}
function playLevelEndSound() {
var _local2 = disney.rabbitRivalry.GameState.getInstance().levelNum;
playSound("yoWin" + _local2);
}
function playSound(name, loops, t_queued) {
if (muteSound == true) {
return(undefined);
}
super.playSound(name, loops, t_queued);
}
function p(name) {
playSound(name, 1);
}
function q(name) {
queueSound(name);
}
function c(name, cbpath, cbfunc) {
callbackSound(name, 1, cbpath, cbfunc);
}
function playMusic(name) {
if (muteMusic) {
__currentMusic = name;
return(undefined);
}
if ((__currentMusic != "") && (__currentMusic != undefined)) {
stopMusic();
}
__currentMusic = name;
playSound(__currentMusic, 0);
}
function restartMusic() {
if (muteMusic) {
return(undefined);
}
if ((__currentMusic == "") || (__currentMusic == undefined)) {
return(undefined);
}
playMusic(__currentMusic);
}
function stopMusic() {
stopSound(__currentMusic);
}
function playOptional(t_name) {
if (!__get__isQueuePlaying()) {
queueSound(t_name);
}
}
function playVoiceOver(name) {
stopSound(__currentVO);
__currentVO = name;
if (disney.rabbitRivalry.GameState.getInstance().isYang) {
__currentVO = "yang_" + __currentVO;
} else {
__currentVO = "yin_" + __currentVO;
}
playSound(__currentVO);
}
function musicOff() {
muteMusic = true;
stopMusic();
}
function musicOn() {
muteMusic = false;
playMusic(__currentMusic);
}
var __DEPTH = 20;
var __DO_OVERWRITE = false;
}
Symbol 825 MovieClip [__Packages.disney.rabbitRivalry.GameState] Frame 0
class disney.rabbitRivalry.GameState
{
static var __instance;
var score, misses, levelNum, actionState, GRAVITY, isYang, hasChanged;
function GameState () {
}
static function init() {
__instance = new disney.rabbitRivalry.GameState();
}
static function getInstance() {
return(__instance);
}
function reset() {
score = 0;
misses = 0;
levelNum = 1;
actionState = 1;
GRAVITY = new smashing.Point3D(0, 290, 0);
if (Math.random() > 0.5) {
isYang = true;
} else {
isYang = false;
}
hasChanged = false;
}
function addScore(num) {
score = score + num;
smashing.keithm.Messenger.sendMessage("screen", "updateScore");
}
function miss() {
misses++;
}
function removeMiss() {
if (misses > 0) {
misses--;
} else {
addScore(250);
}
}
function isGameOver() {
if (misses >= __MISSES_ALLOWED) {
return(true);
}
return(false);
}
function advanceState() {
actionState++;
if (actionState == 4) {
smashing.keithm.Messenger.sendMessage("ui", "disableActiveScreenUpdates");
smashing.keithm.Messenger.sendMessage("world", "enablePowerAim");
}
}
function restartState() {
actionState = 1;
}
function toggleRabbit() {
restartState();
isYang = !isYang;
}
var __MISSES_ALLOWED = 5;
var TOTAL_LEVELS = 10;
}
Symbol 826 MovieClip [__Packages.smashing.Point3D] Frame 0
class smashing.Point3D
{
var x, y, z;
function Point3D (x, y, z) {
this.x = Number(x);
this.y = Number(y);
this.z = Number(z);
}
function get length() {
return(Math.sqrt(((x * x) + (y * y)) + (z * z)));
}
function set length(newLength) {
if (length != 0) {
var _local2 = newLength / length;
x = x * _local2;
y = y * _local2;
z = z * _local2;
}
//return(length);
}
function get lengthSqu() {
return(((x * x) + (y * y)) + (z * z));
}
function copy() {
return(new smashing.Point3D(x, y, z));
}
function addPoint(p) {
return(new smashing.Point3D(p.x + x, p.y + y, p.z + z));
}
function subtractPoint(p) {
return(new smashing.Point3D(x - p.x, y - p.y, z - p.z));
}
function addScalar(n) {
return(new smashing.Point3D(x + n, y + n, z + n));
}
function subtractScalar(n) {
return(new smashing.Point3D(x - n, y - n, z - n));
}
function addPointMe(p) {
x = x + p.x;
y = y + p.y;
z = z + p.z;
}
function subtractPointMe(p) {
x = x - p.x;
y = y - p.y;
z = z - p.z;
}
function addScalarMe(n) {
x = x + n;
y = y + n;
z = z + n;
}
function subtractScalarMe(n) {
x = x - n;
y = y - n;
z = z - n;
}
function multiply(n) {
var _local2 = copy();
_local2.x = _local2.x * n;
_local2.y = _local2.y * n;
_local2.z = _local2.z * n;
return(_local2);
}
function divide(n) {
var _local2 = copy();
if (n == 0) {
_local2.x = 0;
_local2.y = 0;
_local2.z = 0;
return(undefined);
}
_local2.x = _local2.x / n;
_local2.y = _local2.y / n;
_local2.z = _local2.z / n;
return(_local2);
}
function multiplyMe(n) {
x = x * n;
y = y * n;
z = z * n;
}
function divideMe(n) {
x = x / n;
y = y / n;
z = z / n;
}
function dot(p) {
return(((x * p.x) + (y * p.y)) + (z * p.z));
}
function cross(p) {
return(new smashing.Point3D((y * p.z) - (z * p.y), (z * p.x) - (x * p.z), (x * p.y) - (y * p.x)));
}
function pseudoCross() {
return(new smashing.Point3D(y, -x, z));
}
function normalize() {
if (((!x) && (!y)) && (!z)) {
return(undefined);
}
var _local2 = length;
return(new smashing.Point3D(x / _local2, y / _local2, z / _local2));
}
function normalizeMe() {
if ((!x) && (!y)) {
return(undefined);
}
var _local2 = length;
x = x / _local2;
y = y / _local2;
z = z / _local2;
}
function reverse() {
var _local2 = new smashing.Point3D(x * -1, y * -1, z * -1);
return(_local2);
}
function reverseMe() {
x = x * -1;
y = y * -1;
z = z * -1;
}
function findCosine(vOther) {
var _local3 = dot(vOther);
var _local4 = length * vOther.__get__length();
var _local2 = _local3 / _local4;
return(_local2);
}
function equals(p) {
if (((x == p.x) && (y == p.y)) && (z == p.z)) {
return(true);
}
return(false);
}
function zero() {
x = 0;
y = 0;
z = 0;
}
function distSqu(p) {
var _local4 = p.x - x;
var _local3 = p.y - y;
var _local2 = p.z - z;
return(((_local4 * _local4) + (_local3 * _local3)) + (_local2 * _local2));
}
function toString() {
var _local2 = ((((("Point3D (" + x) + ",") + y) + ",") + z) + ")";
return(_local2);
}
}
Symbol 827 MovieClip [__Packages.disney.rabbitRivalry.Engine] Frame 0
class disney.rabbitRivalry.Engine extends MovieClip
{
var __gameStartTime, __dogePath, __interval, __sounds, viewport_mc, __state, __UI, activeWorld, isPaused, gotoAndStop, doge_container, isUILocked, __updateUI, mouse, mouseHD_mc, _xmouse, _ymouse, key;
function Engine () {
super();
}
function init() {
__gameStartTime = getTimer();
if (_level0.fsd == undefined) {
__dogePath = __DOGE_PATH;
} else {
__dogePath = _level0.fsd;
}
__interval = new smashing.IntervalEngine(this, "update");
__interval.startFast();
disney.rabbitRivalry.Sounds.init();
__sounds = disney.rabbitRivalry.Sounds.getInstance();
__sounds.generateSounds(viewport_mc);
disney.rabbitRivalry.GameState.init();
__state = disney.rabbitRivalry.GameState.getInstance();
__state.reset();
disney.rabbitRivalry.ui.UI.init();
__UI = disney.rabbitRivalry.ui.UI.getInstance();
__UI.linkEngine(this);
__UI.reset();
disney.rabbitRivalry.Dimensions.init();
smashing.keithm.Messenger.registerAddress("engine", this);
smashing.keithm.Viewport.init(viewport_mc, 2, disney.rabbitRivalry.Dimensions.getInstance());
var _local2 = smashing.keithm.Viewport.getInstance();
_local2.setScrollport(1);
_local2.createGroup({name:"bg", index:0, slots:10, scrollport:true});
_local2.createGroup({name:"trees", index:1, slots:50, reverse:true});
_local2.createGroup({name:"ents", index:2, slots:500});
_local2.createGroup({name:"player", index:3, slots:10});
_local2.createGroup({name:"effect", index:4, slots:500});
_local2.reset();
activeWorld = new disney.rabbitRivalry.World(this);
__initMouse();
__initKey();
pause();
__UI.goScreen("splash");
__sounds.queueSound("yinyangyo");
__sounds.queueSound("splash", true);
}
function update(dt) {
if (!isPaused) {
activeWorld.update(dt);
}
__UI.update(dt);
updateAfterEvent();
}
function startGame() {
trace("START GAME");
__state.reset();
startLevel();
__sounds.playMusic("game");
}
function startLevel() {
__UI.goScreen("gameplay");
activeWorld.generate(__state.levelNum);
smashing.keithm.Viewport.getInstance().newView();
activeWorld.start();
unlockUI();
unpause();
}
function onEndLevel() {
if (__state.levelNum == __state.TOTAL_LEVELS) {
__sounds.stopMusic();
__UI.goScreen("winGame");
} else {
__UI.goScreen("winLevel");
}
}
function onNextLevel() {
__state.levelNum++;
__state.removeMiss();
__state.restartState();
__state.toggleRabbit();
startLevel();
smashing.keithm.Messenger.sendMessage("screen", "onNextRabbit");
}
function onGameOver() {
__UI.goScreen("gameOver");
}
function onStartOver() {
__UI.goScreen("splash");
__sounds.playMusic("splash");
__state.reset();
clear();
}
function onQuit() {
stopAllSounds();
destroy();
}
function onHighscore() {
pause();
(gotoAndStop("highscore"));// not popped
System.security.allowDomain("apsc.disney.go.com");
_level0.eventID = "jetix_yyy_rr";
_level0.subject = "Yin Yang Yo - Rabbit Rivalry";
_level0.playerScore = __state.score;
_level0.fsdPlayAgain = mx.utils.Delegate.create(this, onStartOver);
doge_container.loadMovie(__dogePath);
}
function clear() {
activeWorld.clear();
smashing.keithm.Viewport.getInstance().newView();
}
function destroy() {
__interval.clear();
__clearMouse();
__clearKey();
}
function pause() {
isPaused = true;
}
function unpause() {
isPaused = false;
}
function lockUI() {
isUILocked = true;
}
function unlockUI() {
isUILocked = false;
}
function requestUpdateUI() {
__updateUI = true;
}
function showHelp() {
__UI.goScreen("help");
}
function __initMouse() {
mouse = {};
mouse.owner = this;
mouse.onMouseUp = function () {
this.owner.mouse_up();
};
mouse.onMouseDown = function () {
this.owner.mouse_down();
};
Mouse.addListener(mouse);
}
function __clearMouse() {
Mouse.removeListener(mouse);
}
function mouse_up() {
if (!isPaused) {
}
}
function mouse_down() {
if (!isPaused) {
if (mouseHD_mc.hitTest(_xmouse, _ymouse, true)) {
activeWorld.onMouseDown();
}
}
}
function __initKey() {
key = {};
key.owner = this;
key.onKeyDown = function () {
this.owner.key_down();
};
Key.addListener(key);
}
function __clearKey() {
Key.removeListener(key);
}
function key_down() {
if (Key.getCode() == 32) {
}
}
function key_up() {
if (Key.getCode(32)) {
}
}
function onMessageReceived(message, args) {
this[message](args);
}
function get gameStartTime() {
return(__gameStartTime);
}
function isMusicMuted() {
return(__sounds.muteMusic);
}
var __TOTAL_LEVELS = 5;
var __STARTLEVEL = 1;
var __DOGE_PATH = "http://atv.disney.go.com/jetix/media/global/scoredisplays/fsd.swf";
}
Symbol 828 MovieClip [__Packages.disney.rabbitRivalry.World] Frame 0
class disney.rabbitRivalry.World
{
var engine, __state, __scroller, __camera, __entitys, __trees, __projectiles, __effects, __pickups, __player, loop, __yo;
function World (t_engine) {
engine = t_engine;
__state = disney.rabbitRivalry.GameState.getInstance();
}
function start() {
__scroller.generate(__camera);
}
function clear() {
__entitys = [];
__trees = [];
__projectiles = [];
__effects = [];
__pickups = [];
__scroller = null;
}
function update(dt) {
if (dt > 0.2) {
dt = 0.2;
}
__player.update(dt);
__camera.update(dt, __player);
__scroller.render(__camera, dt);
var _local2;
var _local5;
loop = __entitys.length;
while (loop--) {
_local2 = __entitys[loop];
if (_local2.doUpdate) {
_local2.update(dt);
if (__player.isFlying) {
if (__player.runHD(_local2, dt)) {
if ((_local2.x - 15) < __player.x) {
__player.bounce(true);
} else {
__player.bounce(false);
}
if (_local2.TYPE == "yo") {
__player.grimace();
}
}
} else if (__player.isAttackFrame()) {
if ((_local2.TYPE == "statue") && (__player.runHD(_local2, dt))) {
if (!__player.didHit) {
_local2.takeDamage(1);
__player.didHit = true;
__state.addScore(_local2.scoreValue + (__player.isPerfect ? 50 : 0));
smashing.keithm.Messenger.sendMessage("screen", "runResultAnim", {type:(__player.isPerfect ? "perfect" : "hit")});
}
}
}
_local2.moveAndRender(__camera, dt);
}
}
loop = __trees.length;
while (loop--) {
_local2 = __trees[loop];
_local2.updateMoveAndRender(__camera, dt);
if (__player.isFlying) {
if (_local2.runHD(__player, dt)) {
__player.hitGround(_local2.y);
}
}
}
__player.moveAndRender(__camera, dt);
loop = __effects.length;
while (loop--) {
_local2 = __effects[loop];
if (_local2.doRemove) {
__effects.splice(loop, 1);
} else {
_local2.updateMoveAndRender(__camera, dt);
}
}
}
function generate() {
clear();
__camera = new disney.rabbitRivalry.GameCamera({dimensions:disney.rabbitRivalry.Dimensions.getInstance(), ground:__GROUND_Y, y:__GROUND_Y});
__player = new disney.rabbitRivalry.ents.Player({camera:__camera, y:__GROUND_Y, x:270, owner:this});
__player.spawn();
__entitys = [];
__trees = [];
placeRandomStatues(__state.levelNum);
__yo = new disney.rabbitRivalry.ents.Yo({camera:__camera, y:__GROUND_Y - 110, x:580, owner:this});
__entitys.push(__yo);
smashing.keithm.Messenger.registerAddress("world", this);
__scroller = new disney.rabbitRivalry.scroller.Scroller({owner:this});
if (__state.levelNum > 5) {
__scroller.addPanel(500, "bg_night");
} else {
__scroller.addPanel(500, "bg_day");
}
}
function placeRandomStatues(levelNum) {
var _local2;
var _local4;
var _local12 = 0;
var _local3 = levelNum;
if (_local3 > 5) {
_local12 = _local3 - 5;
_local3 = 5;
}
while (_local3--) {
_local2 = new disney.rabbitRivalry.ents.Statue({asset:__STATUE_ASSETS[_local3], owner:this, camera:__camera, x:1300 + (300 * _local3), y:(__GROUND_Y - 150) - (Math.random() * 450), ground:__GROUND_Y, gold:((_local3 <= (_local12 - 1)) ? true : false)});
_local2.spawn();
__entitys.push(_local2);
if (_local2.startY < __GROUND_Y) {
_local4 = new disney.rabbitRivalry.ents.Tree({x:_local2.startX - 110, y:_local2.startY, ground:__GROUND_Y, owner:this, camera:__camera});
_local4.spawn();
_local2.linkTree(_local4);
__trees.push(_local4);
}
}
}
function enablePowerAim() {
__player.enablePowerAndAim();
__camera.zoomOut();
}
function onSelectWeapon(t_data) {
__player.equip(t_data.num);
}
function onMouseDown() {
if (__player.onMouseDown()) {
__camera.zoomIn(__player);
__camera.setDelay(0.5);
}
}
function onMiss() {
__state.miss();
smashing.keithm.Messenger.sendMessage("screen", "updateLives");
if (__state.isGameOver()) {
engine.onGameOver();
return(undefined);
}
var _local3 = true;
var _local2 = __entitys.length;
while (_local2--) {
if ((__entitys[_local2].TYPE == "statue") && (__entitys[_local2].isAlive == true)) {
if ((__entitys[_local2].x + 15) > __player.x) {
_local3 = false;
_local2 = 0;
}
}
}
__yo.setNewTargetLoc();
if (_local3) {
goNextRabbit();
} else {
enablePowerAim();
}
}
function goNextRabbit() {
var _local3 = true;
var _local2 = __entitys.length;
while (_local2--) {
if ((__entitys[_local2].TYPE == "statue") && (__entitys[_local2].isAlive)) {
_local2 = 0;
_local3 = false;
}
}
if (_local3) {
engine.onEndLevel();
return(undefined);
}
spawnNextRabbit();
}
function spawnNextRabbit() {
__state.toggleRabbit();
__player.requestErase();
__player = new disney.rabbitRivalry.ents.Player({camera:__camera, y:__GROUND_Y, x:270, owner:this});
__player.spawn();
smashing.keithm.Messenger.sendMessage("screen", "onNextRabbit");
smashing.keithm.Messenger.sendMessage("ui", "enableActiveScreenUpdates");
}
function onMessageReceived(message, args) {
this[message](args);
}
function getPlayer() {
return(__player);
}
function get camera() {
return(__camera);
}
var __GROUND_Y = 1220;
var __STATUE_ASSETS = ["statue_carl", "statue_herman", "statue_ultimoose", "statue_kraggler", "statue_nightmaster"];
}
Symbol 829 MovieClip [__Packages.smashing.keithm.BaseCamera] Frame 0
class smashing.keithm.BaseCamera
{
var __dimensions, x, y, z, fl, farClip, __bound_left, __bound_right, __bound_top, __bound_bottom, left, right, top, bottom;
function BaseCamera (t_data) {
__dimensions = t_data.dimensions;
x = (y = (z = 0));
if (t_data.x != undefined) {
x = t_data.x;
}
if (t_data.y != undefined) {
y = t_data.y;
}
if (t_data.z != undefined) {
z = t_data.z;
}
fl = fl_DEF;
farClip = __DEF_CLIP;
refreshEdges();
}
function update(dt) {
}
function setBounds(left, right, top, bottom) {
__bound_left = left + __dimensions.HALF_WIDTH;
__bound_right = right - __dimensions.HALF_WIDTH;
__bound_top = top + __dimensions.HALF_HEIGHT;
__bound_bottom = bottom - __dimensions.HALF_HEIGHT;
}
function enforceBounds() {
if (x < __bound_left) {
x = __bound_left;
} else if (x > __bound_right) {
x = __bound_right;
}
if (y < __bound_top) {
y = __bound_top;
} else if (y > __bound_bottom) {
y = __bound_bottom;
}
}
function refreshEdges() {
left = x - __dimensions.HALF_WIDTH;
right = x + __dimensions.HALF_WIDTH;
top = y - __dimensions.HALF_HEIGHT;
bottom = y + __dimensions.HALF_HEIGHT;
}
function get sc() {
return(__dimensions.sc);
}
function screenWidth() {
return(__dimensions.SCREEN_WIDTH);
}
function screenHeight() {
return(__dimensions.SCREEN_WIDTH);
}
function halfWidth() {
return(__dimensions.HALF_WIDTH);
}
function halfHeight() {
return(__dimensions.HALF_HEIGHT);
}
function toString() {
return((((("Camera : focus : " + x) + " , ") + y) + " , ") + z);
}
var __DEF_CLIP = 100000;
var fl_DEF = 1000;
var __EDGE_PADDING = 50;
}
Symbol 830 MovieClip [__Packages.disney.rabbitRivalry.GameCamera] Frame 0
class disney.rabbitRivalry.GameCamera extends smashing.keithm.BaseCamera
{
var __groundY, __state, __moveRate, setBounds, __delay, isZooming, __zoomHeadedOut, x, y, z, enforceBounds, __zoomTimer, xdiff, ydiff, updateChangeX, updateChangeY, refreshEdges;
function GameCamera (t_data) {
super(t_data);
__groundY = t_data.ground;
__state = disney.rabbitRivalry.GameState.getInstance();
__moveRate = __MOVE_RATE;
setBounds(0, 3550, 0, __groundY + 60);
__delay = 0;
isZooming = false;
__zoomHeadedOut = true;
}
function setDelay(num) {
__delay = num;
}
function zoomOut() {
isZooming = (__zoomHeadedOut = true);
x = x - ((x - __ZOOMOUT_POINT.x) / 2);
y = y - ((y - __ZOOMOUT_POINT.y) / 2);
z = __ZOOMOUT_POINT.z / 2;
enforceBounds();
__zoomTimer = __ZOOM_RATE;
}
function zoomIn(player) {
x = x - ((x - player.x) / 2);
y = y - ((y - player.y) / 2);
z = __ZOOMOUT_POINT.z / 2;
enforceBounds();
__zoomTimer = __ZOOM_RATE;
__zoomHeadedOut = false;
}
function endZoomOut() {
x = __ZOOMOUT_POINT.x;
y = __ZOOMOUT_POINT.y;
z = __ZOOMOUT_POINT.z;
enforceBounds();
}
function endZoomIn(player) {
x = player.nextX;
y = player.y;
z = 0;
enforceBounds();
isZooming = false;
}
function update(dt, player) {
if (isZooming) {
if (__zoomHeadedOut) {
if (__zoomTimer > 0) {
__zoomTimer = __zoomTimer - dt;
if (__zoomTimer <= 0) {
endZoomOut();
}
}
} else {
__zoomTimer = __zoomTimer - dt;
if (__zoomTimer <= 0) {
endZoomIn(player);
}
}
} else {
if (__delay > 0) {
__delay = __delay - dt;
if (__delay <= 0) {
__moveRate = __MOVE_RATE * 3;
} else {
return(undefined);
}
}
if (__moveRate > __MOVE_RATE) {
__moveRate = __moveRate - (__MOVE_DECAY * dt);
if (__moveRate < __MOVE_RATE) {
__moveRate = __MOVE_RATE;
}
}
if (player.isAttacking || (player.isCharging)) {
xdiff = (player.nextX + 150) - x;
ydiff = (player.nextY - y) - __Y_OFFSET;
} else if (__state.actionState <= 3) {
xdiff = (player.nextX - x) + 60;
ydiff = ((player.nextY - y) - __Y_OFFSET) + 25;
} else {
xdiff = player.nextX - x;
ydiff = (player.nextY - y) - __Y_OFFSET;
}
dt = dt * 2;
updateChangeX = (updateChangeY = __moveRate * dt);
if (xdiff < (-updateChangeX)) {
x = x - updateChangeX;
} else if (xdiff > updateChangeX) {
x = x + updateChangeX;
} else if (player.isAttacking || (player.isCharging)) {
x = player.nextX + 150;
} else if (__state.actionState <= 3) {
x = player.nextX + 60;
} else {
x = player.nextX;
}
if (ydiff < (-updateChangeY)) {
y = y - updateChangeY;
} else if (ydiff > updateChangeY) {
y = y + updateChangeY;
} else if (__state.actionState <= 3) {
y = (player.nextY - __Y_OFFSET) + 25;
} else {
y = player.nextY - __Y_OFFSET;
}
}
enforceBounds();
refreshEdges();
}
var __ZOOM_RATE = 0.03;
var __ZOOMOUT_POINT = {x:1340, y:850, z:-3500};
var __MOVE_RATE = 400;
var __MOVE_DECAY = 100;
var __Y_OFFSET = 100;
}
Symbol 831 MovieClip [__Packages.disney.rabbitRivalry.Dimensions] Frame 0
class disney.rabbitRivalry.Dimensions
{
static var __instance;
function Dimensions () {
}
static function init() {
__instance = new disney.rabbitRivalry.Dimensions();
}
static function getInstance() {
return(__instance);
}
function get screenWidth() {
return(SCREEN_WIDTH);
}
function get screenHeight() {
return(SCREEN_HEIGHT);
}
function get halfWidth() {
return(HALF_WIDTH);
}
function get halfHeight() {
return(HALF_HEIGHT);
}
var SCREEN_WIDTH = 530;
var SCREEN_HEIGHT = 320;
var HALF_WIDTH = disney.rabbitRivalry.Dimensions.prototype.SCREEN_WIDTH / 2;
var HALF_HEIGHT = disney.rabbitRivalry.Dimensions.prototype.SCREEN_HEIGHT / 2;
var sc = {x:disney.rabbitRivalry.Dimensions.prototype.SCREEN_WIDTH / 2, y:disney.rabbitRivalry.Dimensions.prototype.SCREEN_HEIGHT / 2};
}
Symbol 832 MovieClip [__Packages.smashing.keithm.Renderable] Frame 0
class smashing.keithm.Renderable
{
var mc, baseWidth, baseHeight, hdWidth, hdHeight, radius, doUpdate, owner, __DEF_ASSET, assetID, startX, startY, startZ, depthInfluence, flipH, threedScale, isSpawned, x, nextX, y, nextY, z, __onscreen, isDrawn, isAlive, isHidden, scale, startScale, __fastScale, hdReg, nextZ;
function Renderable (t_data) {
mc = null;
baseWidth = __DEF_WIDTH;
baseHeight = __DEF_HEIGHT;
if (__USE_DIMENSIONS_AS_HD) {
hdWidth = baseWidth / 2;
hdHeight = baseHeight / 2;
radius = hdWidth;
} else {
hdWidth = __DEF_HD_WIDTH / 2;
hdHeight = __DEF_HD_HEIGHT / 2;
radius = hdWidth;
}
setHDRegistration();
doUpdate = __DO_UPDATE;
init(t_data);
}
function init(t_data) {
if (t_data.owner == undefined) {
trace("ERROR! NO OWNER SENT TO ELEMENT : " + TYPE);
}
owner = t_data.owner;
if (t_data.asset == undefined) {
t_data.asset = __DEF_ASSET;
}
assetID = t_data.asset;
if (t_data.x == undefined) {
t_data.x = 0;
}
startX = t_data.x;
if (t_data.y == undefined) {
t_data.y = 0;
}
startY = t_data.y;
if (t_data.z == undefined) {
t_data.z = __DEF_Z;
}
startZ = t_data.z;
if (t_data.depthInfluence == undefined) {
t_data.depthInfluence = 0;
}
depthInfluence = t_data.depthInfluence;
if (t_data.camera != undefined) {
initScale(t_data.camera);
} else if (owner.camera != undefined) {
initScale(owner.camera);
} else {
trace("ERROR! NO CAMERA SENT TO ELEMENT : " + TYPE);
}
if (t_data.flip != undefined) {
flip();
} else {
flipH = false;
}
threedScale = __3D_SCALE;
isSpawned = false;
}
function spawn(camera) {
isSpawned = true;
reset();
if (__FORCE_INITAL_DRAW) {
smashing.keithm.Viewport.getInstance().draw({element:this});
} else if (__DRAW_ON_SPAWN) {
if (camera == undefined) {
trace(("ERROR: spawn of " + assetID) + " failed because __DRAW_ON_SPAWN is true, but no camera was supplied.");
return(undefined);
}
updateDraw(camera);
}
}
function reset() {
x = (nextX = startX);
y = (nextY = startY);
z = startZ;
__onscreen = false;
if (((mc == undefined) || (mc == null)) || (mc == "")) {
isDrawn = false;
}
isAlive = true;
isHidden = false;
}
function onDraw(t_newmc) {
isDrawn = true;
mc = t_newmc;
if (isHidden) {
mc._visible = false;
}
if (__USE_ACTUAL_DIMENSIONS) {
baseWidth = mc._width;
baseHeight = mc._height;
setHDRegistration();
if (__USE_DIMENSIONS_AS_HD) {
hdWidth = baseWidth / 2;
hdHeight = baseHeight / 2;
radius = hdWidth;
}
}
if (flipH) {
mc._xscale = -100;
}
scale = startScale;
mc._x = -1000 - baseWidth;
mc._y = -1000 - baseHeight;
}
function update(dt) {
}
function move(dt) {
}
function moveAndRender(camera, dt) {
}
function updateMoveAndRender(camera, dt) {
}
function render(camera, dt) {
updateDraw(camera);
if (!isDrawn) {
return(undefined);
}
if (threedScale) {
if (z < camera.z) {
return(undefined);
}
__fastScale = camera.fl / (z - camera.z);
if (scale != __fastScale) {
scale = __fastScale;
mc._xscale = (mc._yscale = 100 * (1 + (scale - startScale)));
if (flipH) {
mc._xscale = mc._xscale * -1;
}
}
}
mc._x = ((x - camera.x) * scale) + camera.__get__sc().x;
mc._y = ((y - camera.y) * scale) + camera.__get__sc().y;
}
function renderDirect(camera) {
mc._x = x;
mc._y = y;
}
function initScale(camera) {
startScale = (scale = camera.fl / (startZ - camera.z));
}
function updateDraw(camera) {
__onscreen = false;
if (CUSTOMDRAW) {
__onscreen = true;
} else if (z >= camera.z) {
if (camera.z < 0) {
__onscreen = true;
} else if (((Math.abs(x - camera.x) < (camera.__get__sc().x + baseWidth)) && (Math.abs(y - camera.y) < (camera.__get__sc().y + baseHeight))) && ((z - camera.z) < camera.farClip)) {
__onscreen = true;
}
}
if ((!isDrawn) && (__onscreen)) {
smashing.keithm.Viewport.getInstance().draw({element:this});
} else if (isDrawn && (!__onscreen)) {
requestErase();
}
}
function onErase(t_viewport) {
isDrawn = false;
mc = null;
}
function despawn() {
isAlive = false;
isSpawned = false;
}
function requestErase() {
smashing.keithm.Viewport.getInstance().erase({element:this});
}
function requestDepthSort() {
smashing.keithm.Viewport.getInstance().requestGroupDepthSort(getDrawType());
}
function requestDepthChange() {
smashing.keithm.Viewport.getInstance().requestDepthChange(this);
}
function deleteMe() {
}
function kill() {
isAlive = false;
}
function hide() {
if (isDrawn) {
mc._visible = false;
}
isHidden = true;
}
function show() {
if (isDrawn) {
mc._visible = true;
}
isHidden = false;
}
function flip() {
flipH = true;
if (isDrawn) {
mc._xscale = -100;
}
}
function unflip() {
flipH = false;
if (isDrawn) {
mc._xscale = 100;
}
}
function toggleFlip() {
if (flipH) {
unflip();
} else {
flip();
}
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
function runHD_entity_radius(t_target, dt) {
var _local4 = (nextX + hdReg.x) - (t_target.nextX + t_target.hdReg.x);
var _local3 = (nextY + hdReg.y) - (t_target.nextY + t_target.hdReg.y);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 <= (t_target.radius + radius)) {
return(true);
}
return(false);
}
function runHD_entity_box(t_target, dt) {
if (Math.abs((nextX + hdReg.x) - (t_target.nextX + t_target.hdReg.x)) < (hdWidth + t_target.hdWidth)) {
if (Math.abs((nextY + hdReg.y) - (t_target.nextY + t_target.hdReg.y)) < (hdHeight + t_target.hdHeight)) {
return(true);
}
}
return(false);
}
function runHD_entity_3D(t_target, dt) {
var _local3 = z - t_target.z;
var _local2 = (nextZ + radius) - t_target.z;
if ((_local3 * _local2) <= 0) {
return(runHD_entity_radius(t_target, dt));
}
return(false);
}
function runHD_line_sphere(t_lineStart, t_lineEnd, dt) {
var _local4 = new smashing.Point3D(t_lineStart.x, t_lineStart.y, 0);
var _local3 = new smashing.Point3D(t_lineEnd.x, t_lineEnd.y, 0);
var _local6 = _local4.x - _local3.x;
var _local7 = _local4.y - _local3.y;
var _local2 = getLineSeperation(_local3, {x:x, y:y}, _local6, _local7);
var _local5;
if (_local2.distance <= radius) {
_local5 = new smashing.Point3D(x + _local2.xSeparation, y + _local2.ySeparation);
return(true);
}
_local5.x = (_local5.y = 0);
return(false);
}
function runHD_line_sphere_complex(t_lineStart, t_lineEnd, dt) {
var _local5 = new smashing.Point3D(t_lineStart.x, t_lineStart.y, 0);
var _local7 = new smashing.Point3D(t_lineEnd.x, t_lineEnd.y, 0);
var _local8;
var _local16 = getDistBetween(_local5, {x:x, y:y});
var _local15 = getDistBetween(_local7, {x:x, y:y});
var _local11 = getDistBetween(_local5, _local7);
var _local4 = new smashing.Point3D(_local5.x, _local5.y);
var _local9 = new smashing.Point3D(_local7.x, _local7.y);
var _local12 = _local9.x - _local4.x;
var _local13 = _local9.y - _local4.y;
var _local3 = _local12 / _local11;
var _local2 = _local13 / _local11;
var _local10;
_local4.subtractScalarMe(_local3 * radius, _local2 * radius);
_local9.addScalarMe(_local3 * radius, _local2 * radius);
var _local6 = getLineSeperation(_local5, {x:x, y:y}, _local12, _local13);
_local12 = _local9.x - _local4.x;
_local13 = _local9.y - _local4.y;
var _local14 = getLineSeperation(_local4, {x:x, y:y}, _local12, _local13);
if (_local6.distance <= radius) {
if (_local15 > _local11) {
_local8 = Math.sqrt((radius * radius) - (_local14.distance * _local14.distance));
_local3 = _local3 * _local8;
_local2 = _local2 * _local8;
(x + _local14.xSeparation) + _local3;
_local10 = (y + _local14.ySeparation) + _local2;
} else {
_local8 = Math.sqrt((radius * radius) - (_local6.distance * _local6.distance));
_local3 = _local3 * _local8;
_local2 = _local2 * _local8;
(x + _local6.xSeparation) + _local3;
_local10 = (y + _local6.ySeparation) + _local2;
if (getDistBetween(_local5, _local10) >= _local11) {
_local10.copy(_local7);
}
}
return(true);
}
_local10.x = (_local10.y = 0);
return(false);
}
function getLineSeperation(p0, s, dx, dy) {
var _local1 = new Object();
var _local5 = p0.x - s.x;
var _local6 = p0.y - s.y;
var _local7 = (dx * dx) + (dy * dy);
var _local2 = (-((_local5 * dx) + (_local6 * dy))) / _local7;
_local2 = Math.min(Math.max(_local2, 0), 1);
_local1.xSeparation = _local5 + (_local2 * dx);
_local1.ySeparation = _local6 + (_local2 * dy);
_local1.distance = Math.sqrt((_local1.xSeparation * _local1.xSeparation) + (_local1.ySeparation * _local1.ySeparation));
return(_local1);
}
function getDistBetween(p0, p1) {
return(Math.sqrt((p1.x - p0.x) * (p1.x - p0.x)) + ((p1.y - p0.y) * (p1.y - p0.y)));
}
function hitReact(t_source) {
}
function getDrawType() {
return(DRAWTYPE);
}
function animate(t_frame, t_subFrame) {
mc.gotoAndStop(t_frame);
if (t_subFrame != undefined) {
mc.anim.gotoAndStop(t_subFrame);
}
}
function toString() {
return("Renderable: " + TYPE);
}
function drawHitBox() {
var _local3 = hdReg.x;
var _local4 = hdReg.y;
var _local2 = mc.createEmptyMovieClip("hitbox", 1);
_local2.beginFill(16751103, 50);
_local2.lineStyle(2, 16751103, 100);
_local2.moveTo(_local3 - hdWidth, _local4 - hdHeight);
_local2.lineTo(_local3 + hdWidth, _local4 - hdHeight);
_local2.lineTo(_local3 + hdWidth, _local4 + hdHeight);
_local2.lineTo(_local3 - hdWidth, _local4 + hdHeight);
_local2.lineTo(_local3 - hdWidth, _local4 - hdHeight);
_local2.endFill();
}
function drawReg() {
var _local2 = mc.createEmptyMovieClip("hitbox", 1);
_local2.beginFill(16751103, 50);
_local2.lineStyle(2, 16751103, 100);
_local2.moveTo(-5, -5);
_local2.lineTo(5, -5);
_local2.lineTo(5, 5);
_local2.lineTo(-5, 5);
_local2.lineTo(-5, -5);
}
var TYPE = "element";
var DRAWTYPE = "element";
var __DEF_Z = 1000;
var __3D_SCALE = false;
var __DEF_WIDTH = 50;
var __DEF_HEIGHT = 50;
var __USE_ACTUAL_DIMENSIONS = true;
var __CAREFUL_DRAW = false;
var CUSTOMDRAW = false;
var __FORCE_INITAL_DRAW = false;
var __DRAW_ON_SPAWN = false;
var __DEF_HD_WIDTH = 25;
var __DEF_HD_HEIGHT = 25;
var __USE_DIMENSIONS_AS_HD = true;
var __DO_UPDATE = true;
}
Symbol 833 MovieClip [__Packages.smashing.keithm.Viewport] Frame 0
class smashing.keithm.Viewport
{
static var __a_groups, __o_groups, __dimensions, __viewportPath, __viewportDepth, __useScrollport, __instance, __scrollportDepth, mc, scrollmc;
function Viewport (t_path, t_depth, dimensions) {
__a_groups = [];
__o_groups = {};
__dimensions = dimensions;
__viewportPath = t_path;
__viewportDepth = t_depth;
__useScrollport = false;
trace("-- Init Viewport --");
}
static function init(t_path, t_depth, dimensions) {
__instance = new smashing.keithm.Viewport(t_path, t_depth, dimensions);
}
static function getInstance() {
return(__instance);
}
function setScrollport(t_depth) {
__useScrollport = true;
__scrollportDepth = t_depth;
}
function reset() {
var _local6 = __a_groups.length;
var _local2;
var _local5 = [];
var _local3 = 0;
while (_local5.length < _local6) {
_local2 = __a_groups.length;
while (_local2--) {
if (__a_groups[_local2].index < __a_groups[_local3].index) {
_local3 = _local2;
}
}
_local5.push(__a_groups[_local3]);
__a_groups.splice(_local3, 1);
}
__a_groups = _local5;
var _local4 = __defaultMCDepth;
_local2 = 0;
while (_local2 < __a_groups.length) {
_local4 = __a_groups[_local2].init(_local4);
_local4++;
_local2++;
}
newView();
}
function newView() {
var _local1 = __a_groups.length;
while (_local1--) {
__a_groups[_local1].reset();
}
if (mc != undefined) {
mc.removeMovieClip();
}
mc = __viewportPath.createEmptyMovieClip("viewport" + __viewportDepth, __viewportDepth);
if (__useScrollport) {
if (scrollmc != undefined) {
scrollmc.removeMovieClip();
}
scrollmc = __viewportPath.createEmptyMovieClip("scrollport" + __scrollportDepth, __scrollportDepth);
scrollmc.scrollRect = new flash.geom.Rectangle(0, 0, __dimensions.SCREEN_WIDTH + 1, __dimensions.SCREEN_HEIGHT);
}
}
function clearGroup(t_group) {
var _local2 = __o_groups[t_group].mcs;
while (_local2.length > 0) {
__eraseAsset(_local2[0].mc, t_group);
}
}
function draw(t_data) {
var _local4;
if (t_data.element != undefined) {
var _local3 = t_data.element;
if (!_local3.isSpawned) {
trace(("WARNING: despawned entity " + _local3.assetID) + " received draw request.");
return(undefined);
}
_local4 = __drawElement(_local3);
if (_local4 != undefined) {
_local3.onDraw(_local4, getInstance());
// unexpected jump
}
trace("ERROR DRAWING ASSET " + _local3.assetID);
return(undefined);
}
if (t_data.assetID == "_empty") {
return(__drawEmpty(t_data.groupName, t_data.depth + t_data.depthInfluence));
}
return(__drawAsset(t_data.assetID, t_data.groupName, t_data.depth + t_data.depthInfluence));
}
function erase(t_data) {
if (t_data.element != undefined) {
__eraseAsset(t_data.element.mc, t_data.element.getDrawType());
t_data.element.onErase(getInstance());
} else {
__eraseAsset(t_data.mc, t_data.groupName);
}
}
function createGroup(t_data) {
__a_groups.push((__o_groups[t_data.name] = new smashing.keithm.ViewportGroup(t_data)));
}
function requestGroupDepthSort(t_group) {
__o_groups[t_group].requestDepthSort();
}
function requestDepthChange(t_element) {
__o_groups[t_element.getDrawType()].requestDepthChange(t_element);
}
function __drawElement(t_element) {
var _local5;
var _local2 = __o_groups[t_element.getDrawType()];
var _local7 = _local2.getDepth(t_element[_local2.sortAxis] + t_element.depthInfluence);
var _local3 = mc;
if (_local2.scrollport) {
_local3 = scrollmc;
}
if (t_element.assetID == "_empty") {
var _local4 = _local3.createEmptyMovieClip(t_element.getDrawType() + _local7, _local7);
} else {
var _local4 = _local3.attachMovie(t_element.assetID, t_element.assetID + _local7, _local7);
}
_local2.mcs.push({mc:_local4, depth:_local7});
_local5.initScale();
return(_local4);
}
function __drawAsset(t_asset, t_groupName, t_depth) {
var _local1 = __o_groups[t_groupName];
var _local6 = _local1.getDepth(t_depth);
var _local3 = mc;
if (_local1.scrollport) {
_local3 = scrollmc;
}
var _local2 = _local3.attachMovie(t_asset, t_asset + _local6, _local6);
_local1.mcs.push({mc:_local2, depth:_local6});
return(_local2);
}
function __drawEmpty(t_groupName, t_depth) {
var _local3 = __o_groups[t_groupName];
var _local6 = _local3.getDepth(t_depth);
var _local2 = mc;
if (_local3.scrollport) {
_local2 = scrollmc;
}
var _local1 = _local2.createEmptyMovieClip(t_groupName + _local6, _local6);
__o_groups[t_groupName].mcs.push({mc:_local1, depth:_local6});
return(_local1);
}
function __eraseAsset(t_mc, t_groupName) {
var _local2 = __o_groups[t_groupName];
var _local1 = _local2.mcs.length;
while (_local1--) {
if (_local2.mcs[_local1].mc == t_mc) {
_local2.mcs[_local1].mc.removeMovieClip();
_local2.mcs.splice(_local1, 1);
return(undefined);
}
}
}
function toString() {
return("Viewport exists");
}
static var __defaultMCDepth = 100;
}
Symbol 834 MovieClip [__Packages.smashing.keithm.ViewportGroup] Frame 0
class smashing.keithm.ViewportGroup
{
var name, mcs, index, numSlots, sortAxis, ascending, reverse, scrollport, min, max, current, isSearching, loop;
function ViewportGroup (t_data) {
name = t_data.name;
mcs = [];
index = t_data.index;
numSlots = t_data.slots;
if (t_data.sortAxis == undefined) {
t_data.sortAxis = "";
}
sortAxis = t_data.sortAxis;
if ((sortAxis != "") && (numSlots < 10000)) {
numSlots = 10000;
}
if (t_data.ascending == undefined) {
t_data.ascending = false;
}
ascending = t_data.ascending;
if (t_data.reverse == undefined) {
t_data.reverse = false;
}
reverse = t_data.reverse;
if (t_data.scrollport == undefined) {
t_data.scrollport = false;
}
scrollport = t_data.scrollport;
}
function init(t_depth) {
min = t_depth;
max = t_depth + numSlots;
reset();
return(max);
}
function reset() {
mcs = [];
if (reverse) {
current = max;
} else {
current = min;
}
}
function requestDepthChange(t_element) {
t_element.mc.swapDepths(__getChangedDepth(t_element));
}
function requestDepthSort() {
trace("Request Depth Sort not implemented yet. Better get to work!");
}
function getDepth(t_depth) {
if (sortAxis != "") {
return(__getNewDepth(t_depth));
}
increment();
return(current);
}
function increment() {
isSearching = true;
while (isSearching) {
if (reverse) {
current--;
if (current < min) {
current = max;
}
} else {
current++;
if (current > max) {
current = min;
}
}
isSearching = false;
loop = mcs.length;
while (loop--) {
if (mcs[loop].depth == current) {
isSearching = true;
loop = 0;
}
}
}
}
function __getNewDepth(depth) {
if (depth < 0) {
trace("Error : Depth cannot be under zero");
return(undefined);
}
if (ascending) {
depth = min + Math.ceil(depth);
} else {
depth = max - Math.ceil(depth);
}
loop = mcs.length;
while (loop--) {
if (mcs[loop].depth == depth) {
if (ascending) {
depth++;
} else {
depth--;
}
loop = mcs.length;
}
}
return(depth);
}
function __getChangedDepth(t_element) {
var _local2 = Math.ceil(t_element[sortAxis]);
if (_local2 < 0) {
trace("Error : Depth cannot be under zero");
return(undefined);
}
if (ascending) {
_local2 = min + _local2;
} else {
_local2 = max - _local2;
}
var _local3 = -1;
loop = mcs.length;
while (loop--) {
if (mcs[loop].mc == t_element.mc) {
_local3 = loop;
} else if (mcs[loop].depth == _local2) {
if (ascending) {
_local2++;
} else {
_local2--;
}
loop = mcs.length;
}
}
mcs[_local3].depth = _local2;
return(_local2);
}
}
Symbol 835 MovieClip [__Packages.disney.rabbitRivalry.ents.Entity] Frame 0
class disney.rabbitRivalry.ents.Entity extends smashing.keithm.Renderable
{
var startSpin, startVelocity, owner, startGravity, doRemove, velocity, gravityVector, rotation, spin, isSpinning, __animation, kill, isAlive, hdWidth, hdReg, nextX, hdHeight, nextY, x, y, nextZ, z, mc, __isAnimating, DRAWTYPE, specialDepth;
function Entity (t_data) {
super(t_data);
}
function init(t_data) {
if (t_data.spin != undefined) {
startSpin = t_data.spin;
} else {
startSpin = 0;
}
if (t_data.vel != undefined) {
startVelocity = t_data.vel;
} else {
startVelocity = new smashing.Point3D(0, 0, 0);
}
if (owner.gravity != undefined) {
startGravity = owner.gravity;
} else {
startGravity = new smashing.Point3D(0, 0, 0);
}
doRemove = false;
super.init(t_data);
}
function reset() {
velocity = startVelocity.copy();
gravityVector = startGravity.copy();
rotation = 0;
spin = startSpin;
if (startSpin == 0) {
isSpinning = false;
} else {
isSpinning = true;
}
super.reset();
__animation = __IDLE_ANIMATION;
}
function takeDamage(power) {
startDie();
}
function startDie() {
kill();
animate(__DEATH_ANIMATION);
if (__USES_VELOCITY) {
velocity.x = (velocity.y = 0);
}
}
function endDie() {
}
function onErase() {
super.onErase();
}
function updateDraw(camera) {
if (doRemove || (!isAlive)) {
return(undefined);
}
super.updateDraw(camera);
}
function runHD(t_target, dt) {
if (!(isAlive && (t_target.isAlive))) {
return(false);
}
if (Math.abs((nextX + hdReg.x) - (t_target.nextX + t_target.hdReg.x)) < (hdWidth + t_target.hdWidth)) {
if (Math.abs((nextY + hdReg.y) - (t_target.nextY + t_target.hdReg.y)) < (hdHeight + t_target.hdHeight)) {
return(true);
}
}
return(false);
}
function hitReact(t_source) {
}
function onDraw(t_newmc) {
super.onDraw(t_newmc);
animate(__IDLE_ANIMATION);
}
function update(dt) {
updateAnim();
if (__USES_VELOCITY) {
nextX = x + (velocity.x * dt);
nextY = y + (velocity.y * dt);
nextZ = z + (velocity.z * dt);
}
}
function move(dt) {
if (__USES_VELOCITY) {
x = x + (velocity.x * dt);
y = y + (velocity.y * dt);
z = z + (velocity.z * dt);
}
}
function render(camera, dt) {
super.render(camera, dt);
}
function moveAndRender(camera, dt) {
if (__USES_VELOCITY) {
nextX = (x = x + (velocity.x * dt));
nextY = (y = y + (velocity.y * dt));
nextZ = (z = z + (velocity.z * dt));
}
render(camera, dt);
}
function updateMoveAndRender(camera, dt) {
updateAnim();
if (__USES_VELOCITY) {
nextX = (x = x + (velocity.x * dt));
nextY = (y = y + (velocity.y * dt));
nextZ = (z = z + (velocity.z * dt));
}
render(camera, dt);
}
function animate(frame) {
if (frame != undefined) {
__animation = frame;
}
mc.gotoAndStop(__animation);
if (__animation == __IDLE_ANIMATION) {
__isAnimating = false;
} else {
__isAnimating = true;
}
}
function updateAnim() {
if (__isAnimating) {
if (mc.anim._currentFrame == mc.anim._totalFrames) {
if (__animation == __DEATH_ANIMATION) {
endDie();
} else {
animate(__IDLE_ANIMATION);
}
}
}
}
function freezeAnimation() {
mc.anim.stop();
}
function unfreezeAnimation() {
if (__isAnimating) {
mc.anim.play();
} else {
animate();
}
}
function replaceVelocity(t_vector) {
velocity = t_vector.copy();
}
function inputVelocity(t_vector) {
velocity.x = velocity.x + t_vector.x;
velocity.y = velocity.y + t_vector.y;
velocity.z = velocity.z + t_vector.z;
}
function addVelocity(t_vector, dt, maxVelocity, xMult, yMult, zMult) {
velocity.x = velocity.x + (t_vector.x * dt);
velocity.y = velocity.y + (t_vector.y * dt);
velocity.z = velocity.z + (t_vector.z * dt);
}
function getIntersect_line_line(t_lineStart, t_lineEnd, dt) {
var _local4;
var _local3;
var _local7;
var _local6;
var _local5;
if (velocity.x != 0) {
_local4 = velocity.y / velocity.x;
} else {
_local4 = Infinity;
}
if ((t_lineEnd.x - t_lineStart.x) != 0) {
_local3 = (t_lineEnd.y - t_lineStart.y) / (t_lineEnd.x - t_lineStart.x);
} else {
_local3 = Infinity;
}
_local7 = t_lineStart.y - (_local4 * t_lineStart.x);
_local6 = t_lineStart.y - (_local3 * t_lineStart.x);
_local5 = 1 / ((_local4 * -1) - (_local3 * -1));
return(new smashing.Point3D(((-1 * _local6) - (-1 * _local7)) * _local5, ((_local3 * _local7) - (_local4 * _local6)) * _local5));
}
function magnitudeToVector(t_magnitude, t_angle) {
var _local2;
var _local1;
var _local3 = t_angle * (Math.PI/180);
_local2 = t_magnitude * Math.cos(_local3);
_local2 = Math.round(_local2 * 100) / 100;
_local1 = t_magnitude * Math.sin(_local3);
_local1 = Math.round(_local1 * 100) / 100;
return(new smashing.Point3D(_local2, _local1, 0));
}
function getDrawType() {
return(((HAS_SPECIAL_DEPTH == true) ? ((DRAWTYPE + "_") + specialDepth) : (DRAWTYPE)));
}
function getIsAnimating() {
return(__isAnimating);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
var HAS_SPECIAL_DEPTH = false;
var __3D_SCALE = true;
var __IDLE_ANIMATION = "idle";
var __DEATH_ANIMATION = "die";
var __MAX_VELOCITY = 800;
var __USES_VELOCITY = true;
}
Symbol 836 MovieClip [__Packages.disney.rabbitRivalry.ents.Player] Frame 0
class disney.rabbitRivalry.ents.Player extends disney.rabbitRivalry.ents.Entity
{
var __currentWeapon, assetID, isCharging, isAttacking, isFlying, mc, gravityVector, __moveDt, __xAngleCalc, __yAngleCalc, __angle, __isPoweringUp, __power, __powerMeter_frames, addVelocity, startY, nextY, y, velocity, __animation, __isAnimating, magnitudeToVector, isPerfect, didHit, __IDLE_ANIMATION, __bounceCount, isAlive, x, hdReg, baseHeight;
function Player (t_data) {
super(t_data);
__currentWeapon = 1;
if (disney.rabbitRivalry.GameState.getInstance().isYang) {
assetID = "yang_mc";
} else {
assetID = "yin_mc";
}
isCharging = (isAttacking = (isFlying = false));
}
function equip(num) {
__currentWeapon = num;
mc.anim.weapon.gotoAndStop(__currentWeapon);
}
function reset() {
super.reset();
gravityVector = disney.rabbitRivalry.GameState.getInstance().GRAVITY;
}
function moveAndRender(camera, dt) {
dt = dt * 2;
super.moveAndRender(camera, dt);
}
function update(dt) {
__moveDt = dt * 1.5;
super.update(__moveDt);
if (isCharging) {
__xAngleCalc = mc.center_mc._xmouse;
__yAngleCalc = mc.center_mc._ymouse;
if (__xAngleCalc >= 0) {
if (__yAngleCalc >= 0) {
__angle = 0;
} else {
__angle = 360;
}
} else {
__angle = 180;
}
__angle = __angle + (Math.atan(__yAngleCalc / __xAngleCalc) * 57.2957795130823);
if ((__angle > __MAX_ANGLE) || (__angle < 180)) {
__angle = __MAX_ANGLE;
} else if (__angle < __MIN_ANGLE) {
__angle = __MIN_ANGLE;
}
mc.angleBar_mc._rotation = __angle;
if (__isPoweringUp) {
__power = __power + (__POWER_RATE * dt);
if (__power >= __MAX_POWER) {
__power = __MAX_POWER;
__isPoweringUp = false;
}
} else {
__power = __power - (__POWER_RATE * dt);
if (__power <= __MIN_POWER) {
__power = __MIN_POWER;
__isPoweringUp = true;
}
}
mc.angleBar_mc.powerMeter_mc.gotoAndStop(Math.round(((__power - __MIN_POWER) / __MINMAX_POWER_DIFF) * __powerMeter_frames));
} else if (isFlying) {
addVelocity(gravityVector, __moveDt);
if (nextY > startY) {
hitGround(startY);
}
}
}
function hitGround(t_y) {
y = (nextY = t_y);
isFlying = false;
animate("land");
velocity = new smashing.Point3D(0, 0, 0);
}
function grimace() {
if (__animation != "hit") {
disney.rabbitRivalry.Sounds.getInstance().p("yoHit" + Math.ceil(Math.random() * 2));
}
animate("hit");
}
function onMouseDown() {
if (isCharging) {
disablePowerAndAim();
animate("launch");
isAttacking = false;
return(true);
}
return(false);
}
function animate(frame) {
super.animate(frame);
mc.anim.weapon.gotoAndStop(__currentWeapon);
}
function updateAnim() {
if (__isAnimating) {
if (mc.anim._currentFrame == mc.anim._totalFrames) {
if (__animation == "launch") {
animate("fly");
if (__angle < __MAX_ANGLE) {
__power = __power - (25 * (1 - ((__angle - (__MIN_ANGLE - 1)) / (__MAX_ANGLE - __MIN_ANGLE))));
}
__power = 30 + (70 * (__power / 100));
velocity = magnitudeToVector(__power * __POWER_MULTIPLIER, __angle);
isPerfect = true;
isFlying = true;
} else if (__animation == "land") {
if (y >= startY) {
animate("lose");
smashing.keithm.Messenger.sendMessage("screen", "runResultAnim", {type:"miss"});
isAttacking = false;
} else {
animate("attack_" + __currentWeapon);
isAttacking = true;
if (assetID == "yang_mc") {
disney.rabbitRivalry.Sounds.getInstance().p("yangattack");
} else {
disney.rabbitRivalry.Sounds.getInstance().p("yinattack");
}
}
} else if (__animation.indexOf("attack_") > -1) {
if (didHit) {
animate("win");
} else {
animate("lose");
}
isAttacking = false;
} else if (__animation == "win") {
smashing.keithm.Messenger.sendMessage("world", "goNextRabbit");
__animation = "freeze";
} else if (__animation == "lose") {
smashing.keithm.Messenger.sendMessage("world", "onMiss");
__animation = "freeze";
}
}
}
}
function enablePowerAndAim() {
animate(__IDLE_ANIMATION);
isCharging = true;
mc.angleBar_mc._visible = true;
didHit = false;
__power = __MIN_POWER;
__isPoweringUp = true;
__angle = 0;
__bounceCount = 0;
}
function disablePowerAndAim() {
isCharging = false;
mc.angleBar_mc._visible = false;
mc.angleBar_mc.powerMeter_mc.gotoAndStop(1);
mc.angleBar_mc._rotation = 0;
}
function onDraw(newmc) {
super.onDraw(newmc);
if (!isCharging) {
disablePowerAndAim();
}
__powerMeter_frames = mc.angleBar_mc.powerMeter_mc._totalFrames;
}
function bounce(bounceRight) {
if (__bounceCount > 2) {
return(undefined);
}
__bounceCount++;
isPerfect = false;
if (bounceRight == true) {
velocity.x = 90;
} else {
velocity.x = -60;
}
velocity.y = -100;
}
function runHD(t_target, dt) {
if (!(isAlive && (t_target.isAlive))) {
return(false);
}
if (!isAttacking) {
return(super.runHD(t_target, dt));
}
if ((t_target.x < x) || (!t_target.isDrawn)) {
return(false);
}
if (mc.hitTest(t_target.mc)) {
return(true);
}
return(false);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -(baseHeight / 2);
}
function isAttackFrame() {
if (assetID == "yang_mc") {
var _local2;
if (__currentWeapon == 2) {
_local2 = 6;
} else {
_local2 = 15;
}
} else if (__currentWeapon == 3) {
var _local2 = 53;
} else if (__currentWeapon == 2) {
var _local2 = 35;
} else {
var _local2 = 19;
}
if (isAttacking && (mc.anim._currentFrame > _local2)) {
return(true);
}
return(false);
}
var TYPE = "player";
var DRAWTYPE = "player";
var __DEF_ASSET = "yang_mc";
var __DEF_WIDTH = 120;
var __DEF_HEIGHT = 190;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 80;
var __DEF_HD_HEIGHT = 160;
var __USE_DIMENSIONS_AS_HD = false;
var CUSTOMDRAW = true;
var __POWER_RATE = 100;
var __MAX_POWER = 100;
var __MIN_POWER = 30;
var __MINMAX_POWER_DIFF = disney.rabbitRivalry.ents.Player.prototype.__MAX_POWER - disney.rabbitRivalry.ents.Player.prototype.__MIN_POWER;
var __MIN_ANGLE = 270;
var __MAX_ANGLE = 350;
var __MAX_VELOCITY = 2800;
var __POWER_MULTIPLIER = 8.9;
}
Symbol 837 MovieClip [__Packages.disney.rabbitRivalry.ents.Yo] Frame 0
class disney.rabbitRivalry.ents.Yo extends disney.rabbitRivalry.ents.Entity
{
var __doHoverDown, __hoverLoc, spawn, __targetLoc, y, nextY, startY, hdReg;
function Yo (t_data) {
super(t_data);
}
function init(t_data) {
super.init(t_data);
__doHoverDown = false;
__hoverLoc = __HOVER_PEAK / 2;
setNewTargetLoc();
spawn();
}
function setNewTargetLoc() {
__targetLoc = Math.floor(Math.random() * __HOVER_PEAK);
}
function update(dt) {
super.update(dt);
if (__doHoverDown) {
__hoverLoc = __hoverLoc - (__hoverRate * dt);
if (__hoverLoc <= 0) {
__doHoverDown = false;
}
} else {
__hoverLoc = __hoverLoc + (__hoverRate * dt);
if (__hoverLoc > __HOVER_PEAK) {
__doHoverDown = true;
}
}
y = (nextY = startY - __hoverLoc);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
var TYPE = "yo";
var DRAWTYPE = "ents";
var __DEF_ASSET = "yo_mc";
var __DEF_WIDTH = 180;
var __DEF_HEIGHT = 180;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 80;
var __DEF_HD_HEIGHT = 80;
var __USE_DIMENSIONS_AS_HD = false;
var __IDLE_ANIMATION = "idle";
var __HIT_SFX = "bonk";
var __USES_VELOCITY = false;
var __HOVER_PEAK = 600;
var __hoverRate = 140;
}
Symbol 838 MovieClip [__Packages.disney.rabbitRivalry.scroller.Scroller] Frame 0
class disney.rabbitRivalry.scroller.Scroller
{
var __world, __scrollRate, __panels, loop;
function Scroller (t_data) {
__world = t_data.owner;
__scrollRate = 400;
__panels = [];
}
function addPanel(distance, asset) {
__panels.push(new disney.rabbitRivalry.scroller.ScrollerPanel(__world, distance, asset));
}
function addSky(asset) {
__panels.push(new disney.rabbitRivalry.scroller.ScrollerSky(__world, asset));
}
function render(camera, dt) {
loop = __panels.length;
while (loop--) {
__panels[loop].render(camera, dt);
}
}
function generate(camera) {
loop = __panels.length;
while (loop--) {
__panels[loop].spawn(camera);
}
}
function clear(t_viewport) {
super.onErase(t_viewport);
loop = __panels.length;
while (loop--) {
__panels[loop].clear();
}
}
}
Symbol 839 MovieClip [__Packages.disney.rabbitRivalry.scroller.ScrollerPanel] Frame 0
class disney.rabbitRivalry.scroller.ScrollerPanel extends smashing.keithm.Renderable
{
var __distRatio, __z, __currentAsset, mc, __mcs, __fastScale, z, scale, startScale, x, y, loop;
function ScrollerPanel (owner, t_distance, asset) {
super({x:0, y:0, owner:owner});
__distRatio = 1 - (t_distance / 1000);
__z = 1;
__currentAsset = asset;
}
function onDraw(newmc) {
super.onDraw(newmc);
mc._x = 0;
mc._y = 0;
mc.attachMovie(__currentAsset, "bg" + __z, __z);
mc.cacheAsBitmap = true;
__mcs = [mc];
}
function onErase() {
trace("I should not be erasable");
}
function render(camera, dt) {
__fastScale = camera.fl / (z - camera.z);
if (scale != __fastScale) {
scale = __fastScale;
mc._xscale = (mc._yscale = 100 * (1 + (scale - startScale)));
}
mc._x = ((x - camera.x) * scale) + camera.__get__sc().x;
mc._y = ((y - camera.y) * scale) + camera.__get__sc().y;
}
function clear() {
loop = __mcs.length;
while (loop--) {
__mcs[loop].removeMovieClip();
}
__mcs = [];
}
var DRAWTYPE = "bg";
var __DEF_ASSET = "_empty";
var CUSTOMDRAW = true;
var __DRAW_ON_SPAWN = true;
var __DEF_WIDTH = 800;
var __DEF_HEIGHT = 800;
var __USE_ACTUAL_DIMENSIONS = false;
}
Symbol 840 MovieClip [__Packages.disney.rabbitRivalry.scroller.ScrollerSky] Frame 0
class disney.rabbitRivalry.scroller.ScrollerSky extends smashing.keithm.Renderable
{
var __asset, specialDepth, mc, __mc, y;
function ScrollerSky (owner, asset) {
super({owner:owner});
__asset = asset;
specialDepth = "dist";
}
function onDraw(newmc) {
super.onDraw(newmc);
mc._x = 0;
mc._y = 0;
drawBG();
}
function drawBG() {
__mc = mc.attachMovie(__asset, "horizon", 1);
__mc.cacheAsBitmap = true;
return(__mc);
}
function update(deltaPixels, deltaTime) {
return(undefined);
}
function render(camera, dt) {
mc._y = y - camera.top;
}
function clear() {
__mc.removeMovieClip();
}
function getDrawType() {
return(((HAS_SPECIAL_DEPTH == true) ? ((DRAWTYPE + "_") + specialDepth) : (DRAWTYPE)));
}
var DRAWTYPE = "scroller";
var HAS_SPECIAL_DEPTH = true;
var __DEF_ASSET = "_empty";
var CUSTOMDRAW = true;
var __DRAW_ON_SPAWN = true;
var __DEF_WIDTH = 800;
var __DEF_HEIGHT = 800;
var __USE_ACTUAL_DIMENSIONS = false;
}
Symbol 841 MovieClip [__Packages.disney.rabbitRivalry.ents.Statue] Frame 0
class disney.rabbitRivalry.ents.Statue extends disney.rabbitRivalry.ents.Entity
{
var __baseY, scoreValue, health, __isGold, __hasTree, __tree, isAlive, __colorTrans, mc, startDie, hdReg, baseHeight;
function Statue (t_data) {
super(t_data);
}
function init(t_data) {
if (t_data.ground == undefined) {
__baseY = 700;
} else {
__baseY = t_data.ground;
}
super.init(t_data);
if (t_data.score == undefined) {
scoreValue = __SCORE_VALUE_DEF;
} else {
scoreValue = t_data.score;
}
health = 1;
if (t_data.gold == undefined) {
__isGold = false;
} else {
__isGold = t_data.gold;
}
if (__isGold) {
health = 2;
}
__hasTree = false;
}
function linkTree(tree) {
__hasTree = true;
__tree = tree;
}
function takeDamage(power) {
if (isAlive) {
health = health - power;
if (health > 0) {
__isGold = false;
__colorTrans.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
disney.rabbitRivalry.Sounds.getInstance().p("bash");
mc.goldSmash_mc.gotoAndPlay(2);
} else {
startDie();
}
if (__HIT_SFX != "none") {
disney.rabbitRivalry.Sounds.getInstance().p(__HIT_SFX);
}
}
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = -(baseHeight / 2);
}
function onDraw(newmc) {
super.onDraw(newmc);
if (__isGold) {
__colorTrans = new flash.geom.Transform(mc);
__colorTrans.colorTransform = new flash.geom.ColorTransform(0.8, 0.6, 0, 1, 120, 120, 0, 0);
}
}
var TYPE = "statue";
var DRAWTYPE = "ents";
var __DEF_ASSET = "statue_carl";
var __DEF_WIDTH = 180;
var __DEF_HEIGHT = 180;
var __USE_ACTUAL_DIMENSIONS = true;
var __DEF_HD_WIDTH = 180;
var __DEF_HD_HEIGHT = 180;
var __USE_DIMENSIONS_AS_HD = false;
var __IDLE_ANIMATION = "idle";
var __DEATH_ANIMATION = "splode";
var __HIT_SFX = "bonk";
var __SCORE_VALUE_DEF = 100;
var __USES_VELOCITY = false;
}
Symbol 842 MovieClip [__Packages.disney.rabbitRivalry.ents.Tree] Frame 0
class disney.rabbitRivalry.ents.Tree extends disney.rabbitRivalry.ents.Entity
{
var __baseY, __trunkHeight, startY, isDrawn, __xOnscreen, baseWidth, scale, x, mc, y, __fastScale, z, startScale, baseHeight, isTreeTopDrawn, isTreeTrunkDrawn, hdWidth, hdReg;
function Tree (t_data) {
super(t_data);
if (t_data.ground == undefined) {
__baseY = 700;
} else {
__baseY = t_data.ground;
}
__baseY = __baseY - 23;
__trunkHeight = __baseY - startY;
}
function updateAnim() {
}
function render(camera, dt) {
if (!isDrawn) {
updateDraw(camera);
}
__xOnscreen = Math.abs((x - camera.x) * scale) < (camera.__get__sc().x + baseWidth);
renderTreeTrunk(camera, __xOnscreen);
renderTreeTop(camera, __xOnscreen);
mc._x = Math.ceil((((x - camera.x) * scale) + camera.__get__sc().x) * 100) / 100;
mc._y = Math.ceil((((y - camera.y) * scale) + camera.__get__sc().y) * 100) / 100;
__fastScale = camera.fl / (z - camera.z);
if (scale != __fastScale) {
scale = __fastScale;
mc._xscale = (mc._yscale = 100 * (1 + (scale - startScale)));
}
}
function renderTreeTop(camera, xOnscreen) {
if (xOnscreen && (Math.abs((y - camera.y) * scale) < (camera.__get__sc().y + baseHeight))) {
if (!isTreeTopDrawn) {
mc.attachMovie(__TREETOP_ASSET, __TREETOP_ASSET, 2);
mc[__TREETOP_ASSET].cacheAsBitmap = true;
isTreeTopDrawn = true;
}
} else if (isTreeTopDrawn) {
mc[__TREETOP_ASSET].removeMovieClip();
isTreeTopDrawn = false;
}
}
function renderTreeTrunk(camera, xOnscreen) {
if (xOnscreen) {
if (!isTreeTrunkDrawn) {
var _local2 = mc.createEmptyMovieClip(__TREETRUNK_ID, 1);
var _local3 = 8480297 /* 0x816629 */;
if (disney.rabbitRivalry.GameState.getInstance().levelNum > 5) {
_local3 = 4930840 /* 0x4B3D18 */;
}
_local2.lineStyle(1, _local3, 100);
_local2.beginFill(_local3, 100);
_local2.moveTo(-__TRUNK_WIDTH_HALF, __trunkHeight);
_local2.lineTo(__TRUNK_WIDTH_HALF, __trunkHeight);
_local2.lineTo(__TRUNK_WIDTH_HALF, __TREETOP_HEIGHT);
_local2.lineTo(-__TRUNK_WIDTH_HALF, __TREETOP_HEIGHT);
_local2.lineTo(-__TRUNK_WIDTH_HALF, __trunkHeight);
_local3 = 7954728 /* 0x796128 */;
if (disney.rabbitRivalry.GameState.getInstance().levelNum > 5) {
_local3 = 5982494 /* 0x5B491E */;
}
_local2.beginFill(_local3, 100);
_local2.moveTo(__SHADOW_START, __trunkHeight);
_local2.lineTo(__SHADOW_START + __SHADOW_WIDTH, __trunkHeight);
_local2.lineTo(__SHADOW_START + __SHADOW_WIDTH, __TREETOP_HEIGHT);
_local2.lineTo(__SHADOW_START, __TREETOP_HEIGHT);
_local2.lineTo(__SHADOW_START, __trunkHeight);
_local2.cacheAsBitmap = true;
isTreeTrunkDrawn = true;
}
} else if (isTreeTrunkDrawn) {
mc[__TREETRUNK_ID].removeMovieClip();
isTreeTrunkDrawn = false;
}
}
function updateDraw(camera) {
smashing.keithm.Viewport.getInstance().draw({element:this});
isTreeTopDrawn = false;
isTreeTrunkDrawn = false;
}
function runHD(player) {
if ((player.nextX > (x - hdWidth)) && (player.nextX < (x + hdWidth))) {
if (((player.velocity.y > 0) && (player.y < (y + 45))) && (player.nextY >= y)) {
trace("Tree collision : " + y);
return(true);
}
}
return(false);
}
function setHDRegistration() {
hdReg = {};
hdReg.x = 0;
hdReg.y = 0;
}
var TYPE = "tree";
var DRAWTYPE = "trees";
var __DEF_ASSET = "_empty";
var __DEF_WIDTH = 521;
var __DEF_HEIGHT = 93;
var __USE_ACTUAL_DIMENSIONS = false;
var __USE_DIMENSIONS_AS_HD = true;
var __TREETOP_ASSET = "treetop_mc";
var __TREETRUNK_ID = "treetrunk_mc";
var __TRUNK_WIDTH_HALF = 125;
var __SHADOW_START = 80;
var __SHADOW_WIDTH = 40;
var __TREETOP_HEIGHT = 50;
}
Symbol 843 MovieClip [__Packages.disney.rabbitRivalry.ui.UI] Frame 0
class disney.rabbitRivalry.ui.UI
{
static var __instance;
var engine, __nextScreenID, __hasActiveScreen, __doesActiveScreenUpdate, __hasIntroPlayed, __activeScreen, __previousScreenID, __activeScreenID;
function UI () {
}
static function init() {
__instance = new disney.rabbitRivalry.ui.UI();
}
static function getInstance() {
return(__instance);
}
function linkEngine(t_engine) {
engine = t_engine;
smashing.keithm.Messenger.registerAddress("ui", this);
}
function reset() {
__nextScreenID = "";
__hasActiveScreen = false;
__doesActiveScreenUpdate = false;
__hasIntroPlayed = false;
}
function update(dt) {
if (__doesActiveScreenUpdate) {
__activeScreen.update(dt);
}
}
function returnToPreviousScreen() {
__nextScreenID = __previousScreenID;
__activeScreen.close();
}
function goScreen(id) {
if (__hasActiveScreen) {
__nextScreenID = id;
__activeScreen.close();
} else {
openScreen(id);
}
}
function openScreen(id) {
if (id == undefined) {
id = __nextScreenID;
}
if (id == "") {
return(undefined);
}
__nextScreenID = "";
__previousScreenID = __activeScreenID;
__activeScreenID = id;
engine.gotoAndStop(__activeScreenID);
switch (__activeScreenID) {
case "splash" :
__activeScreen = new disney.rabbitRivalry.ui.Splash(engine.screen_mc, this, __hasIntroPlayed);
__hasIntroPlayed = true;
break;
case "gameplay" :
__activeScreen = new disney.rabbitRivalry.ui.GamePlay(engine.screen_mc, this, engine.overlay_mc, engine.nav_mc, engine.helpPopup_mc);
break;
case "help" :
__activeScreen = new disney.rabbitRivalry.ui.Help(engine.screen_mc, this);
break;
case "winLevel" :
__activeScreen = new disney.rabbitRivalry.ui.WinLevel(engine.screen_mc, this);
break;
case "winGame" :
__activeScreen = new disney.rabbitRivalry.ui.WinGame(engine.screen_mc, this);
break;
case "gameOver" :
__activeScreen = new disney.rabbitRivalry.ui.GameOver(engine.screen_mc, this);
break;
default :
trace("[UI] openScreen called with invalid id: " + __activeScreenID);
return(undefined);
}
__activeScreen.init();
__activeScreen.open();
smashing.keithm.Messenger.registerAddress("screen", __activeScreen);
__hasActiveScreen = true;
__doesActiveScreenUpdate = __activeScreen.DOES_UPDATE;
}
function onScreenClosed() {
if (__nextScreenID != "") {
openScreen(__nextScreenID);
}
}
function disableActiveScreenUpdates() {
__doesActiveScreenUpdate = false;
}
function enableActiveScreenUpdates() {
__doesActiveScreenUpdate = true;
}
function onMessageReceived(message, args) {
this[message](args);
}
function get currentScreenID() {
return(__activeScreenID);
}
}
Symbol 844 MovieClip [__Packages.disney.rabbitRivalry.ui.Screen] Frame 0
class disney.rabbitRivalry.ui.Screen
{
var __mc, ui, __outroCallbackID, __outroCallbackPath, __isOpening, __isClosing, __isClosed;
function Screen (mc, t_ui) {
__mc = mc;
ui = t_ui;
__outroCallbackID = (__outroCallbackPath = "");
}
function update(dt) {
if (__isOpening) {
if (__mc._currentFrame >= __OPENED_FRAME) {
onOpened();
}
} else if (__isClosing) {
if (__mc._currentFrame == __mc._totalFrames) {
onClosed();
}
}
}
function init() {
__isOpening = (__isClosing = false);
__isClosed = true;
}
function open() {
__isClosed = false;
if (__HAS_INTRO) {
__isOpening = true;
__mc.gotoAndPlay(__INTRO_FRAME);
} else {
onOpened();
}
}
function onOpened() {
__isOpening = false;
__mc.gotoAndStop(__OPENED_FRAME);
}
function close() {
if (__isClosed) {
ui.onScreenClosed();
return(undefined);
}
if (__HAS_OUTRO) {
__isClosing = true;
__mc.gotoAndPlay(__OUTRO_FRAME);
} else {
onClosed();
}
}
function onClosed() {
__isClosing = false;
__isClosed = true;
if (__outroCallbackID != "") {
smashing.keithm.Messenger.sendMessage(__outroCallbackPath, __outroCallbackID);
__outroCallbackID = (__outroCallbackPath = "");
} else {
ui.onScreenClosed();
}
}
function closeThenCallback(callbackPath, callbackID) {
__outroCallbackPath = callbackPath;
__outroCallbackID = callbackID;
close();
}
function makeButton(mc) {
mc.screen = this;
}
function onMessageReceived(message, args) {
this[message](args);
}
function toString() {
return("Screen");
}
var __INTRO_FRAME = "intro";
var __OUTRO_FRAME = "outro";
var __HAS_INTRO = false;
var __HAS_OUTRO = false;
var __OPENED_FRAME = 10;
var DOES_UPDATE = true;
}
Symbol 845 MovieClip [__Packages.disney.rabbitRivalry.ui.Splash] Frame 0
class disney.rabbitRivalry.ui.Splash extends disney.rabbitRivalry.ui.Screen
{
var __hasPlayedOnce, __isClosed, __isOpening, __mc, __INTRO_FRAME, makeButton;
function Splash (mc, ui, hasIntroPlayed) {
super(mc, ui);
__hasPlayedOnce = hasIntroPlayed;
}
function open() {
__isClosed = false;
__isOpening = true;
if (__hasPlayedOnce) {
__mc.gotoAndPlay("fastIntro");
} else {
__mc.gotoAndPlay(__INTRO_FRAME);
}
__hasPlayedOnce = true;
}
function onOpened() {
super.onOpened();
makeButton(__mc.btn_play);
__mc.btn_play.onRelease = function () {
this.screen.closeThenCallback("engine", "startGame");
};
__mc.btn_help.onRelease = function () {
smashing.keithm.Messenger.sendMessage("engine", "showHelp");
};
}
var __HAS_INTRO = true;
var __HAS_OUTRO = true;
var __OPENED_FRAME = 120;
}
Symbol 846 MovieClip [__Packages.disney.rabbitRivalry.ui.GamePlay] Frame 0
class disney.rabbitRivalry.ui.GamePlay extends disney.rabbitRivalry.ui.Screen
{
var __overlay, __nav, __help, __state, __hideYoMeter;
function GamePlay (mc, ui, overlay, nav, help) {
super(mc, ui);
__overlay = overlay;
__nav = nav;
__help = help;
__state = disney.rabbitRivalry.GameState.getInstance();
__hideYoMeter = false;
}
function update(dt) {
super.update(dt);
if (__state.actionState == 1) {
if (__overlay._currentFrame >= __LEVEL_INTRO_END_FRAME) {
__state.advanceState();
__overlay.gotoAndPlay((__state.isYang ? "yang_in" : "yin_in"));
}
} else if (__state.actionState == 2) {
if (__overlay._currentFrame == (__state.isYang ? (__YANG_INTRO_END_FRAME) : (__YIN_INTRO_END_FRAME))) {
assignWeaponSelectButtons();
__state.advanceState();
}
} else if (__state.actionState == 3) {
if (__overlay._currentFrame == (__state.isYang ? (__YANG_OUTRO_END_FRAME) : (__YIN_OUTRO_END_FRAME))) {
__state.advanceState();
__overlay.gotoAndStop("hidden");
}
}
}
function updateLives() {
var _local2 = disney.rabbitRivalry.GameState.getInstance().misses;
while (_local2--) {
__nav["underwear_" + (_local2 + 1)].gotoAndStop("on");
}
_local2 = 5;
while (_local2 > disney.rabbitRivalry.GameState.getInstance().misses) {
__nav["underwear_" + _local2].gotoAndStop("off");
_local2--;
}
}
function updateScore() {
__nav.scoreBoard_mc.txt_score.text = String(disney.rabbitRivalry.GameState.getInstance().score);
}
function onNextRabbit() {
__overlay.gotoAndStop(32);
}
function onOpened() {
super.onOpened();
__overlay.gotoAndPlay("level");
__overlay.levelNum_mc.txt_mc.textBox.text = "Level " + __state.levelNum;
if ((disney.rabbitRivalry.GameState.getInstance().levelNum == 1) || (__nav._currentframe == 1)) {
__nav.gotoAndPlay("intro");
}
updateScore();
updateLives();
}
function onClosed() {
__overlay.gotoAndStop("hidden");
super.onClosed();
}
function assignWeaponSelectButtons() {
__overlay.wep_1.onRollOver = function () {
smashing.keithm.Messenger.sendMessage("world", "onSelectWeapon", {num:1});
disney.rabbitRivalry.Sounds.getInstance().playVoiceOver("attack1");
};
__overlay.wep_1.onRelease = function () {
smashing.keithm.Messenger.sendMessage("world", "onSelectWeapon", {num:1});
smashing.keithm.Messenger.sendMessage("screen", "onSelectWeapon");
};
__overlay.wep_2.onRollOver = function () {
smashing.keithm.Messenger.sendMessage("world", "onSelectWeapon", {num:2});
disney.rabbitRivalry.Sounds.getInstance().playVoiceOver("attack2");
};
__overlay.wep_2.onRelease = function () {
smashing.keithm.Messenger.sendMessage("world", "onSelectWeapon", {num:2});
smashing.keithm.Messenger.sendMessage("screen", "onSelectWeapon");
};
__overlay.wep_3.onRollOver = function () {
smashing.keithm.Messenger.sendMessage("world", "onSelectWeapon", {num:3});
disney.rabbitRivalry.Sounds.getInstance().playVoiceOver("attack3");
};
__overlay.wep_3.onRelease = function () {
smashing.keithm.Messenger.sendMessage("world", "onSelectWeapon", {num:3});
smashing.keithm.Messenger.sendMessage("screen", "onSelectWeapon");
};
}
function onSelectWeapon() {
__overlay.gotoAndPlay((__state.isYang ? "yang_out" : "yin_out"));
}
function runResultAnim(t_args) {
__nav.resultsAnim_mc.gotoAndPlay(2);
__nav.resultsAnim_mc.text_mc.gotoAndStop(t_args.type);
}
function onPressHelpOpen() {
__help.gotoAndPlay("open");
smashing.keithm.Messenger.sendMessage("engine", "pause");
}
function onPressHelpClose() {
__help.gotoAndPlay("close");
smashing.keithm.Messenger.sendMessage("engine", "unpause");
}
function onPressPlay() {
onPressHelpClose();
}
var DOES_UPDATE = true;
var __HAS_INTRO = true;
var __LEVEL_INTRO_END_FRAME = 32;
var __YANG_INTRO_END_FRAME = 45;
var __YIN_INTRO_END_FRAME = 71;
var __YANG_OUTRO_END_FRAME = 58;
var __YIN_OUTRO_END_FRAME = 82;
}
Symbol 847 MovieClip [__Packages.disney.rabbitRivalry.ui.Help] Frame 0
class disney.rabbitRivalry.ui.Help extends disney.rabbitRivalry.ui.Screen
{
var __mc, closeThenCallback;
function Help (mc, ui) {
super(mc, ui);
}
function open() {
if (disney.rabbitRivalry.GameState.getInstance().actionState == 1) {
__mc.scroll.hideQuit = true;
}
super.open();
}
function onPressPlay() {
closeThenCallback("engine", "startGame");
}
function onPressHelpClose() {
smashing.keithm.Messenger.sendMessage("ui", "returnToPreviousScreen");
}
var __HAS_INTRO = true;
var __HAS_OUTRO = true;
var __OPENED_FRAME = 10;
}
Symbol 848 MovieClip [__Packages.disney.rabbitRivalry.ui.WinLevel] Frame 0
class disney.rabbitRivalry.ui.WinLevel extends disney.rabbitRivalry.ui.Screen
{
var __mc;
function WinLevel (mc, ui) {
super(mc, ui);
}
function onOpened() {
super.onOpened();
__mc.go_btn.onRelease = function () {
smashing.keithm.Messenger.sendMessage("engine", "onNextLevel");
};
}
var __HAS_INTRO = true;
var __HAS_OUTRO = false;
var __OPENED_FRAME = 26;
}
Symbol 849 MovieClip [__Packages.disney.rabbitRivalry.ui.WinGame] Frame 0
class disney.rabbitRivalry.ui.WinGame extends disney.rabbitRivalry.ui.Screen
{
var __mc;
function WinGame (mc, ui) {
super(mc, ui);
}
function onOpened() {
super.onOpened();
__mc.btn_play.onRelease = function () {
smashing.keithm.Messenger.sendMessage("engine", "goSplash");
};
__mc.btn_highscore.onRelease = function () {
smashing.keithm.Messenger.sendMessage("engine", "goHighscore");
};
}
var __HAS_INTRO = true;
var __HAS_OUTRO = false;
var __OPENED_FRAME = 40;
}
Symbol 850 MovieClip [__Packages.disney.rabbitRivalry.ui.GameOver] Frame 0
class disney.rabbitRivalry.ui.GameOver extends disney.rabbitRivalry.ui.Screen
{
var __mc;
function GameOver (mc, ui) {
super(mc, ui);
}
function onOpened() {
super.onOpened();
__mc.btn_play.onRelease = function () {
smashing.keithm.Messenger.sendMessage("engine", "goSplash");
};
__mc.btn_highscore.onRelease = function () {
smashing.keithm.Messenger.sendMessage("engine", "goHighscore");
};
}
var __HAS_INTRO = true;
var __HAS_OUTRO = false;
var __OPENED_FRAME = 48;
}
Symbol 851 MovieClip [__Packages.smashing.IntervalEngine] Frame 0
class smashing.IntervalEngine
{
var _uo, _uf, _update_interval, _last_update, _i, _ft, _el;
function IntervalEngine (update_object, update_function) {
_uo = update_object;
_uf = update_function;
}
function startFlat(FPS) {
_FPS = FPS;
_update_interval = 1 / FPS;
_last_update = getTimer() * 0.001;
_i = setInterval(this, "_flat_step", 0);
}
function startFlex() {
_last_update = getTimer() * 0.001;
_i = setInterval(this, "_flex_step", 0);
}
function startFast() {
_last_update = getTimer();
_i = setInterval(this, "_fast_step", 10);
}
function reset(Void) {
if (_i != undefined) {
clearInterval(_i);
}
_ft = 0;
_last_update = getTimer() * 0.001;
_lel = _MAX_FRAMETIME / 2;
}
function _flex_step(Void) {
_el = Math.min(_MAX_FRAMETIME, (-_last_update) + ((_last_update = getTimer() * 0.001)));
_lel = _lel - Math.max(-_MAX_TIMEDIFF, Math.min(_MAX_TIMEDIFF, _lel - _el));
_uo[_uf](_lel);
}
function _flat_step(Void) {
_ft = _ft + ((-_last_update) + ((_last_update = getTimer() * 0.001)));
if (_ft < _update_interval) {
return(undefined);
}
_uo[_uf](_ft);
_ft = 0;
}
function _fast_step(Void) {
_el = (-_last_update) + ((_last_update = getTimer()));
_uo[_uf](_el * 0.001);
}
function clear() {
clearInterval(_i);
}
var _MAX_TIMEDIFF = 0.005;
var _MIN_FPS = 5;
var _MAX_FRAMETIME = 1 / smashing.IntervalEngine.prototype._MIN_FPS;
var _lel = 0.2;
var _FPS = 0;
}
Symbol 476 MovieClip Frame 1
stop();
Symbol 481 MovieClip Frame 25
stop();
Symbol 547 MovieClip Frame 1
stop();
Symbol 582 MovieClip Frame 22
stop();
Symbol 618 MovieClip Frame 37
stop();
Symbol 622 MovieClip Frame 72
stop();
Symbol 625 MovieClip Frame 16
stop();
Symbol 628 MovieClip Frame 54
stop();
Symbol 633 MovieClip Frame 25
stop();
Symbol 638 MovieClip Frame 25
stop();
Symbol 643 MovieClip Frame 25
stop();
Symbol 648 MovieClip Frame 25
stop();
Symbol 669 MovieClip Frame 1
stop();
Symbol 685 MovieClip Frame 1
stop();
Symbol 701 MovieClip Frame 1
stop();
Symbol 735 MovieClip Frame 59
stop();
Symbol 772 MovieClip Frame 1
stop();
Symbol 780 MovieClip Frame 65
stop();
Symbol 783 MovieClip Frame 17
stop();
Symbol 785 MovieClip Frame 55
stop();