Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "_mochibot_";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("ec2b6b82", this, 10301, true);
__com_mochibot__("66bb3518", this, 10301, true);
var MochiAd = {getVersion:function () {
return("2.7");
}, showPreGameAd:function (options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = MochiAd._parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = MochiAd._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 _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.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 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_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 _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
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.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_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;
}
}
};
}, showClickAwayAd:function (options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = MochiAd._parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = MochiAd._getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
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")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}, showInterLevelAd:function (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();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = MochiAd._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 (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = MochiAd._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 = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
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) {
options.ad_failed();
_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;
}
}
};
}, showPreloaderAd:function (options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(options);
}, showTimedAd:function (options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(options);
}, _allowDomains:function (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);
}, load:function (options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = MochiAd.getVersion();
var _local9 = options.clip;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = MochiAd._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 = MochiAd._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);
}, unload:function (clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}, _isNetworkAvailable:function () {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}, _getRes:function (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]);
}, _parseOptions:function (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++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}, rpc:function (clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
MochiAd.setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = MochiAd.getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = MochiAd.runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}, setValue:function (base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}, getValue:function (base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}, runMethod:function (base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}, _:null};
MochiAd.showPreGameAd({id:"9b466bcf4c237965", res:"640x350"});
Frame 2
function onGameLoadProgress() {
var _local2 = Math.floor((this.getBytesLoaded() / this.getBytesTotal()) * 100);
writeText(this.playButton.buttonText, ("LOADING " + _local2) + "%");
if (_local2 >= 100) {
delete this.onEnterFrame;
this.onGameLoadComplete();
}
}
function onGameLoadComplete() {
this.playButton.gotoAndStop(2);
writeText(this.playButton.buttonText, "PLAY GRID");
this.playButton.onRollOver = mx.utils.Delegate.create(this, onRollOverHandler);
this.playButton.onRollOut = (this.playButton.onDragOut = mx.utils.Delegate.create(this, onRollOutHandler));
this.playButton.onRelease = mx.utils.Delegate.create(this, onReleaseHandler);
}
function init() {
this.gotoAndPlay("preload");
}
function onRollOverHandler() {
com.caurina.transitions.Tweener.addTween(this.playButton, {_xscale:175, _yscale:175, time:0.5, transition:"easeOutExpo"});
}
function onRollOutHandler() {
com.caurina.transitions.Tweener.addTween(this.playButton, {_xscale:145, _yscale:145, time:0.5, transition:"easeOutExpo"});
}
function onReleaseHandler() {
this.stinger3D.destroy();
this.init();
}
function showButton() {
trace("SHOW BUTTON");
var _local3 = this.playButton._xscale;
var _local2 = this.playButton._yscale;
this.playButton._xscale = 0;
this.playButton._yscale = 0;
com.caurina.transitions.Tweener.addTween(this.playButton, {_xscale:_local3, _yscale:_local2, time:1});
this.playButton._visible = true;
}
function loadAudio() {
trace("PLAY AUDIO");
var _local1 = new Sound();
_local1.attachSound("cs_audio");
_local1.start();
}
function writeText(textfield, str) {
var _local1 = textfield.getTextFormat();
_local1.bold = true;
textfield.text = str;
textfield.setTextFormat(_local1);
}
var GAME_NAMES = ["Vector TD2", "Headcase", "Insurgo", "Jetboost", "Linegolfer", "Good Ol' Poker", "Polarity", "Pow Pool", "Streetball Jam", "Slipstream", "GP Team Challenge", "Hockey Face-Off", "Candystand Baseball", "Flash Circle TD", "Gemworks", "Monster Trucks", "RC Rally Reloaded", "Roaring Waves", "Spherez", "Ultimate Raceway"];
var GAME_LINKS = ["http://www.candystand.com/play.do?id=18281", "http://www.candystand.com/play.do?id=18252", "http://www.candystand.com/play.do?id=18303", "http://www.candystand.com/play.do?id=18189", "http://www.candystand.com/play.do?id=18253", "http://www.candystand.com/play.do?id=18316", "http://www.candystand.com/play.do?id=17986", "http://www.candystand.com/play.do?id=18201", "http://www.candystand.com/play.do?id=18309", "http://www.candystand.com/play.do?id=18290", "http://www.candystand.com/play.do?id=18049", "http://www.candystand.com/play.do?id=18209", "http://www.candystand.com/play.do?id=18210", "http://www.candystand.com/play.do?id=17995", "http://www.candystand.com/play.do?id=18317", "http://www.candystand.com/play.do?id=17974", "http://www.candystand.com/play.do?id=18193", "http://www.candystand.com/play.do?id=18286", "http://www.candystand.com/play.do?id=17994", "http://www.candystand.com/play.do?id=18254"];
var GAME_ID = 18473;
this.stop();
this.playButton.tabEnabled = false;
this.playButton.visible = false;
this.playButton.gotoAndStop(1);
writeText(this.playButton.buttonText, "PLEASE WAIT...");
this.stinger3D.addEventListener("onStinger3DStart", mx.utils.Delegate.create(this, this.loadAudio));
this.stinger3D.addEventListener("onStinger3DComplete", mx.utils.Delegate.create(this, this.showButton));
this.stinger3D.init(GAME_NAMES, GAME_LINKS, GAME_ID);
this.onEnterFrame = mx.utils.Delegate.create(this, this.onGameLoadProgress);
this.playButton._visible = false;
Frame 3
stop();
_quality = "HIGH";
Button.prototype.tabEnabled = false;
disable_check = true;
myURL = _url;
okDomain = "candystand.com";
if ((myURL.indexOf(okDomain) != -1) or disable_check) {
gotoAndPlay ("preload");
} else {
gotoAndStop (1);
}
skipIntro = false;
if (skipintro == true) {
gotoAndPlay (6);
}
Frame 5
var lBytes = this.getBytesLoaded();
var tBytes = this.getBytesTotal();
var percentLoaded = Math.floor((lBytes / tBytes) * 100);
loader_mc.bar_mc._xscale = percentLoaded;
loader_mc.percent = ((percentLoaded + "% of ") + Math.floor(tBytes / 1024)) + "K loaded.";
if (_framesloaded >= 22) {
if (count >= 12) {
gotoAndPlay ("intro");
} else {
count++;
gotoAndPlay ("preload");
}
} else {
gotoAndPlay ("preload");
}
Frame 7
musicOn = true;
gameState = 1;
firstTime = 1;
fromGame = false;
soundCont = {};
ASBroadcaster.addListener(soundCont);
noiseSoundClip.noiseSound = new Sound(noiseSoundClip);
noiseSoundClip.noiseSound.attachSound("whiteNoise");
noiseSoundClip.noiseSound.setVolume(50);
whiteNoise = noiseSoundClip.noiseSound;
menuMusicClip.menuMusicA = new Sound(menuMusicClip);
menuMusicClip.menuMusicA.attachSound("menuMusic");
menuMusic = menuMusicClip.menuMusicA;
menuIntroMusicClip.introMusicA = new Sound(menuIntroMusicClip);
menuIntroMusicClip.introMusicA.attachSound("introMusic");
introMusic = menuIntroMusicClip.introMusicA;
Sound.prototype.fadeSound = function () {
this.setVolume(this.getVolume() - 5);
};
MenuOutMusicClip.menuOutMusic = new Sound(MenuOutMusicClip);
MenuOutMusicClip.menuOutMusic.attachSound("MenuOutMusic");
menuOutMusic = MenuOutMusicClip.menuOutMusic;
LevelChimeClip.LevelChime = new Sound(LevelChimeClip);
LevelChimeClip.LevelChime.attachSound("levelChime");
levelChime = LevelChimeClip.LevelChime;
endGameClip.endGame = new Sound(endGameClip);
endGameClip.endGame.attachSound("endGameMusic");
endGameMusic = endGameClip.endGame;
endBoomClip.endBoom = new Sound(endBoomClip);
endBoomClip.endBoom.attachSound("endGameBoom");
endGameBoom = endBoomClip.endBoom;
pointTallyClip.pointTally1 = new Sound(pointTallyClip);
pointTallyClip.pointTally1.attachSound("pointTally");
pointTallyClip.pointTally1.setVolume(50);
pointTally1 = pointTallyClip.pointTally1;
if (skipIntro == true) {
gotoAndStop ("main");
}
Frame 20
stop();
Frame 21
Frame 23
stop();
HUD.swapDepths(10000);
HUD._visible = false;
dispLev = undefined;
TUT.swapDepths(9998);
TUT._visible = false;
HUD.inGameMusic = new Sound(HUD);
HUD.inGameMusic.attachSound("mainSound");
inGameMusic = HUD.inGameMusic;
startScore = 0;
totalScore = 0;
scoreInc = 1;
scoreHUDOn = false;
setNumTicker = function (target, theNum) {
theNum = theNum + 1000000;
theNum = theNum + "";
theNumArray = theNum.split("");
target.col6.gotoAndStop("a" + theNumArray[6]);
target.col5.gotoAndStop("a" + theNumArray[5]);
target.col4.gotoAndStop("a" + theNumArray[4]);
target.col3.gotoAndStop("a" + theNumArray[3]);
target.col2.gotoAndStop("a" + theNumArray[2]);
target.col1.gotoAndStop("a" + theNumArray[1]);
};
maxLevelNum = 1;
levelNum = 1;
levelScoresAr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
myLocal_so = SharedObject.getLocal("flashcookie");
if (myLocal_so.data.levelNumber) {
_root.maxLevelNum = (_root.levelNum = _root.myLocal_so.data.levelNumber);
}
if (myLocal_so.data.levelScoresAr) {
_root.levelScoresAr = _root.myLocal_so.data.levelScoresAr.split("s");
i = 0;
while (i < _root.levelScoresAr.length) {
_root.levelScoresAr[i] = int(_root.levelScoresAr[i]);
i++;
}
trace(_root.levelScoresAr[0]);
}
finalScore = 0;
if (myLocal_so.data.finalScore) {
_root.finalScore = myLocal_so.data.finalScore;
}
lBonusAr = [100, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000, 3100, 3200, 3300, 3400, 3500];
lInitAr = [10, 20, 30, 30, 30, 35, 55, 50, 70, 70, 120, 130, 140, 145, 150, 160, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 425, 450, 475, 500, 600, 700, 850, 1000];
lockedAr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1];
lNum = 1;
levelsArray = [];
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,0,0,0,0,0,0,0,0,0,0,0,0,102,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,5,0,0,0,0,0,0,0,0,0,0,0,8,107,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0,0,0,0,0,0,0,0,0,1,10,10,10,102,0,0,0,0,0,0,0,0,8,13,13,13,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,5,103,0,0,0,0,0,0,0,0,0,0,8,13,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,0,0,0,0,0,0,0,0,0,0,0,1,8,6,0,0,0,0,0,0,0,0,0,0,0,8,107,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,10,7,0,0,0,0,0,0,0,0,0,0,5,111,5,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,8,101,0,0,0,0,0,0,0,0,0,0,0,7,11,3,0,0,0,0,0,0,0,0,0,0,8,13,3,0,0,0,0,0,0,0,0,0,0,10,10,10,0,0,0,0,0,0,0,0,0,0,1,12,6,0,0,0,0,0,0,0,0,0,0,1,11,7,0,0,0,0,0,0,0,0,0,0,0,4,8,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,9,9,6,0,0,0,0,0,0,0,0,0,10,5,6,10,0,0,0,0,0,0,0,0,1,10,10,10,10,102,0,0,0,0,0,0,0,8,7,10,8,7,10,0,0,0,0,0,0,0,0,0,8,9,9,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,5,7,5,0,0,0,0,0,0,0,0,0,11,8,8,12,0,0,0,0,0,0,0,0,0,11,11,6,9,0,0,0,0,0,0,0,0,0,108,8,7,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,5,5,5,5,0,0,0,0,0,0,0,0,107,7,7,7,7,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,13,9,10,5,6,13,5,8,9,14,3,5,5,8,5,8,14,8,10,11,8,1,11,5,4,11,10,14,14,10,4,1,7,9,9,3,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,5,6,102,0,0,0,0,0,0,0,0,0,8,12,14,7,0,0,0,0,0,0,0,0,0,5,12,14,6,0,0,0,0,0,0,0,0,0,7,8,7,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,6,9,9,10,9,10,3,0,0,0,0,0,0,9,6,9,10,9,10,6,0,0,0,0,0,0,9,9,6,10,10,6,10,0,0,0,0,0,0,9,9,9,101,7,10,10,0,0,0,0,0,0,10,10,5,10,8,9,9,0,0,0,0,0,0,10,5,9,10,9,7,9,0,0,0,0,0,0,5,10,10,10,9,9,7,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,9,6,5,9,13,9,11,6,0,0,0,0,10,0,4,10,0,10,1,9,8,6,0,0,0,9,5,12,11,5,8,9,110,0,10,0,0,0,9,8,14,10,5,7,9,9,0,10,0,0,0,8,10,7,4,0,4,5,11,9,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,6,7,0,0,0,0,0,0,0,0,0,0,6,6,7,7,0,0,0,0,0,0,0,0,6,6,8,7,7,7,0,0,0,0,0,0,6,6,8,8,5,5,7,7,0,0,0,0,6,6,8,8,8,7,5,5,7,7,0,0,6,6,8,8,6,6,7,7,5,5,7,7,101,6,0,7,9,6,4,9,8,0,5,9,8";
lNum++;
levelsArray[lNum] = "6,9,12,9,9,9,7,1,5,9,11,9,7,11,2,4,2,0,8,14,13,7,14,8,0,4,11,12,3,10,2,13,0,7,13,12,12,2,0,10,10,0,6,10,7,0,0,112,1,8,7,0,9,13,9,12,6,5,11,13,12,5,11,8,0,9,7,3,12,6,9,10,1,8,14,4,5,7,7,3,0,5,9,13,8,0,0,7,9,7,4";
lNum++;
levelsArray[lNum] = "101,3,5,7,8,11,7,5,9,7,5,10,2,10,9,11,14,12,6,6,11,3,7,15,11,5,7,11,6,0,0,0,0,0,0,0,5,7,9,8,6,6,9,9,9,9,9,9,9,1,7,11,12,12,7,0,0,0,0,0,0,0,8,7,9,7,14,9,11,14,9,5,5,12,11,13,3,4,1,14,10,8,5,9,14,5,5,13,12,11,3";
lNum++;
levelsArray[lNum] = "0,0,0,0,8,9,5,1,103,0,0,0,0,0,0,0,0,7,7,5,11,12,0,0,0,0,0,0,0,0,8,14,7,4,10,0,0,0,0,0,0,0,0,11,8,7,13,9,0,0,0,0,0,0,0,0,1,9,5,7,3,0,0,0,0,0,0,0,0,0,1,5,7,0,0,0,0,0,0,0,0,0,0,1,10,8,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,8,8,9,6,7,11,9,6,3,0,2,14,9,7,10,0,9,110,9,0,7,12,0,10,12,9,1,12,9,12,8,13,11,8,7,9,13,10,0,0,10,0,14,6,0,9,9,5,3,10,8,9,9,6,0,1,8,9,12,7,8,9,8,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "1,9,9,14,12,9,9,9,11,10,10,9,7,6,1,6,11,3,0,0,0,8,14,7,2,14,13,5,9,9,0,6,12,5,0,10,7,7,3,9,9,14,8,0,12,115,15,9,6,6,12,7,9,14,7,4,0,5,11,8,0,2,13,5,7,9,5,5,8,6,0,0,0,5,6,9,8,7,8,9,14,10,11,9,9,9,5,5,7,1,8";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,8,5,0,2,5,0,0,0,6,2,0,6,7,101,6,6,5,6,0,0,0,5,6,5,5,3,0,6,15,11,10,9,9,9,9,11,15,5,0,8,5,7,7,3,0,0,0,1,8,8,6,7,8,4,0,7,6,0,0,0,5,8,0,4,7,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,9,12,11,7,0,8,6,0,6,9,3,5,7,0,2,10,8,8,10,14,6,13,3,0,14,10,9,8,14,10,13,10,9,9,110,0,0,5,11,9,14,9,0,9,9,10,9,12,9,7,0,8,9,8,3,0,8,7,1,8,11,9,7,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,6,1,5,6,0,0,0,0,0,0,0,0,1,8,10,6,9,0,0,0,0,0,0,0,0,12,10,10,10,7,0,0,0,0,0,0,0,0,5,7,102,7,0,0,0,0,0,0,0,0,0,0,10,0,10,0,0,0,0,0,0,0,0,0,0,8,9,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,8,11,10,11,2,0,0,0,0,0,0,0,1,14,5,5,11,14,2,0,0,0,0,0,5,14,8,0,10,0,8,9,6,0,0,0,0,9,8,10,7,9,5,10,6,10,0,0,0,0,8,13,0,5,111,6,0,5,7,0,0,0,0,0,13,7,0,0,0,6,6,0,0,0,0,0,0,1,7,9,9,9,7,3,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,0,0,6,9,7,0,0,0,0,0,0,0,0,0,0,5,5,9,0,0,0,0,0,0,0,0,8,10,7,11,6,0,0,0,0,0,0,6,8,9,101,9,10,0,0,0,0,0,0,0,10,7,5,10,6,5,5,7,0,0,0,0,0,5,5,5,12,6,5,6,3,0,0,0,0,0,0,5,7,0,7,6,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,0,0,5,9,6,0,0,0,0,0,0,0,0,0,1,6,2,14,2,0,0,0,0,0,0,0,1,11,12,10,7,8,6,0,0,0,0,0,0,14,8,9,104,9,6,10,0,0,0,0,0,0,8,6,6,10,5,8,7,0,0,0,0,0,0,0,8,9,7,5,7,0,0,0,0,0,0,0,0,0,1,13,4,0,0,0,0,0";
lNum++;
levelsArray[lNum] = "0,0,0,1,5,11,2,2,5,6,3,0,0,0,0,0,5,7,13,12,10,13,12,2,0,0,0,0,0,8,9,6,14,7,5,14,7,0,0,0,0,0,14,1,103,8,3,4,8,6,0,0,0,0,0,2,8,12,2,1,11,11,7,0,0,0,0,0,8,11,7,14,11,13,8,6,0,0,0,0,0,1,7,1,7,4,1,7,4,0,0";
lNum++;
levelsArray[lNum] = "0,0,2,11,7,6,7,6,7,8,5,0,0,0,6,10,7,7,7,8,7,7,8,8,5,0,0,5,6,5,10,10,10,10,10,7,6,6,0,0,6,12,14,10,10,9,2,101,15,13,0,0,0,5,12,8,10,10,10,10,10,6,8,7,0,0,0,5,5,8,5,8,5,5,11,9,8,0,0,0,0,5,7,5,8,5,8,8,4,0,0";
lNum++;
levelsArray[lNum] = "5,11,11,9,5,0,0,0,6,9,11,11,6,9,9,9,8,5,0,0,0,8,5,9,9,9,9,5,5,8,10,9,9,9,9,6,12,6,9,12,10,101,6,9,9,9,9,10,6,5,10,14,9,7,12,6,5,3,0,1,6,5,14,8,9,9,9,9,7,6,0,0,0,5,12,11,9,9,8,13,11,12,4,0,0,0,4,14,11,13,7";
lNum++;
levelsArray[lNum] = "0,0,0,2,11,1,5,7,0,0,0,0,0,0,0,0,5,13,11,7,2,0,0,0,0,0,0,0,0,7,8,9,8,5,3,5,0,0,0,0,0,0,2,14,6,8,10,5,114,0,0,0,0,0,0,8,7,0,0,9,14,8,3,0,0,0,0,0,8,9,6,6,8,10,6,7,0,0,0,0,0,0,1,7,6,9,14,7,0,0,0";
lNum++;
levelAr = [[], [], [], [], [], [], []];
numOfActiveGlyphs = 0;
numOfSurgedGlyphs = 0;
parseString = function () {
_root.numOfActiveGlyphs = 0;
_root.numOfSurgedGlyphs = 0;
var _local4 = _root.levelsArray[_root.levelNum];
var _local2 = _local4.split(",");
i = 0;
while (i < _local2.length) {
_local2[i] = Number(_local2[i]);
i++;
}
var _local3 = 0;
y = 0;
while (y < 7) {
x = 0;
while (x < 13) {
_root.levelAr[y][x] = _local2[_local3];
_local3++;
x++;
}
y++;
}
_root.gCont.broadcastMessage("setAll");
_root.gCont.broadcastMessage("resetPower");
_root.pCont.broadcastMessage("createPowerFlow");
};
lComplete = 0;
powerOn = 0;
isLevelComplete = function () {
_root.lComplete = 0;
_root.powerOn = 0;
gCont.broadcastMessage("isGlyphComplete");
if (lComplete == 0) {
if (_root.musicOn) {
_root.endGameBoom.setVolume(60);
_root.endGameBoom.start(0, 1);
}
_root.energyRing._visible = false;
_root.canControl = false;
_root.levelNum++;
if (_root.lockedAr[_root.levelNum] == 1) {
_root.levelScoresAr[_root.levelNum + 1] = (_root.totalScore + _root.startScore) + _root.lBonusAr[_root.levelNum - 1];
} else {
_root.levelScoresAr[_root.levelNum] = (_root.totalScore + _root.startScore) + _root.lBonusAr[_root.levelNum - 1];
}
if (_root.levelNum > _root.maxLevelNum) {
_root.maxLevelNum = _root.levelNum;
}
_root.myLocal_so.data.levelNumber = _root.maxLevelNum;
saveString = "";
i = 0;
while (i < _root.levelScoresAr.length) {
saveString = saveString + _root.levelScoresAr[i];
saveString = saveString + "s";
i++;
}
trace(saveString);
trace(_root.levelScoresAr);
_root.myLocal_so.data.levelScoresAr = saveString;
if (_root.totalScore > _root.finalScore) {
_root.finalScore = _root.totalScore;
myLocal_so.data.finalScore = _root.finalScore;
}
_root.myLocal_so.flush();
_root.sCont.gotoAndPlay("conceal");
_root.undoAr = [];
}
};
cheatBut.onPress = function () {
numOfSurgedGlyphs = numOfActiveGlyphs;
skipLevel();
};
skipLevel = function () {
_root.energyRing._visible = false;
_root.canControl = false;
_root.levelNum++;
_root.sCont.gotoAndPlay("conceal");
_root.undoAr = [];
};
MovieClip.prototype.isGlyphComplete = function () {
var _local3 = 0;
var _local4 = 0;
if (this.main.glyphNum != 0) {
_local3 = 1;
_local4 = 1;
if (this.main.power == "on") {
_local4 = 1;
if (this.main.allArmsUsed == 1) {
_local3 = 0;
}
} else {
this.main.aButtons.spinner._visible = false;
}
}
_root.lComplete = _root.lComplete + _local3;
_root.powerOn = _root.powerOn + _local4;
};
MovieClip.prototype.createPowerSurge = function () {
var _local4 = this.main.gx;
var _local3 = this.main.gy;
var _local5 = this.main.sides;
this.main.allArmsUsed = 1;
if (_local5[0] == 1) {
var _local6 = _root.glyphsAr[_local3][_local4 + 1];
if (_local6.main.sides[2] == 1) {
if (_local6.main.inner.surge._currentframe == 1) {
_local6.main.inner.surge.gotoAndPlay(2);
}
}
}
if (_local5[1] == 1) {
var _local6 = _root.glyphsAr[_local3 + 1][_local4];
if (_local6.main.sides[3] == 1) {
if (_local6.main.inner.surge._currentframe == 1) {
_local6.main.inner.surge.gotoAndPlay(2);
}
}
}
if (_local5[2] == 1) {
var _local6 = _root.glyphsAr[_local3][_local4 - 1];
if (_local6.main.sides[0] == 1) {
if (_local6.main.inner.surge._currentframe == 1) {
_local6.main.inner.surge.gotoAndPlay(2);
}
}
}
if (_local5[3] == 1) {
var _local6 = _root.glyphsAr[_local3 - 1][_local4];
if (_local6.main.sides[1] == 1) {
if (_local6.main.inner.surge._currentframe == 1) {
_local6.main.inner.surge.gotoAndPlay(2);
}
}
}
};
MovieClip.prototype.resetSurge = function () {
this.main.inner.surge.gotoAndStop(1);
};
glyphsAr = [[], [], [], [], [], [], []];
energyRingsAr = [];
gCont = {};
AsBroadcaster.initialize(gCont);
pCont = {};
AsBroadcaster.initialize(pCont);
zeroXp = 65;
zeroYp = 35;
gridDist = 40;
inc = 1;
powerPlant = 0;
energyRing._visible = false;
energyRing.swapDepths(1999);
initGrid = function () {
y = 0;
while (y < 7) {
x = 0;
while (x < 13) {
var _local2 = _root.mStage.attachMovie("glyphOuter", "glyph" + inc, inc + 1000);
inc++;
_local2._x = _root.zeroXp + (_root.gridDist * x);
_local2._y = _root.zeroYp + (_root.gridDist * y);
_local2._visible = false;
_local2.main.glyphNum = 0;
_local2.main.allArmsUsed = 0;
_local2.isPowerPlant = false;
if ((y == 3) && (x == 6)) {
_root.pCont.addListener(_local2);
_local2.isPowerPlant = true;
_local2.main.glyphNum = 0;
_local2.main.inner.energy._visible = true;
_local2.main.inner.light._visible = true;
_local2.main.inner.dark._visible = false;
_local2.main.aButtons._visible = true;
_local2.main.power = "on";
_root.powerPlant = _local2;
} else {
_local2.main.inner.energy._visible = false;
_local2.main.inner.light._visible = false;
_local2.main.inner.dark._visible = true;
_local2.main.aButtons._visible = false;
_local2.main.power = "off";
}
_root.gCont.addListener(_local2);
_local2.main.sides = [];
_local2.main.sides[0] = 0 + _root.tilesSidesAr[_local2.main.glyphNum][0];
_local2.main.sides[1] = 0 + _root.tilesSidesAr[_local2.main.glyphNum][1];
_local2.main.sides[2] = 0 + _root.tilesSidesAr[_local2.main.glyphNum][2];
_local2.main.sides[3] = 0 + _root.tilesSidesAr[_local2.main.glyphNum][3];
_root.glyphsAr[y][x] = _local2;
_local2.main.gx = x;
_local2.main.gy = y;
x++;
}
y++;
}
};
tilesSidesAr = [];
tilesSidesAr[1] = [1, 0, 0, 0];
tilesSidesAr[2] = [0, 1, 0, 0];
tilesSidesAr[3] = [0, 0, 1, 0];
tilesSidesAr[4] = [0, 0, 0, 1];
tilesSidesAr[5] = [1, 1, 0, 0];
tilesSidesAr[6] = [0, 1, 1, 0];
tilesSidesAr[7] = [0, 0, 1, 1];
tilesSidesAr[8] = [1, 0, 0, 1];
tilesSidesAr[9] = [1, 0, 1, 0];
tilesSidesAr[10] = [0, 1, 0, 1];
tilesSidesAr[11] = [1, 1, 1, 0];
tilesSidesAr[12] = [0, 1, 1, 1];
tilesSidesAr[13] = [1, 0, 1, 1];
tilesSidesAr[14] = [1, 1, 0, 1];
tilesSidesAr[15] = [1, 1, 1, 1];
initGrid();
MovieClip.prototype.resetPower = function () {
if (this.isPowerPlant != true) {
this.main.inner.energy._visible = false;
this.main.inner.light._visible = false;
this.main.inner.dark._visible = true;
this.main.aButtons._visible = false;
this.main.power = "off";
} else if (this.main.glyphNum == 0) {
this.main.glyphNum = 1;
}
};
MovieClip.prototype.createPowerFlow = function () {
this.main.inner.energy._visible = true;
this.main.inner.light._visible = true;
this.main.inner.dark._visible = false;
this.main.aButtons._visible = true;
var _local5 = this.main.gx;
var _local3 = this.main.gy;
var _local6 = this.main.sides;
this.main.allArmsUsed = 1;
if (_local6[0] == 1) {
var _local4 = _root.glyphsAr[_local3][_local5 + 1];
if (_local4.main.sides[2] == 1) {
if (_local4.main.power == "off") {
_local4.main.power = "on";
_local4.createPowerFlow();
}
} else {
this.main.allArmsUsed = 0;
}
}
if (_local6[1] == 1) {
var _local4 = _root.glyphsAr[_local3 + 1][_local5];
if (_local4.main.sides[3] == 1) {
if (_local4.main.power == "off") {
_local4.main.power = "on";
_local4.createPowerFlow();
}
} else {
this.main.allArmsUsed = 0;
}
}
if (_local6[2] == 1) {
var _local4 = _root.glyphsAr[_local3][_local5 - 1];
if (_local4.main.sides[0] == 1) {
if (_local4.main.power == "off") {
_local4.main.power = "on";
_local4.createPowerFlow();
}
} else {
this.main.allArmsUsed = 0;
}
}
if (_local6[3] == 1) {
var _local4 = _root.glyphsAr[_local3 - 1][_local5];
if (_local4.main.sides[1] == 1) {
if (_local4.main.power == "off") {
_local4.main.power = "on";
_local4.createPowerFlow();
}
} else {
this.main.allArmsUsed = 0;
}
}
};
undoClick = 1;
undoDelay = 0;
gameStates = [];
gameStates[2] = function () {
if (firstTime == 1) {
parseString();
_root.pCont.broadcastMessage("createPowerFlow");
sCont.gotoAndPlay("reveal");
waveBG();
firstTime = 0;
_root.bgStage._alpha = 100;
if (_root.musicOn) {
_root.whiteNoise.stop();
_root.whiteNoise.setVolume(50);
_root.menuMusic.stop();
_root.menuMusic.setVolume(100);
_root.inGameMusic.start(0, 1000);
_root.inGameMusic.setVolume(100);
}
_root.canControl = true;
}
_root.moveBG();
_root.bgStage._rotation = _root.bgStage._rotation + 0.2;
if (Key.isDown(32)) {
if (undoClick == 1) {
_root.HUD.HUDInner.undo.gotoAndPlay(2);
undoFunc();
undoClick = 0;
}
} else {
undoClick = 1;
}
};
onEnterFrame = function () {
_root.gameStates[_root.gameState]();
};
MovieClip.prototype.shuffleGlyph = function () {
this.main.glyphNum = random(16);
this.main.inner.energy.gotoAndPlay(1);
this.main.inner.light.gotoAndPlay(1);
this.main.inner.dark.gotoAndPlay(1);
this.main.inner._rotation = 0;
this.main.sides[0] = 0 + _root.tilesSidesAr[this.main.glyphNum][0];
this.main.sides[1] = 0 + _root.tilesSidesAr[this.main.glyphNum][1];
this.main.sides[2] = 0 + _root.tilesSidesAr[this.main.glyphNum][2];
this.main.sides[3] = 0 + _root.tilesSidesAr[this.main.glyphNum][3];
};
MovieClip.prototype.resetGlyph = function () {
this.main.inner._rotation = 0;
this.main.sides[0] = 0 + _root.tilesSidesAr[this.main.glyphNum][0];
this.main.sides[1] = 0 + _root.tilesSidesAr[this.main.glyphNum][1];
this.main.sides[2] = 0 + _root.tilesSidesAr[this.main.glyphNum][2];
this.main.sides[3] = 0 + _root.tilesSidesAr[this.main.glyphNum][3];
};
MovieClip.prototype.setAll = function () {
var _local3 = _root.levelAr[this.main.gy][this.main.gx];
if (_local3 > 100) {
_local3 = _local3 - 100;
_root.powerPlant.isPowerPlant = false;
_root.pCont.removeListener(_root.powerPlant);
_root.powerPlant = this;
_root.pCont.addListener(this);
this.isPowerPlant = true;
}
this.main.glyphNum = _local3;
if (_local3 > 0) {
_root.numOfActiveGlyphs = _root.numOfActiveGlyphs + 1;
}
this.main.inner.energy.gotoAndPlay(1);
this.main.inner.light.gotoAndPlay(1);
this.main.inner.dark.gotoAndPlay(1);
this.main.inner._rotation = 0;
this.main.sides[0] = 0 + _root.tilesSidesAr[this.main.glyphNum][0];
this.main.sides[1] = 0 + _root.tilesSidesAr[this.main.glyphNum][1];
this.main.sides[2] = 0 + _root.tilesSidesAr[this.main.glyphNum][2];
this.main.sides[3] = 0 + _root.tilesSidesAr[this.main.glyphNum][3];
this.main.parentGlyph.glyphNum = _local3;
this.main.parentGlyph.initBut.gotoAndStop(_local3 + 1);
};
sBut.onPress = function () {
sCont.gotoAndPlay("conceal2");
_root.sBut._visible = false;
};
undoAr = [];
undoFunc = function () {
if (_root.undoAr.length > 0) {
var _local5 = undoAr[undoAr.length - 1][0];
var _local4 = undoAr[undoAr.length - 1][1];
var _local6 = undoAr[undoAr.length - 1][2];
undoAr.splice(undoAr.length - 1, 1);
var _local2 = _root.glyphsAr[_local4][_local5].main;
if (_local6 == -1) {
_local2.inner._rotation = _local2.inner._rotation + 90;
var _local3 = [];
_local3[0] = 0 + _local2.sides[0];
_local3[1] = 0 + _local2.sides[1];
_local3[2] = 0 + _local2.sides[2];
_local3[3] = 0 + _local2.sides[3];
_local2.sides[0] = _local3[3];
_local2.sides[1] = _local3[0];
_local2.sides[2] = _local3[1];
_local2.sides[3] = _local3[2];
} else {
_local2.inner._rotation = _local2.inner._rotation - 90;
var _local3 = [];
_local3[0] = 0 + _local2.sides[0];
_local3[1] = 0 + _local2.sides[1];
_local3[2] = 0 + _local2.sides[2];
_local3[3] = 0 + _local2.sides[3];
_local2.sides[0] = _local3[1];
_local2.sides[1] = _local3[2];
_local2.sides[2] = _local3[3];
_local2.sides[3] = _local3[0];
}
_root.startScore = _root.startScore - (_root.scoreInc * 2);
if (_root.startScore < 0) {
_root.startScore = 0;
}
_root.setNumTicker(_root.scoreHUD.inner.levelScore, _root.startScore);
_root.gCont.broadcastMessage("resetPower");
_root.pCont.broadcastMessage("createPowerFlow");
}
};
uBut.onPress = function () {
undoFunc();
};
restartFunc = function () {
_root.undoAr = [];
_root.gCont.broadcastMessage("resetPower");
_root.gCont.broadcastMessage("resetGlyph");
_root.pCont.broadcastMessage("createPowerFlow");
};
rBut.onPress = function () {
restartFunc();
};
resetGrid = function () {
_root.gCont.broadcastMessage("resetPower");
_root.gCont.broadcastMessage("resetGlyph");
_root.pCont.broadcastMessage("createPowerFlow");
undoAr = [];
};
MovieClip.prototype.fadeZeros = function () {
if (this.main.glyphNum == 0) {
this._alpha = this._alpha - 1;
}
};
bgCont = {};
AsBroadcaster.initialize(bgCont);
bgInc = 0;
dist = 200;
bgAnglesAr = [];
bgsNum = 30;
initBG = function () {
i = 0;
while (i < bgsNum) {
_root.bgAnglesAr[i] = [];
_root.bgAnglesAr[i][0] = 0.209 * i;
var _local3 = 1;
var _local2 = _root.bgStage.attachMovie("objectClip", "bgObj" + _root.bgInc, _root.bgInc);
if (bgInc == 0) {
firstBG = _local2;
} else if (bgInc == (bgsNum - 1)) {
firstBG.prevBG = _local2;
}
_root.bgInc++;
_local2.bgAngle = i;
bgCont.addListener(_local2);
_local2.dInc = _local3;
_local2.prevBG = prevBG;
_local3++;
_root.prevBG = _local2;
_local2._visible = false;
i++;
}
};
initBG();
MovieClip.prototype.applyBGTransform = function () {
this._x = _root.bgAnglesAr[this.bgAngle][1];
this._y = 0;
this.swapDepths(_root.bgAnglesAr[this.bgAngle][3]);
this._xscale = (this._yscale = 50 + (200 - _root.bgAnglesAr[this.bgAngle][2]));
if (_root.bgAnglesAr[this.bgAngle][2] < 0) {
this._visible = false;
} else if (_root.bgAnglesAr[this.bgAngle][2] < 10) {
this._visible = true;
}
};
bgAngle = 0;
moveBG = function () {
with (Math) {
_root.bgAngle = _root.bgAngle + 0.005;
f = 0;
while (f < _root.bgAnglesAr.length) {
var curAngle = (_root.bgAngle + _root.bgAnglesAr[f][0]);
var bgX = (dist * cos(curAngle));
var bgY = (dist * sin(curAngle));
_root.bgAnglesAr[f][1] = bgX * 2.5;
_root.bgAnglesAr[f][2] = bgY;
_root.bgAnglesAr[f][3] = (((-bgY) + 1000) * 1000) + bgX;
_root.bgAnglesAr[f][4] = ((bgX < 0) ? (bgX * -1) : (bgX));
f++;
}
}
bgCont.broadcastMessage("applyBGTransform");
};
bgFlash = false;
MovieClip.prototype.flashBG = function () {
this.gotoAndPlay(2);
};
waveBG = function () {
bgFlash = 1;
prevBG.gotoAndPlay(2);
};
endWave = function () {
bgFlash = false;
};
MovieClip.prototype.makeInvisible = function () {
this.gotoAndStop(1);
this._visible = false;
};
Frame 25
stop();
Symbol 33 MovieClip Frame 30
stop();
Symbol 79 MovieClip Frame 41
this.logo_button.onRelease = mx.utils.Delegate.create(com.candystand.Stinger.Stinger3D._instance, com.candystand.Stinger.Stinger3D._instance.CSHomepageLink);
Symbol 79 MovieClip Frame 55
stop();
Symbol 81 MovieClip [com.candystand.Stinger.Stinger3D] Frame 1
#initclip 30
Object.registerClass("com.candystand.Stinger.Stinger3D", com.candystand.Stinger.Stinger3D);
#endinitclip
Symbol 720 MovieClip [__Packages.com.candystand.Stinger.Stinger3D] Frame 0
class com.candystand.Stinger.Stinger3D extends MovieClip
{
static var _instance;
var onEnterFrame, removeMovieClip, startTime, container, createEmptyMovieClip, getNextHighestDepth, scene, camera, center, planes, containerMask, buttonText, _xmouse;
function Stinger3D () {
super();
mx.events.EventDispatcher.initialize(this);
_instance = this;
trace("Created Stinger3D");
}
function dispatchEvent() {
}
function addEventListener() {
}
function removeEventListener() {
}
function destroy() {
delete onEnterFrame;
removeMovieClip();
trace("Destroyed Stinger3D");
}
function CSHomepageLink() {
_root.getURL("http://www.candystand.com/index.do?vgid=" + GAME_ID, "_blank");
}
function init(gameNames, gameLinks, gameID) {
GAME_NAMES = gameNames;
GAME_LINKS = gameLinks;
GAME_ID = gameID;
init3D();
var _local2 = 0;
while (_local2 < numImages) {
var _local3 = _local2 - 14;
if (_local3 < 0) {
_local3 = _local2 + 6;
}
createImagePlane(_local3);
_local2++;
}
orientPlanes();
startTime = getTimer();
onEnterFrame = mx.utils.Delegate.create(this, loop);
}
function init3D() {
container = createEmptyMovieClip("container", getNextHighestDepth());
container._x = 0;
container._y = 50;
scene = new org.papervision3d.scenes.MovieScene3D(container);
camera = new org.papervision3d.cameras.Camera3D();
camera.zoom = 5;
camera.focus = 100;
center = new org.papervision3d.core.proto.DisplayObject3D();
planes = new Array();
var _local3 = 725;
var _local2 = 380;
containerMask._width = _local3;
containerMask._height = _local2;
containerMask._x = -(_local3 / 2);
containerMask._y = (-(_local2 / 2)) - 60;
container.cacheAsBitmap = true;
containerMask.cacheAsBitmap = true;
container.setMask(containerMask);
}
function createImagePlane(index) {
var _local6 = index % GAME_NAMES.length;
var _local4 = flash.display.BitmapData.loadBitmap("CSSet1Image" + _local6);
_local4 = createReflectedBitmap(_local4);
var _local5 = new org.papervision3d.materials.BitmapMaterial(_local4);
_local5.oneSide = false;
_local5.updateBitmap();
var _local3 = new org.papervision3d.objects.Plane(_local5, _local4.width * 0.625, _local4.height * 0.625, 2, 2);
scene.push(_local3);
_local3.x = -500;
_local3.y = -700;
_local3.z = -500;
var _local2 = _local3.__get__container();
_local2._name = "container_" + index;
_local2.onRollOverDelegate = mx.utils.Delegate.create(this, onRollOverHandler);
_local2.onRollOver = function () {
this.onRollOverDelegate(this);
};
_local2.onRollOutDelegate = mx.utils.Delegate.create(this, onRollOutHandler);
_local2.onRollOut = (_local2.onDragOut = function () {
this.onRollOutDelegate(this);
});
_local2.onClickDelegate = mx.utils.Delegate.create(this, onPressHandler);
_local2.onRelease = function () {
this.onClickDelegate(this);
};
planes.push(_local3);
}
function orientPlanes() {
var _local2 = 0;
while (_local2 < numImages) {
var _local3 = _local2;
var _local5 = Math.cos(_local3 * anglePerPlane) * radius;
var _local4 = Math.sin(_local3 * anglePerPlane) * radius;
planes[_local2].extra = new Object();
planes[_local2].extra.angle = (_local3 * anglePerPlane) * 57.2957795130823;
var _local7 = mx.utils.Delegate.create(this, onMoveUpdate);
var _local6 = mx.utils.Delegate.create(this, onMoveComplete);
com.caurina.transitions.Tweener.addTween(planes[_local2], {x:_local5, y:0, z:_local4, time:1, delay:(_local2 * 0.1) + 2, onUpdate:_local7, onUpdateParams:[planes[_local2]], onComplete:_local6});
_local2++;
}
dispatchEvent({type:"onStinger3DStart", target:this});
}
function onMoveUpdate(plane) {
var _local4 = center.x - plane.x;
var _local3 = center.z - plane.z;
var _local5 = Math.atan2(_local4, _local3);
plane.__set__rotationY(_local5 * (-radToDeg));
if (plane.z >= 15) {
plane.__get__container()._alpha = 30;
} else {
plane.__get__container()._alpha = 100;
}
}
function onMoveComplete() {
planeCounter++;
if (planeCounter == numImages) {
dispatchEvent({type:"onStinger3DComplete", target:this});
}
}
function spinPlanes(speed) {
var _local2 = 0;
while (_local2 < numImages) {
var _local4 = planes[_local2].extra.angle + speed;
planes[_local2].extra.angle = _local4;
var _local3 = _local4 * (Math.PI/180);
var _local6 = Math.cos(_local3) * radius;
var _local5 = Math.sin(_local3) * radius;
planes[_local2].x = _local6;
planes[_local2].z = _local5;
onMoveUpdate(planes[_local2]);
_local2++;
}
}
function onRollOverHandler(clip) {
if (clip) {
var _local3 = Number(clip._name.split("_")[1]);
com.caurina.transitions.Tweener.addTween(clip, {_xscale:110, _yscale:110, time:0.5});
buttonText.text = GAME_NAMES[_local3 % GAME_NAMES.length].toUpperCase();
}
}
function onRollOutHandler(clip) {
if (clip) {
com.caurina.transitions.Tweener.addTween(clip, {_xscale:100, _yscale:100, time:0.5});
buttonText.text = "";
}
}
function onPressHandler(clip) {
if (clip) {
var _local2 = Number(clip._name.split("_")[1]);
_root.getURL((GAME_LINKS[_local2 % GAME_NAMES.length] + "&vgid=") + GAME_ID, "_blank");
}
}
function loop() {
if (getTimer() >= (startTime + 3000)) {
var _local2 = 0;
if ((_xmouse > _local2) || (_xmouse < (-_local2))) {
if (_xmouse < 0) {
_local2 = _local2 * -1;
}
var _local3 = (_xmouse - _local2) / ((Stage.width / 2) - _local2);
_local3 = _local3 * -2;
spinPlanes(_local3);
}
}
scene.renderCamera(camera);
}
function createReflectedBitmap(bmp) {
var _local13 = true;
var _local11 = 1;
var _local12 = 30;
var _local8 = Math.floor(Math.random() * 1000000);
var _local3 = _root.createEmptyMovieClip("_holder" + _local8, _root.getNextHighestDepth());
var _local7 = _local3.createEmptyMovieClip("topImage_" + _local8, _local3.getNextHighestDepth());
_local7.attachBitmap(bmp, 100, "auto", true);
var _local4 = _local3.createEmptyMovieClip("bottomImage_" + _local8, _local7.getDepth() + 1);
var _local5 = new flash.display.BitmapData(bmp.width, bmp.height * 0.6);
_local5.draw(bmp, new flash.geom.Matrix(1, 0, 0, -1, 0, bmp.height));
_local4.attachBitmap(_local5, 100, "auto", true);
var _local10 = new flash.geom.Matrix();
_local10.createGradientBox(_local5.width, _local5.height, (Math.PI/2));
var _local2 = _local3.createEmptyMovieClip("gradient_" + _local8, _local4.getDepth() + 1);
_local4._y = (_local7._y + _local7._height) + 5;
_local2.lineStyle(0, 16777215, 1);
_local2.beginGradientFill("linear", [0, 16777215], [_local12, 0], [0, 150], _local10);
_local2.moveTo(0, 0);
_local2.lineTo(bmp.width, 0);
_local2.lineTo(bmp.width, _local5.height * _local11);
_local2.lineTo(0, _local5.height * _local11);
_local2.lineTo(0, 0);
_local2.endFill();
_local2._x = _local4._x;
_local2._y = _local4._y;
_local4.cacheAsBitmap = true;
_local2.cacheAsBitmap = true;
_local4.setMask(_local2);
var _local9 = new flash.display.BitmapData(_local3._width, _local3._height, _local13, 0);
_local9.draw(_local3);
bmp.dispose();
_local5.dispose();
_local7.removeMovieClip();
_local4.removeMovieClip();
_local2.removeMovieClip();
_local3.removeMovieClip();
return(_local9);
}
function correctDegrees(v) {
v = v % 360;
if (v < 0) {
v = v + 360;
}
return(v);
}
static var GAME_NAMES = [];
static var GAME_LINKS = [];
static var GAME_ID = 0;
var planeCounter = 0;
var numImages = 20;
var radius = 540;
var anglePerPlane = (Math.PI*2) / com.candystand.Stinger.Stinger3D.prototype.numImages;
var radToDeg = 57.2957795130823;
}
Symbol 721 MovieClip [__Packages.org.papervision3d.core.proto.SceneObject3D] Frame 0
class org.papervision3d.core.proto.SceneObject3D
{
var container, objects, materials, stats;
function SceneObject3D (container) {
if (container) {
this.container = container;
} else {
org.papervision3d.Papervision3D.log("Scene3D: container argument required.");
}
objects = new Array();
materials = new Array();
org.papervision3d.Papervision3D.log(((((org.papervision3d.Papervision3D.NAME + " ") + org.papervision3d.Papervision3D.VERSION) + " (") + org.papervision3d.Papervision3D.DATE) + ")\n");
stats = new Object({points:0, polys:0, triangles:0, performance:0, rendered:0});
}
function push(sceneElement) {
if (sceneElement instanceof org.papervision3d.core.proto.DisplayObject3D) {
objects.push(sceneElement);
sceneElement.scene = this;
} else if (sceneElement instanceof org.papervision3d.core.proto.MaterialObject3D) {
materials.push(sceneElement);
sceneElement.scene = this;
} else {
org.papervision3d.Papervision3D.log("SceneObject3D.push(): Object not recognized. Must be Material3D or DisplayObject3D descendants.");
}
}
function renderCamera(camera) {
var _local9 = stats;
_local9.performance = getTimer();
var _local3;
var _local5 = materials;
var _local4 = _local5.length;
_local4--;
while (_local3 = _local5[_local4] , _local3) {
if (_local3.animated) {
_local3.updateBitmap();
}
}
if (camera) {
camera.transform();
var _local7 = objects;
var _local2;
_local4 = _local7.length;
_local4--;
while (_local2 = _local7[_local4] , _local2) {
if (_local2.visible) {
_local2.project(camera);
}
}
}
var _local8 = camera.sort;
if (_local8) {
objects.sortOn("screenZ", Array.ASCENDING | Array.NUMERIC);
}
_local9.rendered = 0;
renderObjects(_local8);
}
function renderObjects() {
}
}
Symbol 722 MovieClip [__Packages.org.papervision3d.Papervision3D] Frame 0
class org.papervision3d.Papervision3D
{
function Papervision3D () {
log("Papervision3D scene class has been replaced by org.papervision3d.scenes");
}
static function log(message) {
if (VERBOSE) {
trace(message);
}
}
static var NAME = "Papervision3D";
static var VERSION = "Beta RC0";
static var DATE = "24.05.07";
static var AUTHOR = "(c) 2006-2007 Copyright by Carlos Ulloa | papervision3d.org | carlos@papervision3d.org";
static var VERBOSE = true;
}
Symbol 723 MovieClip [__Packages.org.papervision3d.core.Number3D] Frame 0
class org.papervision3d.core.Number3D
{
var x, y, z;
function Number3D (x, y, z) {
this.x = x || 0;
this.y = y || 0;
this.z = z || 0;
}
function clone() {
return(new org.papervision3d.core.Number3D(x, y, z));
}
static function get ZERO() {
return(new org.papervision3d.core.Number3D(0, 0, 0));
}
function toString() {
return((((("x:" + x) + " y:") + y) + " z:") + z);
}
}
Symbol 724 MovieClip [__Packages.org.papervision3d.core.proto.DisplayObject3D] Frame 0
class org.papervision3d.core.proto.DisplayObject3D
{
var x, y, z, _rotation, _rotationX, _rotationY, _rotationZ, _scale, _scaleX, _scaleY, _scaleZ, extra, visible, _container;
function DisplayObject3D (initObject) {
x = initObject.x || 0;
y = initObject.y || 0;
z = initObject.z || 0;
rotationX = (initObject.rotationX || 0);
rotationY = (initObject.rotationY || 0);
rotationZ = (initObject.rotationZ || 0);
_rotation = ((_rotationX == 0) && (_rotationY == 0)) && (_rotationZ == 0);
var _local3 = (PERCENT ? 100 : 1);
scaleX = (initObject.scaleX || (_local3));
scaleY = (initObject.scaleY || (_local3));
scaleZ = (initObject.scaleZ || (_local3));
_scale = ((_scaleX == 1) && (_scaleY == 1)) && (_scaleZ == 1);
extra = initObject.extra;
container = (initObject.container);
visible = initObject.visible != false;
}
function get rotationX() {
if (DEGREES) {
return(rad2deg(_rotationX));
}
return(_rotationX);
}
function set rotationX(rot) {
if (DEGREES) {
_rotationX = deg2rad(rot);
} else {
_rotationX = rot;
}
_rotation = true;
//return(rotationX);
}
function get rotationY() {
if (DEGREES) {
return(rad2deg(_rotationY));
}
return(_rotationY);
}
function set rotationY(rot) {
if (DEGREES) {
_rotationY = deg2rad(rot);
} else {
_rotationY = rot;
}
_rotation = true;
//return(rotationY);
}
function get rotationZ() {
if (DEGREES) {
return(rad2deg(_rotationZ));
}
return(_rotationZ);
}
function set rotationZ(rot) {
if (DEGREES) {
_rotationZ = deg2rad(rot);
} else {
_rotationZ = rot;
}
_rotation = true;
//return(rotationZ);
}
function rad2deg(rad) {
return((180 * rad) / Math.PI);
}
function deg2rad(deg) {
return((Math.PI * deg) / 180);
}
function get scale() {
if ((_scaleX == _scaleY) && (_scaleX == _scaleZ)) {
if (PERCENT) {
return(_scaleX * 100);
}
return(_scaleX);
}
return(NaN);
}
function set scale(scale) {
if (PERCENT) {
scale = scale / 100;
}
_scaleX = (_scaleY = (_scaleZ = scale));
_scale = true;
//return(this.scale);
}
function get scaleX() {
if (PERCENT) {
return(_scaleX * 100);
}
return(_scaleX);
}
function set scaleX(scale) {
if (PERCENT) {
_scaleX = scale / 100;
} else {
_scaleX = scale;
}
_scale = true;
//return(scaleX);
}
function get scaleY() {
if (PERCENT) {
return(_scaleY * 100);
}
return(_scaleY);
}
function set scaleY(scale) {
if (PERCENT) {
_scaleY = scale / 100;
} else {
_scaleY = scale;
}
_scale = true;
//return(scaleY);
}
function get scaleZ() {
if (PERCENT) {
return(_scaleZ * 100);
}
return(_scaleZ);
}
function set scaleZ(scale) {
if (PERCENT) {
_scaleZ = scale / 100;
} else {
_scaleZ = scale;
}
_scale = true;
//return(scaleZ);
}
function get container() {
return(_container);
}
function set container(gfx) {
gfx.displayObject3D = this;
_container = gfx;
//return(container);
}
static function get ZERO() {
return(new org.papervision3d.core.proto.DisplayObject3D({x:0, y:0, z:0}));
}
function project(camera) {
}
function render(scene) {
}
function moveForward(distance) {
translate(distance, FORWARD);
}
function moveBackward(distance) {
translate(distance, BACKWARD);
}
function moveLeft(distance) {
translate(distance, LEFT);
}
function moveRight(distance) {
translate(distance, RIGHT);
}
function moveUp(distance) {
translate(distance, UP);
}
function moveDown(distance) {
translate(distance, DOWN);
}
function translate(distance, axis) {
var _local2 = axis.clone();
rotate(_local2);
x = x + (distance * _local2.x);
y = y + (distance * _local2.y);
z = z + (distance * _local2.z);
}
function rotate(vector) {
var _local11 = vector.x;
var _local8 = vector.y;
var _local5 = vector.z;
var _local17 = _rotationX;
var _local15 = _rotationY;
var _local13 = _rotationZ;
var _local16 = Math.cos(_local17);
var _local9 = Math.sin(_local17);
var _local14 = Math.cos(_local15);
var _local6 = Math.sin(_local15);
var _local12 = Math.cos(_local13);
var _local3 = Math.sin(_local13);
var _local10 = (_local11 * _local12) - (_local8 * _local3);
var _local7 = (_local8 * _local12) + (_local11 * _local3);
var _local19 = (_local10 * _local14) - (_local5 * _local6);
var _local4 = (_local5 * _local14) + (_local10 * _local6);
var _local18 = (_local7 * _local16) - (_local4 * _local9);
var _local20 = (_local4 * _local16) + (_local7 * _local9);
vector.x = _local19;
vector.y = _local18;
vector.z = _local20;
}
function toString() {
return((((("x:" + Math.round(x)) + " y:") + Math.round(y)) + " z:") + Math.round(z));
}
static var DEGREES = true;
static var PERCENT = false;
static var FORWARD = new org.papervision3d.core.Number3D(0, 0, 1);
static var BACKWARD = new org.papervision3d.core.Number3D(0, 0, -1);
static var LEFT = new org.papervision3d.core.Number3D(-1, 0, 0);
static var RIGHT = new org.papervision3d.core.Number3D(1, 0, 1);
static var UP = new org.papervision3d.core.Number3D(0, -1, 0);
static var DOWN = new org.papervision3d.core.Number3D(0, 1, 0);
}
Symbol 725 MovieClip [__Packages.org.papervision3d.core.proto.CameraObject3D] Frame 0
class org.papervision3d.core.proto.CameraObject3D extends org.papervision3d.core.proto.DisplayObject3D
{
var z, zoom, focus, sort, sin, cos, viewport, _rotationX, _rotationY, _rotationZ;
function CameraObject3D (zoom, focus, initObject) {
super(initObject);
z = DEFAULT_Z;
this.zoom = zoom || (DEFAULT_ZOOM);
this.focus = focus || (DEFAULT_FOCUS);
sort = initObject.sort != false;
sin = new org.papervision3d.core.Number3D();
cos = new org.papervision3d.core.Number3D();
viewport = new org.papervision3d.core.geom.Viewport();
}
function transform() {
var _local6 = _rotationX;
var _local5 = _rotationY;
var _local4 = _rotationZ;
var _local3 = cos;
var _local2 = sin;
_local3.x = Math.cos(_local6);
_local2.x = Math.sin(_local6);
_local3.y = Math.cos(_local5);
_local2.y = Math.sin(_local5);
_local3.z = Math.cos(_local4);
_local2.z = Math.sin(_local4);
}
static var DEFAULT_Z = -1000;
static var DEFAULT_ZOOM = 3;
static var DEFAULT_FOCUS = 500;
}
Symbol 726 MovieClip [__Packages.org.papervision3d.core.geom.Viewport] Frame 0
class org.papervision3d.core.geom.Viewport
{
var top, bottom, right, left;
function Viewport (top, bottom, right, left) {
this.top = top || 0;
this.bottom = bottom || 0;
this.right = right || 0;
this.left = left || 0;
}
}
Symbol 727 MovieClip [__Packages.org.papervision3d.core.proto.MaterialObject3D] Frame 0
class org.papervision3d.core.proto.MaterialObject3D
{
var bitmap, lineColor, lineAlpha, fillColor, fillAlpha, animated, invisible, smooth, oneSide;
function MaterialObject3D (initObject) {
bitmap = initObject.bitmap || null;
lineColor = initObject.lineColor || 0;
lineAlpha = initObject.lineAlpha || 0;
fillColor = initObject.fillColor || 0;
fillAlpha = initObject.fillAlpha || 0;
animated = initObject.animated || false;
invisible = initObject.invisible || false;
smooth = initObject.smooth || false;
oneSide = initObject.oneSide != false;
}
static function get DEFAULT() {
var _local1 = new org.papervision3d.core.proto.MaterialObject3D();
_local1.lineColor = DEFAULT_COLOR;
_local1.lineAlpha = 100;
_local1.fillColor = DEFAULT_COLOR;
_local1.fillAlpha = 10;
_local1.oneSide = false;
return(_local1);
}
function updateBitmap() {
}
function toString() {
return((((("[MaterialObject3D] bitmap:" + bitmap) + " lineColor:") + lineColor) + " fillColor:") + fillColor);
}
static var DEFAULT_COLOR = 16711935;
}
Symbol 728 MovieClip [__Packages.org.papervision3d.scenes.Scene3D] Frame 0
class org.papervision3d.scenes.Scene3D extends org.papervision3d.core.proto.SceneObject3D
{
var container, objects, stats;
function Scene3D (container) {
super(container);
}
function renderObjects(sort) {
container.clear();
var _local2;
var _local3 = objects;
var _local4 = _local3.length;
_local4--;
while (_local2 = _local3[_local4] , _local2) {
if (_local2.visible) {
_local2.render(this);
}
}
var _local5 = stats;
_local5.performance = getTimer() - _local5.performance;
}
}
Symbol 729 MovieClip [__Packages.org.papervision3d.scenes.MovieScene3D] Frame 0
class org.papervision3d.scenes.MovieScene3D extends org.papervision3d.scenes.Scene3D
{
var containerList, container, objects, stats;
function MovieScene3D (container) {
super(container);
containerList = new Array();
}
function push(sceneElement) {
super.push(sceneElement);
if (sceneElement instanceof org.papervision3d.core.proto.DisplayObject3D) {
sceneElement.container = container.createEmptyMovieClip("Object" + objects.length, container.getNextHighestDepth());
containerList.push(sceneElement.container);
}
}
function renderObjects(sort) {
var _local7 = objects.length;
var _local4;
var _local5 = containerList;
var _local3 = 0;
while (_local4 = _local5[_local3++] , _local4) {
_local4.clear();
}
var _local2;
var objects = objects;
_local3 = objects.length;
if (sort) {
_local3--;
while (_local2 = objects[_local3] , _local2) {
if (_local2.visible) {
_local2.__get__container().swapDepths(MAX_DEPTH - _local3);
_local2.render(this);
}
}
} else {
_local3--;
while (_local2 = objects[_local3] , _local2) {
if (_local2.visible) {
_local2.render(this);
}
}
}
var _local6 = stats;
_local6.performance = getTimer() - _local6.performance;
}
static var MAX_DEPTH = 1000;
}
Symbol 730 MovieClip [__Packages.org.papervision3d.cameras.Camera3D] Frame 0
class org.papervision3d.cameras.Camera3D extends org.papervision3d.core.proto.CameraObject3D
{
var target, goto, x, y, z, _rotationY, _rotationX;
function Camera3D (target, zoom, focus, initObject) {
super(zoom, focus, initObject);
this.target = target || (org.papervision3d.core.proto.DisplayObject3D.__get__ZERO());
goto = new org.papervision3d.core.Number3D(x, y, z);
}
function transform() {
var _local3 = target;
var _local5 = _local3.x - x;
var _local6 = _local3.y - y;
var _local4 = _local3.z - z;
_rotationY = Math.atan2(_local5, _local4);
_rotationX = Math.atan2(_local6, Math.sqrt((_local4 * _local4) + (_local5 * _local5)));
super.transform();
}
function hover(type, mouseX, mouseY) {
var _local6 = target;
var _local4 = goto;
switch (type) {
case 0 :
var _local5 = 8;
var _local3 = _local4.x - _local6.x;
var _local2 = _local4.z - _local6.z;
var _local8 = Math.atan2(_local2, _local3);
var _local7 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local9 = 0.5 * mouseX;
var _local12 = _local7 * Math.cos(_local8 - _local9);
var _local10 = _local7 * Math.sin(_local8 - _local9);
var _local11 = _local4.y - (300 * mouseY);
x = x - ((x - _local12) / _local5);
y = y - ((y - _local11) / _local5);
z = z - ((z - _local10) / _local5);
break;
case 1 :
_local5 = 8;
x = x - ((x - (1000 * mouseX)) / _local5);
y = y - ((y - (1000 * mouseY)) / _local5);
}
}
}
Symbol 731 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 732 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 733 MovieClip [__Packages.org.papervision3d.materials.BitmapMaterial] Frame 0
class org.papervision3d.materials.BitmapMaterial extends org.papervision3d.core.proto.MaterialObject3D
{
var _texture, bitmap, lineAlpha, lineColor;
function BitmapMaterial (asset, initObject) {
super(initObject);
texture = (asset);
}
function get texture() {
return(_texture);
}
function set texture(asset) {
bitmap = createBitmap(asset);
_texture = asset;
//return(texture);
}
function toString() {
return((((("Texture:" + texture) + " lineColor:") + lineColor) + " lineAlpha:") + lineAlpha);
}
function createBitmap(asset) {
return(asset);
}
}
Symbol 734 MovieClip [__Packages.org.papervision3d.objects.Points] Frame 0
class org.papervision3d.objects.Points extends org.papervision3d.core.proto.DisplayObject3D
{
var vertices, _scale, _scaleX, _scaleY, _scaleZ, _rotation, _rotationX, _rotationY, _rotationZ, x, y, z;
function Points (vertices, initObject) {
super(initObject);
this.vertices = vertices || (new Array());
}
function project(camera) {
if (_scale) {
updateScale(vertices, new org.papervision3d.core.Number3D(_scaleX, _scaleY, _scaleZ));
_scale = false;
_rotation = true;
}
if (_rotation) {
updateRotation(vertices, new org.papervision3d.core.Number3D(_rotationX, _rotationY, _rotationZ));
_rotation = false;
}
var _local23 = camera.x;
var _local22 = camera.y;
var _local21 = camera.z;
var _local28 = camera.sin;
var _local15 = _local28.x;
var _local13 = _local28.y;
var _local12 = _local28.z;
var _local27 = camera.cos;
var _local18 = _local27.x;
var _local16 = _local27.y;
var _local14 = _local27.z;
_local23 = _local23 - x;
_local22 = _local22 - y;
_local21 = _local21 - z;
var _local2;
var vertices = vertices;
var _local25 = vertices.length;
var _local17 = camera.focus;
var _local24 = camera.zoom;
var _local3;
var _local6;
var _local11;
var _local9;
var _local7;
var _local10;
var _local8;
var _local20;
var _local5;
var _local19;
var _local4;
_local25--;
while (_local2 = vertices[_local25] , _local2) {
_local11 = _local2.x - _local23;
_local9 = _local2.y - _local22;
_local7 = _local2.z - _local21;
_local10 = (_local11 * _local14) - (_local9 * _local12);
_local8 = (_local9 * _local14) + (_local11 * _local12);
_local20 = (_local10 * _local16) - (_local7 * _local13);
_local5 = (_local7 * _local16) + (_local10 * _local13);
_local19 = (_local8 * _local18) - (_local5 * _local15);
_local4 = (_local5 * _local18) + (_local8 * _local15);
_local2.visible = _local4 > 0;
if (_local2.visible) {
_local3 = _local2.screen;
_local6 = (_local17 / (_local17 + _local4)) * _local24;
_local3.x = _local20 * _local6;
_local3.y = _local19 * _local6;
_local3.z = _local4;
}
}
}
function updateRotation(vertices, rotation) {
var _local14 = Math.cos(rotation.x);
var _local11 = Math.sin(rotation.x);
var _local13 = Math.cos(rotation.y);
var _local10 = Math.sin(rotation.y);
var _local12 = Math.cos(rotation.z);
var _local9 = Math.sin(rotation.z);
var _local8;
var _local6;
var _local4;
var _local7;
var _local5;
var _local16;
var _local3;
var _local15;
var _local17;
var _local2;
var _local1;
var _local18 = vertices.length;
_local18--;
while (_local1 = vertices[_local18] , _local1) {
_local2 = _local1.toRotate;
_local8 = _local2.x;
_local6 = _local2.y;
_local4 = _local2.z;
_local7 = (_local8 * _local12) - (_local6 * _local9);
_local5 = (_local6 * _local12) + (_local8 * _local9);
_local16 = (_local7 * _local13) - (_local4 * _local10);
_local3 = (_local4 * _local13) + (_local7 * _local10);
_local15 = (_local5 * _local14) - (_local3 * _local11);
_local17 = (_local3 * _local14) + (_local5 * _local11);
_local1.x = _local16;
_local1.y = _local15;
_local1.z = _local17;
}
}
function updateScale(vertices, scale) {
var _local6 = scale.x;
var _local5 = scale.y;
var _local4 = scale.z;
var _local1;
var _local2;
var _local7 = vertices.length;
var _local3;
_local7--;
while (_local3 = vertices[_local7] , _local3) {
_local1 = _local3.toScale;
_local2 = _local3.toRotate;
_local2.x = _local1.x * _local6;
_local2.y = _local1.y * _local5;
_local2.z = _local1.z * _local4;
}
}
function boundingBox() {
var _local4 = vertices;
var _local2 = new Object();
_local2.min = new org.papervision3d.core.Number3D();
_local2.max = new org.papervision3d.core.Number3D();
_local2.size = new org.papervision3d.core.Number3D();
for (var _local5 in _local4) {
var _local3 = _local4[Number(_local5)];
_local2.min.x = ((_local2.min.x == undefined) ? (_local3.x) : (Math.min(_local3.x, _local2.min.x)));
_local2.max.x = ((_local2.max.x == undefined) ? (_local3.x) : (Math.max(_local3.x, _local2.max.x)));
_local2.min.y = ((_local2.min.y == undefined) ? (_local3.y) : (Math.min(_local3.y, _local2.min.y)));
_local2.max.y = ((_local2.max.y == undefined) ? (_local3.y) : (Math.max(_local3.y, _local2.max.y)));
_local2.min.z = ((_local2.min.z == undefined) ? (_local3.z) : (Math.min(_local3.z, _local2.min.z)));
_local2.max.z = ((_local2.max.z == undefined) ? (_local3.z) : (Math.max(_local3.z, _local2.max.z)));
}
_local2.size.x = _local2.max.x - _local2.min.x;
_local2.size.y = _local2.max.y - _local2.min.y;
_local2.size.z = _local2.max.z - _local2.min.z;
return(_local2);
}
}
Symbol 735 MovieClip [__Packages.org.papervision3d.core.geom.Vertex3D] Frame 0
class org.papervision3d.core.geom.Vertex3D
{
var x, y, z, toScale, toRotate, screen, visible;
function Vertex3D (x, y, z) {
this.x = x || 0;
this.y = y || 0;
this.z = z || 0;
toScale = new org.papervision3d.core.Number3D(x, y, z);
toRotate = new org.papervision3d.core.Number3D(x, y, z);
screen = org.papervision3d.core.Number3D.ZERO;
visible = false;
}
}
Symbol 736 MovieClip [__Packages.org.papervision3d.objects.Mesh] Frame 0
class org.papervision3d.objects.Mesh extends org.papervision3d.objects.Points
{
var faces, _material, sortFaces, showFaces, _visibleNow, screenZ, _container, boundingBox;
function Mesh (material, vertices, faces, initObject) {
super(vertices, initObject);
this.faces = faces || (new Array());
_material = material || (org.papervision3d.core.proto.MaterialObject3D.__get__DEFAULT());
sortFaces = initObject.sortFaces != false;
showFaces = initObject.showFaces || false;
}
function get material() {
return(_material);
}
function set material(newMaterial) {
transformUV(newMaterial);
_material = newMaterial;
//return(material);
}
function project(camera) {
super.project(camera);
var _local18 = faces;
var _local17 = 0;
var _local16 = 0;
var _local9 = camera.viewport.top;
var _local10 = camera.viewport.bottom;
var _local11 = camera.viewport.right;
var _local8 = camera.viewport.left;
var _local15;
var _local14;
var _local13;
var _local3;
var _local7;
var _local6;
var _local5;
var _local4;
var _local12 = 0;
while (_local4 = _local18[_local12] , _local4) {
_local15 = _local4.vertices[0];
_local14 = _local4.vertices[1];
_local13 = _local4.vertices[2];
_local3 = ((Number(_local15.visible) + Number(_local14.visible)) + Number(_local13.visible)) == 3;
_local7 = _local15.screen;
_local6 = _local14.screen;
_local5 = _local13.screen;
if (_local3 && (_local9)) {
_local3 = ((_local7.y > _local9) || (_local6.y > _local9)) || (_local5.y > _local9);
}
if (_local3 && (_local10)) {
_local3 = ((_local7.y < _local10) || (_local6.y < _local10)) || (_local5.y < _local10);
}
if (_local3 && (_local11)) {
_local3 = ((_local7.x < _local11) || (_local6.x < _local11)) || (_local5.x < _local11);
}
if (_local3 && (_local8)) {
_local3 = ((_local7.x > _local8) || (_local6.x > _local8)) || (_local5.x > _local8);
}
_local4.isVisible = _local3;
if (_local3) {
_local17 = _local17 + ((_local4.screenZ = ((_local7.z + _local6.z) + _local5.z) / 3));
_local16++;
}
_local12++;
}
_visibleNow = _local16 > 0;
if (_visibleNow) {
screenZ = _local17 / _local16;
} else {
screenZ = 0;
}
}
function render(scene) {
if (_visibleNow) {
var _local5 = faces;
if (sortFaces) {
_local5.sortOn("screenZ", Array.DESCENDING | Array.NUMERIC);
}
var _local8 = _container || (scene.container);
var _local6 = _material;
var _local7 = showFaces;
var _local4 = 0;
var _local3;
var _local2 = 0;
while (_local3 = _local5[_local2] , _local3) {
if (_local3.isVisible) {
_local4 = _local4 + _local3.render(_local8, _local6, _local7);
}
_local2++;
}
scene.stats.rendered = scene.stats.rendered + _local4;
}
}
function projectTexture(u, v) {
u = u || "x";
v = v || "y";
var _local17 = faces;
var _local18 = boundingBox();
var _local10 = _local18.min[u];
var _local12 = _local18.size[u];
var _local9 = _local18.min[v];
var _local11 = _local18.size[v];
var _local16 = _material;
for (var _local19 in _local17) {
var _local2 = _local17[Number(_local19)];
var _local3 = _local2.vertices;
var _local6 = _local3[0];
var _local5 = _local3[1];
var _local4 = _local3[2];
var _local15 = new org.papervision3d.core.NumberUV((_local6[u] - _local10) / _local12, (_local6[v] - _local9) / _local11);
var _local14 = new org.papervision3d.core.NumberUV((_local5[u] - _local10) / _local12, (_local5[v] - _local9) / _local11);
var _local13 = new org.papervision3d.core.NumberUV((_local4[u] - _local10) / _local12, (_local4[v] - _local9) / _local11);
_local2.uv = [_local15, _local14, _local13];
if (_local16.bitmap) {
_local2.transformUV(_local16);
}
}
}
function transformUV(material) {
if (material.bitmap) {
for (var _local3 in faces) {
faces[_local3].transformUV(material);
}
}
}
}
Symbol 737 MovieClip [__Packages.org.papervision3d.core.geom.Face3D] Frame 0
class org.papervision3d.core.geom.Face3D
{
static var _bitmapMatrix;
var vertices, material, uv, id, _a, _b, _c, _d, _tx, _ty, materialBack;
function Face3D (vertices, material, uv) {
this.vertices = vertices;
this.material = material;
this.uv = uv;
if (uv && (material.bitmap)) {
transformUV();
}
id = _totalFaces++;
if (!_bitmapMatrix) {
_bitmapMatrix = new flash.geom.Matrix();
}
}
function transformUV(objectMaterial) {
var _local8 = material || (objectMaterial);
if (_local8.bitmap) {
var _local5 = uv;
var _local12 = _local8.bitmap.width;
var _local10 = _local8.bitmap.height;
var _local4 = _local5[0].u * _local12;
var _local3 = _local5[0].v * _local10;
var _local11 = _local5[1].u * _local12;
var _local9 = _local5[1].v * _local10;
var _local7 = _local5[2].u * _local12;
var _local6 = _local5[2].v * _local10;
if (((_local4 == _local11) && (_local3 == _local9)) || ((_local4 == _local7) && (_local3 == _local6))) {
_local4 = _local4 - ((_local4 > 0.05) ? 0.05 : -0.05);
_local3 = _local3 - ((_local3 > 0.07) ? 0.07 : -0.07);
}
if ((_local7 == _local11) && (_local6 == _local9)) {
_local7 = _local7 - ((_local7 > 0.05) ? 0.04 : -0.04);
_local6 = _local6 - ((_local6 > 0.06) ? 0.06 : -0.06);
}
var _local16 = _local11 - _local4;
var _local15 = _local9 - _local3;
var _local14 = _local7 - _local4;
var _local13 = _local6 - _local3;
var _local2 = new flash.geom.Matrix(_local16, _local15, _local14, _local13, _local4, _local3);
_local2.invert();
_a = _local2.a;
_b = _local2.b;
_c = _local2.c;
_d = _local2.d;
_tx = _local2.tx;
_ty = _local2.ty;
} else {
org.papervision3d.Papervision3D.log("Face3D: transformUV() material.bitmap not found!");
}
}
function render(container, objectMaterial, randomFill) {
var _local13 = vertices;
var _local21 = _local13[0].screen;
var _local20 = _local13[1].screen;
var _local19 = _local13[2].screen;
var _local5 = _local21.x;
var _local4 = _local21.y;
var _local11 = _local20.x;
var _local9 = _local20.y;
var _local10 = _local19.x;
var _local7 = _local19.y;
var _local2 = material || (objectMaterial);
if (_local2.oneSide && ((((_local10 - _local5) * (_local9 - _local4)) - ((_local7 - _local4) * (_local11 - _local5))) < 0)) {
if (materialBack) {
_local2 = materialBack;
} else {
return(0);
}
}
if (_local2.invisible) {
return(0);
}
var _local14 = _local2.bitmap;
var _local8 = _local2.fillAlpha;
var _local12 = _local2.lineAlpha;
if (randomFill) {
container.beginFill(Math.random() * 16777215);
} else if (_local14) {
var _local24 = _a;
var _local23 = _b;
var _local22 = _c;
var _local27 = _d;
var _local26 = _tx;
var _local25 = _ty;
var _local17 = _local11 - _local5;
var _local16 = _local9 - _local4;
var _local15 = _local10 - _local5;
var _local18 = _local7 - _local4;
var _local6 = _bitmapMatrix;
_local6.a = (_local24 * _local17) + (_local23 * _local15);
_local6.b = (_local24 * _local16) + (_local23 * _local18);
_local6.c = (_local22 * _local17) + (_local27 * _local15);
_local6.d = (_local22 * _local16) + (_local27 * _local18);
_local6.tx = ((_local26 * _local17) + (_local25 * _local15)) + _local5;
_local6.ty = ((_local26 * _local16) + (_local25 * _local18)) + _local4;
container.beginBitmapFill(_local14, _local6, true, _local2.smooth);
} else if (_local8) {
container.beginFill(_local2.fillColor, _local8);
}
if (_local12) {
container.lineStyle(0, _local2.lineColor, _local12);
} else {
container.lineStyle();
}
container.moveTo(_local5, _local4);
container.lineTo(_local11, _local9);
container.lineTo(_local10, _local7);
if (_local12) {
container.lineTo(_local5, _local4);
}
if (_local14 || (_local8)) {
container.endFill();
}
return(1);
}
static var _totalFaces = 0;
}
Symbol 738 MovieClip [__Packages.org.papervision3d.core.NumberUV] Frame 0
class org.papervision3d.core.NumberUV
{
var u, v;
function NumberUV (u, v) {
this.u = u || 0;
this.v = v || 0;
}
function clone() {
return(new org.papervision3d.core.NumberUV(u, v));
}
static function get ZERO() {
return(new org.papervision3d.core.NumberUV(0, 0));
}
function toString() {
return((("u:" + u) + " v:") + v);
}
}
Symbol 739 MovieClip [__Packages.org.papervision3d.objects.Plane] Frame 0
class org.papervision3d.objects.Plane extends org.papervision3d.objects.Mesh
{
var segmentsW, segmentsH, vertices, faces, transformUV, _material;
function Plane (material, width, height, segmentsW, segmentsH, initObject) {
super(material, new Array(), new Array(), initObject);
this.segmentsW = segmentsW || (DEFAULT_SEGMENTS);
this.segmentsH = segmentsH || (this.segmentsW);
var _local3 = DEFAULT_SCALE;
if (!height) {
if (width) {
_local3 = width;
}
if (material && (material.bitmap)) {
width = material.bitmap.width * _local3;
height = material.bitmap.height * _local3;
} else {
width = DEFAULT_SIZE * _local3;
height = DEFAULT_SIZE * _local3;
}
}
buildPlane(width, height);
}
function buildPlane(width, height) {
var _local5 = segmentsW;
var _local4 = segmentsH;
var _local23 = _local5 + 1;
var _local7 = _local4 + 1;
var _local6 = vertices;
var _local16 = faces;
var _local17 = width / 2;
var _local18 = height / 2;
var _local19 = width / _local5;
var _local20 = height / _local4;
var _local3 = 0;
while (_local3 < (_local5 + 1)) {
var _local2 = 0;
while (_local2 < _local7) {
var _local15 = (_local3 * _local19) - _local17;
var _local14 = (_local2 * _local20) - _local18;
_local6.push(new org.papervision3d.core.geom.Vertex3D(_local15, _local14, 0));
_local2++;
}
_local3++;
}
var _local13;
var _local11;
var _local12;
_local3 = 0;
while (_local3 < _local5) {
var _local2 = 0;
while (_local2 < _local4) {
var _local10 = _local6[(_local3 * _local7) + _local2];
var _local8 = _local6[(_local3 * _local7) + (_local2 + 1)];
var _local9 = _local6[((_local3 + 1) * _local7) + _local2];
_local13 = new org.papervision3d.core.NumberUV(_local3 / _local5, _local2 / _local4);
_local11 = new org.papervision3d.core.NumberUV(_local3 / _local5, (_local2 + 1) / _local4);
_local12 = new org.papervision3d.core.NumberUV((_local3 + 1) / _local5, _local2 / _local4);
_local16.push(new org.papervision3d.core.geom.Face3D([_local10, _local9, _local8], null, [_local13, _local12, _local11]));
_local10 = _local6[((_local3 + 1) * _local7) + (_local2 + 1)];
_local8 = _local6[((_local3 + 1) * _local7) + _local2];
_local9 = _local6[(_local3 * _local7) + (_local2 + 1)];
_local13 = new org.papervision3d.core.NumberUV((_local3 + 1) / _local5, (_local2 + 1) / _local4);
_local11 = new org.papervision3d.core.NumberUV((_local3 + 1) / _local5, _local2 / _local4);
_local12 = new org.papervision3d.core.NumberUV(_local3 / _local5, (_local2 + 1) / _local4);
_local16.push(new org.papervision3d.core.geom.Face3D([_local10, _local9, _local8], null, [_local13, _local12, _local11]));
_local2++;
}
_local3++;
}
transformUV(_material);
}
static var DEFAULT_SIZE = 500;
static var DEFAULT_SCALE = 1;
static var DEFAULT_SEGMENTS = 1;
}
Symbol 740 MovieClip [__Packages.com.caurina.transitions.Tweener] Frame 0
class com.caurina.transitions.Tweener
{
static var _specialPropertySplitterList, _specialPropertyModifierList, _transitionList, _currentTime, _tweenList, _specialPropertyList;
function Tweener () {
trace("Tweener is an static class and should not be instantiated.");
}
static function addTween() {
if ((arguments.length < 2) || (arguments[0] == undefined)) {
return(false);
}
var _local11 = new Array();
var _local3;
var _local39;
var _local4;
var _local38;
if (arguments[0] instanceof Array) {
_local3 = 0;
while (_local3 < arguments[0].length) {
_local11.push(arguments[0][_local3]);
_local3++;
}
} else {
_local3 = 0;
while (_local3 < (arguments.length - 1)) {
_local11.push(arguments[_local3]);
_local3++;
}
}
var _local5 = com.caurina.transitions.TweenListObj.makePropertiesChain(arguments[arguments.length - 1]);
if (!_inited) {
init();
}
if ((!_engineExists) || (_root[getControllerName()] == undefined)) {
startEngine();
}
var _local17 = (isNaN(_local5.time) ? 0 : (_local5.time));
var _local15 = (isNaN(_local5.delay) ? 0 : (_local5.delay));
var _local7 = new Object();
var _local21 = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, quickAdd:true};
var _local10 = new Object();
for (_local4 in _local5) {
if (!_local21[_local4]) {
if (_specialPropertySplitterList[_local4] != undefined) {
var _local9 = _specialPropertySplitterList[_local4].splitValues(_local5[_local4], _specialPropertySplitterList[_local4].parameters);
_local3 = 0;
while (_local3 < _local9.length) {
_local7[_local9[_local3].name] = {valueStart:undefined, valueComplete:_local9[_local3].value};
_local3++;
}
} else if (_specialPropertyModifierList[_local4] != undefined) {
var _local8 = _specialPropertyModifierList[_local4].modifyValues(_local5[_local4]);
_local3 = 0;
while (_local3 < _local8.length) {
_local10[_local8[_local3].name] = {modifierParameters:_local8[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local4].getValue};
_local3++;
}
} else {
_local7[_local4] = {valueStart:undefined, valueComplete:_local5[_local4]};
}
}
}
for (_local4 in _local10) {
if (_local7[_local4] != undefined) {
_local7[_local4].modifierParameters = _local10[_local4].modifierParameters;
_local7[_local4].modifierFunction = _local10[_local4].modifierFunction;
}
}
var _local20;
if (typeof(_local5.transition) == "string") {
var _local22 = _local5.transition.toLowerCase();
_local20 = _transitionList[_local22];
} else {
_local20 = _local5.transition;
}
if (_local20 == undefined) {
_local20 = _transitionList.easeoutexpo;
}
var _local12;
var _local6;
var _local16;
_local3 = 0;
while (_local3 < _local11.length) {
_local12 = new Object();
for (_local4 in _local7) {
_local12[_local4] = new com.caurina.transitions.PropertyInfoObj(_local7[_local4].valueStart, _local7[_local4].valueComplete, _local7[_local4].modifierFunction, _local7[_local4].modifierParameters);
}
_local6 = new com.caurina.transitions.TweenListObj(_local11[_local3], _currentTime + ((_local15 * 1000) / _timeScale), _currentTime + (((_local15 * 1000) + (_local17 * 1000)) / _timeScale), _local5.useFrames == true, _local20);
_local6.properties = _local12;
_local6.onStart = _local5.onStart;
_local6.onUpdate = _local5.onUpdate;
_local6.onComplete = _local5.onComplete;
_local6.onOverwrite = _local5.onOverwrite;
_local6.onError = _local5.onError;
_local6.onStartParams = _local5.onStartParams;
_local6.onUpdateParams = _local5.onUpdateParams;
_local6.onCompleteParams = _local5.onCompleteParams;
_local6.onOverwriteParams = _local5.onOverwriteParams;
_local6.rounded = _local5.rounded;
_local6.skipUpdates = _local5.skipUpdates;
if (!_local5.quickAdd) {
removeTweensByTime(_local6.scope, _local6.properties, _local6.timeStart, _local6.timeComplete);
}
_tweenList.push(_local6);
if ((_local17 == 0) && (_local15 == 0)) {
_local16 = _tweenList.length - 1;
updateTweenByIndex(_local16);
removeTweenByIndex(_local16);
}
_local3++;
}
return(true);
}
static function addCaller() {
if ((arguments.length < 2) || (arguments[0] == undefined)) {
return(false);
}
var _local6 = new Array();
var _local5;
var _local12;
if (arguments[0] instanceof Array) {
_local5 = 0;
while (_local5 < arguments[0].length) {
_local6.push(arguments[0][_local5]);
_local5++;
}
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local6.push(arguments[_local5]);
_local5++;
}
}
var _local4 = arguments[arguments.length - 1];
if (!_inited) {
init();
}
if ((!_engineExists) || (_root[getControllerName()] == undefined)) {
startEngine();
}
var _local9 = (isNaN(_local4.time) ? 0 : (_local4.time));
var _local7 = (isNaN(_local4.delay) ? 0 : (_local4.delay));
var _local10;
if (typeof(_local4.transition) == "string") {
var _local11 = _local4.transition.toLowerCase();
_local10 = _transitionList[_local11];
} else {
_local10 = _local4.transition;
}
if (_local10 == undefined) {
_local10 = _transitionList.easeoutexpo;
}
var _local3;
var _local8;
_local5 = 0;
while (_local5 < _local6.length) {
_local3 = new com.caurina.transitions.TweenListObj(_local6[_local5], _currentTime + ((_local7 * 1000) / _timeScale), _currentTime + (((_local7 * 1000) + (_local9 * 1000)) / _timeScale), _local4.useFrames == true, _local10);
_local3.properties = undefined;
_local3.onStart = _local4.onStart;
_local3.onUpdate = _local4.onUpdate;
_local3.onComplete = _local4.onComplete;
_local3.onOverwrite = _local4.onOverwrite;
_local3.onStartParams = _local4.onStartParams;
_local3.onUpdateParams = _local4.onUpdateParams;
_local3.onCompleteParams = _local4.onCompleteParams;
_local3.onOverwriteParams = _local4.onOverwriteParams;
_local3.isCaller = true;
_local3.count = _local4.count;
_local3.waitFrames = _local4.waitFrames;
_tweenList.push(_local3);
if ((_local9 == 0) && (_local7 == 0)) {
_local8 = _tweenList.length - 1;
updateTweenByIndex(_local8);
removeTweenByIndex(_local8);
}
_local5++;
}
return(true);
}
static function removeTweensByTime(p_scope, p_properties, p_timeStart, p_timeComplete) {
var _local4 = false;
var _local3;
var _local1;
var _local6 = _tweenList.length;
var _local2;
_local1 = 0;
while (_local1 < _local6) {
if (p_scope == _tweenList[_local1].scope) {
if ((p_timeComplete > _tweenList[_local1].timeStart) && (p_timeStart < _tweenList[_local1].timeComplete)) {
_local3 = false;
for (_local2 in _tweenList[_local1].properties) {
if (p_properties[_local2] != undefined) {
if (_tweenList[_local1].onOverwrite != undefined) {
try {
_tweenList[_local1].onOverwrite.apply(_tweenList[_local1].scope, _tweenList[_local1].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[_local1], e, "onOverwrite");
}
}
_tweenList[_local1].properties[_local2] = undefined;
delete _tweenList[_local1].properties[_local2];
_local3 = true;
_local4 = true;
}
}
if (_local3) {
if (com.caurina.transitions.AuxFunctions.getObjectLength(_tweenList[_local1].properties) == 0) {
removeTweenByIndex(_local1);
}
}
}
}
_local1++;
}
return(_local4);
}
static function removeTweens(p_scope) {
var _local3 = new Array();
var _local2;
_local2 = 1;
while (_local2 < arguments.length) {
if ((typeof(arguments[_local2]) == "string") && (!com.caurina.transitions.AuxFunctions.isInArray(arguments[_local2], _local3))) {
_local3.push(arguments[_local2]);
}
_local2++;
}
return(affectTweens(removeTweenByIndex, p_scope, _local3));
}
static function removeAllTweens() {
var _local2 = false;
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
removeTweenByIndex(_local1);
_local2 = true;
_local1++;
}
return(_local2);
}
static function pauseTweens(p_scope) {
var _local3 = new Array();
var _local2;
_local2 = 1;
while (_local2 < arguments.length) {
if ((typeof(arguments[_local2]) == "string") && (!com.caurina.transitions.AuxFunctions.isInArray(arguments[_local2], _local3))) {
_local3.push(arguments[_local2]);
}
_local2++;
}
return(affectTweens(pauseTweenByIndex, p_scope, _local3));
}
static function pauseAllTweens() {
var _local2 = false;
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
pauseTweenByIndex(_local1);
_local2 = true;
_local1++;
}
return(_local2);
}
static function resumeTweens(p_scope) {
var _local3 = new Array();
var _local2;
_local2 = 1;
while (_local2 < arguments.length) {
if ((typeof(arguments[_local2]) == "string") && (!com.caurina.transitions.AuxFunctions.isInArray(arguments[_local2], _local3))) {
_local3.push(arguments[_local2]);
}
_local2++;
}
return(affectTweens(resumeTweenByIndex, p_scope, _local3));
}
static function resumeAllTweens() {
var _local2 = false;
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
resumeTweenByIndex(_local1);
_local2 = true;
_local1++;
}
return(_local2);
}
static function affectTweens(p_affectFunction, p_scope, p_properties) {
var _local5 = false;
var _local2;
if (!_tweenList) {
return(false);
}
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == p_scope) {
if (p_properties.length == 0) {
p_affectFunction(_local2);
_local5 = true;
} else {
var _local4 = new Array();
var _local1;
_local1 = 0;
while (_local1 < p_properties.length) {
if (_tweenList[_local2].properties[p_properties[_local1]] != undefined) {
_local4.push(p_properties[_local1]);
}
_local1++;
}
if (_local4.length > 0) {
var _local7 = com.caurina.transitions.AuxFunctions.getObjectLength(_tweenList[_local2].properties);
if (_local7 == _local4.length) {
p_affectFunction(_local2);
_local5 = true;
} else {
var _local8 = splitTweens(_local2, _local4);
p_affectFunction(_local8);
_local5 = true;
}
}
}
}
_local2++;
}
return(_local5);
}
static function splitTweens(p_tween, p_properties) {
var _local6 = _tweenList[p_tween];
var _local5 = _local6.clone(false);
var _local1;
var _local2;
_local1 = 0;
while (_local1 < p_properties.length) {
_local2 = p_properties[_local1];
if (_local6.properties[_local2] != undefined) {
_local6.properties[_local2] = undefined;
delete _local6.properties[_local2];
}
_local1++;
}
var _local4;
for (_local2 in _local5.properties) {
_local4 = false;
_local1 = 0;
while (_local1 < p_properties.length) {
if (p_properties[_local1] == _local2) {
_local4 = true;
break;
}
_local1++;
}
if (!_local4) {
_local5.properties[_local2] = undefined;
delete _local5.properties[_local2];
}
}
_tweenList.push(_local5);
return(_tweenList.length - 1);
}
static function updateTweens() {
if (_tweenList.length == 0) {
return(false);
}
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
if (!_tweenList[_local1].isPaused) {
if (!updateTweenByIndex(_local1)) {
removeTweenByIndex(_local1);
}
if (_tweenList[_local1] == null) {
removeTweenByIndex(_local1, true);
_local1--;
}
}
_local1++;
}
return(true);
}
static function removeTweenByIndex(p_tween, p_finalRemoval) {
_tweenList[p_tween] = null;
if (p_finalRemoval) {
_tweenList.splice(p_tween, 1);
}
return(true);
}
static function pauseTweenByIndex(p_tween) {
var _local1 = _tweenList[p_tween];
if ((_local1 == null) || (_local1.isPaused)) {
return(false);
}
_local1.timePaused = _currentTime;
_local1.isPaused = true;
return(true);
}
static function resumeTweenByIndex(p_tween) {
var _local1 = _tweenList[p_tween];
if ((_local1 == null) || (!_local1.isPaused)) {
return(false);
}
_local1.timeStart = _local1.timeStart + (_currentTime - _local1.timePaused);
_local1.timeComplete = _local1.timeComplete + (_currentTime - _local1.timePaused);
_local1.timePaused = undefined;
_local1.isPaused = false;
return(true);
}
static function updateTweenByIndex(i) {
var _local1 = _tweenList[i];
if ((_local1 == null) || (!_local1.scope)) {
return(false);
}
var _local11 = false;
var _local12;
var _local2;
var _local6;
var _local8;
var _local7;
var _local5;
var _local4;
var _local10;
var _local3;
if (_currentTime >= _local1.timeStart) {
_local10 = _local1.scope;
if (_local1.isCaller) {
do {
_local6 = ((_local1.timeComplete - _local1.timeStart) / _local1.count) * (_local1.timesCalled + 1);
_local8 = _local1.timeStart;
_local7 = _local1.timeComplete - _local1.timeStart;
_local5 = _local1.timeComplete - _local1.timeStart;
_local2 = _local1.transition(_local6, _local8, _local7, _local5);
if (_currentTime >= _local2) {
if (_local1.onUpdate != undefined) {
try {
_local1.onUpdate.apply(_local10, _local1.onUpdateParams);
} catch(e:Error) {
handleError(_local1, e, "onUpdate");
}
}
_local1.timesCalled++;
if (_local1.timesCalled >= _local1.count) {
_local11 = true;
break;
}
if (_local1.waitFrames) {
break;
}
}
} while (_currentTime >= _local2);
} else {
_local12 = ((_local1.skipUpdates < 1) || (_local1.skipUpdates == undefined)) || (_local1.updatesSkipped >= _local1.skipUpdates);
if (_currentTime >= _local1.timeComplete) {
_local11 = true;
_local12 = true;
}
if (!_local1.hasStarted) {
if (_local1.onStart != undefined) {
try {
_local1.onStart.apply(_local10, _local1.onStartParams);
} catch(e:Error) {
handleError(_local1, e, "onStart");
}
}
for (_local4 in _local1.properties) {
var _local9 = getPropertyValue(_local10, _local4);
_local1.properties[_local4].valueStart = (isNaN(_local9) ? (_local1.properties[_local4].valueComplete) : (_local9));
}
_local12 = true;
_local1.hasStarted = true;
}
if (_local12) {
for (_local4 in _local1.properties) {
_local3 = _local1.properties[_local4];
if (_local11) {
_local2 = _local3.valueComplete;
} else if (_local3.hasModifier) {
_local6 = _currentTime - _local1.timeStart;
_local5 = _local1.timeComplete - _local1.timeStart;
_local2 = _local1.transition(_local6, 0, 1, _local5);
_local2 = _local3.modifierFunction(_local3.valueStart, _local3.valueComplete, _local2, _local3.modifierParameters);
} else {
_local6 = _currentTime - _local1.timeStart;
_local8 = _local3.valueStart;
_local7 = _local3.valueComplete - _local3.valueStart;
_local5 = _local1.timeComplete - _local1.timeStart;
_local2 = _local1.transition(_local6, _local8, _local7, _local5);
}
if (_local1.rounded) {
_local2 = Math.round(_local2);
}
setPropertyValue(_local10, _local4, _local2);
}
_local1.updatesSkipped = 0;
if (_local1.onUpdate != undefined) {
try {
_local1.onUpdate.apply(_local10, _local1.onUpdateParams);
} catch(e:Error) {
handleError(_local1, e, "onUpdate");
}
}
} else {
_local1.updatesSkipped++;
}
}
if (_local11 && (_local1.onComplete != undefined)) {
try {
_local1.onComplete.apply(_local10, _local1.onCompleteParams);
} catch(e:Error) {
handleError(_local1, e, "onComplete");
}
}
return(!_local11);
}
return(true);
}
static function init() {
_inited = true;
_transitionList = new Object();
com.caurina.transitions.Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
com.caurina.transitions.SpecialPropertiesDefault.init();
}
static function registerTransition(p_name, p_function) {
if (!_inited) {
init();
}
_transitionList[p_name] = p_function;
}
static function registerSpecialProperty(p_name, p_getFunction, p_setFunction, p_parameters) {
if (!_inited) {
init();
}
var _local1 = new com.caurina.transitions.SpecialProperty(p_getFunction, p_setFunction, p_parameters);
_specialPropertyList[p_name] = _local1;
}
static function registerSpecialPropertyModifier(p_name, p_modifyFunction, p_getFunction) {
if (!_inited) {
init();
}
var _local1 = new com.caurina.transitions.SpecialPropertyModifier(p_modifyFunction, p_getFunction);
_specialPropertyModifierList[p_name] = _local1;
}
static function registerSpecialPropertySplitter(p_name, p_splitFunction, p_parameters) {
if (!_inited) {
init();
}
var _local1 = new com.caurina.transitions.SpecialPropertySplitter(p_splitFunction, p_parameters);
_specialPropertySplitterList[p_name] = _local1;
}
static function startEngine() {
_engineExists = true;
_tweenList = new Array();
var _local2 = Math.floor(Math.random() * 999999);
var _local3 = _root.createEmptyMovieClip(getControllerName(), 31338 + _local2);
_local3.onEnterFrame = function () {
com.caurina.transitions.Tweener.onEnterFrame();
};
updateTime();
}
static function stopEngine() {
_engineExists = false;
_tweenList = null;
_currentTime = 0;
delete _root[getControllerName()].onEnterFrame;
_root[getControllerName()].removeMovieClip();
}
static function getPropertyValue(p_obj, p_prop) {
if (_specialPropertyList[p_prop] != undefined) {
return(_specialPropertyList[p_prop].getValue(p_obj, _specialPropertyList[p_prop].parameters));
}
return(p_obj[p_prop]);
}
static function setPropertyValue(p_obj, p_prop, p_value) {
if (_specialPropertyList[p_prop] != undefined) {
_specialPropertyList[p_prop].setValue(p_obj, p_value, _specialPropertyList[p_prop].parameters);
} else {
p_obj[p_prop] = p_value;
}
}
static function updateTime() {
_currentTime = getTimer();
}
static function onEnterFrame() {
updateTime();
var _local1 = false;
_local1 = updateTweens();
if (!_local1) {
stopEngine();
}
}
static function setTimeScale(p_time) {
var _local1;
if (isNaN(p_time)) {
p_time = 1;
}
if (p_time < 1E-5) {
p_time = 1E-5;
}
if (p_time != _timeScale) {
_local1 = 0;
while (_local1 < _tweenList.length) {
_tweenList[_local1].timeStart = _currentTime - (((_currentTime - _tweenList[_local1].timeStart) * _timeScale) / p_time);
_tweenList[_local1].timeComplete = _currentTime - (((_currentTime - _tweenList[_local1].timeComplete) * _timeScale) / p_time);
if (_tweenList[_local1].timePaused != undefined) {
_tweenList[_local1].timePaused = _currentTime - (((_currentTime - _tweenList[_local1].timePaused) * _timeScale) / p_time);
}
_local1++;
}
_timeScale = p_time;
}
}
static function isTweening(p_scope) {
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
if (_tweenList[_local1].scope == p_scope) {
return(true);
}
_local1++;
}
return(false);
}
static function getTweens(p_scope) {
var _local1;
var _local2;
var _local3 = new Array();
_local1 = 0;
while (_local1 < _tweenList.length) {
if (_tweenList[_local1].scope == p_scope) {
for (_local2 in _tweenList[_local1].properties) {
_local3.push(_local2);
}
}
_local1++;
}
return(_local3);
}
static function getTweenCount(p_scope) {
var _local1;
var _local2 = 0;
_local1 = 0;
while (_local1 < _tweenList.length) {
if (_tweenList[_local1].scope == p_scope) {
_local2 = _local2 + com.caurina.transitions.AuxFunctions.getObjectLength(_tweenList[_local1].properties);
}
_local1++;
}
return(_local2);
}
static function handleError(pTweening, pError, pCallBackName) {
if ((pTweening.onError != undefined) && (typeof(pTweening.onError == "function"))) {
try {
pTweening.onError.apply(pTweening.scope, [pTweening.scope, pError]);
} catch(metaError:Error) {
trace((((("## [Tweener] Error: " + pTweening.scope.toString()) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError) + "\nonError error: ") + metaError);
}
} else if (pTweening.onError == undefined) {
trace((((("## [Tweener] Error: " + pTweening.scope.toString()) + " raised an error while executing the '") + pCallBackName.toString()) + "'handler. \n") + pError);
}
}
static function getVersion() {
return("AS2 1.26.62");
}
static function getControllerName() {
return("__tweener_controller__" + getVersion());
}
static function debug_getList() {
var _local3 = "";
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _tweenList.length) {
_local3 = _local3 + (("[" + _local1) + "] ::\n");
for (_local2 in _tweenList[_local1].properties) {
_local3 = _local3 + ((((" " + _local2) + " -> ") + _tweenList[_local1].properties[_local2].valueComplete) + newline);
}
_local1++;
}
return(_local3);
}
static var _engineExists = false;
static var _inited = false;
static var _timeScale = 1;
}
Symbol 741 MovieClip [__Packages.com.caurina.transitions.TweenListObj] Frame 0
class com.caurina.transitions.TweenListObj
{
var scope, timeStart, timeComplete, useFrames, transition, auxProperties, properties, isPaused, timePaused, isCaller, updatesSkipped, timesCalled, skipUpdates, hasStarted, onStart, onUpdate, onComplete, onOverwrite, onError, onStartParams, onUpdateParams, onCompleteParams, onOverwriteParams, rounded, count, waitFrames;
function TweenListObj (p_scope, p_timeStart, p_timeComplete, p_useFrames, p_transition) {
scope = p_scope;
timeStart = p_timeStart;
timeComplete = p_timeComplete;
useFrames = p_useFrames;
transition = p_transition;
auxProperties = new Object();
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
function clone(omitEvents) {
var _local2 = new com.caurina.transitions.TweenListObj(scope, timeStart, timeComplete, useFrames, transition);
_local2.properties = new Object();
for (var _local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
}
_local2.skipUpdates = skipUpdates;
_local2.updatesSkipped = updatesSkipped;
if (!omitEvents) {
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
}
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2.isCaller = isCaller;
_local2.count = count;
_local2.timesCalled = timesCalled;
_local2.waitFrames = waitFrames;
_local2.hasStarted = hasStarted;
return(_local2);
}
function toString() {
var _local2 = "\n[TweenListObj ";
_local2 = _local2 + ("scope:" + String(scope));
_local2 = _local2 + ", properties:";
var _local3 = true;
for (var _local4 in properties) {
if (!_local3) {
_local2 = _local2 + ",";
}
_local2 = _local2 + ("[name:" + properties[_local4].name);
_local2 = _local2 + (",valueStart:" + properties[_local4].valueStart);
_local2 = _local2 + (",valueComplete:" + properties[_local4].valueComplete);
_local2 = _local2 + "]";
_local3 = false;
}
_local2 = _local2 + (", timeStart:" + String(timeStart));
_local2 = _local2 + (", timeComplete:" + String(timeComplete));
_local2 = _local2 + (", useFrames:" + String(useFrames));
_local2 = _local2 + (", transition:" + String(transition));
if (skipUpdates) {
_local2 = _local2 + (", skipUpdates:" + String(skipUpdates));
}
if (updatesSkipped) {
_local2 = _local2 + (", updatesSkipped:" + String(updatesSkipped));
}
if (onStart) {
_local2 = _local2 + (", onStart:" + String(onStart));
}
if (onUpdate) {
_local2 = _local2 + (", onUpdate:" + String(onUpdate));
}
if (onComplete) {
_local2 = _local2 + (", onComplete:" + String(onComplete));
}
if (onOverwrite) {
_local2 = _local2 + (", onOverwrite:" + String(onOverwrite));
}
if (onError) {
_local2 = _local2 + (", onError:" + String(onError));
}
if (onStartParams) {
_local2 = _local2 + (", onStartParams:" + String(onStartParams));
}
if (onUpdateParams) {
_local2 = _local2 + (", onUpdateParams:" + String(onUpdateParams));
}
if (onCompleteParams) {
_local2 = _local2 + (", onCompleteParams:" + String(onCompleteParams));
}
if (onOverwriteParams) {
_local2 = _local2 + (", onOverwriteParams:" + String(onOverwriteParams));
}
if (rounded) {
_local2 = _local2 + (", rounded:" + String(rounded));
}
if (isPaused) {
_local2 = _local2 + (", isPaused:" + String(isPaused));
}
if (timePaused) {
_local2 = _local2 + (", timePaused:" + String(timePaused));
}
if (isCaller) {
_local2 = _local2 + (", isCaller:" + String(isCaller));
}
if (count) {
_local2 = _local2 + (", count:" + String(count));
}
if (timesCalled) {
_local2 = _local2 + (", timesCalled:" + String(timesCalled));
}
if (waitFrames) {
_local2 = _local2 + (", waitFrames:" + String(waitFrames));
}
if (hasStarted) {
_local2 = _local2 + (", hasStarted:" + String(hasStarted));
}
_local2 = _local2 + "]\n";
return(_local2);
}
static function makePropertiesChain(p_obj) {
var _local6 = p_obj.base;
if (_local6) {
var _local5 = {};
var _local2;
if (_local6 instanceof Array) {
_local2 = [];
var _local3 = 0;
while (_local3 < _local6.length) {
_local2.push(_local6[_local3]);
_local3++;
}
} else {
_local2 = [_local6];
}
_local2.push(p_obj);
var _local4;
var _local7 = _local2.length;
var _local1 = 0;
while (_local1 < _local7) {
if (_local2[_local1].base) {
_local4 = com.caurina.transitions.AuxFunctions.concatObjects(makePropertiesChain(_local2[_local1].base), _local2[_local1]);
} else {
_local4 = _local2[_local1];
}
_local5 = com.caurina.transitions.AuxFunctions.concatObjects(_local5, _local4);
_local1++;
}
if (_local5.base) {
delete _local5.base;
}
return(_local5);
}
return(p_obj);
}
}
Symbol 742 MovieClip [__Packages.com.caurina.transitions.AuxFunctions] Frame 0
class com.caurina.transitions.AuxFunctions
{
function AuxFunctions () {
}
static function numberToR(p_num) {
return((p_num & 16711680) >> 16);
}
static function numberToG(p_num) {
return((p_num & 65280) >> 8);
}
static function numberToB(p_num) {
return(p_num & 255);
}
static function isInArray(p_string, p_array) {
var _local2 = p_array.length;
var _local1 = 0;
while (_local1 < _local2) {
if (p_array[_local1] == p_string) {
return(true);
}
_local1++;
}
return(false);
}
static function getObjectLength(p_object) {
var _local1 = 0;
for (var _local2 in p_object) {
_local1++;
}
return(_local1);
}
static function concatObjects() {
var _local4 = {};
var _local2;
var _local3 = 0;
while (_local3 < arguments.length) {
_local2 = arguments[_local3];
for (var _local5 in _local2) {
if (_local2[_local5] == null) {
delete _local4[_local5];
} else {
_local4[_local5] = _local2[_local5];
}
}
_local3++;
}
return(_local4);
}
}
Symbol 743 MovieClip [__Packages.com.caurina.transitions.PropertyInfoObj] Frame 0
class com.caurina.transitions.PropertyInfoObj
{
var valueStart, valueComplete, hasModifier, modifierFunction, modifierParameters;
function PropertyInfoObj (p_valueStart, p_valueComplete, p_modifierFunction, p_modifierParameters) {
valueStart = p_valueStart;
valueComplete = p_valueComplete;
hasModifier = p_modifierFunction != undefined;
modifierFunction = p_modifierFunction;
modifierParameters = p_modifierParameters;
}
function clone() {
var _local2 = new com.caurina.transitions.PropertyInfoObj(valueStart, valueComplete, modifierFunction, modifierParameters);
return(_local2);
}
function toString() {
var _local2 = "\n[PropertyInfoObj ";
_local2 = _local2 + ("valueStart:" + String(valueStart));
_local2 = _local2 + ", ";
_local2 = _local2 + ("valueComplete:" + String(valueComplete));
_local2 = _local2 + ", ";
_local2 = _local2 + ("modifierFunction:" + String(modifierFunction));
_local2 = _local2 + ", ";
_local2 = _local2 + ("modifierParameters:" + String(modifierParameters));
_local2 = _local2 + "]\n";
return(_local2);
}
}
Symbol 744 MovieClip [__Packages.com.caurina.transitions.Equations] Frame 0
class com.caurina.transitions.Equations
{
function Equations () {
trace("Equations is a static class and should not be instantiated.");
}
static function init() {
com.caurina.transitions.Tweener.registerTransition("easenone", easeNone);
com.caurina.transitions.Tweener.registerTransition("linear", easeNone);
com.caurina.transitions.Tweener.registerTransition("easeinquad", easeInQuad);
com.caurina.transitions.Tweener.registerTransition("easeoutquad", easeOutQuad);
com.caurina.transitions.Tweener.registerTransition("easeinoutquad", easeInOutQuad);
com.caurina.transitions.Tweener.registerTransition("easeoutinquad", easeOutInQuad);
com.caurina.transitions.Tweener.registerTransition("easeincubic", easeInCubic);
com.caurina.transitions.Tweener.registerTransition("easeoutcubic", easeOutCubic);
com.caurina.transitions.Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
com.caurina.transitions.Tweener.registerTransition("easeoutincubic", easeOutInCubic);
com.caurina.transitions.Tweener.registerTransition("easeinquart", easeInQuart);
com.caurina.transitions.Tweener.registerTransition("easeoutquart", easeOutQuart);
com.caurina.transitions.Tweener.registerTransition("easeinoutquart", easeInOutQuart);
com.caurina.transitions.Tweener.registerTransition("easeoutinquart", easeOutInQuart);
com.caurina.transitions.Tweener.registerTransition("easeinquint", easeInQuint);
com.caurina.transitions.Tweener.registerTransition("easeoutquint", easeOutQuint);
com.caurina.transitions.Tweener.registerTransition("easeinoutquint", easeInOutQuint);
com.caurina.transitions.Tweener.registerTransition("easeoutinquint", easeOutInQuint);
com.caurina.transitions.Tweener.registerTransition("easeinsine", easeInSine);
com.caurina.transitions.Tweener.registerTransition("easeoutsine", easeOutSine);
com.caurina.transitions.Tweener.registerTransition("easeinoutsine", easeInOutSine);
com.caurina.transitions.Tweener.registerTransition("easeoutinsine", easeOutInSine);
com.caurina.transitions.Tweener.registerTransition("easeincirc", easeInCirc);
com.caurina.transitions.Tweener.registerTransition("easeoutcirc", easeOutCirc);
com.caurina.transitions.Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
com.caurina.transitions.Tweener.registerTransition("easeoutincirc", easeOutInCirc);
com.caurina.transitions.Tweener.registerTransition("easeinexpo", easeInExpo);
com.caurina.transitions.Tweener.registerTransition("easeoutexpo", easeOutExpo);
com.caurina.transitions.Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
com.caurina.transitions.Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
com.caurina.transitions.Tweener.registerTransition("easeinelastic", easeInElastic);
com.caurina.transitions.Tweener.registerTransition("easeoutelastic", easeOutElastic);
com.caurina.transitions.Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
com.caurina.transitions.Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
com.caurina.transitions.Tweener.registerTransition("easeinback", easeInBack);
com.caurina.transitions.Tweener.registerTransition("easeoutback", easeOutBack);
com.caurina.transitions.Tweener.registerTransition("easeinoutback", easeInOutBack);
com.caurina.transitions.Tweener.registerTransition("easeoutinback", easeOutInBack);
com.caurina.transitions.Tweener.registerTransition("easeinbounce", easeInBounce);
com.caurina.transitions.Tweener.registerTransition("easeoutbounce", easeOutBounce);
com.caurina.transitions.Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
com.caurina.transitions.Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(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 easeOutInQuad(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutQuad(t * 2, b, c / 2, d));
}
return(easeInQuad((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(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 easeOutInCubic(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutCubic(t * 2, b, c / 2, d));
}
return(easeInCubic((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(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 easeOutInQuart(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutQuart(t * 2, b, c / 2, d));
}
return(easeInQuart((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(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 easeOutInQuint(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutQuint(t * 2, b, c / 2, d));
}
return(easeInQuint((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutSine(t * 2, b, c / 2, d));
}
return(easeInSine((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : (((c * Math.pow(2, 10 * ((t / d) - 1))) + b) - (c * 0.001))));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : (((c * 1.001) * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(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) - (c * 0.0005));
}
t--;
return((((c / 2) * 1.0005) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutExpo(t * 2, b, c / 2, d));
}
return(easeInExpo((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(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 easeOutInCirc(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutCirc(t * 2, b, c / 2, d));
}
return(easeInCirc((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInElastic(t, b, c, d, a, p) {
var _local5;
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;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
var _local5;
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;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
var _local5;
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;
_local5 = p / 4;
} else {
_local5 = (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) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, a, p) {
if (t < (d / 2)) {
return(easeOutElastic(t * 2, b, c / 2, d, a, p));
}
return(easeInElastic((t * 2) - d, b + (c / 2), c / 2, d, a, p));
}
static function easeInBack(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 easeOutBack(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 easeInOutBack(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 easeOutInBack(t, b, c, d, s) {
if (t < (d / 2)) {
return(easeOutBack(t * 2, b, c / 2, d, s));
}
return(easeInBack((t * 2) - d, b + (c / 2), c / 2, d, s));
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeOutBounce(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 easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutBounce(t * 2, b, c / 2, d));
}
return(easeInBounce((t * 2) - d, b + (c / 2), c / 2, d));
}
}
Symbol 745 MovieClip [__Packages.com.caurina.transitions.SpecialPropertiesDefault] Frame 0
class com.caurina.transitions.SpecialPropertiesDefault
{
function SpecialPropertiesDefault () {
trace("SpecialProperties is an static class and should not be instantiated.");
}
static function init() {
com.caurina.transitions.Tweener.registerSpecialProperty("_frame", _frame_get, _frame_set);
com.caurina.transitions.Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set);
com.caurina.transitions.Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set);
com.caurina.transitions.Tweener.registerSpecialProperty("_color_ra", _color_property_get, _color_property_set, ["ra"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_color_rb", _color_property_get, _color_property_set, ["rb"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_color_ga", _color_property_get, _color_property_set, ["ga"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_color_gb", _color_property_get, _color_property_set, ["gb"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_color_ba", _color_property_get, _color_property_set, ["ba"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_color_bb", _color_property_get, _color_property_set, ["bb"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_color_aa", _color_property_get, _color_property_set, ["aa"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_color_ab", _color_property_get, _color_property_set, ["ab"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_autoAlpha", _autoAlpha_get, _autoAlpha_set);
com.caurina.transitions.Tweener.registerSpecialPropertySplitter("_color", _color_splitter);
com.caurina.transitions.Tweener.registerSpecialPropertySplitter("_colorTransform", _colorTransform_splitter);
com.caurina.transitions.Tweener.registerSpecialPropertySplitter("_scale", _scale_splitter);
com.caurina.transitions.Tweener.registerSpecialProperty("_blur_blurX", _filter_property_get, _filter_property_set, [flash.filters.BlurFilter, "blurX"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_blur_blurY", _filter_property_get, _filter_property_set, [flash.filters.BlurFilter, "blurY"]);
com.caurina.transitions.Tweener.registerSpecialProperty("_blur_quality", _filter_property_get, _filter_property_set, [flash.filters.BlurFilter, "quality"]);
com.caurina.transitions.Tweener.registerSpecialPropertySplitter("_filter", _filter_splitter);
com.caurina.transitions.Tweener.registerSpecialPropertyModifier("_bezier", _bezier_modifier, _bezier_get);
}
static function _color_splitter(p_value) {
var _local1 = new Array();
if (p_value == null) {
_local1.push({name:"_color_ra", value:100});
_local1.push({name:"_color_rb", value:0});
_local1.push({name:"_color_ga", value:100});
_local1.push({name:"_color_gb", value:0});
_local1.push({name:"_color_ba", value:100});
_local1.push({name:"_color_bb", value:0});
} else {
_local1.push({name:"_color_ra", value:0});
_local1.push({name:"_color_rb", value:com.caurina.transitions.AuxFunctions.numberToR(p_value)});
_local1.push({name:"_color_ga", value:0});
_local1.push({name:"_color_gb", value:com.caurina.transitions.AuxFunctions.numberToG(p_value)});
_local1.push({name:"_color_ba", value:0});
_local1.push({name:"_color_bb", value:com.caurina.transitions.AuxFunctions.numberToB(p_value)});
}
return(_local1);
}
static function _colorTransform_splitter(p_value) {
var _local2 = new Array();
if (p_value == null) {
_local2.push({name:"_color_ra", value:100});
_local2.push({name:"_color_rb", value:0});
_local2.push({name:"_color_ga", value:100});
_local2.push({name:"_color_gb", value:0});
_local2.push({name:"_color_ba", value:100});
_local2.push({name:"_color_bb", value:0});
} else {
if (p_value.ra != undefined) {
_local2.push({name:"_color_ra", value:p_value.ra});
}
if (p_value.rb != undefined) {
_local2.push({name:"_color_rb", value:p_value.rb});
}
if (p_value.ga != undefined) {
_local2.push({name:"_color_ba", value:p_value.ba});
}
if (p_value.gb != undefined) {
_local2.push({name:"_color_bb", value:p_value.bb});
}
if (p_value.ba != undefined) {
_local2.push({name:"_color_ga", value:p_value.ga});
}
if (p_value.bb != undefined) {
_local2.push({name:"_color_gb", value:p_value.gb});
}
if (p_value.aa != undefined) {
_local2.push({name:"_color_aa", value:p_value.aa});
}
if (p_value.ab != undefined) {
_local2.push({name:"_color_ab", value:p_value.ab});
}
}
return(_local2);
}
static function _scale_splitter(p_value) {
var _local1 = new Array();
_local1.push({name:"_xscale", value:p_value});
_local1.push({name:"_yscale", value:p_value});
return(_local1);
}
static function _filter_splitter(p_value) {
var _local1 = new Array();
if (p_value instanceof flash.filters.BlurFilter) {
_local1.push({name:"_blur_blurX", value:flash.filters.BlurFilter(p_value).blurX});
_local1.push({name:"_blur_blurY", value:flash.filters.BlurFilter(p_value).blurY});
_local1.push({name:"_blur_quality", value:flash.filters.BlurFilter(p_value).quality});
} else {
trace("??");
}
return(_local1);
}
static function _frame_get(p_obj) {
return(p_obj._currentFrame);
}
static function _frame_set(p_obj, p_value) {
p_obj.gotoAndStop(Math.round(p_value));
}
static function _sound_volume_get(p_obj) {
return(p_obj.getVolume());
}
static function _sound_volume_set(p_obj, p_value) {
p_obj.setVolume(p_value);
}
static function _sound_pan_get(p_obj) {
return(p_obj.getPan());
}
static function _sound_pan_set(p_obj, p_value) {
p_obj.setPan(p_value);
}
static function _color_property_get(p_obj, p_parameters) {
return(new Color(p_obj).getTransform()[p_parameters[0]]);
}
static function _color_property_set(p_obj, p_value, p_parameters) {
var _local1 = new Object();
_local1[p_parameters[0]] = Math.round(p_value);
new Color(p_obj).setTransform(_local1);
}
static function _autoAlpha_get(p_obj) {
return(p_obj._alpha);
}
static function _autoAlpha_set(p_obj, p_value) {
p_obj._alpha = p_value;
p_obj._visible = p_value > 0;
}
static function _filter_property_get(p_obj, p_parameters) {
var _local2 = p_obj.filters;
var _local1;
var _local4 = p_parameters[0];
var _local3 = p_parameters[1];
_local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] instanceof _local4) {
return(_local2[_local1][_local3]);
}
_local1++;
}
var _local5;
if (!(_local4 === flash.filters.BlurFilter)) {
} else {
_local5 = {blurX:0, blurY:0, quality:NaN};
}
return(_local5[_local3]);
}
static function _filter_property_set(p_obj, p_value, p_parameters) {
var _local2 = p_obj.filters;
var _local1;
var _local4 = p_parameters[0];
var _local3 = p_parameters[1];
_local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] instanceof _local4) {
_local2[_local1][_local3] = p_value;
p_obj.filters = _local2;
return(undefined);
}
_local1++;
}
if (_local2 == undefined) {
_local2 = new Array();
}
var _local7;
if (!(_local4 === flash.filters.BlurFilter)) {
} else {
_local7 = new flash.filters.BlurFilter(0, 0);
}
_local7[_local3] = p_value;
_local2.push(_local7);
p_obj.filters = _local2;
}
static function _bezier_modifier(p_obj) {
var _local7 = [];
var _local4;
if (p_obj instanceof Array) {
_local4 = p_obj.concat();
} else {
_local4 = [p_obj];
}
var _local3;
var _local1;
var _local2 = {};
_local3 = 0;
while (_local3 < _local4.length) {
for (_local1 in _local4[_local3]) {
if (_local2[_local1] == undefined) {
_local2[_local1] = [];
}
_local2[_local1].push(_local4[_local3][_local1]);
}
_local3++;
}
for (_local1 in _local2) {
_local7.push({name:_local1, parameters:_local2[_local1]});
}
return(_local7);
}
static function _bezier_get(b, e, t, p) {
if (p.length == 1) {
return(b + (t * (((2 * (1 - t)) * (p[0] - b)) + (t * (e - b)))));
}
var _local2 = Math.floor(t * p.length);
var _local5 = (t - (_local2 * (1 / p.length))) * p.length;
var _local3;
var _local6;
if (_local2 == 0) {
_local3 = b;
_local6 = (p[0] + p[1]) / 2;
} else if (_local2 == (p.length - 1)) {
_local3 = (p[_local2 - 1] + p[_local2]) / 2;
_local6 = e;
} else {
_local3 = (p[_local2 - 1] + p[_local2]) / 2;
_local6 = (p[_local2] + p[_local2 + 1]) / 2;
}
return(_local3 + (_local5 * (((2 * (1 - _local5)) * (p[_local2] - _local3)) + (_local5 * (_local6 - _local3)))));
}
}
Symbol 746 MovieClip [__Packages.com.caurina.transitions.SpecialProperty] Frame 0
class com.caurina.transitions.SpecialProperty
{
var parameters;
function SpecialProperty (p_getFunction, p_setFunction, p_parameters) {
getValue = p_getFunction;
setValue = p_setFunction;
parameters = p_parameters;
}
function getValue(p_obj, p_parameters) {
return(null);
}
function setValue(p_obj, p_value, p_parameters) {
}
function toString() {
var _local2 = "";
_local2 = _local2 + "[SpecialProperty ";
_local2 = _local2 + ("getValue:" + getValue.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("setValue:" + setValue.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("parameters:" + parameters.toString());
_local2 = _local2 + "]";
return(_local2);
}
}
Symbol 747 MovieClip [__Packages.com.caurina.transitions.SpecialPropertyModifier] Frame 0
class com.caurina.transitions.SpecialPropertyModifier
{
var modifyValues, getValue;
function SpecialPropertyModifier (p_modifyFunction, p_getFunction) {
modifyValues = p_modifyFunction;
getValue = p_getFunction;
}
function toString() {
var _local2 = "";
_local2 = _local2 + "[SpecialPropertyModifier ";
_local2 = _local2 + ("modifyValues:" + modifyValues.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("getValue:" + getValue.toString());
_local2 = _local2 + "]";
return(_local2);
}
}
Symbol 748 MovieClip [__Packages.com.caurina.transitions.SpecialPropertySplitter] Frame 0
class com.caurina.transitions.SpecialPropertySplitter
{
var parameters;
function SpecialPropertySplitter (p_splitFunction, p_parameters) {
splitValues = p_splitFunction;
parameters = p_parameters;
}
function splitValues(p_value, p_parameters) {
return([]);
}
function toString() {
var _local2 = "";
_local2 = _local2 + "[SpecialPropertySplitter ";
_local2 = _local2 + ("splitValues:" + splitValues.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("parameters:" + parameters.toString());
_local2 = _local2 + "]";
return(_local2);
}
}
Symbol 87 MovieClip Frame 1
stop();
Symbol 98 MovieClip [eRing] Frame 1
if (_root.gameState == 2) {
this._x = _root.powerPlant._x + 12.5;
this._y = _root.powerPlant._y + 20;
}
Symbol 131 MovieClip Frame 1
gotoAndStop(_parent._parent.glyphNum + 1);
Symbol 162 MovieClip Frame 1
gotoAndStop(_parent._parent.glyphNum + 1);
Symbol 193 MovieClip Frame 1
gotoAndStop(_parent._parent.glyphNum + 1);
Symbol 196 MovieClip Frame 1
stop();
Symbol 196 MovieClip Frame 3
this._parent._parent._parent.createPowerSurge();
_root.numOfSurgedGlyphs = _root.numOfSurgedGlyphs + 1;
Symbol 196 MovieClip Frame 16
this._parent.dark._visible = true;
Symbol 197 MovieClip Frame 1
Symbol 204 MovieClip Frame 1
if (_root.canControl) {
this._visible = true;
} else {
this._visible = false;
}
Symbol 210 MovieClip Frame 1
leftBut.onRollOver = function () {
if (_root.canControl == true) {
spinner._visible = true;
spinner.gotoAndPlay(2);
spinner._xscale = -114;
}
};
leftBut.onRollOut = function () {
spinner._visible = false;
};
leftBut.onPress = function () {
if (_root.canControl == true) {
_root.canControl = false;
var _local3 = [];
_local3[0] = 0 + _parent.sides[0];
_local3[1] = 0 + _parent.sides[1];
_local3[2] = 0 + _parent.sides[2];
_local3[3] = 0 + _parent.sides[3];
_parent.sides[0] = _local3[1];
_parent.sides[1] = _local3[2];
_parent.sides[2] = _local3[3];
_parent.sides[3] = _local3[0];
var _local4 = _root.undoAr.length;
_root.undoAr[_local4] = [_parent.gx, _parent.gy, -1];
_root.startScore = _root.startScore - _root.scoreInc;
if (_root.startScore < 0) {
_root.startScore = 0;
}
_root.setNumTicker(_root.scoreHUD.inner.levelScore, _root.startScore);
_parent.gotoAndPlay("rotLeft");
}
};
rightBut.onRollOver = function () {
if (_root.canControl == true) {
spinner._visible = true;
spinner.gotoAndPlay(2);
spinner._xscale = 114;
}
};
rightBut.onRollOut = function () {
spinner._visible = false;
};
rightBut.onPress = function () {
if (_root.canControl == true) {
_root.canControl = false;
var _local3 = [];
_local3[0] = 0 + _parent.sides[0];
_local3[1] = 0 + _parent.sides[1];
_local3[2] = 0 + _parent.sides[2];
_local3[3] = 0 + _parent.sides[3];
_parent.sides[0] = _local3[3];
_parent.sides[1] = _local3[0];
_parent.sides[2] = _local3[1];
_parent.sides[3] = _local3[2];
var _local4 = _root.undoAr.length;
_root.undoAr[_local4] = [_parent.gx, _parent.gy, 1];
_root.startScore = _root.startScore - _root.scoreInc;
if (_root.startScore < 0) {
_root.startScore = 0;
}
_root.setNumTicker(_root.scoreHUD.inner.levelScore, _root.startScore);
_parent.gotoAndPlay("rotRight");
}
};
spinner._visible = false;
Symbol 211 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 2
inner._rotation = inner._rotation + 20;
Symbol 211 MovieClip Frame 3
inner._rotation = inner._rotation + 50;
Symbol 211 MovieClip Frame 4
inner._rotation = inner._rotation + 20;
_root.gCont.broadcastMessage("resetPower");
_root.pCont.broadcastMessage("createPowerFlow");
_root.isLevelComplete();
_root.canControl = true;
gotoAndStop (1);
Symbol 211 MovieClip Frame 5
inner._rotation = inner._rotation - 20;
Symbol 211 MovieClip Frame 6
inner._rotation = inner._rotation - 50;
Symbol 211 MovieClip Frame 7
inner._rotation = inner._rotation - 20;
_root.gCont.broadcastMessage("resetPower");
_root.pCont.broadcastMessage("createPowerFlow");
_root.isLevelComplete();
_root.canControl = true;
gotoAndStop (1);
Symbol 212 MovieClip [glyphOuter] Frame 1
stop();
Symbol 212 MovieClip [glyphOuter] Frame 30
stop();
Symbol 212 MovieClip [glyphOuter] Frame 48
this._visible = false;
gotoAndStop (1);
Symbol 221 MovieClip [objectClip] Frame 1
stop();
Symbol 221 MovieClip [objectClip] Frame 7
if (_root.bgFlash == 1) {
prevBG.gotoAndPlay(2);
}
Symbol 221 MovieClip [objectClip] Frame 23
gotoAndStop (1);
Symbol 221 MovieClip [objectClip] Frame 29
if (prevBG._visible == true) {
prevBG.gotoAndPlay(24);
}
Symbol 221 MovieClip [objectClip] Frame 45
this._visible = false;
gotoAndStop (1);
Symbol 229 MovieClip [lsClip] Frame 1
stop();
Symbol 229 MovieClip [lsClip] Frame 2
lsBUT.onRelease = function () {
_root.levelNum = lNum;
_root.totalScore = _root.levelScoresAr[_root.levelNum];
_root.startScore = 0;
_parent._parent.gotoAndPlay("endMenu");
};
Symbol 239 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 1
stop();
Symbol 254 MovieClip Frame 15
if (_root.musicOn == true) {
_root.noiseSoundClip.noiseSound.start(0, 1000);
}
if (_root.skipIntro == true) {
_root.gotoAndStop("creditsScene");
}
Symbol 254 MovieClip Frame 145
_root.gotoAndStop("main");
Symbol 278 MovieClip Frame 125
_root.gotoAndStop("main");
Symbol 282 MovieClip Frame 1
_root.shakeNum = 20;
if (_root.musicOn) {
_root.whiteNoise.setVolume(0);
_root.whiteNoise.start(0, 1000);
}
Symbol 282 MovieClip Frame 2
_root.shakeNum = _root.shakeNum + 1;
var xShake = ((random(_root.shakeNum) - (_root.shakeNum / 2)) / 10);
var yShake = ((random(_root.shakeNum) - (_root.shakeNum / 2)) / 10);
_root.mStage._x = xShake;
_root.mStage._y = yShake;
_root.gCont.broadcastMessage("fadeZeros");
_root.whiteNoise.setVolume(_root.whiteNoise.getVolume() + 1);
Symbol 282 MovieClip Frame 3
_root.shakeNum = _root.shakeNum + 1;
var xShake = ((random(_root.shakeNum) - (_root.shakeNum / 2)) / 10);
var yShake = ((random(_root.shakeNum) - (_root.shakeNum / 2)) / 10);
_root.mStage._x = xShake;
_root.mStage._y = yShake;
_root.gCont.broadcastMessage("fadeZeros");
_root.whiteNoise.setVolume(_root.whiteNoise.getVolume() + 1);
gotoAndPlay (2);
Symbol 289 MovieClip Frame 1
playLockedBTN.onRelease = function () {
getURL ("http://www.candystand.com/play.do?id=18473&vgid=18473");
};
Symbol 291 MovieClip Frame 1
_root._quality = "HIGH";
stop();
Symbol 291 MovieClip Frame 2
yAr = [0, -1, -2, -3, -4, -5, -6];
_root.lNumHUD = ("" + _root.levelNum) + " / 35";
_root.parseString();
_root.gCont.broadcastMessage("resetSurge");
xInc = 0;
var lNumDisp = ("grid " + _root.levelNum);
if (_root.levelNum == 1) {
lNumDisp = lNumDisp + " /35";
}
if (_root.lockedAr[_root.levelNum] == 1) {
gotoAndPlay ("lockedLevel");
}
if (_root.scoreHUDOn == false) {
_root.scoreHUD.gotoAndPlay(2);
}
_root._quality = "HIGH";
Symbol 291 MovieClip Frame 60
_root.HUD.gotoAndPlay("turnOn");
Symbol 291 MovieClip Frame 61
y = 0;
while (y < 7) {
var tt = (xInc + yAr[y]);
var gl = _root.glyphsAr[y][tt];
gl._visible = true;
gl.gotoAndPlay(2);
y++;
}
xInc++;
if (xInc > 19) {
gotoAndPlay ("finish");
_root.sBut._visible = true;
}
Symbol 291 MovieClip Frame 64
gotoAndPlay ("repeatReveal");
Symbol 291 MovieClip Frame 65
yAr = [0, -1, -2, -3, -4, -5, -6];
xInc = 0;
_root.powerPlant.main.inner.surge.gotoAndPlay(2);
_root.canControl = false;
_root.HUD.gotoAndPlay("turnOff");
_root.TUT.gotoAndPlay("out");
Symbol 291 MovieClip Frame 72
if (_root.levelNum == _root.levelsArray.length) {
gotoAndPlay ("endGame");
}
if (_root.numOfSurgedGlyphs < _root.numOfActiveGlyphs) {
gotoAndPlay ("waitSurge");
}
Symbol 291 MovieClip Frame 73
Symbol 291 MovieClip Frame 99
y = 0;
while (y < 7) {
var tt = (xInc + yAr[y]);
var gl = _root.glyphsAr[y][tt];
gl._visible = true;
gl.gotoAndPlay(31);
y++;
}
xInc++;
if (xInc > 19) {
if (_root.concealToMenu == true) {
gotoAndPlay ("finish2");
} else {
stop();
_root.scoreHUD.inner.gotoAndPlay(2);
}
_root.sBut._visible = true;
}
Symbol 291 MovieClip Frame 102
gotoAndPlay ("repeatConceal");
Symbol 291 MovieClip Frame 103
yAr = [0, -1, -2, -3, -4, -5, -6];
xInc = 0;
_root.energyRing._visible = false;
Symbol 291 MovieClip Frame 104
y = 0;
while (y < 7) {
var tt = (xInc + yAr[y]);
var gl = _root.glyphsAr[y][tt];
gl._visible = true;
gl.gotoAndPlay(31);
y++;
}
xInc++;
if (xInc > 19) {
_root.gCont.broadcastMessage("shuffleGlyph");
_root.undoAr = [];
_root.gCont.broadcastMessage("resetPower");
gotoAndPlay (2);
}
Symbol 291 MovieClip Frame 107
gotoAndPlay ("repeatConceal2");
Symbol 291 MovieClip Frame 108
_root.pCont.broadcastMessage("createPowerFlow");
_root.energyRing.gotoAndPlay(1);
_root.energyRing._visible = true;
_root.canControl = true;
if (_root.levelNum <= 5) {
_root.TUT.TUTInner.gotoAndStop(_root.levelNum);
_root.TUT._visible = true;
_root.TUT.gotoAndPlay("in");
}
Symbol 291 MovieClip Frame 138
gotoAndStop (1);
Symbol 291 MovieClip Frame 168
if (_root.concealToMenu == true) {
_root.concealToMenu = false;
gotoAndStop (1);
_root.MENU.gotoAndPlay(2);
_root._quality = "HIGH";
if (_root.musicOn) {
_root.whiteNoise.setVolume(50);
_root.whiteNoise.start(0, 1000);
}
} else {
gotoAndPlay (2);
}
Symbol 291 MovieClip Frame 169
_root.scoreHUD.gotoAndPlay("closeScore");
Symbol 291 MovieClip Frame 190
_root.powerPlant.main.inner.surge.gotoAndPlay(2);
_root.musicChanger.gotoAndPlay(2);
Symbol 291 MovieClip Frame 220
_root.powerPlant.main.inner.surge.gotoAndPlay(2);
Symbol 291 MovieClip Frame 250
_root.powerPlant.main.inner.surge.gotoAndPlay(2);
_root.bgStage._visible = false;
Symbol 291 MovieClip Frame 280
_root.powerPlant.main.inner.surge.gotoAndPlay(2);
Symbol 291 MovieClip Frame 353
_root.gameState = 1;
_root.firstTime = 1;
_root.fromGame = false;
_root.mStage._x = (_root.mStage._y = 0);
_root.gotoAndStop(24);
Symbol 291 MovieClip Frame 354
stop();
_root.scoreWindow.gotoAndPlay("In");
Symbol 291 MovieClip Frame 470
_root.levelNum = _root.levelNum + 1;
_root.myLocal_so.data.levelNumber = _root.levelNum;
_root.myLocal_so.flush();
gotoAndPlay (2);
Symbol 346 MovieClip Frame 1
if (_root.musicOn == true) {
gotoAndStop ("musicON");
} else {
gotoAndStop ("musicOFF");
}
Symbol 346 MovieClip Frame 2
stop();
Symbol 346 MovieClip Frame 11
stop();
Symbol 351 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 30
if (this.isPlaying == true) {
this.gotoAndPlay("glowEffect");
} else {
this.gotoAndStop(1);
}
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 30
if (this.isPlaying == true) {
this.gotoAndPlay("glowEffect");
} else {
this.gotoAndStop(1);
}
Symbol 356 MovieClip Frame 1
saveQuitBUT.onRollOver = function () {
saveQuitBUT.gotoAndPlay("glowEffect");
saveQuitBUT.isPlaying = true;
};
saveQuitBUT.onRollOut = function () {
saveQuitBUT.isPlaying = false;
};
saveQuitBUT.onRelease = function () {
_root.musicChanger.gotoAndPlay(2);
_root.fromGame = true;
_root.endGame();
_root.energyRing._visible = false;
_root.sCont.gotoAndPlay("returnToMenu");
_root.concealToMenu = true;
_root.sCont.xInc = 0;
_root.letterbox.gotoAndPlay(2);
_root.canClick = false;
_root.canControl = false;
_root.HUD.HUDFader.gotoAndPlay("menuOUT");
_root.HUD.gotoAndPlay("turnOff");
_root.TUT.gotoAndPlay("out");
_root.scoreHUD.gotoAndPlay("closeScore");
};
restartLevelBUT.onRollOver = function () {
restartLevelBUT.gotoAndPlay("glowEffect");
restartLevelBUT.isPlaying = true;
};
restartLevelBUT.onRollOut = function () {
restartLevelBUT.isPlaying = false;
};
restartLevelBUT.onRelease = function () {
_root.resetGrid();
};
lNumHUD = _root.levelNum + "/35";
muteBUT.onPress = function () {
if (_root.musicOn == true) {
muteBUT.gotoAndStop("musicOFF");
_root.musicOn = false;
_root.inGameMusic.stop();
} else {
muteBUT.gotoAndStop("musicON");
_root.musicOn = true;
_root.inGameMusic.setVolume(100);
_root.inGameMusic.start(0, 1000);
}
};
openerBUT.onRollOver = function () {
if (_parent._currentframe == 1) {
_parent.gotoAndPlay("menuIN");
}
};
Symbol 365 MovieClip Frame 1
stop();
Symbol 368 MovieClip Frame 1
undoBUT.onRelease = function () {
if (_root.HUDCanClick == true) {
undoBUT.gotoAndPlay("rotateEffect");
_root.undoFunc();
}
};
stop();
Symbol 368 MovieClip Frame 2
HUDMenu.HUDNums.gotoAndStop(_root.levelNum);
Symbol 368 MovieClip Frame 13
menuOUTBUT.onRollOver = function () {
gotoAndPlay ("menuOUT");
};
stop();
Symbol 369 MovieClip Frame 1
stop();
Symbol 369 MovieClip Frame 2
this._visible = true;
_root.setNumTicker(_root.HUD.HUDFader.scoreTicker, _root.startScore);
gotoAndPlay (3);
Symbol 369 MovieClip Frame 11
_root.HUDCanClick = true;
stop();
Symbol 369 MovieClip Frame 12
_root.HUDCanClick = false;
Symbol 369 MovieClip Frame 20
stop();
this._visible = false;
Symbol 370 MovieClip Frame 1
stop();
Symbol 370 MovieClip Frame 2
if (_root.musicOn) {
_root.menuOutMusic.setVolume(0);
_root.menuOutMusic.start(3, 1);
}
_root.inGameMusic.setVolume(100);
Symbol 370 MovieClip Frame 3
mmVol = _root.inGameMusic.getVolume();
if (mmVol > 0) {
mmVol = mmVol - 5;
_root.inGameMusic.setVolume(mmVol);
_root.menuOutMusic.setVolume(100 - mmVol);
_root.bgStage._alpha = mmVol + 5;
} else {
_root.inGameMusic.stop("mainSound");
gotoAndStop (1);
}
Symbol 370 MovieClip Frame 4
mmVol = _root.inGameMusic.getVolume();
if (mmVol > 0) {
mmVol = mmVol - 5;
_root.inGameMusic.setVolume(mmVol);
_root.menuOutMusic.setVolume(100 - mmVol);
_root.bgStage._alpha = mmVol + 5;
gotoAndPlay (3);
} else {
_root.inGameMusic.stop();
gotoAndStop (1);
}
Symbol 380 MovieClip Frame 1
stop();
if (_root.musicOn == true) {
gotoAndPlay (2);
}
Symbol 380 MovieClip Frame 15
stop();
Symbol 396 MovieClip Frame 1
gotoAndStop(_root.levelNum + 1);
Symbol 396 MovieClip Frame 6
gotoAndPlay (6);
Symbol 396 MovieClip Frame 234
stop();
_root.TUT._visible = false;
Symbol 397 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 11
stop();
Symbol 397 MovieClip Frame 15
_root.TUT._visible = false;
Symbol 411 MovieClip Frame 1
stop();
stop();
Symbol 411 MovieClip Frame 2
_root.setNumTicker(_root.scoreHUD.inner.levelBonus, _root.lBonusAr[_root.levelNum - 1]);
_root.levCompleteBonus = _root.lBonusAr[_root.levelNum - 1];
Symbol 411 MovieClip Frame 105
_root.startScore = _root.startScore + _root.lBonusAr[_root.levelNum - 1];
_root.setNumTicker(_root.scoreHUD.inner.levelScore, _root.startScore);
Symbol 411 MovieClip Frame 140
divInc = Math.floor(_root.startScore / 120);
divInc = ((divInc < 1) ? 1 : (divInc));
if (_root.musicOn == true) {
trace("sound");
_root.pointTally1.start(0, 1000);
}
Symbol 411 MovieClip Frame 141
if (_root.startScore < divInc) {
divInc = _root.startScore;
}
_root.startScore = _root.startScore - divInc;
_root.totalScore = _root.totalScore + divInc;
_root.setNumTicker(_root.scoreHUD.inner.levelScore, _root.startScore);
_root.setNumTicker(_root.scoreHUD.inner.totalScore, _root.totalScore);
if (_root.startScore == 0) {
_root.pointTally1.stop();
gotoAndPlay ("continueScore");
}
Symbol 411 MovieClip Frame 142
if (_root.startScore < divInc) {
divInc = _root.startScore;
}
_root.startScore = _root.startScore - divInc;
_root.totalScore = _root.totalScore + divInc;
_root.setNumTicker(_root.scoreHUD.inner.levelScore, _root.startScore);
_root.setNumTicker(_root.scoreHUD.inner.totalScore, _root.totalScore);
if (_root.startScore == 0) {
gotoAndPlay ("continueScore");
_root.pointTally1.stop();
} else {
gotoAndPlay ("tallyScore");
}
Symbol 411 MovieClip Frame 180
_root.sCont.gotoAndPlay("finish2");
gotoAndPlay ("initScore2");
Symbol 411 MovieClip Frame 181
gotoAndPlay ("initScore2");
Symbol 411 MovieClip Frame 182
if (_root.lockedAr[_root.levelNum] == 1) {
_root.initLevScore = _root.lInitAr[_root.levelNum];
} else {
_root.initLevScore = _root.lInitAr[_root.levelNum - 1];
}
Symbol 411 MovieClip Frame 285
if (_root.lockedAr[_root.levelNum] == 1) {
_root.startScore = _root.lInitAr[_root.levelNum];
} else {
_root.startScore = _root.lInitAr[_root.levelNum - 1];
}
_root.setNumTicker(_root.scoreHUD.inner.levelScore, _root.startScore);
Symbol 411 MovieClip Frame 291
gotoAndStop (1);
Symbol 412 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 2
inner.gotoAndPlay("initScore");
_root.scoreHUDOn = true;
Symbol 412 MovieClip Frame 15
stop();
Symbol 412 MovieClip Frame 30
_root.scoreHUDOn = false;
Symbol 415 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 40
stop();
Symbol 417 MovieClip Frame 1
if (_root.fromGame == true) {
gotoAndPlay (2);
} else {
stop();
}
Symbol 417 MovieClip Frame 2
_parent.gotoAndPlay(_parent._currentframe + 1);
if (_root.fromGame == false) {
gotoAndStop (1);
}
Symbol 417 MovieClip Frame 3
_parent.gotoAndPlay(_parent._currentframe + 1);
if (_root.fromGame == false) {
gotoAndStop (1);
} else {
gotoAndPlay (2);
}
Symbol 588 MovieClip Frame 1
if (_root.musicOn) {
if (_root.fromGame == true) {
_root.introMusic.start(3.5, 1);
} else {
_root.introMusic.start(0, 1);
}
}
if (_root.skipIntro == true) {
gotoAndPlay (165);
}
Symbol 588 MovieClip Frame 170
_root.fromGame = false;
Symbol 588 MovieClip Frame 171
_root.fromGame = false;
Symbol 588 MovieClip Frame 187
_root.bgCont.broadcastMessage("makeInvisible");
_root.gameState = 1;
_root.fromGame = false;
_parent._parent.gotoAndPlay("openMenu");
_root.letterbox.gotoAndStop(1);
stop();
Symbol 588 MovieClip Frame 188
_root.bgCont.broadcastMessage("makeInvisible");
_root.gameState = 1;
_root.fromGame = false;
_parent._parent.gotoAndPlay("openMenu");
_root.letterbox.gotoAndStop(1);
stop();
Symbol 588 MovieClip Frame 293
Symbol 631 MovieClip Frame 1
stop();
Symbol 631 MovieClip Frame 32
if (this.isPlaying == true) {
this.gotoAndPlay("activateEffect");
} else {
this.gotoAndStop(1);
}
Symbol 638 MovieClip Frame 1
stop();
Symbol 638 MovieClip Frame 32
if (this.isPlaying == true) {
this.gotoAndPlay("activateEffect");
} else {
this.gotoAndStop(1);
}
Symbol 641 Button
on (rollOver) {
if (_parent._parent._parent.menuScene.canUseMenu) {
gotoAndPlay ("mouseOn");
}
}
Symbol 643 MovieClip Frame 1
stop();
if (_root.musicOn == true) {
gotoAndStop (2);
}
Symbol 650 MovieClip Frame 1
stop();
if (_root.musicOn == true) {
gotoAndStop (2);
}
Symbol 653 MovieClip Frame 1
stop();
this.onRelease = function () {
if (_parent._parent._parent._parent.menuScene.canUseMenu) {
_parent._parent._parent._parent.menuScene.canUseMenu = false;
_root.levelNum = 1;
_root.startGame();
_root.totalScore = 0;
_root.startScore = 0;
_root.MENU.gotoAndPlay("closer");
_parent.gotoAndPlay("closed");
}
};
Symbol 653 MovieClip Frame 32
if (this.isPlaying == true) {
this.gotoAndPlay("activateEffect");
} else {
this.gotoAndStop(1);
}
Symbol 658 MovieClip Frame 1
stop();
if (_root.maxLevelNum < 2) {
gotoAndStop ("continueDisabled");
} else {
this.onRelease = function () {
if (_parent._parent._parent._parent.menuScene.canUseMenu) {
_parent._parent._parent._parent.menuScene.canUseMenu = false;
_root.levelNum = _root.maxLevelNum;
_root.startGame();
_root.MENU.gotoAndPlay("closer");
_parent.gotoAndPlay("closed");
}
};
}
Symbol 658 MovieClip Frame 31
if (this.isPlaying == true) {
this.gotoAndPlay("activateEffect");
} else {
this.gotoAndStop(1);
}
Symbol 658 MovieClip Frame 32
stop();
Symbol 660 Button
on (rollOver, dragOver) {
gotoAndPlay ("closed");
}
Symbol 664 Button
on (rollOver) {
gotoAndPlay ("mouseOn");
}
Symbol 665 MovieClip Frame 1
stop();
Symbol 665 MovieClip Frame 30
stop();
newGameBTN.onRollOver = function () {
newGameBTN.gotoAndPlay("activateEffect");
newGameBTN.isPlaying = true;
};
newGameBTN.onRollOut = function () {
newGameBTN.isPlaying = false;
};
if (_root.maxLevelNum != 1) {
continueBTN.onRollOver = function () {
continueBTN.gotoAndPlay("activateEffect");
continueBTN.isPlaying = true;
};
continueBTN.onRollOut = function () {
continueBTN.isPlaying = false;
};
}
Symbol 666 MovieClip Frame 1
manualButton.onPress = function () {
if (_parent._parent.menuScene.canUseMenu) {
_parent._parent.menuScene.gotoAndPlay("manualIn");
}
};
manualButton.onRollOver = function () {
manualButton.gotoAndPlay("activateEffect");
manualButton.isPlaying = true;
};
manualButton.onRollOut = function () {
manualButton.isPlaying = false;
};
creditsButton.onPress = function () {
if (_parent._parent.menuScene.canUseMenu) {
_parent._parent.menuScene.gotoAndPlay("creditsIn");
}
};
creditsButton.onRollOver = function () {
creditsButton.gotoAndPlay("activateEffect");
creditsButton.isPlaying = true;
};
creditsButton.onRollOut = function () {
creditsButton.isPlaying = false;
};
muteBUT.onPress = function () {
if (_root.musicOn == true) {
_root.musicOn = false;
_root.whiteNoise.stop();
_root.menuMusic.stop();
muteBUT.gotoAndStop("musicOFF");
} else {
_root.musicOn = true;
_root.whiteNoise.start(0, 1000);
_root.menuMusic.start(0, 1000);
muteBUT.gotoAndStop("musicON");
}
};
Symbol 671 MovieClip Frame 1
stop();
Symbol 671 MovieClip Frame 30
if (this.isPlaying == true) {
this.gotoAndPlay("glowEffect");
} else {
this.gotoAndStop(1);
}
Symbol 675 MovieClip Frame 1
stop();
Symbol 675 MovieClip Frame 30
if (this.isPlaying == true) {
this.gotoAndPlay("glowEffect");
} else {
this.gotoAndStop(1);
}
Symbol 682 MovieClip Frame 1
playMoreGamesBTN.onRollOver = function () {
playMoreGamesBTN.gotoAndPlay("glowEffect");
playMoreGamesBTN.isPlaying = true;
};
playMoreGamesBTN.onRollOut = function () {
playMoreGamesBTN.isPlaying = false;
};
playMoreGamesBTN.onRelease = function () {
getURL ("http://www.candystand.com/index.do?vgid=18473");
};
playLockedLevelsBTN.onRollOver = function () {
playLockedLevelsBTN.gotoAndPlay("glowEffect");
playLockedLevelsBTN.isPlaying = true;
};
playLockedLevelsBTN.onRollOut = function () {
playLockedLevelsBTN.isPlaying = false;
};
playLockedLevelsBTN.onRelease = function () {
getURL ("http://www.candystand.com/play.do?id=18473&vgid=18473");
};
Symbol 693 MovieClip Frame 1
Symbol 693 MovieClip Frame 30
if (this.isPlaying == true) {
this.gotoAndPlay("glowEffect");
} else {
this.gotoAndStop(1);
}
Symbol 697 MovieClip Frame 1
canUseMenu = true;
if (_root.musicOn) {
_root.menuMusicClip.menuMusicA.setVolume(100);
_root.menuMusic.start(0, 1000);
}
innerMENU.activateButton._visible = true;
innerMENU.manualButton._visible = true;
innerMENU.creditsButton._visible = true;
_root.dynamicBrand._visible = true;
_root.dynamicBrand.gotoAndPlay("opener");
Symbol 697 MovieClip Frame 21
stop();
Symbol 697 MovieClip Frame 29
innerMENU.activateButton._visible = false;
innerMENU.manualButton._visible = false;
innerMENU.creditsButton._visible = false;
innerMENU.muteBUT._visible = false;
Symbol 697 MovieClip Frame 30
stop();
backBUT.onRollOver = function () {
backBUT.gotoAndPlay("glowEffect");
};
backBUT.onPress = function () {
gotoAndPlay ("creditsOut");
backBUT.isPlaying = true;
};
backBUT.onRollOut = function () {
backBUT.isPlaying = false;
};
Symbol 697 MovieClip Frame 31
innerMENU.activateButton._visible = true;
innerMENU.manualButton._visible = true;
innerMENU.creditsButton._visible = true;
innerMENU.muteBUT._visible = true;
Symbol 697 MovieClip Frame 37
gotoAndStop ("menuFunctioning");
Symbol 697 MovieClip Frame 45
innerMENU.activateButton._visible = false;
innerMENU.manualButton._visible = false;
innerMENU.creditsButton._visible = false;
innerMENU.muteBUT._visible = false;
Symbol 697 MovieClip Frame 46
stop();
backBUT.onRollOver = function () {
backBUT.gotoAndPlay("glowEffect");
};
backBUT.onPress = function () {
gotoAndPlay ("manualOut");
backBUT.isPlaying = true;
};
backBUT.onRollOut = function () {
backBUT.isPlaying = false;
};
Symbol 697 MovieClip Frame 47
innerMENU.activateButton._visible = true;
innerMENU.manualButton._visible = true;
innerMENU.creditsButton._visible = true;
innerMENU.muteBUT._visible = true;
Symbol 697 MovieClip Frame 53
gotoAndStop ("menuFunctioning");
Symbol 697 MovieClip Frame 55
_root.dynamicBrand.gotoAndPlay("closer");
Symbol 697 MovieClip Frame 77
stop();
_root.MENU._visible = false;
_root.gameState = 2;
Symbol 710 MovieClip Frame 1
stop();
Symbol 710 MovieClip Frame 30
if (this.isPlaying == true) {
this.gotoAndPlay("glowEffect");
} else {
this.gotoAndStop(1);
}
Symbol 711 MovieClip Frame 2
stop();
Symbol 711 MovieClip Frame 3
canMenuClick = true;
Symbol 711 MovieClip Frame 23
stop();
Symbol 711 MovieClip Frame 45
if (_root.musicOn) {
_root.menuOutMusic.start(0, 1);
_root.menuMusic.stop();
}
Symbol 711 MovieClip Frame 65
if (_root.levelNum == 1) {
gField._visible = false;
}
Symbol 711 MovieClip Frame 69
gridBuilder.masker.gotoAndStop(gridBuilder.masker._currentframe - 1);
Symbol 711 MovieClip Frame 70
wnVol = _root.whiteNoise.getVolume();
if (wnVol > 1) {
_root.whiteNoise.setVolume(wnVol - 1);
}
mmVol = _root.menuMusic.getVolume();
if (mmVol > 5) {
_root.menuMusic.setVolume(mmVol - 2);
}
gbCurF = gridBuilder.masker._currentframe;
if (gbCurF > 3) {
gridBuilder.masker.gotoAndStop(gbCurF - 1);
gotoAndPlay ("outLoop");
}
Symbol 711 MovieClip Frame 71
_root.whiteNoise.stop();
Symbol 711 MovieClip Frame 110
if (_root.levelNum == 1) {
gotoAndPlay ("endMenu");
}
Symbol 711 MovieClip Frame 120
stop();
inc = 1;
y = 0;
while (y < 5) {
x = 0;
while (x < 7) {
var tBUT = _root.MENU.buts.attachMovie("lsClip", "lsClip" + inc, inc);
tBUT._width = (tBUT._height = 30.6);
tBUT._x = x * 30.6;
tBUT._y = y * 30.6;
tBUT.lNum = inc;
inc++;
if (_root.lockedAr[tBUT.lNum] == 1) {
tBUT.gotoAndStop(3);
} else if (tBUT.lNum <= _root.maxLevelNum) {
tBUT.gotoAndStop(2);
}
x++;
}
y++;
}
bonusBTN.onRelease = function () {
getURL ("http://www.candystand.com/play.do?id=18473&vgid=18473");
};
Symbol 711 MovieClip Frame 121
stop();
goBUT.onPress = function () {
gotoAndPlay ("endMenu");
};
goBUT.onRollOver = function () {
goBUT.gotoAndPlay("glowEffect");
};
Symbol 711 MovieClip Frame 145
_root.firstTime = 1;
_root.gameState = 2;
gotoAndStop (1);
Symbol 715 MovieClip Frame 1
_root.shakeNum = _root.shakeNum - 8;
var xShake = ((random(_root.shakeNum) - (_root.shakeNum / 2)) / 10);
var yShake = ((random(_root.shakeNum) - (_root.shakeNum / 2)) / 10);
shakeMe._x = xShake;
shakeMe._y = yShake;
var volNum = (_root.whiteNoise.getVolume() - 10);
if (volNum < 0) {
_root.whiteNoise.stop();
} else {
_root.whiteNoise.setVolume(volNum);
}
Symbol 715 MovieClip Frame 2
_root.shakeNum = _root.shakeNum - 8;
var xShake = ((random(_root.shakeNum) - (_root.shakeNum / 2)) / 10);
var yShake = ((random(_root.shakeNum) - (_root.shakeNum / 2)) / 10);
shakeMe._x = xShake;
shakeMe._y = yShake;
var volNum = (_root.whiteNoise.getVolume() - 10);
if (volNum < 0) {
_root.whiteNoise.stop();
} else {
_root.whiteNoise.setVolume(volNum);
}
if (_root.shakeNum < 0) {
gotoAndStop (1);
}
Symbol 718 MovieClip Frame 1
saveQuitBUT.onRollOver = function () {
saveQuitBUT.gotoAndPlay("glowEffect");
saveQuitBUT.isPlaying = true;
};
saveQuitBUT.onRollOut = function () {
saveQuitBUT.isPlaying = false;
};
saveQuitBUT.onRelease = function () {
_parent.gotoAndPlay("returnToMenu");
};
Symbol 719 MovieClip Frame 75
_root.totalScore = (_root.totalScore + _root.startScore) + _root.lBonusAr[_root.levelNum - 1];
Symbol 719 MovieClip Frame 190
stop();
Symbol 719 MovieClip Frame 220
_root.gameState = 1;
_root.firstTime = 1;
_root.fromGame = false;
_root.gotoAndStop("title");