Frame 1
var ExpressInstall = function () {
this.needsUpdate = ((_root.MMplayerType == undefined) ? false : true);
};
ExpressInstall.prototype = {init:function () {
if (this.needsUpdate) {
this.loadUpdater();
return(true);
}
return(false);
}, loadUpdater:function () {
System.security.allowDomain("fpdownload.macromedia.com");
this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000);
var _self = this;
this.updater.installStatus = _self.onInstallStatus;
this.hold = this.updater.createEmptyMovieClip("hold", 1);
this.updater.onEnterFrame = function () {
if (typeof(this.hold.startUpdate) == "function") {
_self.initUpdater();
this.onEnterFrame = null;
}
};
var _local3 = Math.random();
this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + _local3);
}, initUpdater:function () {
this.hold.redirectURL = _root.MMredirectURL;
this.hold.MMplayerType = _root.MMplayerType;
this.hold.MMdoctitle = _root.MMdoctitle;
this.hold.startUpdate();
}, onInstallStatus:function (msg) {
if (msg == "Download.Complete") {
} else if (msg == "Download.Cancelled") {
getURL ("javascript:alert('This content requires a more recent version of the Macromedia Flash Player.')");
} else if (msg == "Download.Failed") {
getURL ("javascript:alert('There was an error downloading the Flash Player update. Please try again later, or visit macromedia.com to download the latest version of the Flash plugin.')");
}
}};
var ExpressInstall = new ExpressInstall();
if (ExpressInstall.needsUpdate) {
var upgradeMsg = _root.attachMovie("upgradeMsg_src", "upgradeMsg", 1);
upgradeMsg._x = Stage.width / 2;
upgradeMsg._y = Stage.height / 2;
upgradeMsg.upgradeBtn.onRelease = function () {
ExpressInstall.init();
};
stop();
}
Frame 2
_global.inPage = f_loaded != undefined;
_global.alert = function (msg) {
_root.getURL(("javascript:alert('" + escape(msg)) + "');");
};
if (inPage) {
} else if ((_url.indexOf(".exe") == -1) && (_url.indexOf("file:") != -1)) {
trace(" Enable XRAY ");
xrayEnabled = true;
}
if ((xrayEnabled == "true") || (xrayEnabled == 1)) {
stop();
xray_txt.text = "create connector";
var listener = new Object();
listener.LoadComplete = function () {
xray_txt.text = "Xray has loaded...";
_root.play();
};
com.blitzagency.xray.util.XrayLoader.addEventListener("LoadComplete", listener);
com.blitzagency.xray.util.XrayLoader.loadConnector("./xray_connector.swf", this);
}
Frame 3
stop();
function randomEgg() {
var _local1 = eggsCon_mc.attachMovie("mcEggs", "mcEggs" + myCount, eggsCon_mc.getNextHighestDepth());
_local1._x = random(mcLoader._width);
_local1.eggs_mc.gotoAndStop(random(6) + 1);
}
var myCount = 0;
_root.isPreload = true;
var eggsCon_mc;
eggsCon_mc = _root.createEmptyMovieClip("eggs_mc", _root.getNextHighestDepth());
eggsCon_mc._x = mcLoader._x;
eggsCon_mc._y = mcLoader._y;
var rand = setInterval(randomEgg, 1000);
var preloadMute;
preloadMute = new Sound();
preloadMute.setVolume(0);
Instance of Symbol 242 MovieClip "mcLoader" in Frame 3
onClipEvent (enterFrame) {
if (percent == 100) {
_root.play();
} else {
percent = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
_root.mcLoader.mcBar._width = percent;
}
}
Instance of Symbol 242 MovieClip "mcLoader" in Frame 10
onClipEvent (enterFrame) {
if (percent == 100) {
_root.play();
} else {
percent = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
_root.mcLoader.mcBar._width = percent;
}
}
Frame 11
_root.isPreload = false;
clearInterval(rand);
preloadMute.setVolume(100);
eggsCon_mc.removeMovieClip();
delete preloadMute;
Frame 12
Frame 14
if (_global.$tweenManager == undefined) {
_global.$tweenManager = new zigo.tweenManager();
} else {
_global.$tweenManager.cleanUp();
_global.$tweenManager.init();
}
com.robertpenner.easing.Back;
com.robertpenner.easing.Bounce;
com.robertpenner.easing.Circ;
com.robertpenner.easing.Cubic;
com.robertpenner.easing.Elastic;
com.robertpenner.easing.Expo;
com.robertpenner.easing.Linear;
com.robertpenner.easing.Quad;
com.robertpenner.easing.Quart;
com.robertpenner.easing.Quint;
com.robertpenner.easing.Sine;
var Mp = MovieClip.prototype;
Mp.addListener = function () {
if (!this._listeners) {
AsBroadcaster.initialize(this);
}
this.addListener.apply(this, arguments);
};
ASSetPropFlags(Mp, "addListener", 1, 0);
Mp.tween = function (props, pEnd, seconds, animType, delay, callback, extra1, extra2) {
if (_global.$tweenManager.isTweenLocked(this)) {
trace("tween not added, this movieclip is locked");
return(undefined);
}
if (arguments.length < 2) {
trace("tween not added, props & pEnd must be defined");
return(undefined);
}
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
if (!(pEnd instanceof Array)) {
pEnd = [pEnd];
while (pEnd.length < props.length) {
pEnd.push(pEnd[0]);
}
}
if (seconds == undefined) {
seconds = 2;
} else if (seconds < 0.01) {
seconds = 0;
}
if ((delay < 0.01) || (delay == undefined)) {
delay = 0;
}
switch (typeof(animType)) {
case "string" :
animType = animType.toLowerCase();
if (animType == "linear") {
var eqf = com.robertpenner.easing.Linear.easeNone;
} else if (animType.indexOf("easeoutin") == 0) {
var t = animType.substr(9);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeOutIn;
} else if (animType.indexOf("easeinout") == 0) {
var t = animType.substr(9);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeInOut;
} else if (animType.indexOf("easein") == 0) {
var t = animType.substr(6);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeIn;
} else if (animType.indexOf("easeout") == 0) {
var t = animType.substr(7);
t = t.charAt(0).toUpperCase() + t.substr(1);
var eqf = com.robertpenner.easing[t].easeOut;
}
if (eqf == undefined) {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
case "function" :
var eqf = animType;
break;
case "object" :
if ((animType.ease != undefined) && (animType.pts != undefined)) {
var eqf = animType.ease;
extra1 = animType.pts;
} else {
var eqf = com.robertpenner.easing.Expo.easeOut;
}
break;
default :
var eqf = com.robertpenner.easing.Expo.easeOut;
}
switch (typeof(callback)) {
case "function" :
callback = {func:callback, scope:this._parent};
break;
case "string" :
var ilp;
var funcp;
var scope;
var args;
var a;
ilp = callback.indexOf("(");
funcp = callback.slice(0, ilp);
scope = eval (funcp.slice(0, funcp.lastIndexOf(".")));
func = eval (funcp);
args = callback.slice(ilp + 1, callback.lastIndexOf(")")).split(",");
var i = 0;
while (i < args.length) {
a = eval (args[i]);
if (a != undefined) {
args[i] = a;
}
i++;
}
callback = {func:func, scope:scope, args:args};
}
if (_global.$tweenManager.autoStop) {
_global.$tweenManager.removeTween(this);
}
if (delay > 0) {
_global.$tweenManager.addTweenWithDelay(delay, this, props, pEnd, seconds, eqf, callback, extra1, extra2);
} else {
_global.$tweenManager.addTween(this, props, pEnd, seconds, eqf, callback, extra1, extra2);
}
};
Mp.stopTween = function (props) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_global.$tweenManager.removeTween(this, props);
};
Mp.isTweening = function (prop) {
return(_global.$tweenManager.isTweening(this, prop));
};
Mp.getTweens = function () {
return(_global.$tweenManager.getTweens(this));
};
Mp.lockTween = function () {
_global.$tweenManager.lockTween(this, true);
};
Mp.unlockTween = function () {
_global.$tweenManager.lockTween(this, false);
};
Mp.isTweenLocked = function () {
return(_global.$tweenManager.isTweenLocked(this));
};
Mp.isTweenPaused = function (prop) {
return(_global.$tweenManager.isTweenPaused(this, prop));
};
Mp.pauseTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.pauseTween(this, _local4);
};
Mp.unpauseTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.unpauseTween(this, _local4);
};
Mp.pauseAllTweens = function () {
_global.$tweenManager.pauseTween();
};
Mp.unpauseAllTweens = function () {
_global.$tweenManager.unpauseTween();
};
Mp.stopAllTweens = function () {
_global.$tweenManager.stopAll();
};
Mp.ffTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.ffTween(this, _local4);
};
Mp.rewTween = function (props) {
var _local4;
if (props != undefined) {
if (typeof(props) == "string") {
if (props.indexOf(",") > -1) {
props = props.split(" ").join("").split(",");
} else {
props = [props];
}
}
_local4 = {};
for (var _local5 in props) {
_local4[props[_local5]] = true;
}
}
_global.$tweenManager.rewTween(this, _local4);
};
Mp.alphaTo = function (destAlpha, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_alpha"], [destAlpha], seconds, animType, delay, callback, extra1, extra2);
};
Mp.scaleTo = function (destScale, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_xscale", "_yscale"], [destScale, destScale], seconds, animType, delay, callback, extra1, extra2);
};
Mp.sizeTo = function (destSize, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_width", "_height"], [destSize, destSize], seconds, animType, delay, callback, extra1, extra2);
};
Mp.slideTo = function (destX, destY, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_x", "_y"], [destX, destY], seconds, animType, delay, callback, extra1, extra2);
};
Mp.rotateTo = function (destRotation, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_rotation"], [destRotation], seconds, animType, delay, callback, extra1, extra2);
};
_global.getColorTransObj = function (type, amt, rgb) {
switch (type) {
case "brightness" :
var _local4 = 100 - Math.abs(amt);
var _local6 = 0;
if (amt > 0) {
_local6 = 256 * (amt / 100);
}
return({ra:_local4, rb:_local6, ga:_local4, gb:_local6, ba:_local4, bb:_local6});
case "brightOffset" :
_local6 = 256 * (amt / 100);
return({ra:100, rb:_local6, ga:100, gb:_local6, ba:100, bb:_local6});
case "contrast" :
var _local2 = {};
_local2.ra = (_local2.ga = (_local2.ba = amt));
_local2.rb = (_local2.gb = (_local2.bb = 128 - (1.28 * amt)));
return(_local2);
case "invertColor" :
_local2 = {};
_local2.ra = (_local2.ga = (_local2.ba = 100 - (2 * amt)));
_local2.rb = (_local2.gb = (_local2.bb = amt * 2.55));
return(_local2);
case "tint" :
if ((rgb == undefined) || (rgb == null)) {
} else {
var _local8 = rgb >> 16;
var _local9 = (rgb >> 8) & 255;
var _local7 = rgb & 255;
var _local5 = amt / 100;
_local2 = {rb:_local8 * _local5, gb:_local9 * _local5, bb:_local7 * _local5};
_local2.ra = (_local2.ga = (_local2.ba = 100 - amt));
return(_local2);
}
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
};
Mp.brightnessTo = function (bright, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("brightness", bright)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.brightOffsetTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("brightOffset", percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.contrastTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("contrast", percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.colorTo = function (rgb, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("tint", 100, rgb)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, animType, delay, callback, extra1, extra2) {
var _local2 = {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab};
this.tween(["_ct_"], [_local2], seconds, animType, delay, callback, extra1, extra2);
};
Mp.invertColorTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("invertColor", percent)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.tintTo = function (rgb, percent, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_ct_"], [getColorTransObj("tint", percent, rgb)], seconds, animType, delay, callback, extra1, extra2);
};
Mp.getFrame = function () {
return(this._currentframe);
};
Mp.setFrame = function (fr) {
this.gotoAndStop(Math.round(fr));
};
Mp.addProperty("_frame", Mp.getFrame, Mp.setFrame);
Mp.frameTo = function (endframe, duration, animType, delay, callback, extra1, extra2) {
if (endframe == undefined) {
endframe = this._totalframes;
}
this.tween("_frame", endframe, duration, animType, delay, callback, extra1, extra2);
};
var TFP = TextField.prototype;
if (!TFP.origAddListener) {
TFP.origAddListener = TFP.addListener;
ASSetPropFlags(TFP, "origAddListener", 1, 0);
TFP.addListener = function () {
if (!this._listeners) {
AsBroadcaster.initialize(this);
}
this.origAddListener.apply(this, arguments);
};
}
var $_$methods = ["tween", "stopTween", "isTweening", "getTweens", "lockTween", "isTweenLocked", "unlockTween", "isTweenPaused", "pauseTween", "unpauseTween", "pauseAllTweens", "unpauseAllTweens", "stopAllTweens", "ffTween", "rewTween", "getFrame", "setFrame", "_frame", "frameTo", "alphaTo", "brightnessTo", "colorTo", "colorTransformTo", "invertColorTo", "tintTo", "scaleTo", "sizeTo", "slideTo", "rotateTo", "brightOffsetTo", "contrastTo"];
for (var $_$i in $_$methods) {
ASSetPropFlags(Mp, $_$methods[$_$i], 1, 0);
if ($_$methods[$_$i].toLowerCase().indexOf("frame") == -1) {
TFP[$_$methods[$_$i]] = Mp[$_$methods[$_$i]];
ASSetPropFlags(TFP, $_$methods[$_$i], 1, 0);
}
}
delete Mp;
delete TFP;
delete $_$methods;
delete $_$i;
var rbbMgr;
rbbMgr = new RabbitMgr(_root);
rbbMgr.init();
stop();
var Game = {};
Game.soundT = true;
var my_sound = new Sound();
Game.toggleSound = function () {
trace("come here sounds");
Game = _root.Game;
Game.soundT = !Game.soundT;
if (_root.sounds_mc._currentframe == 1) {
_root.sounds_mc.gotoAndStop(2);
_root.my_sound.setVolume(0);
} else {
_root.sounds_mc.gotoAndStop(1);
_root.my_sound.setVolume(100);
}
trace(" = " + Game.soundT);
};
Symbol 27 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 1
if (_root.currentEgg != 0) {
eggs_mc._visible = true;
eggs_mc.gotoAndStop(_root.currentEgg);
} else {
eggs_mc._visible = false;
}
Symbol 57 MovieClip Frame 1
if (_root.currentEgg != 0) {
eggs_mc._visible = true;
stribe_mc._visible = true;
eggs_mc.gotoAndStop(_root.currentEgg);
} else {
stribe_mc._visible = false;
eggs_mc._visible = false;
}
Symbol 63 MovieClip Frame 1
if (_root.currentEgg != 0) {
eggs_mc._visible = true;
eggs_mc.gotoAndStop(_root.currentEgg);
} else {
eggs_mc._visible = false;
}
Symbol 72 MovieClip Frame 11
_root.rbbMgr.endFlying();
Symbol 72 MovieClip Frame 13
if (_root.currentEgg != 0) {
eggs_mc._visible = true;
eggs_mc.gotoAndStop(_root.currentEgg);
} else {
eggs_mc._visible = false;
}
Symbol 72 MovieClip Frame 18
stop();
_root.rbbMgr.endJump();
_parent.gotoAndStop("idle");
Symbol 76 MovieClip Frame 1
if (_root.currentEgg != 0) {
eggs_mc._visible = true;
eggs_mc.gotoAndStop(_root.currentEgg);
} else {
eggs_mc._visible = false;
}
Symbol 80 MovieClip Frame 11
_root.rbbMgr.endFlying();
Symbol 80 MovieClip Frame 13
if (_root.currentEgg != 0) {
eggs_mc._visible = true;
eggs_mc.gotoAndStop(_root.currentEgg);
} else {
eggs_mc._visible = false;
}
Symbol 80 MovieClip Frame 18
stop();
_root.rbbMgr.endJump();
_parent.gotoAndStop("idle");
Symbol 121 MovieClip Frame 1
if (_root.currentEgg != 0) {
eggs_mc._visible = true;
eggs_mc.gotoAndStop(_root.currentEgg);
} else {
eggs_mc._visible = false;
}
Symbol 121 MovieClip Frame 27
if (_root.currentEgg != 0) {
mcStribe._visible = true;
} else {
mcStribe._visible = false;
}
Symbol 121 MovieClip Frame 73
stop();
_root.rbbMgr.die();
Symbol 137 MovieClip Frame 1
if (_root.currentEgg != 0) {
eggs_mc._visible = true;
eggs_mc.gotoAndStop(_root.currentEgg);
} else {
eggs_mc._visible = false;
}
Symbol 137 MovieClip Frame 27
if (_root.currentEgg != 0) {
mcStribe._visible = true;
} else {
mcStribe._visible = false;
}
Symbol 137 MovieClip Frame 73
stop();
_root.rbbMgr.die();
Symbol 145 MovieClip Frame 42
if (_root.currentEgg != 0) {
mcStribe._visible = true;
} else {
mcStribe._visible = false;
}
if (_root.currentEgg != 0) {
eggs_mc._visible = true;
eggs_mc.gotoAndStop(_root.currentEgg);
} else {
eggs_mc._visible = false;
}
Symbol 145 MovieClip Frame 88
stop();
_root.rbbMgr.die();
Symbol 146 MovieClip [mcRabbit] Frame 1
stop();
Symbol 186 MovieClip [mcCarNormal_1] Frame 1
stop();
Symbol 199 MovieClip [mcCarNormal_2] Frame 1
stop();
Symbol 223 MovieClip [mcMotorcycle] Frame 1
stop();
Symbol 235 MovieClip [mcEggs] Frame 10
if (!_root.isPreload) {
stop();
}
Symbol 235 MovieClip [mcEggs] Frame 46
stop();
this.removeMovieClip();
Symbol 458 MovieClip [__Packages.com.blitzagency.events.IStaticBroadcastable] Frame 0
interface com.blitzagency.events.IStaticBroadcastable
{
}
Symbol 459 MovieClip [__Packages.com.blitzagency.xray.util.XrayLoader] Frame 0
class com.blitzagency.xray.util.XrayLoader implements com.blitzagency.events.IStaticBroadcastable
{
static var loaded, componentSWFPath, containerMovie, fpsMeter, loader, connector;
var broadcaster;
function XrayLoader () {
}
static function trace() {
if (loaded) {
_global.tt.apply(_global.tt, arguments);
}
}
static function tt() {
if (loaded) {
_global.tt.apply(_global.tt, arguments);
}
}
static function tf() {
if (loaded) {
_global.tf.traceFunction.apply(_global.tf, arguments);
}
}
static function loadConnector(componentSWF, containerClip, showFPS) {
componentSWFPath = componentSWF;
containerMovie = ((!containerClip) ? _root : (containerClip));
fpsMeter = showFPS;
loadXray();
}
static function addEventListener(eventName, listener, methodName) {
if (loader == undefined) {
loader = new com.blitzagency.xray.util.XrayLoader();
}
loader.addSingletonEventListener(eventName, listener, methodName);
}
static function removeEventListener(eventName, listener, methodName) {
loader.removeSingletonEventListener(eventName, listener, methodName);
}
function addSingletonEventListener(eventName, listener, methodName) {
if (broadcaster == undefined) {
broadcaster = new com.blitzagency.events.EventBroadcaster(this);
}
broadcaster.addEventListener(eventName, listener, methodName);
}
function broadcastSingletonEvent(eventName, data) {
broadcaster.broadcastEvent(eventName, data);
}
function removeSingletonEventListener(eventName, listener, methodName) {
broadcaster.removeEventListener(eventName, listener, methodName);
}
static function broadcastEvent(eventName, data) {
if (loader == undefined) {
loader = new com.blitzagency.xray.util.XrayLoader();
}
loader.broadcastSingletonEvent(eventName, data);
}
static function loadXray() {
var _local1 = new MovieClipLoader();
connector = containerMovie.createEmptyMovieClip("__xrayConnector", containerMovie.getNextHighestDepth());
_local1.addListener(com.blitzagency.xray.util.XrayLoader);
_local1.loadClip(componentSWFPath, connector);
}
static function onLoadProgress(target_mc, loadedBytes, totalBytes) {
var _local1 = Math.floor((loadedBytes / totalBytes) * 100);
broadcastEvent("onLoadProgress", {type:"onLoadProgress", percentLoaded:_local1});
}
static function onLoadInit(targetMC) {
_global.com.blitzagency.xray.Xray.initConnections();
if (fpsMeter) {
_global.com.blitzagency.xray.Xray.createFPSMeter(targetMC);
}
broadcastEvent("LoadComplete", {type:"LoadComplete"});
}
static function onLoadComplete(targetMC) {
loaded = true;
}
static function onLoadError(targetMC, errorCode) {
broadcastEvent("LoadError", {type:"LoadError", errorCode:errorCode});
}
}
Symbol 460 MovieClip [__Packages.com.blitzagency.events.EventBroadcaster] Frame 0
class com.blitzagency.events.EventBroadcaster
{
var registeredListeners;
function EventBroadcaster (target) {
if (target == undefined) {
throw new Error("ERROR: You must pass in the target object to the EventBroadcaster class. [broadcaster = new EventBroadcaster(this);]");
}
registeredListeners = new Object();
}
function addEventListener(eventName, listenerObj, methodName) {
if (registeredListeners[eventName] == undefined) {
registeredListeners[eventName] = new Array();
}
registeredListeners[eventName].push({listenerObj:listenerObj, methodName:methodName});
}
function broadcastEvent(eventName, data) {
var _local4;
var _local2 = 0;
while (_local2 < registeredListeners[eventName].length) {
_local4 = eventName;
if (registeredListeners[eventName][_local2].methodName != undefined) {
_local4 = registeredListeners[eventName][_local2].methodName;
}
registeredListeners[eventName][_local2].listenerObj[_local4](data);
_local2++;
}
}
function removeEventListener(eventName, listenerObj, methodName) {
var _local3 = registeredListeners[eventName];
var _local2 = _local3.length - 1;
while (_local2 >= 0) {
var _local4 = _local3[_local2].listenerObj;
var _local5 = _local3[_local2].methodName;
if ((_local4 == listenerObj) && (_local5 == methodName)) {
_local3.splice(_local2, 1);
}
_local2--;
}
}
}
Symbol 461 MovieClip [__Packages.com.robertpenner.easing.Quad] Frame 0
class com.robertpenner.easing.Quad
{
function Quad () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((t * t) - 1)) + b);
}
t--;
return(((c / 2) * ((t * t) + 1)) + b);
}
}
Symbol 462 MovieClip [__Packages.com.robertpenner.easing.Circ] Frame 0
class com.robertpenner.easing.Circ
{
function Circ () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
}
Symbol 463 MovieClip [__Packages.RabbitMgr] Frame 0
class RabbitMgr
{
var _mc, _currentStage, score, console_mc, wait_mc, end_mc, mapCtr, rabbitCtr, timeLeft, timerIntv;
function RabbitMgr (mc) {
_mc = mc;
}
function init() {
_root.bgMusic_snd.gotoAndPlay("start");
_currentStage = 1;
score = 0;
console_mc = _mc.console_mc;
wait_mc = _mc.waitScreen_mc;
end_mc = _mc.endScreen_mc;
wait_mc._visible = false;
}
function setupMap() {
}
function setupPlayer() {
}
function startGame() {
trace("[--- StartGame ---]");
mapCtr = new MapController(_mc);
rabbitCtr = new RabbitController(_mc, this);
_currentStage = 1;
score = 0;
_mc.welcome_mc.tween("_x", 750, 2, "easeInQuad", 0);
startStage();
end_mc._x = 750;
end_mc._visible = false;
if (((_root.playGameUrl == undefined) || (_root.playGameUrl == null)) || (_root.playGameUrl == "")) {
_root.playGameUrl = "http://bunny.codegent.net/php/playGame.php";
}
var _local3 = new XML();
_local3.load(_root.playGameUrl);
_local3.onLoad = function (success) {
if (success) {
trace("--- load PLAYGAME STATS SUCCESS ---");
} else {
trace("--- load PLAYGAME STATS FAIL ---");
}
};
}
function endJump() {
rabbitCtr.landingOnFloor();
}
function endFlying() {
rabbitCtr.endFlying();
}
function die() {
trace("---Main.die---");
rabbitCtr.die();
}
function reBirth() {
trace("---Main.reBirth---");
rabbitCtr.reBirth();
}
function startStage() {
trace("\n[---startStage---]");
trace("_currentStage = " + _currentStage);
if (_root.bgMusic_snd._currentframe == 1) {
_root.bgMusic_snd.gotoAndPlay("start");
}
_root.bgMusicMain_snd.gotoAndPlay("stop");
mapCtr.init(_currentStage);
mapCtr.startMap();
rabbitCtr.init(_currentStage);
switch (_currentStage) {
case 1 :
timeLeft = 90;
console_mc.score_txt.text = score;
var _local3 = 1;
while (_local3 < 4) {
console_mc[("life" + _local3) + "_mc"]._visible = true;
_local3++;
}
break;
case 2 :
timeLeft = 120;
break;
case 3 :
timeLeft = 150;
}
wait_mc.pole_mc.number_txt.text = _currentStage;
wait_mc._x = (wait_mc._y = 0);
wait_mc._visible = true;
wait_mc.gotoAndPlay(2);
}
function startStageControl() {
trace("\n[---startStageControl---]");
if (_root.bgMusicMain_snd._currentframe == 1) {
_root.bgMusicMain_snd.gotoAndPlay("start");
}
_root.bgMusic_snd.gotoAndPlay("stop");
timerIntv = setInterval(com.codegent.spark.util.Proxy.create(this, updateTimer), 1000);
wait_mc._visible = false;
reBirth();
rabbitCtr.startControl();
}
function endStage() {
trace("\n[---endStage---]");
clearInterval(timerIntv);
rabbitCtr.stopControl();
mapCtr.clearMap();
nextStage();
}
function nextStage() {
trace("\n[---nextStage---]");
if (_currentStage < 3) {
_currentStage++;
startStage();
} else {
endGame("clear");
}
}
function updateConsole() {
trace("\n[---updateConsole---]");
var _local2 = 3;
while (_local2 > rabbitCtr.life) {
console_mc[("life" + _local2) + "_mc"]._visible = false;
_local2--;
}
console_mc.score_txt.text = score;
}
function endGame(reason) {
trace("\n[--- endGame ---]");
if (_root.bgMusic_snd._currentframe == 1) {
_root.bgMusic_snd.gotoAndPlay("start");
}
_root.bgMusicMain_snd.gotoAndPlay("stop");
clearInterval(timerIntv);
_root.score = score;
rabbitCtr.stopControl();
mapCtr.clearMap();
end_mc._x = (end_mc._y = 0);
end_mc._visible = true;
end_mc.gotoAndPlay(2);
end_mc.score_mc.score_txt.text = score;
switch (reason) {
case "clear" :
end_mc.endPole_mc.greeting_txt.text = "Game Clear";
break;
case "gameover" :
end_mc.endPole_mc.greeting_txt.text = "Game Over";
}
}
function updateTimer() {
timeLeft--;
console_mc.time_txt.text = parseTime(timeLeft);
if (timeLeft <= 0) {
endStage();
}
}
function parseTime() {
var _local3;
var _local2;
var _local4;
var _local5;
var _local6 = timeLeft;
_local2 = Math.floor(_local6 / 60);
_local3 = Math.floor(_local6 - (_local2 * 60));
if (_local2 < 10) {
_local4 = "0" + _local2;
} else {
_local4 = _local2;
}
if (_local3 < 10) {
_local5 = "0" + _local3;
} else {
_local5 = _local3;
}
return((_local4 + ":") + _local5);
}
}
Symbol 464 MovieClip [__Packages.RabbitController] Frame 0
class RabbitController
{
var _mc, cDirection, rDirection, bonus, life, rabbitMgr, currentEgg, hasEgg, isDieing, isJump, isFlying, godMode, bottomMargin, player_mc, topMargin, moveIntv, updateController, curDirection, godModeIntv;
function RabbitController (mc, rbMgr) {
trace("--- RabbitController ---");
_mc = mc;
cDirection = 0;
rDirection = 0;
bonus = 0;
life = 3;
rabbitMgr = rbMgr;
}
function resetRabbig() {
cDirection = 0;
rDirection = 0;
currentEgg = 0;
life = 3;
hasEgg = false;
rabbitMgr.updateConsole();
}
function init(currentStage) {
currentEgg = 0;
hasEgg = false;
isDieing = false;
isJump = false;
isFlying = false;
godMode = false;
_root.currentEgg = currentEgg;
bottomMargin = _mc.mcMaps.refRoad0_mc._y - 30;
_mc.mcMaps.mcRabbit.removeMovieClip();
player_mc = _mc.mcMaps.attachMovie("mcRabbit", "mcRabbit", _mc.mcMaps.getNextHighestDepth());
switch (currentStage) {
case 1 :
topMargin = (_mc.mcMaps.refRoad6_mc._y - _mc.mcMaps.refRoad6_mc._height) - 30;
break;
case 2 :
topMargin = (_mc.mcMaps.refRoad8_mc._y - _mc.mcMaps.refRoad8_mc._height) - 30;
break;
case 3 :
topMargin = (_mc.mcMaps.refRoad10_mc._y - _mc.mcMaps.refRoad10_mc._height) - 30;
}
trace((("topMargin: " + topMargin) + " bottomMargin: ") + bottomMargin);
}
function startControl() {
trace("--- startControl ---");
rb_controller = new KeyboardController();
moveIntv = setInterval(com.codegent.spark.util.Proxy.create(this, moving), 40);
updateController = setInterval(com.codegent.spark.util.Proxy.create(this, _updateDirection), 30);
}
function _updateDirection() {
var _local2 = rb_controller.getControlCommand();
if (isDieing) {
rDirection = 0;
cDirection = 0;
curDirection = "";
} else if (_local2 & Controller.SPACEBAR) {
if (_local2 & Controller.SPACEBAR) {
if ((_local2 & Controller.UP) && (!isJump)) {
curDirection = "up";
rDirection = -1;
cDirection = 0;
isJump = true;
isFlying = true;
player_mc.gotoAndStop("jumpUp");
} else if ((_local2 & Controller.DOWN) && (!isJump)) {
curDirection = "down";
rDirection = 1;
cDirection = 0;
isJump = true;
isFlying = true;
player_mc.gotoAndStop("jumpDown");
}
}
} else {
if (isJump) {
return(undefined);
}
if (_local2 & Controller.LEFT) {
curDirection = "left";
rDirection = 0;
cDirection = -1;
player_mc.gotoAndStop("left");
} else if (_local2 & Controller.RIGHT) {
curDirection = "right";
rDirection = 0;
cDirection = 1;
player_mc.gotoAndStop("right");
} else if (_local2 & Controller.UP) {
curDirection = "up";
rDirection = -1;
cDirection = 0;
player_mc.gotoAndStop("down");
} else if (_local2 & Controller.DOWN) {
curDirection = "down";
rDirection = 1;
cDirection = 0;
player_mc.gotoAndStop("up");
} else {
curDirection = "";
rDirection = 0;
cDirection = 0;
player_mc.gotoAndStop("idle");
}
}
}
function moving() {
if (isJump & (!isDieing)) {
if (isFlying) {
if (((player_mc._y + (rDirection * 7)) < bottomMargin) && ((player_mc._y + (rDirection * 7)) > topMargin)) {
player_mc._y = player_mc._y + (rDirection * 7);
}
if (((player_mc._x + (cDirection * 7)) > 0) && ((player_mc._x + (cDirection * 7)) < 700)) {
player_mc._x = player_mc._x + (cDirection * 7);
}
}
} else {
var _local2 = player_mc._y + (rDirection * 6);
if ((_local2 < bottomMargin) && (_local2 > topMargin)) {
player_mc._y = player_mc._y + (rDirection * 6);
}
if (((player_mc._x + (cDirection * 6)) > 0) && ((player_mc._x + (cDirection * 6)) < 700)) {
player_mc._x = player_mc._x + (cDirection * 6);
}
}
updateDepth();
}
function updateDepth() {
var _local2 = 10;
while (_local2 >= 0) {
var _local3 = {x:_mc.mcMaps[("refRoad" + _local2) + "_mc"]._x, y:_mc.mcMaps[("refRoad" + _local2) + "_mc"]._y};
if (((player_mc._y + 35) < _local3.y) && ((player_mc._y + 35) > (_local3.y - _mc.mcMaps[("refRoad" + _local2) + "_mc"]._height))) {
player_mc.swapDepths(_mc.mcMaps.getNextHighestDepth());
_mc.mcMaps[("road" + _local2) + "_mc"].swapDepths(_mc.mcMaps.getNextHighestDepth());
checkHitObjects(_local2);
} else {
_mc.mcMaps[("road" + _local2) + "_mc"].swapDepths(_mc.mcMaps.getNextHighestDepth());
}
_local2--;
}
}
function checkHitObjects(id) {
var _local6 = _mc.mcMaps[("road" + id) + "_mc"];
var _local4 = _local6.objs_array;
var _local8 = false;
var _local3 = 0;
while (_local3 < _local4.length) {
if (player_mc.hit_mc.hitTest(_local4[_local3].hit_mc) && ((!isFlying) || (!_local6.canJump))) {
trace("HITTED falg=" + _root.hitEggFlag);
if (_local4[_local3].isEgg) {
trace("!!!!!!!!!! IT IS A EGG !!!!!!!!!");
_local8 = true;
if (!hasEgg) {
_root.swap_snd.gotoAndPlay(2);
_root.currentEgg = _local4[_local3].eggs_mc._currentframe;
_local4[_local3].removeMovieClip();
_local4.splice(_local3, 1);
hasEgg = true;
} else if (_root.currentEgg == _local4[_local3].eggs_mc._currentframe) {
_root.currentEgg = _local4[_local3].eggs_mc._currentframe;
_local4[_local3].gotoAndPlay("fly");
_local4.splice(_local3, 1);
rabbitMgr.score = rabbitMgr.score + ((50 * rabbitMgr._currentStage) + ((bonus * 25) * rabbitMgr._currentStage));
bonus++;
rabbitMgr.updateConsole();
_root.hitEggFlag = true;
} else if (!_root.hitEggFlag) {
_root.swap_snd.gotoAndPlay(2);
var _local7 = _local4[_local3].eggs_mc._currentframe;
_local4[_local3].eggs_mc.gotoAndStop(_root.currentEgg);
_root.currentEgg = _local7;
_root.hitEggFlag = true;
bonus = 0;
}
} else {
trace("!!!!!!!!!! HIT ON CAR !!!!!!!!!!");
if (!godMode) {
isDieing = true;
isFlying = (isJump = false);
var _local5 = 1 + random(2);
if (_local6.dir == "left") {
player_mc.gotoAndStop("dieRight" + _local5);
} else if (_local6.dir == "right") {
player_mc.gotoAndStop("dieLeft" + _local5);
} else {
player_mc.gotoAndStop("dieHeadCut");
}
}
}
}
_local3++;
}
if (!_local8) {
_root.hitEggFlag = false;
}
}
function stopControl() {
trace("--- stopControl ---");
delete rb_controller;
clearInterval(moveIntv);
clearInterval(updateController);
clearInterval(godModeIntv);
}
function landingOnFloor() {
isJump = false;
}
function endFlying() {
isFlying = false;
}
function die() {
trace("---die---");
if (life > 0) {
life--;
rabbitMgr.updateConsole();
reBirth();
} else {
trace("++++ Game Over ++++");
rabbitMgr.endGame("gameover");
}
}
function reBirth() {
trace("---reBirth---");
player_mc._x = _mc.mcMaps.bornPoint_mc._x;
player_mc._y = _mc.mcMaps.bornPoint_mc._y;
player_mc._alpha = 50;
godMode = true;
godModeIntv = setInterval(com.codegent.spark.util.Proxy.create(this, turnOffGodMode), 3000);
player_mc.gotoAndStop("idle");
isDieing = false;
}
function turnOffGodMode() {
godMode = false;
player_mc._alpha = 100;
clearInterval(godModeIntv);
}
var rb_controller = null;
}
Symbol 465 MovieClip [__Packages.Controller] Frame 0
class Controller
{
function Controller () {
}
function getControlCommand() {
return(NONE);
}
static var NONE = 0;
static var UP = 1;
static var DOWN = 2;
static var LEFT = 4;
static var RIGHT = 8;
static var CHEATON = 16;
static var CHEATOFF = 32;
static var SPACEBAR = 64;
}
Symbol 466 MovieClip [__Packages.KeyboardController] Frame 0
class KeyboardController extends Controller
{
function KeyboardController () {
super();
}
function getControlCommand() {
var _local1 = Controller.NONE;
if (Key.isDown(38)) {
_local1 = _local1 + Controller.UP;
}
if (Key.isDown(40)) {
_local1 = _local1 + Controller.DOWN;
}
if (Key.isDown(37)) {
_local1 = _local1 + Controller.LEFT;
} else if (Key.isDown(39)) {
_local1 = _local1 + Controller.RIGHT;
}
if (Key.isDown(32)) {
_local1 = _local1 + Controller.SPACEBAR;
}
return(_local1);
}
}
Symbol 467 MovieClip [__Packages.com.codegent.spark.util.Proxy] Frame 0
class com.codegent.spark.util.Proxy
{
function Proxy () {
}
static function create(oTarget, fFunction) {
var aParameters = new Array();
var _local2 = 2;
while (_local2 < arguments.length) {
aParameters[_local2 - 2] = arguments[_local2];
_local2++;
}
var _local4 = function () {
var _local2 = arguments.concat(aParameters);
_local2.push(arguments.callee);
fFunction.apply(oTarget, _local2);
};
return(_local4);
}
}
Symbol 468 MovieClip [__Packages.MapController] Frame 0
class MapController
{
var _mc, _currentStage, tankLeftIntv, road2_mc, busRightIntv, road5_mc, carRightIntv, road4_mc, motocycleLeftIntv, road1_mc, road3_mc, eggDroper, road0_mc, road6_mc, road7_mc, tankRightIntv, carLeftIntv, road8_mc, motocycleRightIntv, road9_mc, busLeftIntv, road10_mc;
function MapController (mc) {
_mc = mc;
_currentStage = 0;
}
function init(currentStage) {
trace("--- init ---");
_currentStage = currentStage;
_mc.mcMaps.gotoAndStop("lv_" + currentStage);
var _local2 = 0;
while (_local2 <= 10) {
this[("road" + _local2) + "_mc"] = _mc.mcMaps.attachMovie("mcRoad", ("road" + _local2) + "_mc", _mc.mcMaps.getNextHighestDepth());
this[("road" + _local2) + "_mc"]._y = _mc.mcMaps[("refRoad" + _local2) + "_mc"]._y;
this[("road" + _local2) + "_mc"].count = 0;
this[("road" + _local2) + "_mc"].objs_array = [];
trace((("road" + _local2) + ": ") + this[("road" + _local2) + "_mc"]);
_local2++;
}
_mc.mcMaps.rabbit_mc.swapDepths(_mc.mcMaps.getNextHighestDepth());
}
function startMap() {
trace(("---startMap " + _currentStage) + " ---");
if (_currentStage == 1) {
trace(" setup map 1 ");
tankLeftIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateTank, road2_mc, "right"), easyFactor * 6000);
road2_mc.dir = "right";
road2_mc.canJump = true;
busRightIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateBus, road5_mc, "left"), easyFactor * 5000);
road5_mc.dir = "left";
road5_mc.canJump = false;
carRightIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateCar, road4_mc, "left"), easyFactor * 4400);
road4_mc.dir = "left";
road4_mc.canJump = true;
motocycleLeftIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateMotorcycle, road1_mc, "right"), easyFactor * 3800);
road1_mc.dir = "right";
road1_mc.canJump = true;
road3_mc.canJump = false;
eggDroper = new EggDroper(_mc, this);
eggDroper.init();
eggDroper.addRoad(road0_mc);
eggDroper.addRoad(road3_mc);
eggDroper.addRoad(road6_mc);
eggDroper.startDrop();
} else if (_currentStage == 2) {
trace(" setup map 2 ");
busRightIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateBus, road7_mc, "left"), easyFactor * 5200);
road7_mc.dir = "left";
road7_mc.canJump = false;
carRightIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateCar, road6_mc, "left"), easyFactor * 3700);
road6_mc.dir = "left";
road6_mc.canJump = true;
tankRightIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateTank, road5_mc, "left"), easyFactor * 2900);
road5_mc.dir = "left";
road5_mc.canJump = true;
carLeftIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateCar, road3_mc, "right"), easyFactor * 2500);
road3_mc.dir = "right";
road3_mc.canJump = true;
tankLeftIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateTank, road2_mc, "right"), easyFactor * 3100);
road2_mc.dir = "right";
road2_mc.canJump = true;
motocycleLeftIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateMotorcycle, road1_mc, "right"), easyFactor * 2200);
road1_mc.dir = "right";
road1_mc.canJump = true;
eggDroper = new EggDroper(_mc, this);
eggDroper.init();
eggDroper.addRoad(road0_mc);
eggDroper.addRoad(road4_mc);
eggDroper.addRoad(road8_mc);
eggDroper.startDrop();
} else if (_currentStage == 3) {
trace(" setup map 3 ");
motocycleRightIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateMotorcycle, road9_mc, "left"), easyFactor * 2300);
road9_mc.dir = "left";
road9_mc.canJump = true;
tankRightIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateBus, road8_mc, "left"), easyFactor * 4000);
road8_mc.dir = "left";
road8_mc.canJump = true;
carRightIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateCar, road7_mc, "left"), easyFactor * 3500);
road7_mc.dir = "left";
road7_mc.canJump = true;
busRightIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateTank, road6_mc, "left"), easyFactor * 2900);
road6_mc.dir = "left";
road6_mc.canJump = false;
busLeftIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateBus, road4_mc, "right"), easyFactor * 2900);
road4_mc.dir = "right";
road4_mc.canJump = false;
carLeftIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateCar, road3_mc, "right"), easyFactor * 3500);
road3_mc.dir = "right";
road3_mc.canJump = true;
tankLeftIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateTank, road2_mc, "right"), easyFactor * 3500);
road2_mc.dir = "right";
road2_mc.canJump = true;
motocycleLeftIntv = setInterval(com.codegent.spark.util.Proxy.create(this, randCreateMotorcycle, road1_mc, "right"), easyFactor * 2300);
road1_mc.dir = "right";
road1_mc.canJump = true;
eggDroper = new EggDroper(_mc, this);
eggDroper.init();
eggDroper.addRoad(road0_mc);
eggDroper.addRoad(road5_mc);
eggDroper.addRoad(road10_mc);
eggDroper.startDrop();
}
}
function randCreateMotorcycle(road_mc, side) {
var _local4 = random(2);
if (_local4 == 0) {
return(undefined);
}
var _local2 = road_mc.attachMovie("mcMotorcycle", "mcMotorcycle" + road_mc.count, road_mc.getNextHighestDepth());
_local4 = random(3);
_local2.gotoAndStop(_local4 + 1);
_local2.cacheAsBitmap = true;
road_mc.count++;
road_mc.objs_array.push(_local2);
if (side == "left") {
_local2._x = 0;
_local2._y = 0;
_local2.tween("_x", (700 + _local2._width) + 60, 9, "linear", 0, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, _local2, road_mc));
} else {
_local2._xscale = -100;
_local2._x = 700;
_local2._y = 0;
_local2.tween("_x", -(_local2._width + 60), 9, "linear", 0, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, _local2, road_mc));
}
}
function randCreateTank(road_mc, side) {
var _local4 = random(4);
if (_local4 == 0) {
return(undefined);
}
var _local2;
switch (_local4) {
case 1 :
if (random(2) == 0) {
_local2 = road_mc.attachMovie("mcTankGreen", "mcCar" + road_mc.count, road_mc.getNextHighestDepth());
break;
}
return(undefined);
case 2 :
_local2 = road_mc.attachMovie("mcCarNormal_1", "mcCar" + road_mc.count, road_mc.getNextHighestDepth());
_local2.gotoAndStop(random(4) + 1);
break;
case 3 :
_local2 = road_mc.attachMovie("mcCarNormal_2", "mcCar" + road_mc.count, road_mc.getNextHighestDepth());
_local2.gotoAndStop(random(4) + 1);
}
road_mc.count++;
road_mc.objs_array.push(_local2);
if (side == "left") {
_local2._x = 0;
_local2._y = 0;
_local2.tween("_x", (700 + _local2._width) + 60, 10, "linear", 0, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, _local2, road_mc));
} else {
_local2._xscale = -100;
_local2._x = 700;
_local2._y = 0;
_local2.tween("_x", -(_local2._width + 60), 10, "linear", 0, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, _local2, road_mc));
}
_local2.cacheAsBitmap = true;
}
function randCreateCar(road_mc, side) {
var _local4 = random(4);
if (_local4 == 0) {
return(undefined);
}
var _local2;
switch (_local4) {
case 1 :
_local2 = road_mc.attachMovie("mcCarRed", "mcCar" + road_mc.count, road_mc.getNextHighestDepth());
break;
case 2 :
_local2 = road_mc.attachMovie("mcCarNormal_1", "mcCar" + road_mc.count, road_mc.getNextHighestDepth());
_local2.gotoAndStop(random(4) + 1);
break;
case 3 :
_local2 = road_mc.attachMovie("mcCarNormal_2", "mcCar" + road_mc.count, road_mc.getNextHighestDepth());
_local2.gotoAndStop(random(4) + 1);
}
road_mc.count++;
road_mc.objs_array.push(_local2);
if (side == "left") {
_local2._x = 0;
_local2._y = 0;
_local2.tween("_x", (700 + _local2._width) + 60, 5, "linear", 0, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, _local2, road_mc));
} else {
_local2._xscale = -100;
_local2._x = 700;
_local2._y = 0;
_local2.tween("_x", -(_local2._width + 60), 5, "linear", 0, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, _local2, road_mc));
}
_local2.cacheAsBitmap = true;
}
function randCreateBus(road_mc, side) {
var _local4 = random(5);
if (_local4 == 0) {
return(undefined);
}
var _local2;
switch (_local4) {
case 1 :
if (random(2) == 0) {
_local2 = road_mc.attachMovie("mcTruck", "mcCar" + road_mc.count, road_mc.getNextHighestDepth());
}
break;
default :
if (side == "left") {
_local2 = road_mc.attachMovie("mcBusRed_back", "mcCar" + road_mc.count, road_mc.getNextHighestDepth());
} else {
_local2 = road_mc.attachMovie("mcBusRed", "mcCar" + road_mc.count, road_mc.getNextHighestDepth());
}
}
road_mc.count++;
road_mc.objs_array.push(_local2);
if (side == "left") {
_local2._x = 0;
_local2._y = 0;
_local2.tween("_x", (700 + _local2._width) + 60, 8, "linear", 0, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, _local2, road_mc));
} else {
_local2._xscale = -100;
_local2._x = 700;
_local2._y = 0;
_local2.tween("_x", -(_local2._width + 60), 8, "linear", 0, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, _local2, road_mc));
}
_local2.cacheAsBitmap = true;
}
function randCreateUFO(road_mc) {
var _local4 = random(4);
if (_local4 == 0) {
return(undefined);
}
var _local2 = road_mc.attachMovie("mcUFO", "mcUFO" + road_mc.count, road_mc.getNextHighestDepth());
road_mc.count++;
road_mc.objs_array.push(_local2);
_local2._x = 0;
_local2._y = 0;
_local2.tween("_x", (700 + _local2._width) + 60, 12, "linear", 0, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, _local2, road_mc));
_local2.cacheAsBitmap = true;
}
function myRemoveMovieClip(_mc, road_mc) {
var _local3;
var _local1 = 0;
while (_local1 < road_mc.objs_array.length) {
if (road_mc.objs_array[_local1] == _mc) {
_local3 = _local1;
break;
}
_local1++;
}
road_mc.objs_array.splice(_local3, 1);
_mc.removeMovieClip();
}
function clearMap() {
trace("[--- clearMap ---]");
road1_mc.stopTween();
clearInterval(tankLeftIntv);
clearInterval(tankRightIntv);
clearInterval(busLeftIntv);
clearInterval(busRightIntv);
clearInterval(carLeftIntv);
clearInterval(carRightIntv);
clearInterval(motocycleLeftIntv);
clearInterval(motocycleRightIntv);
eggDroper.stopDrop();
delete eggDroper;
myRemoveMovieClips();
}
function myRemoveMovieClips() {
trace("[---myRemoveMovieClips---]");
var _local2 = 0;
while (_local2 <= 10) {
trace((("\n\nroad" + _local2) + " : ") + this[("road" + _local2) + "_mc"]);
var _local3 = 0;
while (_local3 < this[("road" + _local2) + "_mc"].objs_array.length) {
trace("remove: " + this[("road" + _local2) + "_mc"].objs_array[_local3]);
this[("road" + _local2) + "_mc"].objs_array[_local3].removeMovieClip();
_local3++;
}
this[("road" + _local2) + "_mc"].removeMovieClip();
_local2++;
}
}
var easyFactor = 1.2;
}
Symbol 469 MovieClip [__Packages.EggDroper] Frame 0
class EggDroper
{
var _mc, _mapCtrl, roadDrop, dropIntv, ufo_mc;
function EggDroper (mc, mapCtrl) {
_mc = mc;
_mapCtrl = mapCtrl;
}
function init() {
roadDrop = [];
}
function addRoad(_road_mc) {
roadDrop.push(_road_mc);
}
function startDrop() {
dropAI();
dropIntv = setInterval(com.codegent.spark.util.Proxy.create(this, dropAI), 5000);
}
function stopDrop() {
trace("[--stopDrop--]");
clearInterval(dropIntv);
ufo_mc.stopTween();
}
function dropAI() {
var _local5 = random(3);
var _local2 = roadDrop[_local5];
ufo_mc = _local2.attachMovie("mcUFO", "mcUFO" + _local2.count, _local2.getNextHighestDepth());
_local2.dir = "ufo";
_local2.count++;
_local2.objs_array.push(ufo_mc);
var _local3 = 70 + random(680);
ufo_mc.dropPoint = _local3;
ufo_mc._x = -50;
ufo_mc._y = -50;
var _local4 = 1 + ((_local3 / 680) * 2);
ufo_mc.tween("_x", _local3, _local4, "easeOutQuad", 0, com.codegent.spark.util.Proxy.create(this, dropEgg, _local2));
ufo_mc.tween("_y", 0, _local4, "easeOutQuad", 0);
ufo_mc.cacheAsBitmap = true;
}
function dropEgg(road_mc) {
var _local5 = random(6) + 1;
var _local2 = road_mc.attachMovie("mcEggs", "mcEgg" + road_mc.count, road_mc.getNextHighestDepth());
_local2.isEgg = true;
road_mc.count++;
road_mc.objs_array.push(_local2);
_local2.eggs_mc.gotoAndStop(_local5);
_local2._x = ufo_mc._x - 50;
_local2._y = -20;
_local2.gotoAndPlay(1);
var _local4 = 1 + (((760 - ufo_mc._x) / 760) * 2);
ufo_mc.tween("_x", 760, _local4, "easeInQuad", 0.1, com.codegent.spark.util.Proxy.create(this, myRemoveMovieClip, ufo_mc, road_mc));
ufo_mc.tween("_y", -50, _local4, "easeOutQuad", 0.2);
}
function myRemoveMovieClip(_mc, road_mc) {
var _local3;
var _local1 = 0;
while (_local1 < road_mc.objs_array.length) {
if (road_mc.objs_array[_local1] == _mc) {
_local3 = _local1;
break;
}
_local1++;
}
road_mc.objs_array.splice(_local3, 1);
_mc.removeMovieClip();
}
}
Symbol 470 MovieClip [__Packages.com.robertpenner.easing.Quart] Frame 0
class com.robertpenner.easing.Quart
{
function Quart () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
}
Symbol 471 MovieClip [__Packages.com.robertpenner.easing.Sine] Frame 0
class com.robertpenner.easing.Sine
{
function Sine () {
}
static function easeIn(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOut(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOut(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
}
Symbol 472 MovieClip [__Packages.com.robertpenner.easing.Back] Frame 0
class com.robertpenner.easing.Back
{
function Back () {
}
static function easeIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
}
Symbol 473 MovieClip [__Packages.com.robertpenner.easing.Quint] Frame 0
class com.robertpenner.easing.Quint
{
function Quint () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
}
Symbol 474 MovieClip [__Packages.com.robertpenner.easing.Linear] Frame 0
class com.robertpenner.easing.Linear
{
function Linear () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOutIn(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 475 MovieClip [__Packages.com.robertpenner.easing.Expo] Frame 0
class com.robertpenner.easing.Expo
{
function Expo () {
}
static function easeIn(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOut(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOut(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutIn(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 1)) + b);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
}
Symbol 476 MovieClip [__Packages.com.robertpenner.easing.Elastic] Frame 0
class com.robertpenner.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)))) + b);
}
}
Symbol 477 MovieClip [__Packages.com.robertpenner.easing.Bounce] Frame 0
class com.robertpenner.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutIn(t, b, c, d) {
if (t < (d / 2)) {
return((easeOut(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeIn((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
}
Symbol 478 MovieClip [__Packages.zigo.tweenManager] Frame 0
class zigo.tweenManager
{
var playing, autoStop, broadcastEvents, autoOverwrite, ints, lockedTweens, tweenList, updateTime, tweenHolder, updateIntId, now;
function tweenManager () {
playing = false;
autoStop = false;
broadcastEvents = false;
autoOverwrite = true;
ints = new Array();
lockedTweens = new Object();
tweenList = new Array();
}
function cleanUp() {
if (!((tweenList instanceof Array) && (tweenList.length > 0))) {
return(undefined);
}
for (var _local2 in tweenList) {
if (tweenList[_local2].mc._x == undefined) {
tweenList.splice(Number(_local2), 1);
}
}
if (tweenList.length == 0) {
tweenList = [];
deinit();
}
for (var _local2 in ints) {
if ((ints[_local2] != undefined) && (ints[_local2].mc._x == undefined)) {
removeDelayedTween(Number(_local2));
}
}
}
function set updateInterval(time) {
if (playing) {
deinit();
updateTime = time;
init();
} else {
updateTime = time;
}
//return(updateInterval);
}
function get updateInterval() {
return(updateTime);
}
function set controllerDepth(v) {
if (_global.isNaN(v) == true) {
return;
}
if (tweenHolder._name != undefined) {
tweenHolder.swapDepths(v);
} else {
_th_depth = v;
}
//return(controllerDepth);
}
function get controllerDepth() {
return(_th_depth);
}
function init() {
if (updateTime > 0) {
clearInterval(updateIntId);
updateIntId = setInterval(this, "update", updateTime);
} else {
if (tweenHolder._name == undefined) {
tweenHolder = _root.createEmptyMovieClip("_th_", _th_depth);
}
var tm = this;
tweenHolder.onEnterFrame = function () {
tm.update.call(tm);
};
}
playing = true;
now = getTimer();
}
function deinit() {
playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
}
function update() {
var _local2;
var _local10;
var _local3;
var _local13 = false;
_local10 = tweenList.length;
if (broadcastEvents) {
var _local4;
var _local7;
var _local5;
var _local9;
_local4 = {};
_local7 = {};
_local5 = {};
_local9 = {};
}
while (_local10--) {
_local2 = tweenList[_local10];
if (_local2.mc._x == undefined) {
_local13 = true;
continue;
}
if (_local2.pt != -1) {
continue;
}
if ((_local2.ts + _local2.d) > now) {
if (_local2.ctm == undefined) {
_local2.mc[_local2.pp] = _local2.ef(now - _local2.ts, _local2.ps, _local2.ch, _local2.d, _local2.e1, _local2.e2);
} else {
var _local8 = {};
for (_local3 in _local2.ctm) {
_local8[_local3] = _local2.ef(now - _local2.ts, _local2.stm[_local3], _local2.ctm[_local3], _local2.d, _local2.e1, _local2.e2);
}
_local2.c.setTransform(_local8);
}
if (broadcastEvents) {
if (_local4[targetPath(_local2.mc)] == undefined) {
_local4[targetPath(_local2.mc)] = _local2.mc;
}
if (_local5[targetPath(_local2.mc)] == undefined) {
_local5[targetPath(_local2.mc)] = [];
}
_local5[targetPath(_local2.mc)].push(((_local2.ctm != undefined) ? "_ct_" : (_local2.pp)));
}
if (_local2.cb.updfunc != undefined) {
var _local6 = _local2.cb.updfunc;
if ((typeof(_local6) == "string") && (_local2.cb.updscope != undefined)) {
_local6 = _local2.cb.updscope[_local6];
}
_local6.apply(_local2.cb.updscope, _local2.cb.updargs);
}
} else {
if (_local2.ctm == undefined) {
_local2.mc[_local2.pp] = _local2.ps + _local2.ch;
} else {
var _local8 = {};
for (_local3 in _local2.ctm) {
_local8[_local3] = _local2.stm[_local3] + _local2.ctm[_local3];
}
_local2.c.setTransform(_local8);
}
if (broadcastEvents) {
if (_local4[targetPath(_local2.mc)] == undefined) {
_local4[targetPath(_local2.mc)] = _local2.mc;
}
if (_local7[targetPath(_local2.mc)] == undefined) {
_local7[targetPath(_local2.mc)] = _local2.mc;
}
if (_local5[targetPath(_local2.mc)] == undefined) {
_local5[targetPath(_local2.mc)] = [];
}
_local5[targetPath(_local2.mc)].push(((_local2.ctm != undefined) ? "_ct_" : (_local2.pp)));
if (_local9[targetPath(_local2.mc)] == undefined) {
_local9[targetPath(_local2.mc)] = [];
}
_local9[targetPath(_local2.mc)].push(((_local2.ctm != undefined) ? "_ct_" : (_local2.pp)));
}
if (_local2.cb.updfunc != undefined) {
var _local6 = _local2.cb.updfunc;
if ((typeof(_local6) == "string") && (_local2.cb.updscope != undefined)) {
_local6 = _local2.cb.updscope[_local6];
}
_local6.updfunc.apply(_local2.cb.updscope, _local2.cb.updargs);
}
if (endt == undefined) {
var endt = new Array();
}
endt.push(_local10);
}
}
if (_local13) {
cleanUp();
}
for (_local3 in _local4) {
_local4[_local3].broadcastMessage("onTweenUpdate", {target:_local4[_local3], props:_local5[_local3]});
}
if (endt != undefined) {
endTweens(endt);
}
for (_local3 in _local7) {
_local7[_local3].broadcastMessage("onTweenEnd", {target:_local7[_local3], props:_local9[_local3]});
}
now = getTimer();
if (updateTime > 0) {
updateAfterEvent();
}
}
function endTweens(tid_arr) {
var _local2;
var _local9;
var _local3;
var _local5;
var _local8;
_local2 = [];
_local9 = tid_arr.length;
_local3 = 0;
while (_local3 < _local9) {
_local5 = tweenList[tid_arr[_local3]].cb;
if (_local5 != undefined) {
var _local6 = true;
for (_local8 in _local2) {
if (_local2[_local8] == _local5) {
_local6 = false;
break;
}
}
if (_local6) {
_local2.push(_local5);
}
}
tweenList.splice(tid_arr[_local3], 1);
_local3++;
}
_local3 = 0;
while (_local3 < _local2.length) {
var _local4 = _local2[_local3].func;
if ((typeof(_local4) == "string") && (_local2[_local3].scope != undefined)) {
_local4 = _local2[_local3].scope[_local4];
}
_local4.apply(_local2[_local3].scope, _local2[_local3].args);
_local3++;
}
if (tweenList.length == 0) {
deinit();
}
}
function removeDelayedTween(index) {
clearInterval(ints[index].intid);
ints[index] = undefined;
var _local2 = true;
for (var _local3 in ints) {
if (ints[_local3] != undefined) {
_local2 = false;
break;
}
}
if (_local2) {
ints = [];
}
}
function addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var _local4;
var _local13;
var _local6;
var _local3;
var _local2;
if (!playing) {
init();
}
var _local12 = [];
for (_local4 in props) {
_local13 = props[_local4];
_local6 = true;
if (_local13.substr(0, 4) != "_ct_") {
var _local17 = ((typeof(pEnd[_local4]) == "string") ? (Number(pEnd[_local4])) : (pEnd[_local4] - mc[_local13]));
if (autoOverwrite) {
for (_local3 in tweenList) {
_local2 = tweenList[_local3];
if ((_local2.mc == mc) && (_local2.pp == _local13)) {
_local2.ps = mc[_local13];
_local2.ch = _local17;
_local2.ts = now;
_local2.d = sec * 1000;
_local2.ef = eqFunc;
_local2.cb = callback;
_local2.e1 = extra1;
_local2.e2 = extra2;
_local2.pt = -1;
_local6 = false;
_local12.push(_local2.pp);
break;
}
}
}
if (_local6) {
tweenList.unshift({mc:mc, pp:_local13, ps:mc[_local13], ch:_local17, ts:now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2, pt:-1});
}
} else {
var _local16 = new Color(mc);
var _local20 = _local16.getTransform();
var _local19 = {};
for (_local3 in pEnd[_local4]) {
if ((pEnd[_local4][_local3] != _local20[_local3]) && (pEnd[_local4][_local3] != undefined)) {
_local19[_local3] = ((typeof(pEnd[_local4][_local3]) == "string") ? (_local20[_local3] + Number(pEnd[_local4][_local3])) : (pEnd[_local4][_local3] - _local20[_local3]));
}
}
if (autoOverwrite) {
for (_local3 in tweenList) {
_local2 = tweenList[_local3];
if ((_local2.mc == mc) && (_local2.ctm != undefined)) {
_local2.c = _local16;
_local2.stm = _local20;
(_local2.ctm = _local19);
(_local2.ts = now);
_local2.d = sec * 1000;
_local2.ef = eqFunc;
_local2.cb = callback;
_local2.e1 = extra1;
_local2.e2 = extra2;
_local2.pt = -1;
_local6 = false;
_local12.push("_ct_");
break;
}
}
}
if (_local6) {
tweenList.unshift({mc:mc, c:_local16, stm:_local20, ctm:_local19, ts:now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2, pt:-1});
}
}
}
if (broadcastEvents) {
if (_local12.length > 0) {
mc.broadcastMessage("onTweenInterrupt", {target:mc, props:_local12});
}
mc.broadcastMessage("onTweenStart", {target:mc, props:props});
}
if (callback.startfunc != undefined) {
var _local27 = callback.startfunc;
if ((typeof(_local27) == "string") && (callback.startscope != undefined)) {
_local27 = callback.startscope[_local27];
}
_local27.apply(callback.startscope, callback.startargs);
}
if (sec == 0) {
update();
}
}
function addTweenWithDelay(delay, mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var il;
var _local3;
il = ints.length;
_local3 = setInterval(function (obj) {
obj.removeDelayedTween(il);
if (mc._x != undefined) {
obj.addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2);
}
}, delay * 1000, this);
ints[il] = {mc:mc, props:props, pend:pEnd, intid:_local3, st:getTimer(), delay:delay * 1000, args:arguments.slice(1), pt:-1};
if (!playing) {
init();
}
}
function removeTween(mc, props) {
var _local8;
var _local2;
var _local5;
_local8 = false;
if ((props == undefined) && (broadcastEvents != true)) {
_local8 = true;
}
_local2 = tweenList.length;
var _local4 = {};
while (_local2--) {
if (tweenList[_local2].mc == mc) {
if (_local8) {
tweenList.splice(_local2, 1);
} else {
for (_local5 in props) {
if (tweenList[_local2].pp == props[_local5]) {
tweenList.splice(_local2, 1);
if (_local4[targetPath(mc)] == undefined) {
_local4[targetPath(mc)] = {t:mc, p:[]};
}
_local4[targetPath(mc)].p.push(props[_local5]);
} else if (((props[_local5] == "_ct_") && (tweenList[_local2].ctm != undefined)) && (tweenList[_local2].mc == mc)) {
tweenList.splice(_local2, 1);
if (_local4[targetPath(mc)] == undefined) {
_local4[targetPath(mc)] = {t:mc, p:[]};
}
_local4[targetPath(mc)].p.push("_ct_");
}
}
}
}
}
_local2 = ints.length;
while (_local2--) {
if (ints[_local2].mc == mc) {
if (_local8) {
removeDelayedTween(Number(_local2));
} else {
for (_local5 in props) {
for (var _local11 in ints[_local2].props) {
if (ints[_local2].props[_local11] == props[_local5]) {
ints[_local2].props.splice(_local11, 1);
ints[_local2].pend.splice(_local11, 1);
if (_local4[targetPath(mc)] == undefined) {
_local4[targetPath(mc)] = {t:mc, p:[]};
}
_local4[targetPath(mc)].p.push(props[_local5]);
}
}
if (ints[_local2].props.length == 0) {
clearInterval(ints[_local2].intid);
}
}
}
}
}
if (broadcastEvents) {
for (var _local11 in _local4) {
if (_local4[_local11].p.length > 0) {
_local4[_local11].t.broadcastMessage("onTweenInterrupt", {target:_local4[_local11].t, props:_local4[_local11].p});
}
}
}
if (tweenList.length == 0) {
deinit();
}
}
function isTweening(mc, prop) {
var _local4 = prop == undefined;
for (var _local6 in tweenList) {
var _local2 = tweenList[_local6];
if (((tweenList[_local6].mc == mc) && (tweenList[_local6].pt == -1)) && ((_local4 || (prop == _local2.pp)) || ((prop == "_ct_") && (_local2.ctm != undefined)))) {
return(true);
}
}
return(false);
}
function getTweens(mc) {
var _local2 = 0;
for (var _local4 in tweenList) {
if (tweenList[_local4].mc == mc) {
_local2++;
}
}
return(_local2);
}
function lockTween(mc, bool) {
lockedTweens[targetPath(mc)] = bool;
}
function isTweenLocked(mc) {
if (lockedTweens[targetPath(mc)] == undefined) {
return(false);
}
return(lockedTweens[targetPath(mc)]);
}
function ffTween(mc, propsObj) {
var _local4 = mc == undefined;
var _local6 = propsObj == undefined;
for (var _local8 in tweenList) {
var _local2 = tweenList[_local8];
if (((_local2.mc == mc) || (_local4)) && (_local6 || (propsObj[_local2.pp] == true))) {
if (_local2.pt != -1) {
_local2.pt = -1;
}
_local2.ts = now - _local2.d;
}
}
for (var _local8 in ints) {
if (ints[_local8] != undefined) {
if ((ints[_local8].mc == mc) || (_local4)) {
if (ints[_local8].mc._x != undefined) {
var _local3 = ints[_local8].args;
_local3[3] = 0;
addTween.apply(this, _local3);
}
removeDelayedTween(Number(_local8));
}
}
}
update();
}
function rewTween(mc, propsObj) {
var _local3 = mc == undefined;
var _local5 = propsObj == undefined;
for (var _local7 in tweenList) {
var _local2 = tweenList[_local7];
if (((_local2.mc == mc) || (_local3)) && (_local5 || (propsObj[_local2.pp] == true))) {
if (_local2.pt != -1) {
_local2.pt = -1;
}
_local2.ts = now;
}
}
for (var _local7 in ints) {
if (ints[_local7] != undefined) {
if ((ints[_local7].mc == mc) || (_local3)) {
if (ints[_local7].mc._x != undefined) {
addTween.apply(this, ints[_local7].args);
}
removeDelayedTween(Number(_local7));
}
}
}
update();
}
function isTweenPaused(mc, prop) {
if (mc == undefined) {
return(null);
}
var _local5 = prop == undefined;
for (var _local6 in tweenList) {
var _local2 = tweenList[_local6];
if ((tweenList[_local6].mc == mc) && ((_local5 || (prop == _local2.pp)) || ((prop == "_ct_") && (_local2.ctm != undefined)))) {
return(Boolean(tweenList[_local6].pt != -1));
}
}
for (var _local6 in ints) {
if ((ints[_local6] != undefined) && (ints[_local6].mc == mc)) {
return(Boolean(ints[_local6].pt != -1));
}
}
return(false);
}
function pauseTween(mc, propsObj) {
var _local3 = mc == undefined;
if ((_local3 == false) && (isTweenPaused(mc) == true)) {
return(undefined);
}
var _local6 = propsObj == undefined;
for (var _local7 in tweenList) {
var _local2 = tweenList[_local7];
if (((_local2.pt == -1) && ((_local2.mc == mc) || (_local3))) && ((_local6 || (propsObj[_local2.pp] == true)) || ((propsObj._ct_ != undefined) && (_local2.ctm != undefined)))) {
_local2.pt = now;
}
}
for (var _local7 in ints) {
if (ints[_local7] != undefined) {
if ((ints[_local7].pt == -1) && ((ints[_local7].mc == mc) || (_local3))) {
ints[_local7].pt = now;
}
}
}
}
function unpauseTween(mc, propsObj) {
var _local4 = mc == undefined;
if ((_local4 == false) && (isTweenPaused(mc) === false)) {
return(undefined);
}
var _local7 = propsObj == undefined;
if (!playing) {
init();
}
for (var _local2 in tweenList) {
var _local3 = tweenList[_local2];
if ((((_local3.pt != -1) && ((_local3.mc == mc) || (_local4))) && (_local7 || (propsObj[_local3.pp] == true))) || ((propsObj._ct_ != undefined) && (_local3.ctm != undefined))) {
_local3.ts = now - (_local3.pt - _local3.ts);
_local3.pt = -1;
}
}
for (var _local2 in ints) {
if (ints[_local2] != undefined) {
if ((ints[_local2].pt != -1) && ((ints[_local2].mc == mc) || (_local4))) {
ints[_local2].delay = ints[_local2].delay - (ints[_local2].pt - ints[_local2].st);
ints[_local2].st = now;
ints[_local2].intid = setInterval(function (obj, id) {
obj.addTween.apply(obj, obj.ints[id].args);
clearInterval(obj.ints[id].intid);
obj.ints[id] = undefined;
}, ints[_local2].delay, this, _local2);
}
}
}
}
function pauseAll() {
pauseTween();
}
function unpauseAll() {
unpauseTween();
}
function stopAll() {
for (var _local2 in ints) {
removeDelayedTween(Number(_local2));
}
tweenList = new Array();
deinit();
}
function toString() {
return("[AS2 tweenManager 1.2.0]");
}
var _th_depth = 6789;
}
Symbol 479 MovieClip [__Packages.com.robertpenner.easing.Cubic] Frame 0
class com.robertpenner.easing.Cubic
{
function Cubic () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutIn(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
}
Symbol 480 MovieClip [__Packages.HighScore] Frame 0
class HighScore
{
var _mc, xmlData;
function HighScore (mc) {
trace("\n[-- HighScore --] mc: " + mc);
_mc = mc;
}
function loadScores(xmlPath) {
trace("\n[-- loadScores --]");
var _local2 = new XML();
_local2.ignoreWhite = true;
var target = this;
_local2.onLoad = function () {
trace("..FINISH LOAD XML: ");
target.xmlData = this;
target.showHighScore();
};
_local2.load(xmlPath);
}
function showHighScore() {
trace("\n[-- showHighScore --]");
var _local3 = xmlData.firstChild;
var _local4 = _local3.childNodes.length;
trace("node: " + _local3);
var _local2 = 0;
while (_local2 < _local3.childNodes.length) {
_mc[("no" + (_local2 + 1)) + "_mc"].name_txt.text = _local3.childNodes[_local2].attributes.username;
_mc[("no" + (_local2 + 1)) + "_mc"].score_txt.text = _local3.childNodes[_local2].attributes.score;
trace((("name: " + _local3.childNodes[_local2].attributes.username) + " score: ") + _local3.childNodes[_local2].attributes.score);
_local2++;
}
while (_local2 < 10) {
_mc[("no" + (_local2 + 1)) + "_mc"].name_txt.text = "";
_mc[("no" + (_local2 + 1)) + "_mc"].score_txt.text = "";
_local2++;
}
}
}
Symbol 246 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 2
stop();
Symbol 254 MovieClip Frame 1
stop();
Symbol 254 MovieClip Frame 2
stop();
Symbol 269 MovieClip Frame 1
stop();
Symbol 326 Button
on (release) {
_root.rbbMgr.startGame();
play_btn.enabled = false;
}
Symbol 336 Button
on (release) {
if (currentMenu != "howtoplay") {
currentMenu = "howtoplay";
navTarget = "howtoplay";
howto_btn.enabled = false;
highscore_btn.enabled = false;
tellfri_btn.enabled = false;
play();
}
}
Symbol 341 Button
on (release) {
navTarget = "tellfriends";
play();
}
Symbol 342 Button
on (release) {
if (currentMenu != "highscore") {
currentMenu = "highscore";
navTarget = "highscore";
howto_btn.enabled = false;
highscore_btn.enabled = false;
tellfri_btn.enabled = false;
play();
}
}
Symbol 344 Button
on (release) {
if (currentMenu != "tellfriends") {
currentMenu = "tellfriends";
navTarget = "tellfriends";
howto_btn.enabled = false;
highscore_btn.enabled = false;
tellfri_btn.enabled = false;
play();
}
}
Symbol 348 Button
on (press) {
getURL ("http://www.codegent.com", "_blank");
}
Symbol 360 MovieClip Frame 21
stop();
Symbol 408 MovieClip Frame 1
function chkEmail(tmpEmail) {
if (tmpEmail != "") {
if (((tmpEmail.indexOf(".") == -1) || (tmpEmail.indexOf("@") == -1)) || (tmpEmail.length < 6)) {
trace("incorrect email " + tmpEmail);
return(false);
}
trace("ok " + tmpEmail);
return(true);
}
trace("blank " + tmpEmail);
return(false);
}
function clearError() {
err_txt.text = "";
clearInterval(clearIntv);
}
stop();
yourname_txt.tabIndex = 1;
youremail_txt.tabIndex = 2;
friendemail1_txt.tabIndex = 3;
friendemail2_txt.tabIndex = 4;
friendemail3_txt.tabIndex = 5;
if (((_root.tellFriendURL == undefined) || (_root.tellFriendURL == null)) || (_root.tellFriendURL == "")) {
_root.tellFriendURL = "http://bunny.codegent.net/php/sendMail.php";
}
var clearIntv;
var username;
btnSubmit.onPress = function () {
var _local7 = yourname_txt.text;
var _local5 = youremail_txt.text;
var _local6 = friendemail1_txt.text;
var _local4 = friendemail2_txt.text;
var _local3 = friendemail3_txt.text;
trace("username: " + username);
err_txt.text = "sending information...";
btnSubmit.enabled = false;
btnClear.enabled = false;
if (((username == "") || (_local5 == "")) || (_local6 == "")) {
err_txt.text = "Please enter all fielsd marked with a *";
clearInterval(clearIntv);
clearIntv = setInterval(clearError, 3000);
btnSubmit.enabled = true;
btnClear.enabled = true;
return(undefined);
}
if (!chkEmail(_local5)) {
err_txt.text = "Please input your valid email...";
clearInterval(clearIntv);
clearIntv = setInterval(clearError, 3000);
btnSubmit.enabled = true;
btnClear.enabled = true;
return(undefined);
}
if (!chkEmail(_local6)) {
err_txt.text = "Please input valid friend 1 email...";
clearInterval(clearIntv);
clearIntv = setInterval(clearError, 3000);
btnSubmit.enabled = true;
btnClear.enabled = true;
return(undefined);
}
if ((!chkEmail(_local4)) && (_local4 != "")) {
err_txt.text = "Please input valid friend 2 email...";
clearInterval(clearIntv);
clearIntv = setInterval(clearError, 3000);
btnSubmit.enabled = true;
btnClear.enabled = true;
return(undefined);
}
if ((!chkEmail(_local3)) && (_local3 != "")) {
err_txt.text = "Please input valid friend 3 email...";
clearInterval(clearIntv);
clearIntv = setInterval(clearError, 3000);
btnSubmit.enabled = true;
btnClear.enabled = true;
return(undefined);
}
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
debug_txt.text = debug_txt.text + ((((("success: " + result_lv.success) + " email: ") + result_lv.email2) + " temp: ") + result_lv.temp);
if (success) {
err_txt.text = "Sent Successfully";
friendemail1_txt.text = "";
friendemail2_txt.text = "";
friendemail3_txt.text = "";
btnSubmit.enabled = true;
btnClear.enabled = true;
} else {
btnSubmit.enabled = true;
btnClear.enabled = true;
err_txt.text = "Error connecting to server.";
}
};
var _local2 = new LoadVars();
_local2.yourname = _local7;
_local2.youremail = _local5;
_local2.friendemail1 = _local6;
_local2.friendemail2 = _local4;
_local2.friendemail3 = _local3;
trace(".._root.tellFriendURL: " + _root.tellFriendURL);
_local2.sendAndLoad(_root.tellFriendURL, result_lv, "POST");
};
clear_btn.onPress = function () {
yourname_txt.text = "";
youremail_txt.text = "";
friendemail1_txt.text = "";
friendemail2_txt.text = "";
friendemail3_txt.text = "";
};
Symbol 409 MovieClip Frame 1
var currentMenu = "";
System.security.allowDomain("codegent.com", "bunney.dev.codegent.com");
System.security.allowInsecureDomain("bunney.dev.codegent.com");
Symbol 409 MovieClip Frame 112
stop();
Symbol 409 MovieClip Frame 126
gotoAndPlay(navTarget);
Symbol 409 MovieClip Frame 141
stop();
highscore_mc.highscore_1.name_txt.text = "Loading...";
howto_btn.enabled = true;
highscore_btn.enabled = true;
tellfri_btn.enabled = true;
play_btn.enabled = true;
Symbol 409 MovieClip Frame 150
gotoAndPlay(navTarget);
Symbol 409 MovieClip Frame 166
stop();
var i = 0;
while (i <= 10) {
highscore_mc[("no" + i) + "_mc"].name_txt.text = "";
highscore_mc[("no" + i) + "_mc"].score_txt.text = "";
i++;
}
highscore_mc.no1_mc.name_txt.text = "Loading...";
var nocache = ("?nocache=" + (Math.random() * 100000));
if (((_root.highscoreURL == undefined) || (_root.highscoreURL == null)) || (_root.highscoreURL == "")) {
_root.highscoreURL = "http://bunny.codegent.net/php/getScore.php";
}
var highScoreMng;
highScoreMng = new HighScore(highscore_mc);
highScoreMng.loadScores(_root.highscoreURL + nocache);
howto_btn.enabled = true;
highscore_btn.enabled = true;
tellfri_btn.enabled = true;
play_btn.enabled = true;
Symbol 409 MovieClip Frame 175
gotoAndPlay(navTarget);
Symbol 409 MovieClip Frame 190
stop();
howto_btn.enabled = true;
highscore_btn.enabled = true;
tellfri_btn.enabled = true;
play_btn.enabled = true;
Symbol 409 MovieClip Frame 199
gotoAndPlay(navTarget);
Symbol 412 Button
on (release) {
_root.rbbMgr.startGame();
}
Symbol 414 Button
on (release) {
_parent.gotoAndPlay("submitscore");
submitscore_btn.enabled = false;
}
Symbol 415 Button
on (release) {
_parent.gotoAndPlay("close");
_root.welcomeTarget = "tellfriends";
}
Symbol 432 Button
on (release) {
name_txt.text = "";
}
Symbol 437 Button
on (release) {
_parent.play();
_root.welcomeTarget = "highscore";
}
Symbol 438 MovieClip Frame 1
function clearError() {
err_txt.text = "";
clearInterval(clearIntv);
}
stop();
if (((_root.postURL == undefined) || (_root.postURL == null)) || (_root.postURL == "")) {
_root.postURL = "http://bunny.codegent.net/php/sendScore.php";
}
var clearIntv;
var username;
btnSubmit.onPress = function () {
var _local2 = name_txt.text;
trace("username: " + _local2);
err_txt.text = "sending information...";
btnSubmit.enabled = false;
btnClear.enabled = false;
if (_local2 == "") {
err_txt.text = "Please enter your name.";
clearInterval(clearIntv);
clearIntv = setInterval(clearError, 3000);
btnSubmit.enabled = true;
btnClear.enabled = true;
return(undefined);
}
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
debug_txt.text = debug_txt.text + ((((("success: " + result_lv.success) + " email: ") + result_lv.email2) + " temp: ") + result_lv.temp);
if (success) {
nextFrame();
err_txt.text = "Send Successfully";
btnSubmit.enabled = false;
} else {
btnSubmit.enabled = true;
btnClear.enabled = true;
err_txt.text = "Error connecting to server.";
}
};
var _local3 = new LoadVars();
_local3.username = _local2;
_local3.score = _root.score;
trace(".._root.postURL: " + _root.postURL);
_local3.sendAndLoad(_root.postURL, result_lv, "POST");
};
Symbol 439 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 36
stop();
Symbol 439 MovieClip Frame 47
stop();
Symbol 439 MovieClip Frame 82
_root.welcome_mc._visible = true;
_root.welcome_mc._x = 0;
trace("welcomeTarget: " + _root.welcomeTarget);
_root.welcome_mc.gotoAndPlay(_root.welcomeTarget);
_root.endScreen_mc._x = 750;
_root.welcome_mc.currentMenu = "";
_root.welcome_mc.currentMenu = _root.welcomeTarget;
_root.welcome_mc.howto_btn.enabled = false;
_root.welcome_mc.highscore_btn.enabled = false;
_root.welcome_mc.tellfri_btn.enabled = false;
stop();
Symbol 444 MovieClip Frame 1
stop();
Symbol 444 MovieClip Frame 102
_root.rbbMgr.startStageControl();
Symbol 446 Button
on (press) {
rbbMgr.endStage();
}
Symbol 447 Button
on (press) {
rbbMgr.nextStage();
}
Symbol 454 Button
on (press) {
_root.Game.toggleSound();
}
Symbol 457 MovieClip Frame 1
stop();