Frame 1
function tweenManager() {
var _local1 = this;
_local1.playing = false;
_local1.autoStop = false;
_local1.broadcastEvents = false;
_local1.autoOverwrite = true;
_local1.tweenList = new Array();
_local1.ints = new Array();
_local1.lockedTweens = new Object();
_local1.now = 0;
_local1.isPaused = false;
_local1.pausedTime = 0;
}
Math.linearTween = function (t, b, c, d) {
return(((c * t) / d) + b);
};
Math.easeInQuad = function (t, b, c, d) {
return(((c * ((t = t / d))) * t) + b);
};
Math.easeOutQuad = function (t, b, c, d) {
return((((-c) * ((t = t / d))) * (t - 2)) + b);
};
Math.easeInOutQuad = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return((((c / 2) * _local1) * _local1) + b);
}
_local1--;
return((((-c) / 2) * ((_local1 * (_local1 - 2)) - 1)) + b);
};
Math.easeOutInQuad = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
_local1--;
return((((-c) / 2) * ((_local1 * _local1) - 1)) + b);
}
_local1--;
return(((c / 2) * ((_local1 * _local1) + 1)) + b);
};
Math.easeInCubic = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / d;
return((((c * _local1) * _local1) * _local1) + b);
};
Math.easeOutCubic = function (t, b, c, d) {
var _local1 = t;
_local1 = (_local1 / d) - 1;
return((c * (((_local1 * _local1) * _local1) + 1)) + b);
};
Math.easeInOutCubic = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((((c / 2) * _local1) * _local1) * _local1) + b);
}
_local1 = _local1 - 2;
return(((c / 2) * (((_local1 * _local1) * _local1) + 2)) + b);
};
Math.easeOutInCubic = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
_local1--;
return(((c / 2) * (((_local1 * _local1) * _local1) + 1)) + b);
};
Math.easeInQuart = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / d;
return(((((c * _local1) * _local1) * _local1) * _local1) + b);
};
Math.easeOutQuart = function (t, b, c, d) {
var _local1 = t;
_local1 = (_local1 / d) - 1;
return(((-c) * ((((_local1 * _local1) * _local1) * _local1) - 1)) + b);
};
Math.easeInOutQuart = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return((((((c / 2) * _local1) * _local1) * _local1) * _local1) + b);
}
_local1 = _local1 - 2;
return((((-c) / 2) * ((((_local1 * _local1) * _local1) * _local1) - 2)) + b);
};
Math.easeOutInQuart = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
_local1--;
return((((-c) / 2) * ((((_local1 * _local1) * _local1) * _local1) - 1)) + b);
}
_local1--;
return(((c / 2) * ((((_local1 * _local1) * _local1) * _local1) + 1)) + b);
};
Math.easeInQuint = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / d;
return((((((c * _local1) * _local1) * _local1) * _local1) * _local1) + b);
};
Math.easeOutQuint = function (t, b, c, d) {
var _local1 = t;
_local1 = (_local1 / d) - 1;
return((c * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 1)) + b);
};
Math.easeInOutQuint = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((((((c / 2) * _local1) * _local1) * _local1) * _local1) * _local1) + b);
}
_local1 = _local1 - 2;
return(((c / 2) * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 2)) + b);
};
Math.easeOutInQuint = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
_local1--;
return(((c / 2) * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 1)) + b);
};
Math.easeInSine = function (t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
};
Math.easeOutSine = function (t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
};
Math.easeInOutSine = function (t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
};
Math.easeOutInSine = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((c / 2) * Math.sin((Math.PI * _local1) / 2)) + b);
}
_local1--;
return((((-c) / 2) * (Math.cos((Math.PI * _local1) / 2) - 2)) + b);
};
Math.easeInExpo = function (t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
};
Math.easeOutExpo = function (t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
};
Math.easeInOutExpo = function (t, b, c, d) {
var _local1 = t;
var _local2 = b;
var _local3 = c;
if (_local1 == 0) {
return(_local2);
}
if (_local1 == d) {
return(_local2 + _local3);
}
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((_local3 / 2) * Math.pow(2, 10 * (_local1 - 1))) + _local2);
}
_local1--;
return(((_local3 / 2) * ((-Math.pow(2, -10 * _local1)) + 2)) + _local2);
};
Math.easeOutInExpo = function (t, b, c, d) {
var _local1 = t;
var _local2 = b;
var _local3 = c;
if (_local1 == 0) {
return(_local2);
}
if (_local1 == d) {
return(_local2 + _local3);
}
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((_local3 / 2) * ((-Math.pow(2, -10 * _local1)) + 1)) + _local2);
}
return(((_local3 / 2) * (Math.pow(2, 10 * (_local1 - 2)) + 1)) + _local2);
};
Math.easeInCirc = function (t, b, c, d) {
return(((-c) * (Math.sqrt(1 - (((t = t / d)) * t)) - 1)) + b);
};
Math.easeOutCirc = function (t, b, c, d) {
var _local1 = t;
_local1 = (_local1 / d) - 1;
return((c * Math.sqrt(1 - (_local1 * _local1))) + b);
};
Math.easeInOutCirc = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (_local1 * _local1)) - 1)) + b);
}
_local1 = _local1 - 2;
return(((c / 2) * (Math.sqrt(1 - (_local1 * _local1)) + 1)) + b);
};
Math.easeOutInCirc = function (t, b, c, d) {
var _local1 = t;
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
_local1--;
return(((c / 2) * Math.sqrt(1 - (_local1 * _local1))) + b);
}
_local1--;
return(((c / 2) * (2 - Math.sqrt(1 - (_local1 * _local1)))) + b);
};
Math.easeInElastic = function (t, b, c, d, a, p) {
var _local1 = p;
var _local2 = t;
var _local3 = c;
if (_local2 == 0) {
return(b);
}
_local2 = _local2 / d;
if (_local2 == 1) {
return(b + _local3);
}
if (!_local1) {
_local1 = d * 0.3;
}
if (a < Math.abs(_local3)) {
a = _local3;
var s = (_local1 / 4);
} else {
var s = ((_local1 / (Math.PI*2)) * Math.asin(_local3 / a));
}
_local2 = _local2 - 1;
return((-((a * Math.pow(2, 10 * _local2)) * Math.sin((((_local2 * d) - s) * (Math.PI*2)) / _local1))) + b);
};
Math.easeOutElastic = function (t, b, c, d, a, p) {
var _local1 = c;
var _local2 = p;
var _local3 = t;
if (_local3 == 0) {
return(b);
}
_local3 = _local3 / d;
if (_local3 == 1) {
return(b + _local1);
}
if (!_local2) {
_local2 = d * 0.3;
}
if (a < Math.abs(_local1)) {
a = _local1;
var s = (_local2 / 4);
} else {
var s = ((_local2 / (Math.PI*2)) * Math.asin(_local1 / a));
}
return((((a * Math.pow(2, -10 * _local3)) * Math.sin((((_local3 * d) - s) * (Math.PI*2)) / _local2)) + _local1) + b);
};
Math.easeInOutElastic = function (t, b, c, d, a, p) {
var _local1 = t;
var _local2 = p;
var _local3 = c;
if (_local1 == 0) {
return(b);
}
_local1 = _local1 / (d / 2);
if (_local1 == 2) {
return(b + _local3);
}
if (!_local2) {
_local2 = d * 0.45;
}
if (a < Math.abs(_local3)) {
a = _local3;
var s = (_local2 / 4);
} else {
var s = ((_local2 / (Math.PI*2)) * Math.asin(_local3 / a));
}
if (_local1 < 1) {
_local1--;
return((-0.5 * ((a * Math.pow(2, 10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / _local2))) + b);
}
_local1--;
return(((((a * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / _local2)) * 0.5) + _local3) + b);
};
Math.easeOutInElastic = function (t, b, c, d, a, p) {
var _local1 = t;
var _local2 = c;
var _local3 = p;
if (_local1 == 0) {
return(b);
}
_local1 = _local1 / (d / 2);
if (_local1 == 2) {
return(b + _local2);
}
if (!_local3) {
_local3 = d * 0.45;
}
if (a < Math.abs(_local2)) {
a = _local2;
var s = (_local3 / 4);
} else {
var s = ((_local3 / (Math.PI*2)) * Math.asin(_local2 / a));
}
if (_local1 < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / _local3))) + (_local2 / 2)) + b);
}
return(((_local2 / 2) + (0.5 * ((a * Math.pow(2, 10 * (_local1 - 2))) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / _local3)))) + b);
};
Math.easeInBack = function (t, b, c, d, s) {
var _local1 = s;
var _local2 = t;
if (_local1 == undefined) {
_local1 = 1.70158;
}
_local2 = _local2 / d;
return((((c * _local2) * _local2) * (((_local1 + 1) * _local2) - _local1)) + b);
};
Math.easeOutBack = function (t, b, c, d, s) {
var _local1 = t;
var _local2 = s;
if (_local2 == undefined) {
_local2 = 1.70158;
}
_local1 = (_local1 / d) - 1;
return((c * (((_local1 * _local1) * (((_local2 + 1) * _local1) + _local2)) + 1)) + b);
};
Math.easeInOutBack = function (t, b, c, d, s) {
var _local1 = t;
var _local2 = s;
if (_local2 == undefined) {
_local2 = 1.70158;
}
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
_local2 = _local2 * 1.525;
return(((c / 2) * ((_local1 * _local1) * (((_local2 + 1) * _local1) - _local2))) + b);
}
_local1 = _local1 - 2;
_local2 = _local2 * 1.525;
return(((c / 2) * (((_local1 * _local1) * (((_local2 + 1) * _local1) + _local2)) + 2)) + b);
};
Math.easeOutInBack = function (t, b, c, d, s) {
var _local1 = t;
var _local2 = s;
if (_local2 == undefined) {
_local2 = 1.70158;
}
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
_local1--;
_local2 = _local2 * 1.525;
return(((c / 2) * (((_local1 * _local1) * (((_local2 + 1) * _local1) + _local2)) + 1)) + b);
}
_local1--;
_local2 = _local2 * 1.525;
return(((c / 2) * (((_local1 * _local1) * (((_local2 + 1) * _local1) - _local2)) + 1)) + b);
};
Math.easeInBounce = function (t, b, c, d) {
return((c - Math.easeOutBounce(d - t, 0, c, d)) + b);
};
Math.easeOutBounce = function (t, b, c, d) {
var _local1 = t;
var _local2 = c;
var _local3 = b;
_local1 = _local1 / d;
if (_local1 < 0.363636363636364) {
return((_local2 * ((7.5625 * _local1) * _local1)) + _local3);
}
if (_local1 < 0.727272727272727) {
_local1 = _local1 - 0.545454545454545;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.75)) + _local3);
}
if (_local1 < 0.909090909090909) {
_local1 = _local1 - 0.818181818181818;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.9375)) + _local3);
}
_local1 = _local1 - 0.954545454545455;
return((_local2 * (((7.5625 * _local1) * _local1) + 0.984375)) + _local3);
};
Math.easeInOutBounce = function (t, b, c, d) {
var _local1 = d;
var _local2 = t;
var _local3 = c;
if (_local2 < (_local1 / 2)) {
return((Math.easeInBounce(_local2 * 2, 0, _local3, _local1) * 0.5) + b);
}
return(((Math.easeOutBounce((_local2 * 2) - _local1, 0, _local3, _local1) * 0.5) + (_local3 * 0.5)) + b);
};
Math.easeOutInBounce = function (t, b, c, d) {
var _local1 = d;
var _local2 = t;
var _local3 = c;
if (_local2 < (_local1 / 2)) {
return((Math.easeOutBounce(_local2 * 2, 0, _local3, _local1) * 0.5) + b);
}
return(((Math.easeInBounce((_local2 * 2) - _local1, 0, _local3, _local1) * 0.5) + (_local3 * 0.5)) + b);
};
var Mp = MovieClip.prototype;
AsBroadcaster.initialize(Mp);
Mp.$addListener = Mp.addListener;
ASSetPropFlags(Mp, "$addListener", 1, 0);
Mp.addListener = function () {
var _local1 = this;
AsBroadcaster.initialize(_local1);
_local1.$addListener.apply(_local1, arguments);
};
var tp = tweenManager.prototype;
tp.setupdateInterval = function (time) {
var _local1 = this;
if (_local1.playing) {
_local1.deinit();
_local1.updateTime = time;
_local1.init();
} else {
_local1.updateTime = time;
}
};
tp.getupdateInterval = function () {
return(this.updateTime);
};
tp.addProperty("updateInterval", tp.getupdateInterval, tp.setupdateInterval);
tp.init = function () {
var tm = this;
if (tm.updateTime > 0) {
tm.updateIntId = setInterval(tm, "update", tm.updateTime);
} else {
if (tm.tweenHolder._name == undefined) {
tm.tweenHolder = _root.createEmptyMovieClip("_th_", 6789);
}
tm.tweenHolder.onEnterFrame = function () {
tm.update.call(tm);
};
}
tm.playing = true;
tm.now = getTimer();
};
tp.deinit = function () {
var _local1 = this;
_local1.playing = false;
clearInterval(_local1.updateIntId);
delete _local1.tweenHolder.onEnterFrame;
};
tp.update = function () {
var _local3 = this;
var i;
var _local1;
var _local2;
i = _local3.tweenList.length;
if (_local3.broadcastEvents) {
var ut = {};
var et = {};
}
while (i--) {
_local1 = _local3.tweenList[i];
if ((_local1.ts + _local1.d) > _local3.now) {
if (_local1.ctm == undefined) {
_local1.mc[_local1.pp] = _local1.ef(_local3.now - _local1.ts, _local1.ps, _local1.ch, _local1.d, _local1.e1, _local1.e2);
} else {
var ttm = {};
for (_local2 in _local1.ctm) {
ttm[_local2] = _local1.ef(_local3.now - _local1.ts, _local1.stm[_local2], _local1.ctm[_local2], _local1.d, _local1.e1, _local1.e2);
}
_local1.c.setTransform(ttm);
}
if (_local3.broadcastEvents && (ut[targetPath(_local1.mc)] == undefined)) {
ut[targetPath(_local1.mc)] = _local1.mc;
}
if (_local1.cb.updfunc != undefined) {
_local1.cb.updfunc.apply(_local1.cb.updscope, _local1.cb.updargs);
}
} else {
if (_local1.ctm == undefined) {
_local1.mc[_local1.pp] = _local1.ps + _local1.ch;
} else {
var ttm = {};
for (_local2 in _local1.ctm) {
ttm[_local2] = _local1.stm[_local2] + _local1.ctm[_local2];
}
_local1.c.setTransform(ttm);
}
if (_local3.broadcastEvents) {
if (ut[targetPath(_local1.mc)] == undefined) {
ut[targetPath(_local1.mc)] = _local1.mc;
}
if (et[targetPath(_local1.mc)] == undefined) {
et[targetPath(_local1.mc)] = _local1.mc;
}
}
if (_local1.cb.updfunc != undefined) {
_local1.cb.updfunc.apply(_local1.cb.updscope, _local1.cb.updargs);
}
if (endt == undefined) {
var endt = new Array();
}
endt.push(i);
}
}
for (_local2 in ut) {
ut[_local2].broadcastMessage("onTweenUpdate");
}
if (endt != undefined) {
_local3.endTweens(endt);
}
for (_local2 in et) {
et[_local2].broadcastMessage("onTweenEnd");
}
_local3.now = getTimer();
if (_local3.updateTime > 0) {
updateAfterEvent();
}
};
tp.endTweens = function (tid_arr) {
var cb_arr;
var tl;
var i;
var cb;
var j;
cb_arr = [];
tl = tid_arr.length;
with (this) {
i = 0;
while (i < tl) {
cb = tweenList[tid_arr[i]].cb;
if (cb != undefined) {
var exec = true;
for (j in cb_arr) {
if (cb_arr[j] == cb) {
exec = false;
break;
}
}
if (exec) {
cb_arr.push(cb);
}
}
tweenList.splice(tid_arr[i], 1);
i++;
}
i = 0;
while (i < cb_arr.length) {
cb_arr[i].func.apply(cb_arr[i].scope, cb_arr[i].args);
i++;
}
if (tweenList.length == 0) {
deinit();
}
}
};
tp.addTween = function (mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
var i;
var pp;
var addnew;
var j;
var t;
with (this) {
if (!playing) {
init();
}
for (i in props) {
pp = props[i];
addnew = true;
if (pp.substr(0, 4) != "_ct_") {
if (autoOverwrite) {
for (j in tweenList) {
t = tweenList[j];
if ((t.mc == mc) && (t.pp == pp)) {
t.ps = mc[pp];
t.ch = pEnd[i] - mc[pp];
t.ts = now;
t.d = sec * 1000;
t.ef = eqFunc;
t.cb = callback;
t.e1 = extra1;
t.e2 = extra2;
addnew = false;
break;
}
}
}
if (addnew) {
tweenList.unshift({mc:mc, pp:pp, ps:mc[pp], ch:pEnd[i] - mc[pp], ts:now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2});
}
} else {
var c = new Color(mc);
var stm = c.getTransform();
var ctm = {};
for (j in pEnd[i]) {
if ((pEnd[i][j] != stm[j]) && (pEnd[i][j] != undefined)) {
ctm[j] = pEnd[i][j] - stm[j];
}
}
if (autoOverwrite) {
for (j in tweenList) {
t = tweenList[j];
if ((t.mc == mc) && (t.ctm != undefined)) {
t.c = c;
t.stm = stm;
(t.ctm = ctm);
(t.ts = now);
t.d = sec * 1000;
t.ef = eqFunc;
t.cb = callback;
t.e1 = extra1;
t.e2 = extra2;
addnew = false;
break;
}
}
}
if (addnew) {
tweenList.unshift({mc:mc, c:c, stm:stm, ctm:ctm, ts:now, d:sec * 1000, ef:eqFunc, cb:callback, e1:extra1, e2:extra2});
}
}
}
if (broadcastEvents) {
mc.broadcastMessage("onTweenStart");
}
if (callback.startfunc != undefined) {
callback.startfunc.apply(callback.startscope, callback.startargs);
}
}
};
tp.addTweenWithDelay = function (delay, mc, props, pEnd, sec, eqFunc, callback, extra1, extra2) {
with (this) {
var il = ints.length;
var intid = setInterval(function (obj) {
var _local1 = obj;
_local1.addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2);
clearInterval(_local1.ints[il].intid);
_local1.ints[il] = undefined;
}, delay * 1000, this);
ints[il] = {mc:mc, props:props, pend:pEnd, intid:intid, st:this.now, delay:delay * 1000, args:arguments.slice(1)};
}
};
tp.removeTween = function (mc, props) {
with (this) {
var all;
var i;
var j;
all = false;
if (props == undefined) {
all = true;
}
i = tweenList.length;
while (i--) {
if (tweenList[i].mc == mc) {
if (all) {
tweenList.splice(i, 1);
} else {
for (j in props) {
if ((tweenList[i].pp == props[j]) && (tweenList[i].mc == mc)) {
tweenList.splice(i, 1);
} else if (((props[j] == "_ct_") && (tweenList[i].ctm != undefined)) && (tweenList[i].mc == mc)) {
tweenList.splice(i, 1);
}
}
}
}
}
i = ints.length;
while ((i--) && (ints[i].mc == mc)) {
if (all) {
clearInterval(ints[i].intid);
ints[i] = undefined;
} else {
for (j in props) {
for (var k in ints[i].props) {
if ((ints[i].props[k] == props[j]) && (tweenList[i].mc == mc)) {
ints[i].props.splice(k, 1);
ints[i].pend.splice(k, 1);
}
}
if (ints[i].props.length == 0) {
clearInterval(ints[i].intid);
}
}
}
}
if (tweenList.length == 0) {
deinit();
}
}
};
tp.isTweening = function (mc) {
with (this) {
for (var i in tweenList) {
if (tweenList[i].mc == mc) {
return(true);
}
}
return(false);
}
};
tp.getTweens = function (mc) {
with (this) {
var count = 0;
for (var i in tweenList) {
if (tweenList[i].mc == mc) {
count++;
}
}
return(count);
}
};
tp.lockTween = function (mc, bool) {
this.lockedTweens[targetPath(mc)] = bool;
};
tp.isTweenLocked = function (mc) {
if (this.lockedTweens[targetPath(mc)] == undefined) {
return(false);
}
return(this.lockedTweens[targetPath(mc)]);
};
tp.pauseAll = function () {
var _local1 = this;
if (_local1.isPaused) {
} else {
_local1.isPaused = true;
_local1.pausedTime = _local1.now;
for (var _local2 in _local1.ints) {
clearInterval(_local1.ints[_local2].intid);
}
_local1.deinit();
}
};
tp.unpauseAll = function () {
var _local1 = this;
if (!_local1.isPaused) {
} else {
var _local2;
var t;
_local1.isPaused = false;
_local1.init();
for (_local2 in _local1.tweenList) {
t = _local1.tweenList[_local2];
t.ts = _local1.now - (_local1.pausedTime - t.ts);
}
for (_local2 in _local1.ints) {
if (_local1.ints[_local2] == undefined) {
continue;
}
var _local3 = _local1.ints[_local2].delay - (_local1.pausedTime - _local1.ints[_local2].st);
var intid = setInterval(function (obj, id) {
var _local1 = obj;
var _local2 = id;
_local1.addTween.apply(_local1, _local1.ints[_local2].args);
clearInterval(_local1.ints[_local2].intid);
_local1.ints[_local2] = undefined;
}, _local3, _local1, _local2);
_local1.ints[_local2].intid = intid;
_local1.ints[_local2].st = _local1.now;
_local1.ints[_local2].delay = _local3;
}
}
};
tp.stopAll = function () {
var _local1 = this;
for (var _local2 in _local1.ints) {
clearInterval(_local1.ints[_local2].intid);
}
_local1.tweenList = new Array();
_local1.deinit();
};
tp.toString = function () {
return("[AS1 tweenManager 1.1.7]");
};
delete tp;
if ($tweenManager == undefined) {
_global.$tweenManager = new tweenManager();
}
Mp.tween = function (props, pEnd, seconds, animType, delay, callback, extra1, extra2) {
if ($tweenManager.isTweenLocked(this)) {
trace("error: this movieclip is locked");
return(undefined);
}
if (arguments.length < 2) {
trace("error: props & pEnd must be defined");
return(undefined);
}
if (typeof(props) == "string") {
props = [props];
}
if (pEnd.length == undefined) {
pEnd = [pEnd];
}
if (seconds == undefined) {
seconds = 2;
} else if (seconds < 0.01) {
seconds = 0;
}
if ((delay < 0.01) || (delay == undefined)) {
delay = 0;
}
switch (typeof(animType)) {
case "string" :
animType = animType.toLowerCase();
if (animType == "linear") {
var eqf = Math.linearTween;
} else {
var eqf = Math[animType];
}
break;
case "function" :
var eqf = animType;
break;
case "object" :
if (!((animType.pts != undefined) && (animType.ease != undefined))) {
break;
}
var eqf = animType.ease;
var extra1 = animType.pts;
}
if (eqf == undefined) {
var eqf = Math.easeOutExpo;
}
switch (typeof(callback)) {
case "function" :
callback = {func:callback, scope:this._parent};
break;
case "string" :
var ilp = callback.indexOf("(");
var funcp = callback.slice(0, ilp);
var scope = eval (funcp.slice(0, funcp.lastIndexOf(".")));
var func = eval (funcp);
var args = callback.slice(ilp + 1, callback.lastIndexOf(")")).split(",");
var i = 0;
while (i < args.length) {
var a = eval (args[i]);
if (a != undefined) {
args[i] = a;
}
i++;
}
callback = {func:func, scope:scope, args:args};
}
if ($tweenManager.autoStop) {
$tweenManager.removeTween(this, props);
}
if (delay > 0) {
$tweenManager.addTweenWithDelay(delay, this, props, pEnd, seconds, eqf, callback, extra1, extra2);
} else {
$tweenManager.addTween(this, props, pEnd, seconds, eqf, callback, extra1, extra2);
}
};
ASSetPropFlags(Mp, "tween", 1, 0);
Mp.stopTween = function (props) {
var _local1 = props;
if (typeof(_local1) == "string") {
_local1 = [_local1];
}
$tweenManager.removeTween(this, _local1);
};
ASSetPropFlags(Mp, "stopTween", 1, 0);
Mp.isTweening = function () {
return($tweenManager.isTweening(this));
};
ASSetPropFlags(Mp, "isTweening", 1, 0);
Mp.getTweens = function () {
return($tweenManager.getTweens(this));
};
ASSetPropFlags(Mp, "getTweens", 1, 0);
Mp.lockTween = function () {
$tweenManager.lockTween(this, true);
};
ASSetPropFlags(Mp, "lockTween", 1, 0);
Mp.unlockTween = function () {
$tweenManager.lockTween(this, false);
};
ASSetPropFlags(Mp, "unlockTween", 1, 0);
Mp.isTweenLocked = function () {
return($tweenManager.isTweenLocked(this));
};
ASSetPropFlags(Mp, "isTweenLocked", 1, 0);
Mp.alphaTo = function (destAlpha, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_alpha"], [destAlpha], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "alphaTo", 1, 0);
Mp.brightnessTo = function (bright, seconds, animType, delay, callback, extra1, extra2) {
var _local3 = bright;
var _local2 = 100 - Math.abs(_local3);
var _local1 = 0;
if (_local3 > 0) {
_local1 = 256 * (_local3 / 100);
}
var destCt = {ra:_local2, rb:_local1, ga:_local2, gb:_local1, ba:_local2, bb:_local1};
this.tween(["_ct_"], [destCt], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "brightnessTo", 1, 0);
Mp.colorTo = function (destColor, seconds, animType, delay, callback, extra1, extra2) {
var _local1 = destColor;
var _local2 = {rb:_local1 >> 16, ra:0, gb:(_local1 & 65280) >> 8, ga:0, bb:_local1 & 255, ba:0};
this.tween(["_ct_"], [_local2], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "colorTo", 1, 0);
Mp.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, animType, delay, callback, extra1, extra2) {
var _local1 = {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab};
this.tween(["_ct_"], [_local1], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "colorTransformTo", 1, 0);
Mp.scaleTo = function (destScale, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_xscale", "_yscale"], [destScale, destScale], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "scaleTo", 1, 0);
Mp.slideTo = function (destX, destY, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_x", "_y"], [destX, destY], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "slideTo", 1, 0);
Mp.rotateTo = function (destRotation, seconds, animType, delay, callback, extra1, extra2) {
this.tween(["_rotation"], [destRotation], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "rotateTo", 1, 0);
Mp.getFrame = function () {
return(this._currentframe);
};
ASSetPropFlags(Mp, "getFrame", 1, 0);
Mp.setFrame = function (fr) {
this.gotoAndStop(Math.round(fr));
};
ASSetPropFlags(Mp, "setFrame", 1, 0);
Mp.addProperty("_frame", Mp.getFrame, Mp.setFrame);
ASSetPropFlags(Mp, "_frame", 1, 0);
Mp.frameTo = function (endframe, duration, animType, delay, callback, extra1, extra2) {
var _local1 = endframe;
if (_local1 == undefined) {
_local1 = this._totalframes;
}
this.tween("_frame", _local1, duration, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "frameTo", 1, 0);
Mp.brightOffsetTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
var _local1 = 256 * (percent / 100);
var _local2 = {ra:100, rb:_local1, ga:100, gb:_local1, ba:100, bb:_local1};
this.tween(["_ct_"], [_local2], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "brightOffsetTo", 1, 0);
Mp.contrastTo = function (percent, seconds, animType, delay, callback, extra1, extra2) {
var _local1 = {};
_local1.ra = (_local1.ga = (_local1.ba = percent));
_local1.rb = (_local1.gb = (_local1.bb = 128 - (1.28 * percent)));
this.tween(["_ct_"], [_local1], seconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(Mp, "contrastTo", 1, 0);
delete Mp;
Array.prototype.createRandomINT = function (count, startval) {
var _local2 = this;
var _local3 = startval;
var _local1 = 0;
while (_local1 < count) {
_local2.push(_local1 + _local3);
_local1++;
}
_local2.shuffle();
};
Array.prototype.shuffle = function () {
var _local2 = this;
var len = _local2.length;
var _local1 = 0;
while (_local1 < len) {
var _local3 = Math.floor(Math.random() * len);
var temp = _local2[_local1];
_local2[_local1] = _local2[_local3];
_local2[_local3] = temp;
_local1++;
}
};
Array.prototype.firstIndexOf = function (arg) {
var _local3 = this;
var _local2 = _local3.length;
var _local1 = 0;
while (_local1 < _local2) {
if (_local3[_local1] == arg) {
return(_local1);
}
_local1++;
}
return(-1);
};
Array.prototype.lastIndexOf = function (arg) {
var _local2 = -1;
var _local3;
var _local1 = 0;
while (_local1 < n) {
(((this[_local3] == arg) && (_local2 == -1)) ? (_local2 = _local3) : null);
_local1++;
}
return(_local2);
};
Array.prototype.pushDistinct = function (v) {
var _local1 = this;
var _local2 = v;
for (var _local3 in _local1) {
if (_local1[_local3] == _local2) {
return(false);
}
}
return(_local1.push(_local2));
};
_global.movieInfo = {w:680, h:450, tweenTime:1, insideWidth:0, insideStartX:0, aimTop:100, aimBottom:325, aimLeft:37, aimRight:635, rSpeed:5, sSpeed:0.5, maxAmmo:8, shotsFired:0, NML:0, reloadKeyCode:82, reflexes:0.25, tiltBuffer:25, firing:false, gameOn:false, roundTimes:[60, 60], currentRound:0, showDuration:4000, showDecay:25, totalShotsFired1:0, totalEnemies1:0, totalHits1:0, totalShotsFired2:0, totalEnemies2:"xx", totalHits2:"xx", scrollPos:"center"};
_global.gameCopy = {instructions:"INSTRUCTIONS:\nSnipers are trying to invade the Precinct, and only you can keep them out! Use your mouse to aim & fire your weapon at the silhouetted targets before they have a chance to shoot back. The more times you are hit, the more your health meter starts to decrease. If your health meter gets too low...YOU LOSE! Also, watch your AMMO, and reload (by hitting your \"R\" key) when prompted.\n\nLEVEL 1 - INTERIOR\nYou will have 1 minute to shoot as many snipers as possible. As time runs out, the snipers appear faster and faster. Keep an eye on your time and watch your health meter. If your health meter gets too low, you will NOT move on to level 2.\n\nLEVEL 2 - EXTERIOR\nYou will have 1 minute to shoot as many snipers as possible. As time runs out, the snipers appear faster and faster. Keep an eye on your time and watch your health meter. ", wonTopText:"You did it!", loseTopText:"Sorry, the Precinct has been lost!"};
gameCopy.help = gameCopy.instructions;
mouseListener = {};
mouseListener.onMouseMove = function () {
if (movieInfo.gameOn) {
cH._x = ((_xmouse < movieInfo.aimLeft) ? (movieInfo.aimLeft) : (((_xmouse > movieInfo.aimRight) ? (movieInfo.aimRight) : (_xmouse))));
cH._y = ((_ymouse < movieInfo.aimTop) ? (movieInfo.aimTop) : (((_ymouse > movieInfo.aimBottom) ? (movieInfo.aimBottom) : (_ymouse))));
}
};
mouseListener.onMouseDown = function () {
if (_ymouse >= movieInfo.aimTop) {
if (((movieInfo.shotsFired++) < movieInfo.maxAmmo) && (movieInfo.gameOn)) {
arm.gotoAndPlay("fire");
bullets.nextFrame();
} else if (movieInfo.gameOn) {
audioHolder.heroEmpty.start();
}
}
};
Mouse.addListener(mouseListener);
var keyListener = {};
keyListener.onKeyDown = function () {
if (!(Key.getCode() === movieInfo.reloadKeyCode)) {
} else if (movieInfo.gameOn) {
reload();
}
};
Key.addListener(keyListener);
function getNextMCLevel() {
return(++movieInfo.NML);
}
function reload() {
movieInfo.shotsFired = 0;
bullets.gotoAndStop(1);
audioHolder.heroReload.start();
}
_global.scrollToThe = function (way) {
var _local2 = way;
movieInfo.scrollPos = _local2;
var _local1 = ((_local2 == "left") ? (movieInfo.scrollDistance) : (((_local2 == "right") ? (-movieInfo.scrollDistance) : 0)));
movieInfo.currentScene.tween("_x", movieInfo.insideStartX + _local1, movieInfo.tweenTime);
scrollControl.tween("_x", movieInfo.scrollStartX + _local1, movieInfo.tweenTime);
};
_global.checkForWarning = function (way) {
if ((way == "lc") && (movieInfo.scrollPos == "right")) {
left.gotoAndPlay(2);
} else if ((way == "rc") && (movieInfo.scrollPos == "left")) {
right.gotoAndPlay(2);
} else if (way != movieInfo.scrollPos) {
eval (way).gotoAndPlay(2);
}
};
_global.killWarnings = function () {
left.gotoAndStop(1);
right.gotoAndStop(1);
};
_global.checkForDeath = function () {
if (healthbar._currentframe == healthbar._totalframes) {
movieInfo.gameOn = false;
movieInfo.currentScene.stopTargets();
gotoAndStop ("endgame");
}
};
_global.audioholder = _root.createEmptyMovieClip("audio", getNextMCLevel());
_global.windHolder = audioholder.createEmptyMovieClip("audio", getNextMCLevel());
audioHolder.heroEmpty = new Sound();
audioHolder.heroEmpty.attachSound("heroEmpty");
audioHolder.heroReload = new Sound();
audioHolder.heroReload.attachSound("heroReload");
audioHolder.windLow = new Sound();
audioHolder.windLow.attachSound("windLow");
audioHolder.windHi = new Sound();
audioHolder.windHi.attachSound("windHi");
audioHolder.enemyShot1 = new Sound();
audioHolder.enemyShot1.attachSound("es1");
audioHolder.enemyShot2 = new Sound();
audioHolder.enemyShot2.attachSound("es2");
audioHolder.enemyShot3 = new Sound();
audioHolder.enemyShot3.attachSound("es3");
Frame 2
movieInfo.currentRound = 0;
(movieInfo.totalHits2 = 0);
(movieInfo.totalShotsFired2 = 0);
(movieInfo.totalHits1 = 0);
(movieInfo.totalShotsFired1 = 0);
(movieInfo.insideWidth = inside._width);
movieInfo.insideStartX = inside._x;
movieInfo.scrollDistance = (900 - movieInfo.w) / 2;
movieInfo.shotsFired = 0;
movieInfo.NML = 0;
movieInfo.firing = false;
movieInfo.gameOn = false;
movieInfo.currentRound = 0;
movieInfo.showDuration = 4000;
killWarnings();
movieInfo.scrollPos = "center";
i = 1;
while (i <= inside.numEnemies) {
inside["t" + i]._visible = true;
i++;
}
stop();
Frame 3
movieInfo.scrollStartX = scrollControl._x;
movieInfo.currentScene = inside;
movieInfo.gameOn = true;
audioHolder.windLow.start(0, 25);
reload();
movieInfo.currentScene.startTargets();
stop();
Instance of Symbol 92 MovieClip "arm" in Frame 3
onClipEvent (enterFrame) {
var frm;
var moveDist = (Math.abs(_parent.ch._x - this._x) * movieInfo.reflexes);
var way = ((_parent.ch._x < this._x) ? -1 : 1);
var netD = (moveDist * way);
this._x = this._x + netD;
if (!movieInfo.firing) {
frm = ((netD < (-movieInfo.tiltBuffer)) ? "right" : (((netD > movieInfo.tiltBuffer) ? "left" : "straight")));
gotoAndStop(frm);
}
}
Frame 4
movieInfo.currentScene = outside;
movieInfo.gameOn = true;
reload();
audioHolder.windHi.start(0, 25);
timer.startTimer();
scrollControl.gotoAndStop("center");
movieInfo.scrollPos = "center";
stop();
Frame 5
messages.gotoAndStop("lose");
messages._visible = true;
Symbol 10 MovieClip Frame 1
stop();
Symbol 10 MovieClip Frame 31
gotoAndStop (1);
Symbol 19 MovieClip Frame 1
numEnemies = 20;
movieInfo.totalEnemies1 = 0;
movieInfo.totalHits1 = 0;
movieInfo.totalEnemies2 = "xx";
movieInfo.totalHits2 = "xx";
eOrder = [];
eOrder.createRandomINT(numEnemies, 1);
ePTR = 0;
xTargets = [0, 76.4, 76.4, 75.75, 75.75, 247.4, 247.4, 250.75, 250.75, 439.4, 474.4, 452.75, 462.75, 660.4, 660.4, 656.75, 656.75, 834.4, 834.4, 827.75, 827.75];
i = 1;
while (i <= numEnemies) {
tmpMC = eval ("t" + i);
tmpMC.origX = tmpMC._x;
tmpMC.targetX = xTargets[i];
tmpMC.onRelease = function () {
if (movieInfo.shotsFired <= movieInfo.maxAmmo) {
movieInfo.totalHits1++;
this.alphaTo(0, 0.7);
this._parent.startTargets();
}
};
i++;
}
toggleTargets = function (tIn, tOut) {
var inT = eval ("t" + tIn);
var outT = eval ("t" + tOut);
inT._alpha = 100;
inT.tween("_x", inT.targetX, 0.75);
outT.tween("_x", outT.origX, 0.75);
};
showNextTarget = function (hit) {
if (movieInfo.gameOn) {
movieInfo.showDuration = movieInfo.showDuration - movieInfo.showDecay;
if (hit != "y") {
movieInfo.totalEnemies1++;
}
killWarnings();
lTarget = cTarget;
if (ePTR >= numEnemies) {
var _local1 = eOrder[numEnemies - 1];
do {
eOrder.shuffle();
} while (eOrder[0] == _local1);
ePTR = 0;
}
cTarget = eOrder[ePTR];
if (cTarget <= 4) {
checkForWarning("left");
} else if (cTarget >= 17) {
checkForWarning("right");
} else if (cTarget <= 8) {
checkForWarning("lc");
} else if (cTarget >= 13) {
checkForWarning("rc");
}
ePTR++;
toggleTargets(cTarget, lTarget);
if (hit != "y") {
_parent.takeAHit.gotoAndPlay("hit" + (random(3) + 1));
}
}
};
stopTargets = function () {
clearInterval(targetInt);
};
startTargets = function () {
movieInfo.totalEnemies1++;
stopTargets();
targetInt = setInterval(showNextTarget, movieInfo.showDuration);
showNextTarget("y");
};
cTarget = eOrder[2];
Symbol 29 Button
on (release) {
_parent.gotoAndStop("round1");
_visible = false;
}
Symbol 34 Button
on (press) {
this.onEnterFrame = function () {
instructions.scroll--;
};
}
on (release, releaseOutside) {
delete this.onEnterFrame;
}
Symbol 35 Button
on (press) {
this.onEnterFrame = function () {
instructions.scroll++;
};
}
on (release, releaseOutside) {
delete this.onEnterFrame;
}
Symbol 36 Button
on (release) {
_parent.gotoAndStop("round2");
_visible = false;
}
Symbol 45 Button
on (release) {
_parent.gotoAndStop("startGame");
gotoAndStop (1);
}
Symbol 64 Button
on (release) {
movieInfo.gameOn = true;
_visible = false;
}
Symbol 66 Button
on (press) {
this.onEnterFrame = function () {
help.scroll--;
};
}
on (release, releaseOutside) {
delete this.onEnterFrame;
}
Symbol 67 Button
on (press) {
this.onEnterFrame = function () {
help.scroll++;
};
}
on (release, releaseOutside) {
delete this.onEnterFrame;
}
Symbol 68 MovieClip Frame 1
function showResults() {
r1e.text = movieInfo.totalEnemies1;
r1h.text = movieInfo.totalHits1;
r2e.text = movieInfo.totalEnemies2;
r2h.text = movieInfo.totalHits2;
if (r2e == "xx") {
rTh.text = r1h.text;
rTe.text = r1h.text;
} else {
rTh.text = Number(r1h.text) + Number(r2h.text);
rTe.text = Number(r1e.text) + Number(r2e.text);
}
}
stop();
instructions.text = gameCopy.instructions;
Symbol 68 MovieClip Frame 2
movieInfo.totalEnemies1--;
endRound1.text = ((("You did it!\n\nScore: " + movieInfo.totalHits1) + " out of ") + movieInfo.totalEnemies1) + "\n\nNow on to LEVEL 2.";
audioHolder.windLow.stop();
Symbol 68 MovieClip Frame 3
movieInfo.totalEnemies2--;
showResults();
audioholder.windHi.stop();
trace(gameCopy.loseTopText);
loseTop.text = gameCopy.loseTopText;
if (movieInfo.showDecay < 0) {
movieInfo.showDecay = movieInfo.showDecay - 5;
}
Symbol 68 MovieClip Frame 4
movieInfo.totalEnemies2--;
showResults();
audioholder.windHi.stop();
winTop.text = gameCopy.wonTopText;
movieInfo.showDecay = movieInfo.showDecay + 5;
Symbol 68 MovieClip Frame 5
stop();
help.text = gameCopy.help;
Symbol 69 Button
on (release) {
getURL ("javascript:window.close();");
}
Symbol 76 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 2
movieInfo.firing = true;
((movieInfo.currentRound == 0) ? (movieInfo.totalShotsFired1++) : (movieInfo.totalShotsFired2++));
Symbol 92 MovieClip Frame 9
gotoAndStop ("straight");
movieInfo.firing = false;
Symbol 95 Button
on (release) {
if (movieInfo.gameOn) {
movieInfo.gameOn = false;
messages.gotoAndStop("help");
messages._visible = true;
}
}
Symbol 97 Button
on (rollOver) {
if (movieInfo.gameOn) {
way = "left";
scrollToThe(way);
gotoAndStop(way);
eval ("_parent." + way).gotoAndStop(1);
}
}
Symbol 98 Button
on (rollOver) {
if (movieInfo.gameOn) {
way = "right";
scrollToThe(way);
gotoAndStop(way);
eval ("_parent." + way).gotoAndStop(1);
}
}
Symbol 99 Button
on (rollOver) {
if (movieInfo.gameOn) {
way = "center";
scrollToThe(way);
gotoAndStop(way);
}
}
Symbol 100 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 1
function showTime() {
minutes.text = Math.floor(startSeconds / 60);
seconds.text = (((startSeconds % 60) < 10) ? ("0" + (startSeconds % 60)) : (startSeconds % 60));
}
function killTimer() {
clearInterval(timerInt);
killWarnings();
}
function checkEndRound(kill) {
var _local1 = _parent;
if (movieInfo.gameOn) {
if ((--startSeconds) < 1) {
movieInfo.gameOn = false;
killTimer();
if (movieInfo.currentRound == 0) {
var _local2 = 1;
while (_local2 <= _local1.inside.numEnemies) {
_local1.inside["t" + _local2]._visible = false;
_local2++;
}
_local1.inside.stopTargets();
} else {
var _local2 = 1;
while (_local2 <= _local1.outside.numEnemies) {
_local1.outside["t" + _local2]._visible = false;
_local2++;
}
_local1.outside.stopTargets();
}
if (kill == "y") {
_local1.messages.gotoAndStop("lose");
} else if ((++movieInfo.currentRound) == 1) {
_local1.messages.gotoAndStop("endRound1");
} else {
_local1.messages.gotoAndStop("win");
}
_local1.messages._visible = true;
_local1.right.gotoAndStop(1);
_local1.left.gotoAndStop(1);
}
showTime();
}
}
function startTimer() {
startSeconds = movieInfo.roundTimes[movieInfo.currentRound];
showTime();
timerInt = setInterval(checkEndRound, 1000);
}
startTimer();
Symbol 125 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 5
if (movieInfo.gameOn) {
_parent.healthBar.nextFrame();
checkForDeath();
} else {
gotoAndStop (1);
}
Symbol 125 MovieClip Frame 6
if (movieInfo.gameOn) {
_parent.healthBar.nextFrame();
checkForDeath();
} else {
gotoAndStop (1);
}
Symbol 125 MovieClip Frame 14
gotoAndStop (1);
Symbol 125 MovieClip Frame 16
if (movieInfo.gameOn) {
_parent.healthBar.nextFrame();
checkForDeath();
} else {
gotoAndStop (1);
}
Symbol 125 MovieClip Frame 21
gotoAndStop (1);
Symbol 125 MovieClip Frame 26
if (movieInfo.gameOn) {
_parent.healthBar.nextFrame();
checkForDeath();
} else {
gotoAndStop (1);
}
Symbol 125 MovieClip Frame 34
if (movieInfo.gameOn) {
_parent.healthBar.nextFrame();
checkForDeath();
} else {
gotoAndStop (1);
}
Symbol 125 MovieClip Frame 46
if (movieInfo.gameOn) {
_parent.healthBar.nextFrame();
checkForDeath();
} else {
gotoAndStop (1);
}
Symbol 125 MovieClip Frame 52
gotoAndStop (1);
Symbol 135 MovieClip Frame 1
numEnemies = 20;
eOrder = [];
eOrder.createRandomINT(numEnemies, 1);
ePTR = 0;
movieInfo.totalEnemies2 = 0;
movieInfo.totalHits2 = 0;
yTargets = [0, 273, 100, 193, 101, 273, 202, 103, 273, 166, 207, 276, 172, 273, 140, 179, 190, 164, 273, 167, 194];
i = 1;
while (i <= numEnemies) {
tmpMC = eval ("t" + i);
tmpMC.origY = tmpMC._y;
tmpMC.targetY = yTargets[i];
tmpMC.onRelease = function () {
if (movieInfo.shotsFired <= movieInfo.maxAmmo) {
movieInfo.totalHits2++;
this.alphaTo(0, 0.7);
this._parent.startTargets();
}
};
i++;
}
toggleTargets = function (tIn, tOut) {
var inT = eval ("t" + tIn);
var outT = eval ("t" + tOut);
inT.tween("_y", inT.targetY, 0.75);
inT._alpha = 100;
outT.tween("_y", outT.origY, 0.75);
};
showNextTarget = function (hit) {
if (movieInfo.gameOn) {
movieInfo.showDuration = movieInfo.showDuration - movieInfo.showDecay;
if (hit != "y") {
movieInfo.totalEnemies2++;
}
lTarget = cTarget;
if (ePTR >= numEnemies) {
var _local1 = eOrder[numEnemies - 1];
do {
eOrder.shuffle();
} while (eOrder[0] == _local1);
ePTR = 0;
}
cTarget = eOrder[ePTR];
if (cTarget <= 2) {
checkForWarning("left");
} else if (cTarget >= 18) {
checkForWarning("right");
} else if (cTarget <= 5) {
checkForWarning("lc");
} else if (cTarget >= 16) {
checkForWarning("rc");
}
ePTR++;
toggleTargets(cTarget, lTarget);
if (hit != "y") {
_parent.takeAHit.gotoAndPlay("hit" + (random(3) + 1));
}
}
};
startTargets = function () {
movieInfo.totalEnemies2++;
clearInterval(oTargetInt);
oTargetInt = setInterval(showNextTarget, movieInfo.showDuration);
showNextTarget("y");
};
stopTargets = function () {
clearInterval(oTargetInt);
};
cTarget = eOrder[2];
startTargets();
Symbol 136 MovieClip Frame 1
((movieInfo.currentRound == 1) ? (nextFrame()) : (stop()));