Frame 1
MochiAd.showPreGameAd({id:"0d96875ae76534b7", res:"620x500"});
Instance of Symbol 37 MovieClip in Frame 3
//component parameters
onClipEvent (construct) {
bOpen = true;
}
Symbol 8 MovieClip [ui.TimeBar] Frame 1
#initclip 16
Object.registerClass("ui.TimeBar", ui.TimeBar);
#endinitclip
onTimer = function (time, totalTime) {
if (time == 0) {
hand._rotation = 0;
} else {
hand._rotation = (1 - (time / totalTime)) * 360;
}
};
Symbol 10 MovieClip [Logo] Frame 1
if (bUrl) {
onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
}
this.cacheAsBitmap = true;
Symbol 14 MovieClip Frame 1
function flash_loading(x, T, r) {
var _local1 = T / 2;
var _local2 = (-r) / (_local1 * _local1);
return((_local2 * Math.pow((x % T) - _local1, 2)) + r);
}
_root.stop();
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
_root.menu = my_cm;
_x = (Stage.width / 2);
_y = ((Stage.height / 2) - 30);
mLogo._alpha = 0;
mLoading._alpha = 0;
var nDownload;
var sDownload = "";
onEnterFrame = function () {
nDownload = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (nDownload == 100) {
if ((_root._mochiad instanceof MovieClip) != true) {
_root.play();
}
}
if (mLogo._alpha < 100) {
mLogo._alpha = mLogo._alpha + 5;
} else {
mLogo._alpha = 100;
sDownload = nDownload + " %";
mLoading._alpha = flash_loading(getTimer(), 800, 100);
}
};
Instance of Symbol 10 MovieClip [Logo] "mLogo" in Symbol 14 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
bUrl = true;
}
Symbol 243 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.0");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 244 MovieClip [__Packages.ui.TimeBar] Frame 0
class ui.TimeBar extends MovieClip
{
var t0, onEnterFrame, pause, time, onTimeUp, onTimer, __totalTime;
function TimeBar () {
super();
}
function start() {
t0 = getTimer();
onEnterFrame = function () {
this.run();
};
}
function stop() {
delete onEnterFrame;
}
function run() {
if (pause) {
t0 = getTimer();
return(undefined);
}
time = time - ((getTimer() - t0) / 1000);
if (time <= 0) {
time = 0;
(stop());// not popped
onTimeUp();
}
onTimer(time, __totalTime);
t0 = getTimer();
}
function get totalTime() {
return(__totalTime);
}
function set totalTime(_totalTime) {
time = (__totalTime = _totalTime);
//return(totalTime);
}
function timeUp() {
(stop());// not popped
onTimeUp();
}
}
Symbol 245 MovieClip [__Packages.Global] Frame 0
class Global
{
function Global () {
}
static function playSound(_s) {
SOUND.attachSound(_s);
SOUND.start();
}
static function SUBMIT(_s, _n) {
if (_s.length > 0) {
var _local1 = new LoadVars();
var _local2 = new LoadVars();
_local1.game = GAMENAME;
trace((_s + "__________") + _n);
_local1.score = _n;
_local1.name = _s;
_local1.sendAndLoad("http://www.freeworldgroup.com/score/score.asp", _local2, "POST");
_local2.onLoad = function () {
Global.SUBMITEND();
};
return(true);
}
return(false);
}
static function SUBMITEND() {
}
static function SAVE(_ob) {
var _local1 = SharedObject.getLocal(GAMENAME + "_data", "/");
_local1.data.game = _ob;
_local1.flush();
}
static function LOAD() {
var _local1 = SharedObject.getLocal(GAMENAME + "_data", "/");
return(_local1.data.game);
}
static function ISSAVE() {
var _local1 = SharedObject.getLocal(GAMENAME + "_data", "/");
return(_local1.data.game != undefined);
}
static function DEL() {
var _local1 = SharedObject.getLocal(GAMENAME + "_data", "/");
_local1.clear();
}
static function VIEWSCORE() {
getURL ("http://www.freeworldgroup.com/score/index.asp?game=" + GAMENAME, "_blank");
}
static function FWGURL() {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
static function ADDGAME() {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
}
static function DOWNLOAD() {
getURL ("http://www.ifungames.com", "_blank");
}
static var MUSIC = new Sound();
static var SOUND = new Sound();
static var GAMENAME = "ostrich";
static var WIDTH = Stage.width;
static var HEIGHT = Stage.height;
}
Symbol 246 MovieClip [__Packages.Common] Frame 0
class Common
{
function Common () {
}
static function enabledFor(_b, _m, _mHit, _nDepth) {
(_m == undefined) && (_m = _root);
(_mHit == undefined) && (_mHit = _root);
(_nDepth == undefined) && (_nDepth = _m.getNextHighestDepth());
if (_b) {
_m.createEmptyMovieClip("mEnabled", _nDepth);
_m.mEnabled.enabled = false;
_m.mEnabled.hitArea = _mHit;
_m.mEnabled.onPress = function () {
};
updateAfterEvent();
} else {
_m.mEnabled.removeMovieClip();
updateAfterEvent();
}
}
static function changeQ() {
switch (_root._quality) {
case "LOW" :
_root._quality = "MEDIUM";
break;
case "MEDIUM" :
_root._quality = "HIGH";
break;
case "HIGH" :
_root._quality = "BEST";
break;
case "BEST" :
_root._quality = "LOW";
}
return(_root._quality);
}
static function mask() {
var bmpRoot = (new flash.display.BitmapData(Stage.width, Stage.height, false, 0));
bmpRoot.draw(_root);
var _local3 = _root.createEmptyMovieClip("mClip_mask", _root.getNextHighestDepth());
var mClip_bmp = _root.createEmptyMovieClip("mClip_bmp", _root.getNextHighestDepth());
mClip_bmp.attachBitmap(bmpRoot, 0);
_local3.bmpRoot = bmpRoot;
_local3.mClip_bmp = mClip_bmp;
_local3.nTime = 0;
_local3.nT = 20;
_local3.ready = function () {
this.mClip_bmp.setMask(this);
Common.enabledFor(true);
};
_local3.finish = function () {
this.mClip_bmp.removeMovieClip();
this.bmpRoot.dispose();
Common.enabledFor(false);
this.removeMovieClip();
};
switch (random(4)) {
case 0 :
_local3.nRdm = random(2);
createClip("m_", _local3, 0, 0);
createClip("m_", _local3, 0, 1, {_x:10, _y:10, _rotation:180});
_local3.onEnterFrame = function () {
if (this.nTime == 0) {
this.ready();
}
this.nTime++;
this.nTemp = 50 - Common.unlinearCycle(this.nTime, this.nT, 50);
if (this.nRdm > 0) {
this.m_0._yscale = (this.m_1._yscale = this.nTemp);
} else {
this.m_0._xscale = (this.m_1._xscale = this.nTemp);
}
if (this.nTime == (this.nT / 2)) {
this.finish();
delete this.onEnterFrame;
}
};
break;
case 1 :
_local3.nRdm = random(3);
_local3.nRdm_2 = random(4);
createClip("m_", _local3, 1, 0, {_x:5, _y:5});
_local3.onEnterFrame = function () {
if (this.nTime == 0) {
this.ready();
}
this.nTime++;
this.nTemp = 100 - Common.unlinearCycle(this.nTime, this.nT, 100);
switch (this.nRdm) {
case 0 :
this.m_0._xscale = 150;
this.m_0._yscale = this.nTemp;
break;
case 1 :
this.m_0._xscale = this.nTemp;
this.m_0._yscale = 150;
break;
case 2 :
this.m_0._xscale = (this.m_0._yscale = this.nTemp);
}
if (this.nRdm_2 == 3) {
this.m_0._rotation = 180 - Common.unlinearCycle(this.nTime, this.nT, 180);
} else if (this.nRdm_2 == 2) {
this.m_0._rotation = Common.unlinearCycle(this.nTime, this.nT, 180);
}
if (this.nTime == (this.nT / 2)) {
this.finish();
delete this.onEnterFrame;
}
};
break;
case 2 :
_local3.nRdm = random(5);
createClip("m_", _local3, 2, 0);
createClip("m_", _local3, 2, 1, {_x:10, _y:10, _rotation:180});
_local3.onEnterFrame = function () {
if (this.nTime == 0) {
this.ready();
}
this.nTime++;
this.nTemp = 100 - Common.unlinearCycle(this.nTime, this.nT, 100);
switch (this.nRdm) {
case 0 :
this.m_0._yscale = (this.m_1._yscale = this.nTemp);
break;
case 1 :
this.m_0._xscale = (this.m_1._yscale = this.nTemp);
break;
case 2 :
this.m_0._yscale = (this.m_1._xscale = this.nTemp);
break;
case 3 :
this.m_0._xscale = (this.m_1._xscale = this.nTemp);
break;
case 4 :
this.m_0._xscale = (this.m_1._xscale = this.nTemp);
this.m_0._yscale = (this.m_1._yscale = this.nTemp);
}
if (this.nTime == (this.nT / 2)) {
this.finish();
delete this.onEnterFrame;
}
};
break;
case 3 :
_local3.nRdm = random(2);
createClip("m_", _local3, 2, 0);
createClip("m_", _local3, 2, 1, {_x:10, _y:10, _rotation:180});
createClip("m_", _local3, 2, 2, {_x:0, _y:10, _rotation:-90});
createClip("m_", _local3, 2, 3, {_x:10, _y:0, _rotation:90});
_local3.onEnterFrame = function () {
if (this.nTime == 0) {
this.ready();
}
this.nTime++;
this.nTemp = 100 - Common.unlinearCycle(this.nTime, this.nT, 100);
if (this.nRdm > 0) {
this.m_0._yscale = (this.m_1._yscale = (this.m_2._yscale = (this.m_3._yscale = this.nTemp)));
} else {
this.m_0._xscale = (this.m_1._xscale = (this.m_2._xscale = (this.m_3._xscale = this.nTemp)));
}
if (this.nTime == (this.nT / 2)) {
this.finish();
delete this.onEnterFrame;
}
};
break;
}
(_local3._width = Stage.width);
(_local3._height = Stage.height);
}
static function createClip(_s, _m, _nType, _nDepth, _ob) {
(_nDepth == undefined) && (_nDepth = _m.getNextHighestDepth());
(_nType == undefined) && (_nType = 0);
_m.createEmptyMovieClip(_s + _nDepth, _nDepth);
_m[_s + _nDepth].beginFill(0);
switch (_nType) {
case 0 :
_m[_s + _nDepth].lineTo(10, 0);
_m[_s + _nDepth].lineTo(10, 10);
_m[_s + _nDepth].lineTo(0, 10);
_m[_s + _nDepth].lineTo(0, 0);
break;
case 1 :
_m[_s + _nDepth].moveTo(-5, -5);
_m[_s + _nDepth].lineTo(-5, 5);
_m[_s + _nDepth].lineTo(5, 5);
_m[_s + _nDepth].lineTo(5, -5);
_m[_s + _nDepth].lineTo(-5, -5);
break;
case 2 :
_m[_s + _nDepth].lineTo(10, 0);
_m[_s + _nDepth].lineTo(0, 10);
_m[_s + _nDepth].lineTo(0, 0);
break;
}
_m[_s + _nDepth].endFill();
for (var _local5 in _ob) {
_m[_s + _nDepth][_local5] = _ob[_local5];
}
return(_m[_s + _nDepth]);
}
static function addClip(_s, _m, oBject, _nDepth) {
(_nDepth == undefined) && (_nDepth = _m.getNextHighestDepth());
return(_m.attachMovie(_s, _s + _nDepth, _nDepth, oBject));
}
static function clearAllClip(_m, _bAll) {
for (var _local3 in _m) {
if (_bAll) {
_m[_local3].swapDepths(0);
}
_m[_local3].removeMovieClip();
}
}
static function drawRect() {
var _local3 = arguments[0];
var _local2 = arguments[1];
var _local4;
var _local5;
var _local6;
var _local7;
switch (_local2.constructor) {
case flash.geom.Rectangle :
_local4 = _local2.x;
_local5 = _local2.y;
_local6 = _local2.x + _local2.width;
_local7 = _local2.y + _local2.height;
break;
case Number :
_local4 = _local2;
_local5 = arguments[2];
_local6 = arguments[3];
_local7 = arguments[4];
break;
default :
_local4 = _local2.xMin;
_local5 = _local2.yMin;
_local6 = _local2.xMax;
_local7 = _local2.yMax;
}
_local3.moveTo(_local4, _local5);
_local3.lineTo(_local6, _local5);
_local3.lineTo(_local6, _local7);
_local3.lineTo(_local4, _local7);
_local3.lineTo(_local4, _local5);
}
static function getBmdHitRect(bg, obj) {
var _local2 = getContainBmd(bg, obj, 10, 10);
_root.attachBitmap(_local2, 0);
return(_local2.getColorBoundsRect(4294967295, 4278190080));
}
static function getContainBmd(bg, obj, bm1, bm2) {
var _local1 = obj.getBounds(obj);
var _local3 = new flash.geom.Rectangle(_local1.xMin, _local1.yMin, _local1.xMax - _local1.xMin, _local1.yMax - _local1.yMin);
var _local4 = new flash.display.BitmapData(_local3.width, _local3.height, true, 0);
var _local6 = bg.transform.concatenatedMatrix;
var _local2 = new flash.geom.Matrix(1, 0, 0, 1, -_local3.x, -_local3.y);
_local4.draw(obj, _local2, null, bm1);
_local2.tx = _local2.tx * -1;
_local2.ty = _local2.ty * -1;
var _local7 = obj.transform.concatenatedMatrix;
_local2.concat(_local7);
_local2.invert();
_local6.concat(_local2);
_local4.draw(bg, _local6, null, bm2);
return(_local4);
}
static function removeFixMc(mc) {
mc.swapDepths(mc._parent.getNextHighestDepth());
mc.removeMovieClip();
}
static function localToLocal(p, mc1, mc2) {
mc1.localToGlobal(p);
mc2.globalToLocal(p);
}
static function np(_n) {
isNaN(_n) && (_n = 1);
return(((random(2) > 0) ? (_n) : (-_n)));
}
static function rdm_2(a, b) {
return((Math.random() * (b - a)) + a);
}
static function rdm_0(a, l) {
return((a - (Math.random() * l)) + (l / 2));
}
static function rdm_a(a1, a2, A) {
var _local3 = 0;
var _local5 = Math.random();
var _local4 = 0;
var _local2 = A.concat();
for (var _local6 in _local2) {
var _local1 = 0;
while (_local1 < Number(_local6)) {
_local2[_local6] = _local2[_local6] + _local2[_local1];
_local1++;
}
(_local3 < _local2[_local6]) && (_local3 = _local2[_local6]);
_local2[_local6] = _local2[_local6] / _local3;
if (_local5 >= _local2[_local6]) {
_local4 = Number(_local6) + 1;
break;
}
}
return(a1 + ((_local4 * (a2 - a1)) / (_local2.length - 1)));
}
static function equal(_ob1, _ob2) {
for (var _local3 in _ob1) {
trace((((_local3 + "____") + _ob1[_local3]) + "____") + _ob2[_local3]);
if (_ob1[_local3] != _ob2[_local3]) {
return(false);
}
}
return(true);
}
static function formatNumber(_n, _d, _nMin, _nMax) {
_n = _n + _d;
if (_n < _nMin) {
_n = _nMin;
} else if (_n > _nMax) {
_n = _nMax;
}
return(_n);
}
static function removeArray(_a, _ai) {
for (var _local2 in _a) {
if (_a[_local2] == _ai) {
_a.splice(int(_local2), 1);
return(-1);
}
}
return(((_local2 == undefined) ? 0 : 1));
}
static function forIn(_a, _s, _b, _ob) {
var _local2 = [];
for (var _local3 in _a) {
if (((_a[_local3] == undefined) || (!_a[_local3][_s](_ob))) && (_b)) {
_local2.push(_local3);
}
}
if (_b) {
for (var _local3 in _local2) {
_a.splice(int(_local2[_local3]), 1);
}
return(-_local3);
}
return(((_local3 == undefined) ? 0 : 1));
}
static function evaUndf(_ob, _ob_new) {
if (_ob == undefined) {
return(_ob_new);
}
return(_ob);
}
static function distance(x0, y0, xt, yt) {
return(Math.sqrt(Math.pow(xt - x0, 2) + Math.pow(yt - y0, 2)));
}
static function side_min(x0, y0, xt, yt) {
return(Math.min(Math.abs(xt - x0), Math.abs(yt - y0)));
}
static function side_max(x0, y0, xt, yt) {
return(Math.max(Math.abs(xt - x0), Math.abs(yt - y0)));
}
static function rFloor(r) {
if (r >= Math.PI) {
r = r - (Math.PI*2);
}
if (r <= -3.14159265358979) {
r = r + (Math.PI*2);
}
return(r);
}
static function rFloor_n(r) {
if (r >= 180) {
r = r - 360;
}
if (r <= -180) {
r = r + 360;
}
return(r);
}
static function s_b(n, a, b) {
if ((a < n) && (n < b)) {
return(0);
}
if (n <= a) {
return(-1);
}
return(1);
}
static function vpNum(_n, _t) {
isNaN(_t) && (_t = 1);
if (_n == 0) {
return(0);
}
if (_n > 0) {
return(_t);
}
return(-_t);
}
static function formatTime(_n) {
var _local3;
var _local4;
var _local2;
if (_n < 60) {
_local3 = 0;
_local4 = _local3;
_local2 = _n;
} else if (_n < 3600) {
_local3 = 0;
_local4 = Math.floor(_n / 60);
_local2 = _n % 60;
} else {
_local3 = Math.floor(_n / 3600);
_local4 = Math.floor(_n / 60) % 60;
_local2 = _n % 60;
}
var _local5 = ((_local3 < 10) ? ("0" + _local3) : (_local3));
var _local7 = ((_local4 < 10) ? ("0" + _local4) : (_local4));
var _local6 = ((_local2 < 10) ? ("0" + _local2) : (_local2));
return((((_local5 + ":") + _local7) + ":") + _local6);
}
static function unlinearCycle(x, T, r) {
var _local1 = T / 2;
var _local2 = (-r) / (_local1 * _local1);
return((_local2 * Math.pow((x % T) - _local1, 2)) + r);
}
static function linearCycle(x, T, r) {
var _local1 = T / 2;
if ((x % T) > _local1) {
return((1 - ((x % _local1) / _local1)) * r);
}
if ((x % T) < _local1) {
return(((x % _local1) / _local1) * r);
}
return(r);
}
static function parabolaRot(x0, y0, xt, yt, nV, nG) {
var _local5 = xt - x0;
var _local7 = yt - y0;
var _local2 = ((nG * _local5) * _local5) / ((2 * nV) * nV);
var _local1 = _local5;
var _local6 = _local2 - _local7;
var _local4 = (_local1 * _local1) - ((4 * _local2) * _local6);
if (_local4 < 0) {
return(undefined);
}
var _local3 = new Object();
if (_local5 > 0) {
_local3.x1 = Math.atan(((-_local1) - Math.sqrt(_local4)) / (2 * _local2));
_local3.x2 = Math.atan(((-_local1) + Math.sqrt(_local4)) / (2 * _local2));
} else {
_local3.x1 = Math.atan(((-_local1) - Math.sqrt(_local4)) / (2 * _local2)) - Math.PI;
_local3.x2 = Math.atan(((-_local1) + Math.sqrt(_local4)) / (2 * _local2)) - Math.PI;
}
return(_local3);
}
static function deepObjectCopy(obj) {
if ((((typeof(obj) != "object") || (obj instanceof Button)) || (obj instanceof TextField)) || (obj instanceof MovieClip)) {
return(obj);
}
var _local3;
if (obj instanceof Boolean) {
_local3 = new Boolean(Boolean.prototype.valueOf.call(obj));
} else if (obj instanceof Number) {
_local3 = new Number(Number.prototype.valueOf.call(obj));
} else if (obj instanceof String) {
_local3 = new String(String.prototype.valueOf.call(obj));
} else if (obj.__constructor__) {
if (typeof(obj.clone) == "function") {
_local3 = obj.clone();
if (_local3.__proto__ == obj.__proto__) {
return(_local3);
}
}
_local3 = new obj.__constructor__();
} else if (obj instanceof Array) {
_local3 = [];
} else {
_local3 = {};
}
for (var _local4 in obj) {
if (obj.hasOwnProperty(_local4)) {
_local3[_local4] = arguments.callee(obj[_local4]);
}
}
return(_local3);
}
static var a2r = 57.2957795130823;
static var p0 = new flash.geom.Point();
static var bf = new flash.filters.BlurFilter();
static var cf = new flash.filters.ConvolutionFilter(3, 3, [1, 1, 1, 1, 30, 1, 1, 1, 1], 38);
static var dirArr = [[-1, 0], [0, -1], [1, 0], [0, 1]];
}
Symbol 247 MovieClip [__Packages.Fwg.Pass] Frame 0
class Fwg.Pass extends MovieClip
{
var bOpen, gotoAndStop, _parent, _name, getDepth, _y, _x, stop;
function Pass () {
super();
}
function init() {
Global.GAME.pPass = this;
if (bOpen) {
(gotoAndStop(2));// not popped
} else if (_parent != Global.GAME.mGround.mBack) {
Global.GAME.mGround.mBack.attachMovie("Fwg.Pass", _name, getDepth(), {_x:(Math.round(_x / Game.nTile_width) * Game.nTile_width) - 10, _y:(Math.round(_y / Game.nTile_width) * Game.nTile_width) - 10, bOpen:bOpen});
Common.removeFixMc(this);
} else {
(stop());// not popped
}
}
function hit(_m) {
}
function open() {
bOpen = true;
Global.GAME.mGround.mDown.attachMovie("Fwg.Pass", _name, getDepth(), {_x:(Math.round(_x / Game.nTile_width) * Game.nTile_width) - 10, _y:(Math.round(_y / Game.nTile_width) * Game.nTile_width) - 10, bOpen:bOpen});
Common.removeFixMc(this);
}
}
Symbol 248 MovieClip [__Packages.Game] Frame 0
class Game extends MovieClip
{
var nInterval, __bPause, _x, _y, gotoAndStop, mPin, attachMovie, getNextHighestDepth, btMoreGame, btAddGame, btDownload, btHighScore, btPlay, btHelp, aScore, aRun_0, nPower, nTime, nScore, nScore_back, nLevel, mGround, pHead, btSumit, btTry, btBack, nTime_th, nTime_id, onEnterFrame;
function Game () {
super();
Global.GAME = this;
nInterval = 1000;
}
function get bPause() {
return(__bPause);
}
function set bPause(_bPause) {
if (bPause != _bPause) {
__bPause = _bPause;
if (__bPause) {
pause();
} else {
run();
}
}
//return(bPause);
}
function init() {
_root.stop();
Common.clearAllClip(_root);
Global.SOUND = new Sound(this);
(_x = 0);
(_y = 0);
Common.mask();
(gotoAndStop("menu"));// not popped
if (nv != 1) {
Global.DEL();
}
}
function inMenu() {
reset();
var _local3 = new Array("btPlay", "btHelp", "btHighScore", "btDownload", "btMoreGame", "btAddGame");
var _local8 = new Array("PLAY GAME", "INSTRUCTIONS", "VIEW HIGHSCORES", "DOWNLOAD GAMES", "MORE ONLINE GAMES", "ADD THIS GAME TO YOUR SITE");
var _local9 = "center";
var _local10 = 34;
var _local12 = mPin._x;
var _local11 = mPin._y;
var _local2 = 0;
while (_local2 < _local3.length) {
attachMovie("Btn", _local3[_local2], getNextHighestDepth(), {sTxt:_local8[_local2], autoSize:_local9, _x:_local12, _y:_local11 + (_local2 * _local10)});
_local2++;
}
btMoreGame.press = function () {
Global.FWGURL();
};
btAddGame.press = function () {
Global.ADDGAME();
};
btDownload.press = function () {
Global.DOWNLOAD();
};
btHighScore.press = function () {
Global.VIEWSCORE();
};
btPlay.release = function () {
Common.mask();
if (Global.LOAD() != undefined) {
Global.GAME.gotoAndStop("setting");
} else {
Global.GAME.gotoAndStop("help");
}
};
btHelp.release = function () {
Common.mask();
Global.GAME.gotoAndStop("help");
};
}
function inCredits() {
Common.clearAllClip(this);
Common.addClip("Btn", this, {_x:310, _y:50, enabled:false, sTxt:"MUSIC CREDITS", _xscale:250, _yscale:250, autoSize:"center"});
}
function inHelp() {
Common.clearAllClip(this);
Common.addClip("Btn", this, {_x:310, _y:50, enabled:false, sTxt:"INSTRUCTIONS", _xscale:250, _yscale:250, autoSize:"center"});
if (Global.LOAD() == undefined) {
Common.addClip("Btn", this, {_x:480, _y:420, sTxt:"PLAY GAME", autoSize:"center", press:function () {
Common.mask();
Global.GAME.gotoAndStop("loading");
}});
}
}
function inSetting() {
Common.clearAllClip(this);
bPause = (true);
aScore = Global.LOAD().aScore;
Common.addClip("Btn", this, {_x:310, _y:50, enabled:false, sTxt:"SELECT LEVEL", _xscale:250, _yscale:250, autoSize:"center"});
var _local2 = 0;
while (_local2 < 12) {
Common.addClip("Btn", this, {_x:((_local2 < 6) ? 150 : 330), _y:150 + ((_local2 % 6) * 40), sTxt:"LEVEL " + (_local2 + 1), bGray:aScore[_local2 + 1] == undefined, nLevel:_local2 + 2, press:function () {
if (Global.GAME.aScore[this.nLevel - 1] != undefined) {
Global.GAME.nScore_back = 0;
Global.GAME.nLevel = this.nLevel;
Common.mask();
Global.GAME.gotoAndStop("loading");
}
}});
_local2++;
}
Common.addClip("Btn", this, {_x:480, _y:420, sTxt:"MENU", autoSize:"center", press:function () {
Common.mask();
Global.GAME.gotoAndStop("menu");
}});
}
function inLoading() {
Common.clearAllClip(this);
bPause = (true);
(gotoAndStop("playing"));// not popped
}
function inPlaying() {
Common.clearAllClip(this);
aRun_0 = new Array();
nPower = 0;
nTime = 0;
nScore = nScore_back;
mGround.timeBar.totalTime = aTime[nLevel - 2];
mGround.createEmptyMovieClip("mBack", 1);
mGround.createEmptyMovieClip("mMid", 2);
mGround.createEmptyMovieClip("mFore", 3);
mGround.createEmptyMovieClip("mBar", 4);
mGround.mBar.attachMovie("Btn", "mScore", 2, {_x:230, _y:460, enabled:false, sTxt:"SCORE : " + nScore, _xscale:90, _yscale:90});
mGround.mBar.attachMovie("Btn", "mReset", 3, {_x:520, _y:460, sTxt:"RESET", autoSize:"right", _xscale:90, _yscale:90, press:function () {
Global.GAME.nScore_back = Global.GAME.nScore_back * 0.75;
Global.GAME.nScore_back = int(Global.GAME.nScore_back);
Common.mask();
Global.GAME.gotoAndStop("loading");
}});
mGround.mBar.attachMovie("Btn", "mMenu", 4, {_x:615, _y:460, sTxt:"MENU", autoSize:"right", _xscale:90, _yscale:90, press:function () {
if (Global.GAME.mSet == undefined) {
Global.GAME.bPause = true;
Global.GAME.attachMovie("mSet", "mSet", Global.GAME.getNextHighestDepth(), {_x:this._x, _y:this._y});
} else {
Global.GAME.bPause = false;
Global.GAME.mSet.removeMovieClip();
Global.GAME.mSet = undefined;
delete Global.GAME.mSet;
}
}});
mGround.mBar.attachMovie("Btn", "mLevel", 5, {_x:85, _y:460, enabled:false, sTxt:"LEVEL : " + (nLevel - 1), _xscale:90, _yscale:90});
pHead = mGround.mFore.attachMovie("Fwg.Head", "mHead", 0, {_x:100, _y:100});
mGround.gotoAndStop(nLevel);
}
function inNext() {
bPause = (true);
Common.clearAllClip(this);
var _local4 = new Array("btSumit", "btTry", "btBack");
var _local5 = new Array("SUBMIT SCORE", "NEXT LEVEL", "MAIN MENU");
var _local6 = "center";
var _local7 = 50;
var _local9 = Global.WIDTH / 2;
var _local8 = 200;
var _local3 = 0;
while (_local3 < _local4.length) {
attachMovie("Btn", _local4[_local3], getNextHighestDepth(), {sTxt:_local5[_local3], autoSize:_local6, _x:_local9, _y:_local8 + (_local3 * _local7)});
_local3++;
}
Common.addClip("Btn", this, {_x:310, _y:50, enabled:false, sTxt:"LEVEL COMPLETE", _xscale:250, _yscale:250, autoSize:"center"});
Common.addClip("Btn", this, {_x:310, _y:150, enabled:false, sTxt:"SCORE : " + nScore, _xscale:150, _yscale:150, autoSize:"center"});
btSumit.press = function () {
Common.addClip("PopUp", _root, {sFrame:"submit", aSt:["", Global.GAME.nScore]});
this._visible = false;
};
btTry.release = function () {
Common.mask();
Global.GAME.gotoAndStop("loading");
};
btBack.release = function () {
Common.mask();
Global.GAME.gotoAndStop("menu");
};
}
function inGameOver() {
bPause = (true);
Common.clearAllClip(this);
nScore_back = nScore_back * 0.9;
nScore_back = int(nScore_back);
var _local4 = new Array("btSumit", "btTry", "btBack", "btDownload", "btMoreGame", "btAddGame");
var _local5 = new Array("SUBMIT SCORE", "CONTINUE", "MAIN MENU", "DOWNLOAD GAMES", "MORE ONLINE GAMES", "ADD THIS GAME TO YOUR SITE");
var _local6 = "center";
var _local7 = 35;
var _local9 = Global.WIDTH / 2;
var _local8 = 200;
var _local3 = 0;
while (_local3 < _local4.length) {
attachMovie("Btn", _local4[_local3], getNextHighestDepth(), {sTxt:_local5[_local3], autoSize:_local6, _x:_local9, _y:(_local8 + (_local3 * ((_local3 > 2) ? (_local7) : 50))) + ((_local3 > 2) ? 45 : 0)});
_local3++;
}
Common.addClip("Btn", this, {_x:310, _y:50, enabled:false, sTxt:"GAME OVER", _xscale:250, _yscale:250, autoSize:"center"});
Common.addClip("Btn", this, {_x:310, _y:150, enabled:false, sTxt:"SCORE :" + nScore, _xscale:150, _yscale:150, autoSize:"center"});
btMoreGame.press = function () {
Global.FWGURL();
};
btAddGame.press = function () {
Global.ADDGAME();
};
btDownload.press = function () {
Global.DOWNLOAD();
};
btSumit.press = function () {
Common.addClip("PopUp", _root, {sFrame:"submit", aSt:["", Global.GAME.nScore]});
this._visible = false;
};
btTry.release = function () {
Common.mask();
Global.GAME.gotoAndStop("loading");
};
btBack.release = function () {
Common.mask();
Global.GAME.gotoAndStop("menu");
};
}
function inGameWin() {
Common.clearAllClip(this);
var _local4 = new Array("btSumit", "btBack", "btDownload", "btMoreGame", "btAddGame");
var _local5 = new Array("SUBMIT SCORE", "MAIN MENU", "DOWNLOAD GAMES", "MORE ONLINE GAMES", "ADD THIS GAME TO YOUR SITE");
var _local6 = "center";
var _local7 = 35;
var _local9 = Global.WIDTH / 2;
var _local8 = 200;
var _local3 = 0;
while (_local3 < _local4.length) {
attachMovie("Btn", _local4[_local3], getNextHighestDepth(), {sTxt:_local5[_local3], autoSize:_local6, _x:_local9, _y:_local8 + (_local3 * _local7)});
_local3++;
}
Common.addClip("Btn", this, {_x:310, _y:50, enabled:false, sTxt:"YOU WIN", _xscale:250, _yscale:250, autoSize:"center"});
Common.addClip("Btn", this, {_x:310, _y:150, enabled:false, sTxt:"SCORE :" + nScore, _xscale:150, _yscale:150, autoSize:"center"});
btMoreGame.press = function () {
Global.FWGURL();
};
btAddGame.press = function () {
Global.ADDGAME();
};
btDownload.press = function () {
Global.DOWNLOAD();
};
btSumit.press = function () {
Common.addClip("PopUp", _root, {sFrame:"submit", aSt:["", Global.GAME.nScore]});
this._visible = false;
};
btBack.release = function () {
Common.mask();
Global.GAME.gotoAndStop("menu");
};
}
function nextLevel() {
bPause = (true);
nLevel++;
nScore = nScore + int((aTime[nLevel - 2] - nTime) * 30);
nScore_back = nScore;
aScore[nLevel - 2] = nScore;
aScore[nLevel - 1] = 0;
Common.mask();
if (nLevel > 13) {
(gotoAndStop("gamewin"));// not popped
} else {
Global.SAVE({aScore:aScore});
(gotoAndStop("nextlevel"));// not popped
}
}
function gameOver() {
(gotoAndStop("gameover"));// not popped
}
function reset() {
Common.clearAllClip(this);
nScore = 0;
nScore_back = 0;
nLevel = 2;
nTime_th = 1;
bPause = (true);
aScore = new Array();
}
function run() {
clearInterval(nTime_id);
nTime_id = setInterval(this, "step_time", nInterval);
mGround.timeBar.start();
onEnterFrame = function () {
Global.GAME.step();
};
}
function pause() {
clearInterval(nTime_id);
mGround.timeBar.stop();
delete onEnterFrame;
}
function step_time() {
nTime++;
mGround.mBar.mScore.sTxt = "SCORE : " + nScore;
mGround.mBar.mScore.replace();
mGround.timeBar.onTimeUp = function () {
Global.GAME.bPause = true;
Common.addClip("mB", Global.GAME);
Common.addClip("PopUp", Global.GAME, {sFrame:"ok", aSt:["Time's Up!", "OK"], rtFun:function () {
Global.GAME.gotoAndStop("gameover");
}});
};
}
function step() {
((nTime_th < 299) ? (nTime_th++) : ((nTime_th = 0)));
Common.forIn(aRun_0, "move");
}
static var nTile_width = 20;
var aTime = [100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 190, 190];
var nv = 1;
}
Symbol 249 MovieClip [__Packages.Fwg.Power_0] Frame 0
class Fwg.Power_0 extends MovieClip
{
var _parent, _name, getDepth, _y, _x, stop, gotoAndStop, bT;
function Power_0 () {
super();
}
function init() {
if (_parent != Global.GAME.mGround.mBack) {
Global.GAME.mGround.mBack.attachMovie("Fwg.Power_0", _name, getDepth(), {_x:Math.round(_x / Game.nTile_width) * Game.nTile_width, _y:Math.round(_y / Game.nTile_width) * Game.nTile_width});
Common.removeFixMc(this);
} else {
Global.GAME.nPower++;
(stop());// not popped
}
(stop());// not popped
}
function hit(_m) {
Global.GAME.nPower--;
Global.GAME.nScore = Global.GAME.nScore + 80;
Global.playSound("sdEat");
Global.GAME.pHead.addP();
Global.GAME.pHead.mC.gotoAndPlay(1);
if (Global.GAME.nPower == 0) {
Global.GAME.pPass.open();
}
Common.removeFixMc(this);
}
function over() {
(gotoAndStop(2));// not popped
(bT == undefined) && ((bT = true));
return(!bT);
}
}
Symbol 250 MovieClip [__Packages.Fwg.Mice] Frame 0
class Fwg.Mice extends MovieClip
{
var nSpeed, _parent, _name, getDepth, _rotation, _y, _x, vDir, vSpeed, stop, _currentframe, gotoAndStop;
function Mice () {
super();
nSpeed = 2;
}
function init(_m) {
if (_parent != Global.GAME.mGround.mBack) {
Global.GAME.mGround.mBack.attachMovie("Fwg.Mice", _name, getDepth(), {_x:Math.round(_x / Game.nTile_width) * Game.nTile_width, _y:Math.round(_y / Game.nTile_width) * Game.nTile_width, _rotation:_rotation});
Common.removeFixMc(this);
} else {
vDir = new Vector(0, 1);
vSpeed = vDir.multNew(nSpeed);
Global.GAME.aRun_0.push(this);
}
(stop());// not popped
}
function move() {
if (Global.GAME.pHead.hitTest(_x + (vDir.x * 10), _y + (vDir.y * 10), true)) {
hit(Global.GAME.pHead);
}
if (((_x % Game.nTile_width) == 0) && ((_y % Game.nTile_width) == 0)) {
if (!hitGround(Global.GAME.mGround.mDown, _x + (vDir.x * Game.nTile_width), _y + (vDir.y * Game.nTile_width))) {
nSpeed = 0;
var _local3 = random(4);
vDir.x = aV[_local3][0];
vDir.y = aV[_local3][1];
} else if (hitGround(Global.GAME.mGround.mMid, _x + (vDir.x * Game.nTile_width), _y + (vDir.y * Game.nTile_width))) {
Global.GAME.gameOver();
nSpeed = 0;
} else {
nSpeed = 2;
}
var _local2;
if (vDir.x != 0) {
_local2 = 3 + vDir.x;
if (_currentframe != _local2) {
(gotoAndStop(_local2));// not popped
}
} else {
_local2 = 6 + vDir.y;
if (_currentframe != _local2) {
(gotoAndStop(_local2));// not popped
}
}
if (nSpeed != 0) {
vSpeed = vDir.multNew(nSpeed);
}
}
if (nSpeed != 0) {
_x = _x + vSpeed.x;
_y = _y + vSpeed.y;
if (_x > Global.WIDTH) {
_x = _x - (Global.WIDTH + vSpeed.x);
} else if (_x < 0) {
_x = _x + (Global.WIDTH - vSpeed.x);
}
}
}
function hit(_m) {
Global.GAME.nScore = Global.GAME.nScore + 50;
Global.playSound("sdEat");
Global.GAME.pHead.addP();
Global.GAME.pHead.mC.gotoAndPlay(1);
Common.removeArray(Global.GAME.aRun_0, this);
Common.removeFixMc(this);
}
function hitGround(_m, xt, yt) {
if (_m.hitTest(xt, yt, true)) {
return(true);
}
return(false);
}
static var aV = new Array([1, 0], [0, 1], [-1, 0], [0, -1]);
}
Symbol 251 MovieClip [__Packages.Vector] Frame 0
class Vector extends flash.geom.Point
{
var x, y;
function Vector (x1, y1) {
super();
x = x1;
y = y1;
if (isNaN(x)) {
x = 0;
}
if (isNaN(y)) {
y = 0;
}
}
function setTo(px, py) {
x = px;
y = py;
}
function copy(v) {
x = v.x;
y = v.y;
}
function plus(v) {
x = x + v.x;
y = y + v.y;
return(this);
}
function minus(v) {
x = x - v.x;
y = y - v.y;
return(this);
}
function mult(s) {
x = x * s;
y = y * s;
return(this);
}
function equal(xt, yt) {
if ((xt == x) && (yt == y)) {
return(true);
}
return(false);
}
function multNew(s) {
return(new Vector(x * s, y * s));
}
function magnitude() {
return(Math.sqrt(len_2));
}
function clone() {
return(new Vector(x, y));
}
function add(p) {
return(new Vector(x + p.x, y + p.y));
}
function subtract(p) {
return(new Vector(x - p.x, y - p.y));
}
function get len_2() {
return((x * x) + (y * y));
}
function simple(u) {
x = Math.round(x / u) * u;
y = Math.round(y / u) * u;
}
function rotate(a) {
var _local2 = Math.cos(a);
var _local3 = Math.sin(a);
var _local5 = x;
var _local4 = y;
x = (_local5 * _local2) - (_local4 * _local3);
y = (_local5 * _local3) + (_local4 * _local2);
}
function transform(m) {
var _local4 = x;
var _local3 = y;
x = ((_local4 * m.a) + (_local3 * m.c)) + m.tx;
y = ((_local4 * m.b) + (_local3 * m.d)) + m.ty;
}
function isRight(p) {
return(crossProduct(this, p) < 0);
}
function isInside(pArr) {
var _local4 = pArr.length;
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = pArr[_local2];
if (!subtract(_local3).isRight(pArr[((_local2 == (_local4 - 1)) ? 0 : (_local2 + 1))].subtract(_local3))) {
return(false);
}
_local2++;
}
return(true);
}
function getMp() {
var _local2 = new Vector(y, -x);
_local2.normalize(1);
return(_local2);
}
function polar(len, angle) {
var _local2 = flash.geom.Point.polar(len, angle);
x = _local2.x;
y = _local2.y;
return(this);
}
static function polarNew(len, angle) {
var _local1 = flash.geom.Point.polar(len, angle);
return(new Vector(_local1.x, _local1.y));
}
static function interpolate(pt1, pt2, f) {
var _local1 = flash.geom.Point.interpolate(pt1, pt2, f);
return(new Vector(_local1.x, _local1.y));
}
static function getK(p, m, n) {
return(crossProduct(p, n) / crossProduct(m, n));
}
static function getHorizontal(p, p0) {
var _local1 = dotProduct(p, p0) / p0.__get__len_2();
return(new Vector(p0.x * _local1, p0.y * _local1));
}
static function getVertical(p, p0) {
var _local2 = p0.__get__len_2();
return(new Vector((p0.y * crossProduct(p, p0)) / _local2, (p0.x * crossProduct(p0, p)) / _local2));
}
static function dotProduct(p1, p2) {
return((p1.x * p2.x) + (p1.y * p2.y));
}
static function crossProduct(p1, p2) {
return((p1.x * p2.y) - (p2.x * p1.y));
}
static function intersects(p1, p2, p3, p4) {
var _local6 = p3.subtract(p1);
var _local5 = p2.subtract(p3);
var _local8 = crossProduct(_local6, _local5);
var _local3 = p4.subtract(p2);
var _local4 = crossProduct(_local5, _local3);
if ((_local8 * _local4) < 0) {
return(false);
}
var _local1 = p1.subtract(p4);
var _local2 = crossProduct(_local3, _local1);
if ((_local4 * _local2) < 0) {
return(false);
}
var _local7 = crossProduct(_local1, _local6);
if ((_local2 * _local7) < 0) {
return(false);
}
return(true);
}
static function intersection(p1, p2, p3, p4) {
var _local2 = crossProduct(p1, p3);
var _local5 = crossProduct(p2, p4);
var _local7 = crossProduct(p3, p2);
var _local1 = crossProduct(p4, p1);
var _local3 = crossProduct(p3, p4);
var _local10 = ((_local2 + _local3) + _local1) / (((_local2 + _local5) + _local7) + _local1);
return(interpolate(p2, p1, _local10));
}
}
Symbol 252 MovieClip [__Packages.Fwg.Pipe] Frame 0
class Fwg.Pipe extends MovieClip
{
var bIn, _name, _parent, getDepth, _y, _x, gotoAndStop, pTwin;
function Pipe () {
super();
bIn = false;
}
function init() {
var _local2 = int(_name.split("_", 2)[1]);
if ((_local2 % 2) == 0) {
_local2++;
} else {
_local2--;
}
getTwin(_parent["mPipe_" + _local2]);
if (_parent != Global.GAME.mGround.mBack) {
Global.GAME.mGround.mBack.attachMovie("Fwg.Pipe", _name, getDepth(), {_x:Math.round(_x / Game.nTile_width) * Game.nTile_width, _y:Math.round(_y / Game.nTile_width) * Game.nTile_width});
Common.removeFixMc(this);
} else {
(gotoAndStop(int(_local2 / 10)));// not popped
}
}
function getTwin(_p) {
pTwin = _p;
_p.pTwin = this;
}
function hit(_m) {
if (!bIn) {
inPipe(_m);
return(true);
}
}
function inPipe(_m) {
bIn = true;
Global.GAME.pHead.addNeck(3);
pTwin.outPipe(_m);
}
function outPipe(_m) {
bIn = true;
_m._x = _x;
_m._y = _y;
_m.nSpeed = 0;
Common.addClip("mS", Global.GAME, {_x:_x, _y:_y});
}
}
Symbol 253 MovieClip [__Packages.Fwg.Neck] Frame 0
class Fwg.Neck extends MovieClip
{
var vCurr, _rotation, vDir, gotoAndStop, vPrev, nFrame, _x, _y;
function Neck () {
super();
}
function init() {
if ((Math.abs(Global.GAME.pHead.aNeck[Global.GAME.pHead.aNeck.length - 2].vCurr.x - vCurr.x) + Math.abs(Global.GAME.pHead.aNeck[Global.GAME.pHead.aNeck.length - 2].vCurr.y - vCurr.y)) > 2) {
_rotation = ((vDir.x != 0) ? (90 + (vDir.x * 90)) : ((-vDir.y) * 90));
(gotoAndStop(3));// not popped
} else if (vDir.equal(vPrev.x, vPrev.y)) {
_rotation = ((vDir.x != 0) ? (90 - (vDir.x * 90)) : (vDir.y * 90));
if (nFrame == undefined) {
(gotoAndStop(1));// not popped
} else {
(gotoAndStop(3));// not popped
}
} else {
_rotation = int((Math.atan2(vDir.y - vPrev.y, vDir.x - vPrev.x) * Common.a2r) + 45);
(gotoAndStop(2));// not popped
}
_x = vCurr.x * Game.nTile_width;
_y = vCurr.y * Game.nTile_width;
}
}
Symbol 254 MovieClip [__Packages.PopUp] Frame 0
class PopUp extends MovieClip
{
var _y, _x, sFrame, attachMovie, aSt, gotoAndStop, nWidth, bt_N, bt_Y, bt_X, tT_0, nHeight, tT_2, tT_1, mBar, stop, removeMovieClip;
function PopUp () {
super();
}
function init() {
if (_y == 0) {
_x = Global.WIDTH / 2;
_y = Global.HEIGHT / 2;
}
if (bScreen) {
Common.enabledFor(true, this, _root, -16384);
} else {
Common.enabledFor(true, this, this, -16384);
}
switch (sFrame) {
case "y_n" :
attachMovie("Btn", "bt_X", 10, {sTxt:"X", autoSize:"right"});
attachMovie("Btn", "bt_Y", 9, {sTxt:((aSt[1] == undefined) ? "YES" : (aSt[1]))});
attachMovie("Btn", "bt_N", 8, {sTxt:((aSt[2] == undefined) ? "NO" : (aSt[2])), autoSize:"right"});
attachMovie("Txt", "tT_0", 7, {sTxt:((aSt[0] == undefined) ? "TXT" : (aSt[0])), autoSize:"center", bCustom:true, obCustom:{multiline:true, wordWrap:true}});
break;
case "ok" :
attachMovie("Btn", "bt_X", 10, {sTxt:"X", autoSize:"right"});
attachMovie("Btn", "bt_Y", 9, {sTxt:((aSt[1] == undefined) ? "OK" : (aSt[1])), autoSize:"center"});
attachMovie("Txt", "tT_0", 7, {sTxt:((aSt[0] == undefined) ? "TXT" : (aSt[0])), autoSize:"center", bCustom:true, obCustom:{multiline:true, wordWrap:true}});
break;
case "submit" :
attachMovie("Btn", "bt_X", 10, {sTxt:"X", autoSize:"right"});
attachMovie("Btn", "bt_Y", 9, {sTxt:"SUBMIT", autoSize:"center"});
attachMovie("Txt", "tT_0", 8, {sTxt:"NAME :"});
attachMovie("Txt", "tT_1", 7, {sTxt:"SCORE :" + ((aSt[1] == undefined) ? 0 : (aSt[1]))});
attachMovie("Txt", "tT_2", 6, {sTxt:((aSt[0] == undefined) ? "YOUR NAME" : (aSt[0])), bCustom:true, obCustom:{type:"input", selectable:true, maxChars:9, restrict:"^ ", border:true, borderColor:16777215}});
break;
case "message" :
attachMovie("Txt", "tT_0", 10, {sTxt:((aSt[0] == undefined) ? "TXT" : (aSt[0])), autoSize:"center"});
break;
}
(gotoAndStop(2));// not popped
}
function inFrame() {
switch (sFrame) {
case "y_n" :
nWidth = int(Math.max(220, (bt_Y._width + bt_N._width) + (nOffset_x * 3)));
bt_X._x = int(((nWidth / 2) - nBorder) - Btn.nBorder);
bt_Y._x = int(((-nWidth) / 2) + nOffset_x);
tT_0._x = 0;
tT_0.obCustom._width = nWidth - (nOffset_x * 2);
tT_0.replace();
nHeight = int(Math.max(100, tT_0.tTxt.textHeight + (nOffset_x * 3)));
bt_X._y = int(((-nHeight) / 2) - nBorder);
bt_Y._y = (bt_N._y = int((nHeight / 2) - nOffset_x));
tT_0._y = -int((nOffset_x / 2) + (tT_0.tTxt.textHeight / 2));
bt_Y.release = function () {
if (this._parent.rtFun(true)) {
this._parent.remove();
}
};
bt_N.release = function () {
if (this._parent.rtFun(false)) {
this._parent.remove();
}
};
break;
case "ok" :
nWidth = 220;
bt_X._x = int(((nWidth / 2) - nBorder) - Btn.nBorder);
bt_Y._x = 0;
tT_0._x = 0;
tT_0.obCustom._width = nWidth - (nOffset_x * 2);
tT_0.replace();
nHeight = int(Math.max(100, tT_0.tTxt.textHeight + (nOffset_x * 3)));
bt_X._y = int(((-nHeight) / 2) - nBorder);
bt_Y._y = int((nHeight / 2) - (nOffset_x * 2));
tT_0._y = -int((nOffset_x / 2) + (tT_0.tTxt.textHeight / 2));
bt_Y.release = function () {
if (this._parent.rtFun(true)) {
this._parent.remove();
}
};
break;
case "submit" :
nWidth = int(Math.max(220, (tT_1.tTxt.textWidth + tT_2.tTxt.textWidth) + (nOffset_x * 2)));
bt_X._x = int(((nWidth / 2) - nBorder) - Btn.nBorder);
tT_0._x = (tT_1._x = int(((-nWidth) / 2) + nOffset_x));
tT_2._x = (tT_0._x + tT_0.tTxt.textWidth) + nBorder;
nHeight = int(nOffset_x * 5);
bt_X._y = int(((-nHeight) / 2) - nBorder);
bt_Y._y = int((nHeight / 2) - (nOffset_x * 2));
tT_0._y = int(((-nHeight) / 2) + nOffset_x);
tT_1._y = int(((-nHeight) / 2) + (nOffset_x * 2));
tT_2._y = int(((-nHeight) / 2) + nOffset_x);
bt_Y.release = function () {
var _local3 = this._parent.tT_2.getTxt();
if (_local3.length > 0) {
Global.SUBMIT(_local3, this._parent.aSt[1]);
Global.mTemp = Common.addClip("PopUp", _root, {sFrame:"message", aSt:["Sending..."]});
Global.SUBMITEND = function () {
Global.mTemp.remove();
var _local2 = Common.addClip("PopUp", _root, {sFrame:"ok", aSt:["Highscore Received!\nView Highscore?"]});
_local2.rtFun = function (_b) {
if (_b) {
Global.VIEWSCORE();
}
return(true);
};
};
this._parent.remove();
} else {
Common.addClip("PopUp", _root, {sFrame:"ok", aSt:["Enter a name please!"]});
}
};
break;
case "message" :
nWidth = 220;
tT_0._x = 0;
tT_0.obCustom._width = nWidth - (nOffset_x * 2);
tT_0.replace();
nHeight = int(Math.max(100, tT_0.tTxt.textHeight + (nOffset_x * 2)));
tT_0._y = -int((nOffset_x / 2) + (tT_0.tTxt.textHeight / 2));
break;
}
bt_X.release = function () {
this._parent.rtFun(false);
this._parent.remove();
};
mBar._width = nWidth;
mBar._height = nHeight;
mBar._x = (-nWidth) / 2;
mBar._y = (-nHeight) / 2;
(stop());// not popped
}
function rtFun(_b) {
return(true);
}
function remove() {
removeMovieClip();
}
static var nBorder = 4;
static var nOffset_x = 24;
var bScreen = true;
}
Symbol 255 MovieClip [__Packages.Btn] Frame 0
class Btn extends MovieClip
{
var onRollOver, onDragOut, onRollOut, onPress, onReleaseOutside, onRelease, __bGray, sTxt, hitArea, tTxt, bIn, bDown, gotoAndStop, mAni, _xscale;
function Btn () {
super();
onRollOver = function () {
this.bIn = true;
this.replace();
this.rollOver(this.bGray);
};
onDragOut = (onRollOut = function () {
this.bIn = false;
this.replace();
});
onPress = function () {
this.bDown = true;
this.replace();
this.press(this.bGray);
};
onReleaseOutside = (onRelease = function () {
this.bDown = false;
this.replace();
this.release(this.bGray);
});
}
function get bGray() {
return(__bGray);
}
function set bGray(_bGray) {
if (__bGray != _bGray) {
__bGray = _bGray;
gray(this, __bGray);
}
//return(bGray);
}
function init(_sTxt) {
if (_sTxt != "undefined") {
sTxt = _sTxt;
}
hitArea = tTxt;
replace();
}
function replace() {
var _local2;
if (bIn && (bDown)) {
_local2 = "Down";
} else if (bIn || (bDown)) {
_local2 = "Over";
} else {
_local2 = "Up";
}
(gotoAndStop(_local2));// not popped
mAni.gotoAndStop(_local2);
tTxt.autoSize = autoSize;
if (autoSize == "right") {
tTxt._x = -Math.floor(tTxt._width);
} else if (autoSize == "center") {
tTxt._x = -Math.floor(tTxt._width / 2);
} else {
tTxt._x = 0;
}
if (!bAni) {
mAni._visible = false;
} else {
mAni._width = tTxt._width + (nBorder * 2);
mAni._height = Math.round(tTxt._height);
mAni._x = tTxt._x - nBorder;
if (bMask) {
mAni.setMask(tTxt);
}
if (_xscale > 200) {
mAni.gotoAndStop(1);
}
}
}
static function gray(_m, _b) {
if (_b) {
_m.filters = [new flash.filters.ColorMatrixFilter([0.308600038290024, 0.609399974346161, 0.0820000022649765, 0, 0, 0.308600008487701, 0.609399974346161, 0.0820000022649765, 0, 0, 0.308600008487701, 0.609399974346161, 0.0820000246167183, 0, 0, 0, 0, 0, 1, 0])];
} else {
_m.filters = [];
}
}
function press(_b) {
}
function release(_b) {
}
function rollOver(_b) {
}
static var nBorder = 0;
var autoSize = "left";
var bAni = true;
var bMask = true;
}
Symbol 256 MovieClip [__Packages.Txt] Frame 0
class Txt extends MovieClip
{
var sTxt, bCustom, obCustom, tTxt, sVariable, nColor;
function Txt () {
super();
}
function init(_sTxt) {
if (_sTxt != "undefined") {
sTxt = _sTxt;
}
replace();
}
function replace() {
if (bCustom) {
for (var _local2 in obCustom) {
if (obCustom[_local2] != undefined) {
tTxt[_local2] = obCustom[_local2];
}
}
if (tTxt.type == "input") {
Selection.setFocus(tTxt);
}
}
if (sVariable.length != 0) {
tTxt.variable = sVariable;
}
tTxt.autoSize = autoSize;
if (autoSize == "right") {
tTxt._x = -Math.floor(tTxt._width);
} else if (autoSize == "center") {
tTxt._x = -Math.floor(tTxt._width / 2);
} else {
tTxt._x = 0;
}
tTxt.text = sTxt;
if (!isNaN(nColor)) {
tTxt.textColor = nColor;
}
}
function getTxt() {
return(tTxt.text);
}
var autoSize = "left";
}
Symbol 257 MovieClip [__Packages.Fwg.Head] Frame 0
class Fwg.Head extends MovieClip
{
var nSpeed, vDir, vPrev, vSpeed, vV, aNeck, vCurr, aP, _visible, mHead, mM, _x, _y, _rotation, _yscale, bSp, bKey;
function Head () {
super();
nSpeed = 0;
vDir = new Vector(0, 1);
vPrev = new Vector(0, 1);
vSpeed = new Vector();
vV = new Vector();
aNeck = new Array();
vCurr = new Vector();
aP = new Array();
}
function init() {
_visible = false;
}
function onEnterFrame() {
if (!Global.GAME.bPause) {
if (random(100) > 96) {
mHead.play();
}
if (aP[0] != undefined) {
for (var _local3 in aP) {
var _local2 = aP[_local3];
_local2.nTime--;
if ((_local2.nTime % 3) == 0) {
aNeck[_local2.nNeck].mC.gotoAndStop(1);
_local2.nNeck--;
aNeck[_local2.nNeck].mC.gotoAndStop(2);
}
if (_local2.nNeck <= 0) {
aNeck[_local2.nNeck].mC.gotoAndStop(1);
aP.splice(_local3, 1);
}
}
}
if (nSpeed != 0) {
mM.play();
_x = _x + vSpeed.x;
_y = _y + vSpeed.y;
if (_x > Global.WIDTH) {
_x = _x - (Global.WIDTH + vSpeed.x);
} else if (_x < 0) {
_x = _x + (Global.WIDTH - vSpeed.x);
} else if (_y < 80) {
Global.GAME.nextLevel();
}
}
key();
if (((_x % Game.nTile_width) == 0) && ((_y % Game.nTile_width) == 0)) {
var _local4 = int(((vDir.x != 0) ? (90 - (vDir.x * 90)) : (vDir.y * 90)));
if (_rotation != _local4) {
_rotation = _local4;
_yscale = ((vDir.x != 0) ? (vDir.x * 100) : 100);
}
vCurr.setTo(Math.round(_x / Game.nTile_width), Math.round(_y / Game.nTile_width));
bSp = false;
if (!hitGround(Global.GAME.mGround.mDown, _x + (vDir.x * Game.nTile_width), _y + (vDir.y * Game.nTile_width))) {
bKey = false;
} else if (hitGround(Global.GAME.mGround.mMid, _x + (vDir.x * Game.nTile_width), _y + (vDir.y * Game.nTile_width))) {
bKey = false;
bSp = true;
}
if (hitGround(Global.GAME.mGround.mBack, _x, _y)) {
if (ckHit(Global.GAME.mGround.mBack)) {
return(undefined);
}
}
if (!bKey) {
nSpeed = 0;
} else {
addNeck();
vSpeed = vDir.multNew(nSpeed);
}
if (bSp && (Key.isDown(32))) {
}
}
}
}
function addP() {
aP.push({nTime:300, nNeck:aNeck.length - 1});
}
function key() {
if (((Key.isDown(38) || (Key.isDown(40))) || (Key.isDown(37))) || (Key.isDown(39))) {
if (Key.isDown(38)) {
vDir.setTo(0, -1);
} else if (Key.isDown(40)) {
vDir.setTo(0, 1);
} else if (Key.isDown(37)) {
vDir.setTo(-1, 0);
} else if (Key.isDown(39)) {
vDir.setTo(1, 0);
}
nSpeed = 4;
bKey = true;
} else {
bKey = false;
}
}
function hitGround(_m, xt, yt) {
if (_m.hitTest(xt, yt, true)) {
return(true);
}
return(false);
}
function ckHit(_m) {
var _local3 = false;
for (var _local4 in _m) {
if (_m[_local4].hitTest(_x, _y, true)) {
if (_m[_local4].hit(this)) {
_local3 = true;
}
}
}
return(_local3);
}
function addNeck(_n) {
var _local2 = Global.GAME.mGround.mMid.getNextHighestDepth();
aNeck.push(Global.GAME.mGround.mMid.attachMovie("Fwg.Neck", "mNeck" + _local2, _local2, {_x:_x, _y:_y, vDir:vDir.clone(), vPrev:vPrev.clone(), vCurr:vCurr.clone(), nFrame:_n}));
vPrev.copy(vDir);
}
function removeNeck() {
for (var _local2 in aNeck) {
if ((aNeck[_local2].vCurr.x != (vCurr.x + vDir.x)) || (aNeck[_local2].vCurr.y != (vCurr.y + vDir.y))) {
aNeck[_local2].removeMovieClip();
aNeck.splice(_local2, 1);
} else {
break;
}
}
aNeck[_local2].vDir = vDir.multNew(-1);
aNeck[_local2].init();
vPrev.copy(aNeck[_local2].vDir);
}
}
Symbol 37 MovieClip Frame 1
_x = (Stage.width / 2);
_y = (Stage.height / 2);
if (bOpen) {
_root.stop();
onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
} else {
this._visible = false;
}
Symbol 37 MovieClip Frame 114
stop();
onEnterFrame = function () {
if (_alpha <= 0) {
_parent.play();
delete onEnterFrame;
} else {
_alpha = (_alpha - 5);
}
};
Symbol 38 MovieClip [mB] Frame 1
onEnterFrame = function () {
do {
if ((in Global.GAME.mGround.mBack) == null) {
break;
}
var _local1 = in Global.GAME.mGround.mBack;
} while (!Global.GAME.mGround.mBack[_local1].over());
do {
} while ("onEnterFrame" != null);
};
Symbol 42 MovieClip Frame 2
stop();
Symbol 46 MovieClip [Btn] Frame 1
#initclip 26
Object.registerClass("Btn", Btn);
#endinitclip
var sTemp;
sTemp = typeof(eval (_sTxt));
if (sTemp == "function") {
_sTxt = eval (_sTxt)();
} else if ((sTemp == "string") || (sTemp == "number")) {
_sTxt = eval (_sTxt);
} else {
_sTxt = String(_sTxt);
}
delete sTemp;
init(_sTxt);
Instance of Symbol 46 MovieClip [Btn] in Symbol 47 MovieClip [mSet] Frame 1
//component parameters
onClipEvent (construct) {
_sTxt = "MUSIC";
autoSize = "right";
bAni = true;
bMask = true;
}
onClipEvent (load) {
bGray = Global.MUSIC.getVolume() != 100;
}
on (press) {
if (Global.MUSIC.getVolume() != 100) {
bGray = false;
Global.MUSIC.setVolume(100);
} else {
bGray = true;
Global.MUSIC.setVolume(0);
}
Global.GAME.bPause = false;
Global.GAME.mSet.removeMovieClip();
Global.GAME.mSet = undefined;
delete Global.GAME.mSet;
}
Instance of Symbol 46 MovieClip [Btn] in Symbol 47 MovieClip [mSet] Frame 1
//component parameters
onClipEvent (construct) {
_sTxt = "SOUND";
autoSize = "right";
bAni = true;
bMask = true;
}
onClipEvent (load) {
bGray = Global.SOUND.getVolume() != 100;
}
on (press) {
if (Global.SOUND.getVolume() != 100) {
bGray = false;
Global.SOUND.setVolume(100);
} else {
bGray = true;
Global.SOUND.setVolume(0);
}
Global.GAME.bPause = false;
Global.GAME.mSet.removeMovieClip();
Global.GAME.mSet = undefined;
delete Global.GAME.mSet;
}
Instance of Symbol 46 MovieClip [Btn] in Symbol 47 MovieClip [mSet] Frame 1
//component parameters
onClipEvent (construct) {
_sTxt = "_root._quality";
autoSize = "right";
bAni = true;
bMask = true;
}
on (press) {
sTxt = Common.changeQ();
Global.GAME.bPause = false;
Global.GAME.mSet.removeMovieClip();
Global.GAME.mSet = undefined;
delete Global.GAME.mSet;
}
Instance of Symbol 46 MovieClip [Btn] in Symbol 47 MovieClip [mSet] Frame 1
//component parameters
onClipEvent (construct) {
_sTxt = "QUIT GAME";
autoSize = "right";
bAni = true;
bMask = true;
}
on (press) {
Common.mask();
Global.GAME.gotoAndStop("menu");
Global.GAME.bPause = false;
Global.GAME.mSet.removeMovieClip();
Global.GAME.mSet = undefined;
delete Global.GAME.mSet;
}
Instance of Symbol 46 MovieClip [Btn] in Symbol 48 MovieClip [Fwg.Bar] Frame 1
//component parameters
onClipEvent (construct) {
_sTxt = "MENU";
autoSize = "left";
bAni = true;
bMask = false;
}
on (press) {
Common.mask();
Global.GAME.gotoAndStop("menu");
}
Symbol 53 MovieClip [Fwg.Pass] Frame 1
#initclip 17
Object.registerClass("Fwg.Pass", Fwg.Pass);
#endinitclip
init();
Symbol 60 MovieClip Frame 1
_x = random(620);
_y = (random(350) + 150);
_rotation = random(360);
Symbol 62 MovieClip Frame 1
_x = random(620);
_y = (random(350) + 150);
_rotation = random(360);
Symbol 68 MovieClip Frame 18
Global.GAME.pHead._visible = true;
Global.GAME.bPause = false;
stop();
Symbol 85 MovieClip [mBoom] Frame 22
Global.playSound("sdEgg");
Common.removeFixMc(_parent);
Symbol 86 MovieClip [Fwg.Power_0] Frame 1
#initclip 18
Object.registerClass("Fwg.Power_0", Fwg.Power_0);
#endinitclip
init();
Symbol 86 MovieClip [Fwg.Power_0] Frame 2
stop();
Symbol 97 MovieClip Frame 1
stop();
Symbol 114 MovieClip [Fwg.Mice] Frame 1
#initclip 19
Object.registerClass("Fwg.Mice", Fwg.Mice);
#endinitclip
init();
Symbol 117 MovieClip [Fwg.Pipe] Frame 1
#initclip 20
Object.registerClass("Fwg.Pipe", Fwg.Pipe);
#endinitclip
init();
Instance of Symbol 10 MovieClip [Logo] in Symbol 131 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
bUrl = true;
}
Symbol 134 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 1
stop();
Symbol 140 MovieClip [Fwg.Neck] Frame 1
#initclip 21
Object.registerClass("Fwg.Neck", Fwg.Neck);
#endinitclip
init();
Symbol 148 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 1
Instance of Symbol 148 MovieClip in Symbol 159 MovieClip Frame 1
onClipEvent (enterFrame) {
if (random(100) > 97) {
play();
}
}
Instance of Symbol 157 MovieClip in Symbol 159 MovieClip Frame 1
onClipEvent (enterFrame) {
if (random(100) > 97) {
play();
}
}
Symbol 164 MovieClip Frame 1
function replace() {
var _local1;
if (bIn && (bDown)) {
_local1 = "Down";
} else if (bIn || (bDown)) {
_local1 = "Over";
} else {
_local1 = "Up";
}
gotoAndStop(_local1);
tTxt.autoSize = (bLeft ? "left" : "right");
if (tTxt.autoSize == "right") {
tTxt._x = -Math.floor(tTxt._width);
} else {
tTxt._x = 0;
}
}
var aWord = new Array("", "Copyright 2007 freeworldgroup.com V 1.00", "Credits");
var sTxt;
var bTop;
var bLeft;
var bIn = false;
var bDown = false;
switch (sSelect) {
case "visonNumber" :
sTxt = aWord[0];
break;
case "copyright" :
sTxt = aWord[1];
break;
case "credits" :
sTxt = aWord[2];
}
if (bTop) {
_y = 0;
} else {
_y = ((Global.HEIGHT - tTxt.textHeight) - 5);
}
if (bLeft) {
_x = 0;
} else {
_x = Global.WIDTH;
}
onRollOver = function () {
bIn = true;
replace();
};
onDragOut = (onRollOut = function () {
bIn = false;
replace();
});
onPress = function () {
bDown = true;
replace();
};
onReleaseOutside = (onRelease = function () {
bDown = false;
replace();
});
replace();
hitArea = tTxt;
Symbol 165 MovieClip Frame 1
nextFrame();
Symbol 165 MovieClip Frame 2
_y = 0;
_x = 0;
Instance of Symbol 164 MovieClip in Symbol 165 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
sSelect = "visonNumber";
bTop = true;
bLeft = true;
}
Instance of Symbol 164 MovieClip in Symbol 165 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
sSelect = "credits";
bTop = false;
bLeft = false;
}
on (press) {
Common.mask();
Global.GAME.gotoAndStop("credits");
}
Instance of Symbol 164 MovieClip in Symbol 165 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
sSelect = "copyright";
bTop = false;
bLeft = true;
}
on (press) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 173 Button
on (release) {
getURL ("http://www.freeworldgroup.com/games6/gameindex/elephantbelow.htm", "_blank");
}
Symbol 179 Button
on (release) {
getURL ("http://www.freeworldgroup.com/games6/gameindex/giraffe-above.htm", "_blank");
}
Symbol 198 MovieClip Frame 1
function reset() {
_rotation = (90 * (!horizontal));
btMid._x = nNow;
btLeft._x = (-btMid._width) / 2;
btRight._x = (btMid._width / 2) + nMax;
btBack._x = (-btMid._width) / 2;
btBack._width = nMax + btMid._width;
btMid._y = (btBack._y = (btRight._y = (btLeft._y = 0)));
}
function dir_hold(vx) {
if ((nTimeNow == 0) || (nTimeNow == nTimeMax)) {
if (vx != 0) {
btMid._x = btMid._x + (nPer * vx);
} else {
btMid._x = btMid._x - (Common.vpNum(btMid._x - _xmouse) * btMid._width);
}
if (btMid._x < 0) {
btMid._x = 0;
} else if (btMid._x > nMax) {
btMid._x = nMax;
}
nNow = btMid._x;
}
(nTimeNow < nTimeMax) && (nTimeNow++);
}
function getTop() {
return(btLeft._width + (btMid._width / 2));
}
function getSide() {
return(btMid._height / 2);
}
function getValue() {
return(int(nNow));
}
function setValue(n) {
nNow = n;
reset();
}
if (typeof(eval (nNow)) == "function") {
nNow = eval (nNow)();
} else if (typeof(eval (nNow)) == "number") {
nNow = eval (nNow);
} else {
nNow = Number(nNow);
}
var nMax;
var horizontal;
var nPer;
var bAutoSiza;
var nTimeMax = 15;
var nTimeNow = 0;
var bRoll = false;
btMid.onPress = function () {
startDrag (this, false, 0, 0, this._parent.nMax, 0);
with (this._parent) {
bRoll = true;
onEnterFrame = function () {
nNow = btMid._x;
onhold(0);
};
}
};
btBack.onPress = function () {
with (this._parent) {
bRoll = true;
onEnterFrame = function () {
dir_hold(0);
onhold(2);
};
}
};
btRight.onPress = function () {
with (this._parent) {
bRoll = true;
onEnterFrame = function () {
dir_hold(1);
onhold(1);
};
}
};
btLeft.onPress = function () {
with (this._parent) {
bRoll = true;
onEnterFrame = function () {
dir_hold(-1);
onhold(-1);
};
}
};
btMid.onReleaseOutside = (btMid.onRelease = function () {
stopDrag();
with (this._parent) {
bRoll = false;
delete onEnterFrame;
onreleas(0);
}
});
btBack.onDragOut = (btBack.onRelease = function () {
with (this._parent) {
bRoll = false;
delete onEnterFrame;
onreleas(2);
nTimeNow = 0;
}
});
btLeft.onReleaseOutside = (btLeft.onRelease = (btRight.onReleaseOutside = (btRight.onRelease = function () {
with (this._parent) {
bRoll = false;
delete onEnterFrame;
onreleas(1);
nTimeNow = 0;
}
})));
reset();
Symbol 199 MovieClip Frame 1
function auto() {
if (bRoll && (mContent._y > (nHeight - mContent._height))) {
mContent._y = mContent._y - nRoll_speed;
ScrollBar.setValue(((-mContent._y) / (mContent._height - nHeight)) * nHeight);
}
}
_visible = false;
var nWidth;
var nHeight;
var nTime_id;
var nInterval;
var nRoll_speed;
var bRoll = true;
mMask._width = nWidth;
mMask._height = nHeight;
Instance of Symbol 198 MovieClip "ScrollBar" in Symbol 199 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
nMax = 100;
nNow = 0;
horizontal = false;
nPer = 1;
}
Symbol 199 MovieClip Frame 2
stop();
_visible = true;
ScrollBar._x = nWidth + ScrollBar.getSide();
ScrollBar._y = 0;
ScrollBar.nMax = nHeight;
ScrollBar.reset();
ScrollBar.onhold = function () {
bRoll = false;
mContent._y = -((this.getValue() / nHeight) * (mContent._height - nHeight));
};
ScrollBar.onreleas = function () {
bRoll = true;
};
nTime_id = setInterval(this, "auto", nInterval);
Symbol 207 Button
on (release) {
getURL ("http://www.freeworldgroup.com/games6/gameindex/elephantbelow.htm", "_blank");
}
Symbol 212 Button
on (release) {
getURL ("http://www.freeworldgroup.com/games6/gameindex/giraffe-above.htm", "_blank");
}
Symbol 219 MovieClip [Game] Frame 1
#initclip 22
Object.registerClass("Game", Game);
#endinitclip
init();
Symbol 219 MovieClip [Game] Frame 5
inMenu();
Instance of Symbol 10 MovieClip [Logo] in Symbol 219 MovieClip [Game] Frame 5
//component parameters
onClipEvent (construct) {
bUrl = true;
}
Instance of Symbol 46 MovieClip [Btn] in Symbol 219 MovieClip [Game] Frame 5
//component parameters
onClipEvent (construct) {
_sTxt = "OSTRICH";
autoSize = "left";
bAni = true;
bMask = true;
}
onClipEvent (load) {
enabled = false;
}
Instance of Symbol 46 MovieClip [Btn] in Symbol 219 MovieClip [Game] Frame 5
//component parameters
onClipEvent (construct) {
_sTxt = "UNDERGROUND";
autoSize = "left";
bAni = true;
bMask = true;
}
onClipEvent (load) {
enabled = false;
}
Symbol 219 MovieClip [Game] Frame 13
inCredits();
Instance of Symbol 46 MovieClip [Btn] in Symbol 219 MovieClip [Game] Frame 13
//component parameters
onClipEvent (construct) {
_sTxt = "MENU";
autoSize = "left";
bAni = true;
bMask = true;
}
on (press) {
Common.mask();
Global.GAME.gotoAndStop("menu");
}
Instance of Symbol 46 MovieClip [Btn] in Symbol 219 MovieClip [Game] Frame 13
//component parameters
onClipEvent (construct) {
_sTxt = "By Soothsage";
autoSize = "center";
bAni = true;
bMask = true;
}
onClipEvent (load) {
enabled = false;
}
Instance of Symbol 46 MovieClip [Btn] in Symbol 219 MovieClip [Game] Frame 13
//component parameters
onClipEvent (construct) {
_sTxt = "Turn and Burn";
autoSize = "center";
bAni = true;
bMask = true;
}
onClipEvent (load) {
enabled = false;
}
Instance of Symbol 10 MovieClip [Logo] in Symbol 219 MovieClip [Game] Frame 13
//component parameters
onClipEvent (construct) {
bUrl = true;
}
Symbol 219 MovieClip [Game] Frame 17
inHelp();
Instance of Symbol 46 MovieClip [Btn] in Symbol 219 MovieClip [Game] Frame 17
//component parameters
onClipEvent (construct) {
_sTxt = "MENU";
autoSize = "center";
bAni = true;
bMask = true;
}
on (press) {
Common.mask();
Global.GAME.gotoAndStop("menu");
}
Instance of Symbol 199 MovieClip in Symbol 219 MovieClip [Game] Frame 17
//component parameters
onClipEvent (construct) {
nWidth = 540;
nHeight = 250;
nInterval = 100;
nRoll_speed = 1;
}
Symbol 219 MovieClip [Game] Frame 21
inGameOver();
Symbol 219 MovieClip [Game] Frame 25
inNext();
Symbol 219 MovieClip [Game] Frame 29
inSetting();
Symbol 219 MovieClip [Game] Frame 33
inLoading();
Symbol 219 MovieClip [Game] Frame 37
inPlaying();
Symbol 219 MovieClip [Game] Frame 41
inGameWin();
Instance of Symbol 10 MovieClip [Logo] in Symbol 219 MovieClip [Game] Frame 41
//component parameters
onClipEvent (construct) {
bUrl = true;
}
Symbol 221 MovieClip [mBarr] Frame 1
onPress = function () {
};
useHandCursor = false;
Symbol 222 MovieClip [PopUp] Frame 1
#initclip 23
Object.registerClass("PopUp", PopUp);
#endinitclip
init();
Symbol 222 MovieClip [PopUp] Frame 2
inFrame();
Symbol 224 MovieClip [Txt] Frame 1
#initclip 24
Object.registerClass("Txt", Txt);
#endinitclip
var a = [];
a.push(new flash.filters.GlowFilter(0, 1, 2, 2, 4, 1, false, false));
this.filters = a;
var sTemp = typeof(eval (_sTxt));
if (sTemp == "function") {
_sTxt = eval (_sTxt)();
} else if ((sTemp == "string") || (sTemp == "number")) {
_sTxt = eval (_sTxt);
} else {
_sTxt = String(_sTxt);
}
init(_sTxt);
Symbol 228 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 1
stop();
Symbol 233 MovieClip Frame 1
stop();
Symbol 234 MovieClip [Fwg.Head] Frame 1
#initclip 25
Object.registerClass("Fwg.Head", Fwg.Head);
#endinitclip
init();
Symbol 237 MovieClip [mS] Frame 20
stop();
this.removeMovieClip();
Symbol 240 MovieClip Frame 1
stop();
Instance of Symbol 10 MovieClip [Logo] in Symbol 240 MovieClip Frame 13
//component parameters
onClipEvent (construct) {
bUrl = true;
}
Instance of Symbol 46 MovieClip [Btn] in Symbol 240 MovieClip Frame 14
//component parameters
onClipEvent (construct) {
_sTxt = "BUTTON";
autoSize = "left";
bAni = true;
bMask = false;
}
Instance of Symbol 224 MovieClip [Txt] in Symbol 240 MovieClip Frame 15
//component parameters
onClipEvent (construct) {
_sTxt = "TXT";
sVariable = "";
nColor = 16777215 /* 0xFFFFFF */;
autoSize = "left";
bCustom = false;
obCustom = {};
obCustom._width = 100;
obCustom.multiline = false;
obCustom.wordWrap = false;
obCustom.type = "input";
obCustom.maxChars = 6;
obCustom.restrict = "^ ";
obCustom.selectable = true;
obCustom.border = true;
obCustom.borderColor = "0xffffff";
obCustom.background = true;
obCustom.backgroundColor = "0x000000";
obCustom.html = false;
}
Symbol 242 MovieClip Frame 1
stopAllSounds();
Global.MUSIC = new Sound(this);
this._visible = false;
Symbol 242 MovieClip Frame 2
stop();