Frame 1
function doBreak() {
var x = "set brake point here";
}
MovieClip.prototype.tween = (TextField.prototype.tween = function (prop, propDest, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local3 = this;
if (timeSeconds < 0.001) {
timeSeconds = 2;
}
if ((animType == undefined) || (animType == "")) {
animType = "easeOutExpo";
}
if (delay == undefined) {
delay = 0;
}
if (typeof(prop) == "string") {
var properties = [prop];
var oldProperties = [_local3[prop]];
var newProperties = [propDest];
} else {
var properties = [];
var oldProperties = [];
var newProperties = [];
for (var i in prop) {
oldProperties.push(_local3[prop[i]]);
}
for (var i in prop) {
properties.push(prop[i]);
}
for (var i in propDest) {
newProperties.push(propDest[i]);
}
}
var $_callback_assigned = false;
if (_root.__tweenController__ == undefined) {
var tweenHolder = _root.createEmptyMovieClip("__tweenController__", 123432);
tweenHolder.$_tweenPropList = new Array();
tweenHolder.$_tTime = getTimer();
tweenHolder.onEnterFrame = function () {
var _local3 = this;
var tTime = ((_local3.$_tTime = getTimer()));
var _local2 = 0;
while (_local2 < _local3.$_tweenPropList.length) {
var _local1 = _local3.$_tweenPropList[_local2];
if ((_local1._timeStart + (_local1._delay * 1000)) <= tTime) {
if ((_local1._timeDest + (_local1._delay * 1000)) <= tTime) {
_local1._targ[_local1._prop] = _local1._propDest;
_local3.$_tweenPropList.splice(_local2, 1);
_local2--;
_local1._targ.$_tweenCount--;
if (_local1._targ.$_tweenCount == 0) {
delete _local1._targ.$_tweenCount;
}
if (_local1._callback != undefined) {
if (_global.backwardCallbackTweening) {
var childMC = _local1._targ.createEmptyMovieClip("__child__", 122344);
_local1._callback.apply(childMC, _local3.callbackargs);
childMC.removeMovieClip();
} else {
_local1._callback.context[_local1._callback.method](_local1._callback.args);
}
}
if (_local3.$_tweenPropList.length == 0) {
_local3.removeMovieClip();
}
} else {
if (_local1._propStart == undefined) {
_local1._propStart = _local1._targ[_local1._prop];
}
_local1._targ[_local1._prop] = _global.findTweenValue(_local1._propStart, _local1._propDest, _local1._timeStart, tTime - (_local1._delay * 1000), _local1._timeDest, _local1._animType, _local1._extra1, _local1._extra2);
if ((typeof(_local1._targ) != "movieclip") && (_local1._prop == "__special_text_b__")) {
_local1._targ.textColor = ((_local1._targ.__special_text_r__ << 16) + (_local1._targ.__special_text_g__ << 8)) + _local1._targ.__special_text_b__;
}
}
}
_local2++;
}
};
}
MovieClip.prototype.addArgs = (TextField.prototype.addArgs = function () {
this.callbackargs = arguments;
});
var tweenPropList = _root.__tweenController__.$_tweenPropList;
var tTime = _root.__tweenController__.$_tTime;
for (var i in oldProperties) {
if ((newProperties[i] != undefined) && (!_local3.$_isTweenLocked)) {
if (_local3.$_tweenCount > 0) {
var _local2 = 0;
while (_local2 < tweenPropList.length) {
if ((tweenPropList[_local2]._targ == _local3) && (tweenPropList[_local2]._prop == properties[i])) {
if ((tTime + (delay * 1000)) < tweenPropList[_local2]._timeDest) {
tweenPropList.splice(_local2, 1);
_local2--;
_local3.$_tweenCount--;
}
}
_local2++;
}
}
tweenPropList.push({_prop:properties[i], _targ:_local3, _propStart:undefined, _propDest:newProperties[i], _timeStart:tTime, _timeDest:tTime + (timeSeconds * 1000), _animType:animType, _extra1:extra1, _extra2:extra2, _delay:delay, _callback:($_callback_assigned ? undefined : (callback))});
_local3.$_tweenCount = ((_local3.$_tweenCount > 0) ? (_local3.$_tweenCount + 1) : 1);
$_callback_assigned = true;
}
}
ASSetPropFlags(_local3, "$_tweenCount", 1, 0);
});
ASSetPropFlags(MovieClip.prototype, "tween", 1, 0);
ASSetPropFlags(TextField.prototype, "tween", 1, 0);
MovieClip.prototype.lockTween = (TextField.prototype.lockTween = function () {
this.$_isTweenLocked = true;
ASSetPropFlags(this, "this.$_isTweenLocked", 1, 0);
});
ASSetPropFlags(MovieClip.prototype, "lockTween", 1, 0);
ASSetPropFlags(TextField.prototype, "lockTween", 1, 0);
MovieClip.prototype.unlockTween = (TextField.prototype.unlockTween = function () {
delete this.$_isTweenLocked;
});
ASSetPropFlags(MovieClip.prototype, "unlockTween", 1, 0);
ASSetPropFlags(TextField.prototype, "unlockTween", 1, 0);
MovieClip.prototype.getTweens = (TextField.prototype.getTweens = function () {
return(this.$_tweenCount);
});
ASSetPropFlags(MovieClip.prototype, "getTweens", 1, 0);
ASSetPropFlags(TextField.prototype, "getTweens", 1, 0);
MovieClip.prototype.isTweening = (TextField.prototype.isTweening = function () {
return(((this.$_tweenCount > 0) ? true : false));
});
ASSetPropFlags(MovieClip.prototype, "isTweening", 1, 0);
ASSetPropFlags(TextField.prototype, "isTweening", 1, 0);
MovieClip.prototype.stopTween = (TextField.prototype.stopTween = function (props) {
var _local2 = this;
var _local3 = props;
var _local1 = _root.__tweenController__.$_tweenPropList;
switch (typeof(_local3)) {
case "string" :
_local3 = [_local3];
case "object" :
for (var i in _local3) {
for (var pti in _local1) {
if ((_local1[pti]._targ == _local2) && (_local1[pti]._prop == _local3[i])) {
_local1.splice(pti, 1);
}
}
}
_local2.$_tweenCount = 0;
for (var pti in _local1) {
if (_local1[pti]._targ == _local2) {
_local2.$_tweenCount++;
}
}
if (_local2.$_tweenCount == 0) {
delete _local2.$_tweenCount;
}
break;
default :
for (var pti in _local1) {
if (_local1[pti]._targ == _local2) {
_local1.splice(pti, 1);
}
}
delete _local2.$_tweenCount;
}
if (_local1.length == 0) {
_root.__tweenController__.removeMovieClip();
_local2.__tweenController_ADVhelper__.removeMovieClip();
}
});
ASSetPropFlags(MovieClip.prototype, "stopTween", 1, 0);
ASSetPropFlags(TextField.prototype, "stopTween", 1, 0);
MovieClip.prototype.alphaTo = (TextField.prototype.alphaTo = function (propDest_a, timeSeconds, animType, delay, callback, extra1, extra2) {
this.tween("_alpha", propDest_a, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "alphaTo", 1, 0);
ASSetPropFlags(TextField.prototype, "alphaTo", 1, 0);
MovieClip.prototype.rotateTo = (TextField.prototype.rotateTo = function (propDest_rotation, timeSeconds, animType, delay, callback, extra1, extra2) {
this.tween("_rotation", propDest_rotation, timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "rotateTo", 1, 0);
ASSetPropFlags(TextField.prototype, "rotateTo", 1, 0);
MovieClip.prototype.scaleTo = (TextField.prototype.scaleTo = function (propDest_scale, timeSeconds, animType, delay, callback, extra1, extra2) {
this.tween(["_xscale", "_yscale"], [propDest_scale, propDest_scale], timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "scaleTo", 1, 0);
ASSetPropFlags(TextField.prototype, "scaleTo", 1, 0);
TextField.prototype.scrollTo = function (propDest_scroll, timeSeconds, animType, delay, callback, extra1, extra2) {
this.tween("scroll", propDest_scroll, timeSeconds, animType, delay, callback, extra1, extra2);
};
ASSetPropFlags(TextField.prototype, "scrollTo", 1, 0);
MovieClip.prototype.slideTo = (TextField.prototype.slideTo = function (propDest_x, propDest_y, timeSeconds, animType, delay, callback, extra1, extra2) {
this.tween(["_x", "_y"], [propDest_x, propDest_y], timeSeconds, animType, delay, callback, extra1, extra2);
});
ASSetPropFlags(MovieClip.prototype, "slideTo", 1, 0);
ASSetPropFlags(TextField.prototype, "slideTo", 1, 0);
MovieClip.prototype.colorTo = (TextField.prototype.colorTo = function (propDest_color, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local1 = this;
var _local2 = propDest_color >> 16;
var new_g = ((propDest_color & 65280) >> 8);
var _local3 = propDest_color & 255;
if (typeof(_local1) == "movieclip") {
_local1.colorTransformTo(0, _local2, 0, new_g, 0, _local3, undefined, undefined, timeSeconds, animType, delay, callback, extra1, extra2);
} else {
_local1.__special_text_r__ = _local1.textColor >> 16;
_local1.__special_text_g__ = (_local1.textColor & 65280) >> 8;
_local1.__special_text_b__ = _local1.textColor & 255;
_local1.tween(["__special_text_r__", "__special_text_g__", "__special_text_b__"], [_local2, new_g, _local3], timeSeconds, animType, delay, callback, extra1, extra2);
}
});
ASSetPropFlags(MovieClip.prototype, "colorTo", 1, 0);
ASSetPropFlags(TextField.prototype, "colorTo", 1, 0);
MovieClip.prototype.colorTransformTo = function (propDest_ra, propDest_rb, propDest_ga, propDest_gb, propDest_ba, propDest_bb, propDest_aa, propDest_ab, timeSeconds, animType, delay, callback, extra1, extra2) {
var _local1 = this;
var $_clrTmp = new Color(_local1);
var _local3 = $_clrTmp.getTransform();
_local1.$_ADVsetter_ra = ((propDest_ra == undefined) ? undefined : (_local3.ra));
_local1.$_ADVsetter_rb = ((propDest_rb == undefined) ? undefined : (_local3.rb));
_local1.$_ADVsetter_ga = ((propDest_ga == undefined) ? undefined : (_local3.ga));
_local1.$_ADVsetter_gb = ((propDest_gb == undefined) ? undefined : (_local3.gb));
_local1.$_ADVsetter_ba = ((propDest_ba == undefined) ? undefined : (_local3.ba));
_local1.$_ADVsetter_bb = ((propDest_bb == undefined) ? undefined : (_local3.bb));
_local1.$_ADVsetter_aa = ((propDest_aa == undefined) ? undefined : (_local3.aa));
_local1.$_ADVsetter_ab = ((propDest_ab == undefined) ? undefined : (_local3.ab));
_local1.$_new_ra = propDest_ra;
_local1.$_new_rb = propDest_rb;
_local1.$_new_ga = propDest_ga;
_local1.$_new_gb = propDest_gb;
_local1.$_new_ba = propDest_ba;
_local1.$_new_bb = propDest_bb;
_local1.$_new_aa = propDest_aa;
_local1.$_new_ab = propDest_ab;
_local1.tween(["$_ADVsetter_ra", "$_ADVsetter_rb", "$_ADVsetter_ga", "$_ADVsetter_gb", "$_ADVsetter_ba", "$_ADVsetter_bb", "$_ADVsetter_aa", "$_ADVsetter_ab"], [_local1.$_new_ra, _local1.$_new_rb, _local1.$_new_ga, _local1.$_new_gb, _local1.$_new_ba, _local1.$_new_bb, _local1.$_new_aa, _local1.$_new_ab], timeSeconds, animType, delay, callback, extra1, extra2);
_local1.__tweenController_ADVhelper__.removeMovieClip();
_local1.createEmptyMovieClip("__tweenController_ADVhelper__", 123434);
_local1.__tweenController_ADVhelper__.onEnterFrame = function () {
var _local1 = this;
var _local3 = new Color(_local1._parent);
var _local2 = {};
if (_local1._parent.$_ADVsetter_ra != undefined) {
_local2.ra = _local1._parent.$_ADVsetter_ra;
}
if (_local1._parent.$_ADVsetter_rb != undefined) {
_local2.rb = _local1._parent.$_ADVsetter_rb;
}
if (_local1._parent.$_ADVsetter_ga != undefined) {
_local2.ga = _local1._parent.$_ADVsetter_ga;
}
if (_local1._parent.$_ADVsetter_gb != undefined) {
_local2.gb = _local1._parent.$_ADVsetter_gb;
}
if (_local1._parent.$_ADVsetter_ba != undefined) {
_local2.ba = _local1._parent.$_ADVsetter_ba;
}
if (_local1._parent.$_ADVsetter_bb != undefined) {
_local2.bb = _local1._parent.$_ADVsetter_bb;
}
if (_local1._parent.$_ADVsetter_aa != undefined) {
_local2.aa = _local1._parent.$_ADVsetter_aa;
}
if (_local1._parent.$_ADVsetter_ab != undefined) {
_local2.ab = _local1._parent.$_ADVsetter_ab;
}
_local3.setTransform(_local2);
if (_local1.$_toDelete) {
delete _local1._parent.$_ADVsetter_ra;
delete _local1._parent.$_ADVsetter_rb;
delete _local1._parent.$_ADVsetter_ga;
delete _local1._parent.$_ADVsetter_gb;
delete _local1._parent.$_ADVsetter_ba;
delete _local1._parent.$_ADVsetter_bb;
delete _local1._parent.$_ADVsetter_aa;
delete _local1._parent.$_ADVsetter_ab;
delete _local1._parent.$_new_ra;
delete _local1._parent.$_new_rb;
delete _local1._parent.$_new_ga;
delete _local1._parent.$_new_gb;
delete _local1._parent.$_new_ba;
delete _local1._parent.$_new_bb;
delete _local1._parent.$_new_aa;
delete _local1._parent.$_new_ab;
_local1.removeMovieClip();
}
if (((((((((_local1._parent.$_ADVsetter_ra == _local1._parent.$_new_ra) || (_local1._parent.$_new_ra == undefined)) && ((_local1._parent.$_ADVsetter_rb == _local1._parent.$_new_rb) || (_local1._parent.$_new_rb == undefined))) && ((_local1._parent.$_ADVsetter_ga == _local1._parent.$_new_ga) || (_local1._parent.$_new_ga == undefined))) && ((_local1._parent.$_ADVsetter_gb == _local1._parent.$_new_gb) || (_local1._parent.$_new_gb == undefined))) && ((_local1._parent.$_ADVsetter_ba == _local1._parent.$_new_ba) || (_local1._parent.$_new_ba == undefined))) && ((_local1._parent.$_ADVsetter_bb == _local1._parent.$_new_bb) || (_local1._parent.$_new_bb == undefined))) && ((_local1._parent.$_ADVsetter_aa == _local1._parent.$_new_aa) || (_local1._parent.$_new_aa == undefined))) && ((_local1._parent.$_ADVsetter_ab == _local1._parent.$_new_ab) || (_local1._parent.$_new_ab == undefined))) {
_local1.$_toDelete = true;
}
};
};
ASSetPropFlags(MovieClip.prototype, "colorTransformTo", 1, 0);
_global.findTweenValue = function (_propStart, _propDest, _timeStart, _timeNow, _timeDest, _animType, _extra1, _extra2) {
var _local1 = _timeNow - _timeStart;
var _local3 = _propStart;
var _local2 = _propDest - _propStart;
var d = (_timeDest - _timeStart);
var a = _extra1;
var p = _extra2;
var s = _extra1;
switch (_animType.toLowerCase()) {
case "linear" :
return(((_local2 * _local1) / d) + _local3);
case "easeinquad" :
_local1 = _local1 / d;
return(((_local2 * _local1) * _local1) + _local3);
case "easeoutquad" :
_local1 = _local1 / d;
return((((-_local2) * _local1) * (_local1 - 2)) + _local3);
case "easeinoutquad" :
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return((((_local2 / 2) * _local1) * _local1) + _local3);
}
_local1--;
return((((-_local2) / 2) * ((_local1 * (_local1 - 2)) - 1)) + _local3);
case "easeincubic" :
_local1 = _local1 / d;
return((((_local2 * _local1) * _local1) * _local1) + _local3);
case "easeoutcubic" :
_local1 = (_local1 / d) - 1;
return((_local2 * (((_local1 * _local1) * _local1) + 1)) + _local3);
case "easeinoutcubic" :
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((((_local2 / 2) * _local1) * _local1) * _local1) + _local3);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (((_local1 * _local1) * _local1) + 2)) + _local3);
case "easeinquart" :
_local1 = _local1 / d;
return(((((_local2 * _local1) * _local1) * _local1) * _local1) + _local3);
case "easeoutquart" :
_local1 = (_local1 / d) - 1;
return(((-_local2) * ((((_local1 * _local1) * _local1) * _local1) - 1)) + _local3);
case "easeinoutquart" :
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return((((((_local2 / 2) * _local1) * _local1) * _local1) * _local1) + _local3);
}
_local1 = _local1 - 2;
return((((-_local2) / 2) * ((((_local1 * _local1) * _local1) * _local1) - 2)) + _local3);
case "easeinquint" :
_local1 = _local1 / d;
return((((((_local2 * _local1) * _local1) * _local1) * _local1) * _local1) + _local3);
case "easeoutquint" :
_local1 = (_local1 / d) - 1;
return((_local2 * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 1)) + _local3);
case "easeinoutquint" :
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((((((_local2 / 2) * _local1) * _local1) * _local1) * _local1) * _local1) + _local3);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (((((_local1 * _local1) * _local1) * _local1) * _local1) + 2)) + _local3);
case "easeinsine" :
return((((-_local2) * Math.cos((_local1 / d) * (Math.PI/2))) + _local2) + _local3);
case "easeoutsine" :
return((_local2 * Math.sin((_local1 / d) * (Math.PI/2))) + _local3);
case "easeinoutsine" :
return((((-_local2) / 2) * (Math.cos((Math.PI * _local1) / d) - 1)) + _local3);
case "easeinexpo" :
return(((_local1 == 0) ? (_local3) : ((_local2 * Math.pow(2, 10 * ((_local1 / d) - 1))) + _local3)));
case "easeoutexpo" :
return(((_local1 == d) ? (_local3 + _local2) : ((_local2 * ((-Math.pow(2, (-10 * _local1) / d)) + 1)) + _local3)));
case "easeinoutexpo" :
if (_local1 == 0) {
return(_local3);
}
if (_local1 == d) {
return(_local3 + _local2);
}
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((_local2 / 2) * Math.pow(2, 10 * (_local1 - 1))) + _local3);
}
_local1--;
return(((_local2 / 2) * ((-Math.pow(2, -10 * _local1)) + 2)) + _local3);
case "easeincirc" :
_local1 = _local1 / d;
return(((-_local2) * (Math.sqrt(1 - (_local1 * _local1)) - 1)) + _local3);
case "easeoutcirc" :
_local1 = (_local1 / d) - 1;
return((_local2 * Math.sqrt(1 - (_local1 * _local1))) + _local3);
case "easeinoutcirc" :
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return((((-_local2) / 2) * (Math.sqrt(1 - (_local1 * _local1)) - 1)) + _local3);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (Math.sqrt(1 - (_local1 * _local1)) + 1)) + _local3);
case "easeinelastic" :
if (_local1 == 0) {
return(_local3);
}
_local1 = _local1 / d;
if (_local1 == 1) {
return(_local3 + _local2);
}
if (!p) {
p = d * 0.3;
}
if (a < Math.abs(_local2)) {
a = _local2;
var s = (p / 4);
} else {
var s = ((p / (Math.PI*2)) * Math.asin(_local2 / a));
}
_local1 = _local1 - 1;
return((-((a * Math.pow(2, 10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / p))) + _local3);
case "easeoutelastic" :
if (_local1 == 0) {
return(_local3);
}
_local1 = _local1 / d;
if (_local1 == 1) {
return(_local3 + _local2);
}
if (!p) {
p = d * 0.3;
}
if (a < Math.abs(_local2)) {
a = _local2;
var s = (p / 4);
} else {
var s = ((p / (Math.PI*2)) * Math.asin(_local2 / a));
}
return((((a * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / p)) + _local2) + _local3);
case "easeinoutelastic" :
if (_local1 == 0) {
return(_local3);
}
_local1 = _local1 / (d / 2);
if (_local1 == 2) {
return(_local3 + _local2);
}
if (!p) {
p = d * 0.45;
}
if (a < Math.abs(_local2)) {
a = _local2;
var s = (p / 4);
} else {
var s = ((p / (Math.PI*2)) * Math.asin(_local2 / a));
}
if (_local1 < 1) {
_local1 = _local1 - 1;
return((-0.5 * ((a * Math.pow(2, 10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / p))) + _local3);
}
_local1 = _local1 - 1;
return(((((a * Math.pow(2, -10 * _local1)) * Math.sin((((_local1 * d) - s) * (Math.PI*2)) / p)) * 0.5) + _local2) + _local3);
case "easeinback" :
if (s == undefined) {
s = 1.70158;
}
_local1 = _local1 / d;
return((((_local2 * _local1) * _local1) * (((s + 1) * _local1) - s)) + _local3);
case "easeoutback" :
if (s == undefined) {
s = 1.70158;
}
_local1 = (_local1 / d) - 1;
return((_local2 * (((_local1 * _local1) * (((s + 1) * _local1) + s)) + 1)) + _local3);
case "easeinoutback" :
if (s == undefined) {
s = 1.70158;
}
_local1 = _local1 / (d / 2);
if (_local1 < 1) {
return(((_local2 / 2) * ((_local1 * _local1) * (((((s = s * 1.525)) + 1) * _local1) - s))) + _local3);
}
_local1 = _local1 - 2;
return(((_local2 / 2) * (((_local1 * _local1) * (((((s = s * 1.525)) + 1) * _local1) + s)) + 2)) + _local3);
case "easeinbounce" :
return((_local2 - findTweenValue(0, _local2, 0, d - _local1, d, "easeOutBounce")) + _local3);
case "easeoutbounce" :
_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);
case "easeinoutbounce" :
if (_local1 < (d / 2)) {
return((findTweenValue(0, _local2, 0, _local1 * 2, d, "easeInBounce") * 0.5) + _local3);
}
return(((findTweenValue(0, _local2, 0, (_local1 * 2) - d, d, "easeOutBounce") * 0.5) + (_local2 * 0.5)) + _local3);
}
return(undefined);
};
ASSetPropFlags(_global, "findTweenValue", 1, 0);
if (!initDone) {
var mcs = (new util.McManager());
var sounds = (new util.SoundManager());
var quiz = new MidasQuiz();
initDone = true;
}
Symbol 36 MovieClip [LifeLineTradeQ] Frame 1
stop();
Symbol 36 MovieClip [LifeLineTradeQ] Frame 10
stop();
Symbol 45 MovieClip [false] Frame 31
gotoAndPlay ("idle");
Symbol 45 MovieClip [false] Frame 45
gotoAndPlay ("mouseover");
Symbol 45 MovieClip [false] Frame 67
stop();
Symbol 54 MovieClip [true] Frame 31
gotoAndPlay ("idle");
Symbol 54 MovieClip [true] Frame 45
gotoAndPlay ("mouseover");
Symbol 54 MovieClip [true] Frame 67
stop();
Symbol 66 MovieClip [truefalse_sv] Frame 1
_root.mclight.gotoAndPlay("truein");
Symbol 66 MovieClip [truefalse_sv] Frame 40
_root.mclight.gotoAndPlay("falsein");
Symbol 66 MovieClip [truefalse_sv] Frame 142
_root.mclight.gotoAndPlay("tfout");
Symbol 66 MovieClip [truefalse_sv] Frame 160
_root.quiz.activeRound().nextState();
Symbol 74 MovieClip [truefalse_de] Frame 1
_root.mclight.gotoAndPlay("truein");
Symbol 74 MovieClip [truefalse_de] Frame 40
_root.mclight.gotoAndPlay("falsein");
Symbol 74 MovieClip [truefalse_de] Frame 142
_root.mclight.gotoAndPlay("tfout");
Symbol 74 MovieClip [truefalse_de] Frame 160
_root.quiz.activeRound().nextState();
Symbol 95 MovieClip Frame 1
_root.mclight.gotoAndPlay("doorin");
Symbol 95 MovieClip Frame 27
_root.mclight.gotoAndPlay("doorout");
Symbol 116 MovieClip Frame 1
_root.mclight.gotoAndPlay("doorin");
Symbol 116 MovieClip Frame 21
_root.mclight.gotoAndPlay("doorout");
Symbol 133 MovieClip Frame 1
_root.mclight.gotoAndPlay("doorin");
Symbol 133 MovieClip Frame 26
_root.mclight.gotoAndPlay("doorin");
Symbol 135 MovieClip [tricky_de] Frame 160
_root.quiz.activeRound().nextState();
Symbol 154 MovieClip Frame 1
_root.mclight.gotoAndPlay("doorin");
Symbol 154 MovieClip Frame 27
_root.mclight.gotoAndPlay("doorout");
Symbol 174 MovieClip Frame 1
_root.mclight.gotoAndPlay("doorin");
Symbol 174 MovieClip Frame 21
_root.mclight.gotoAndPlay("doorout");
Symbol 191 MovieClip Frame 1
_root.mclight.gotoAndPlay("doorin");
Symbol 191 MovieClip Frame 26
_root.mclight.gotoAndPlay("doorout");
Symbol 194 MovieClip [tricky_sv] Frame 160
_root.quiz.activeRound().nextState();
Symbol 208 MovieClip [quizintro_de] Frame 1
startTime = getTimer();
Symbol 208 MovieClip [quizintro_de] Frame 261
_root.mclight.gotoAndPlay("introout");
Symbol 208 MovieClip [quizintro_de] Frame 301
_root.quiz.displayInstructions();
Symbol 217 MovieClip [classic_de] Frame 1
_root.mclight.gotoAndPlay("classicin");
Symbol 217 MovieClip [classic_de] Frame 141
_root.mclight.gotoAndPlay("classicout");
Symbol 217 MovieClip [classic_de] Frame 160
_root.quiz.activeRound().nextState();
Symbol 226 MovieClip [classic_sv] Frame 1
_root.mclight.gotoAndPlay("classicin");
Symbol 226 MovieClip [classic_sv] Frame 141
_root.mclight.gotoAndPlay("classicout");
Symbol 226 MovieClip [classic_sv] Frame 160
_root.quiz.activeRound().nextState();
Symbol 235 MovieClip [truefalse_en] Frame 1
_root.mclight.gotoAndPlay("truein");
Symbol 235 MovieClip [truefalse_en] Frame 40
_root.mclight.gotoAndPlay("falsein");
Symbol 235 MovieClip [truefalse_en] Frame 142
_root.mclight.gotoAndPlay("tfout");
Symbol 235 MovieClip [truefalse_en] Frame 160
_root.quiz.activeRound().nextState();
Symbol 254 MovieClip Frame 1
_root.mclight.gotoAndPlay("doorin");
Symbol 254 MovieClip Frame 27
_root.mclight.gotoAndPlay("doorout");
Symbol 273 MovieClip Frame 1
_root.mclight.gotoAndPlay("doorin");
Symbol 273 MovieClip Frame 21
_root.mclight.gotoAndPlay("doorout");
Symbol 290 MovieClip Frame 1
_root.mclight.gotoAndPlay("doorin");
Symbol 290 MovieClip Frame 26
_root.mclight.gotoAndPlay("doorout");
Symbol 293 MovieClip [tricky_en] Frame 160
_root.quiz.activeRound().nextState();
Symbol 302 MovieClip [classic_en] Frame 1
_root.mclight.gotoAndPlay("classicin");
Symbol 302 MovieClip [classic_en] Frame 141
_root.mclight.gotoAndPlay("classicout");
Symbol 302 MovieClip [classic_en] Frame 160
_root.quiz.activeRound().nextState();
Symbol 314 MovieClip [quizintro_sv] Frame 1
startTime = getTimer();
Symbol 314 MovieClip [quizintro_sv] Frame 260
_root.mclight.gotoAndPlay("introout");
Symbol 314 MovieClip [quizintro_sv] Frame 301
_root.quiz.displayInstructions();
Symbol 326 MovieClip [quizintro_en] Frame 1
startTime = getTimer();
Symbol 326 MovieClip [quizintro_en] Frame 261
_root.mclight.gotoAndPlay("introout");
Symbol 326 MovieClip [quizintro_en] Frame 301
_root.quiz.displayInstructions();
Symbol 331 MovieClip Frame 32
gotoAndPlay (1);
Symbol 331 MovieClip Frame 50
gotoAndPlay (33);
Symbol 332 MovieClip [LifeLineDoubleA] Frame 1
stop();
Symbol 332 MovieClip [LifeLineDoubleA] Frame 10
stop();
Symbol 344 MovieClip [QNum] Frame 1
stop();
Symbol 364 MovieClip [ChoiceNum] Frame 1
stop();
Symbol 400 MovieClip [Timer] Frame 1
stop();
Symbol 410 MovieClip Frame 15
stop();
Symbol 410 MovieClip Frame 45
stop();
Symbol 410 MovieClip Frame 58
stop();
Symbol 410 MovieClip Frame 70
stop();
Symbol 410 MovieClip Frame 81
stop();
Symbol 410 MovieClip Frame 91
stop();
Symbol 410 MovieClip Frame 111
stop();
Symbol 410 MovieClip Frame 133
stop();
Symbol 410 MovieClip Frame 144
stop();
Symbol 410 MovieClip Frame 215
gotoAndPlay ("idlelight");
Symbol 410 MovieClip Frame 231
stop();
Symbol 422 MovieClip Frame 1
stop();
Symbol 450 MovieClip Frame 1
stop();
Symbol 459 MovieClip Frame 1
stop();
Symbol 460 MovieClip [__Packages.util.SoundManager] Frame 0
class util.SoundManager
{
function SoundManager () {
_root.createEmptyMovieClip("soundMCs", 500);
}
function playLoop(soundName, id, volume) {
play(soundName, id, volume, true);
}
function play(soundName, id, volume, loop) {
var _local3 = id;
if (_local3 == null) {
_local3 = soundName;
}
if (_root.soundMCs[_local3] != undefined) {
} else {
var _local2 = _root.soundMCs.createEmptyMovieClip(_local3, depth++);
var _local1 = new Sound(_local2);
_local2.snd = _local1;
_local1.onSoundComplete = function () {
_root.sounds.removeMc(this);
};
_local1.attachSound(soundName);
if (volume) {
_local1.setVolume(volume);
}
if (turnOffSound) {
_local2.originalVolume = _local1.getVolume();
_local1.setVolume(0);
}
if (loop) {
_local1.start(0, 10000);
} else {
_local1.start(0, 1);
}
}
}
function playing(id) {
return(_root.soundMCs[id].playing);
}
function restart(id) {
var _local1 = _root.soundMCs[id];
_local1.stop();
_local1.start(0, 1);
}
function stop(id) {
_root.soundMCs[id].snd.stop();
_root.soundMCs[id].removeMovieClip();
}
function stopAll() {
var _local1 = _root;
for (var _local2 in _local1.soundMCs) {
_local1.soundMCs[_local2].snd.stop();
_local1.soundMCs[_local2].removeMovieClip();
}
}
function removeMc(sound) {
var _local2 = _root;
for (var _local3 in _local2.soundMCs) {
var _local1 = _local2.soundMCs[_local3];
if (_local1.snd == sound) {
_local1.removeMovieClip();
break;
}
}
}
function soundOff() {
var _local2 = _root;
if (turnOffSound) {
} else {
turnOffSound = true;
for (var _local3 in _local2.soundMCs) {
var _local1 = _local2.soundMCs[_local3];
_local1.originalVolume = _local1.snd.getVolume();
_local1.snd.setVolume(0);
}
}
}
function soundOn() {
var _local2 = _root;
turnOffSound = false;
for (var _local3 in _local2.soundMCs) {
var _local1 = _local2.soundMCs[_local3];
_local1.snd.setVolume(_local1.originalVolume);
}
}
function toggleSound() {
var _local1 = this;
if (_local1.turnOffSound) {
_local1.soundOn();
} else {
_local1.soundOff();
}
}
var depth = 1;
var turnOffSound = false;
}
Symbol 461 MovieClip [__Packages.MidasQuiz] Frame 0
class MidasQuiz
{
var availableLifeLines, language, timer, texts;
function MidasQuiz () {
var _local1 = _root;
var _local2 = this;
if (!_local2.DEBUG) {
util.Logger.state = util.Logger.QUIET;
}
util.Logger.log("creating quiz");
_local1.mcBgEllips.stop();
_local1.attachMovie("Screen", "mcScreen", 10000);
_local1.mcScreen._x = 19;
_local1.mcScreen._y = 27;
_local1.attachMovie("ScreenMask", "mcScreenMask", 100);
_local1.attachMovie("ScreenMask", "mcScreenMask2", 101);
_local1.mcScreenMask._x = (_local1.mcScreenMask2._x = 35);
_local1.mcScreenMask._y = (_local1.mcScreenMask2._y = 33);
_local1.mcScreenMask._alpha = (_local1.mcScreenMask2._alpha = 0);
_local1.mcs.setDefaultMask(_local1.mcScreenMask);
_local1.mcs.defaultFormat = TXT_1;
_local2.state = 0;
_local2.activeRoundIndex = 0;
_local2.rounds = new Array();
_local2.availableLifeLines = _local2.DOUBLE_ANSWERS | _local2.TRADE_QUESTION;
_local2.texts = new Array();
_local2.xml = new XML();
_local2.xml.ignoreWhite = true;
if (_local2.DEBUG) {
_local2.xml.onLoad = function () {
_root.quiz.gameDataReceived();
};
_local2.xml.load("gamedata.xml");
} else {
_local2.intervalID = setInterval(_local2, "waitForGameData", 50);
}
}
function waitForGameData() {
var _local1 = this;
if (_root.gameData != undefined) {
clearInterval(_local1.intervalID);
_local1.xml.parseXML(_root.gameData);
_local1.gameDataReceived();
}
}
function gameDataReceived() {
var _local2 = this;
util.Logger.log("gameDataReceived()");
if (_local2.xml.status) {
util.Logger.log("Error occured parsing xml: " + _local2.xml.status);
}
var _local3 = 0;
while (_local3 < _local2.xml.firstChild.childNodes.length) {
var _local1 = _local2.xml.firstChild.childNodes[_local3];
if (_local1.nodeName == "round") {
_local2.rounds.push(_local2.createRound(_local1));
} else if (_local1.nodeName == "text") {
_local2.texts[_local1.attributes.id] = _local1.childNodes[0].nodeValue;
}
_local3++;
}
_local2.language = _local2.xml.firstChild.attributes.language;
if (_local2.language == "") {
util.Logger.log("Error: no language!");
}
_root.endBtnText = _local2.getText("end_game");
_root.mcEnd.onRelease = function () {
_root.quiz.abortGame();
};
_root.mcSoundBtn.gotoAndStop(3);
_root.mcSoundBtn.onRollOver = function () {
this.gotoAndStop(2);
};
_root.mcSoundBtn.onRollOut = function () {
var _local1 = (_root.sounds.turnOffSound ? 1 : 3);
this.gotoAndStop(_local1);
};
_root.mcSoundBtn.onRelease = function () {
_root.sounds.toggleSound();
var _local1 = (_root.sounds.turnOffSound ? 1 : 3);
this.gotoAndStop(_local1);
};
if (_local2.DEBUG) {
_local2.intro();
} else {
_local2.intro();
}
}
function abortGame() {
var _local1 = this;
if (!_local1.gameStarted) {
} else {
if (!_local1.DEBUG) {
fscommand ("playData", "788=0");
}
_local1.activeRound().timer.stop();
_local1.gameOver();
}
}
function isAvailable(lifeLine) {
return(Boolean(availableLifeLines & lifeLine));
}
function makeUnavailable(lifeLine) {
availableLifeLines = availableLifeLines ^ lifeLine;
}
function intro() {
var _local2 = _root;
util.Logger.log("intro()");
var _local1 = _local2.attachMovie("quizintro_" + language, "vinjett", 100000);
_local1._x = 200;
_local1._y = 150;
_local1._width = _local1._width * 0.9;
_local1._height = _local1._height * 0.9;
_local1.setMask(_local2.mcScreenMask2);
_local2.sounds.play("MuzakHela", "introMusic");
}
function displayInstructions() {
util.Logger.log("displayInstructions()");
_root.vinjett.removeMovieClip();
_root.sounds.playLoop("MuzakLoop", "instructionsMusic", 100);
var textBlock = null;
var _local1 = 0;
var _local3 = 2;
var displayTime = 10;
var textMCs = new Array();
while (true) {
var textBlock = getText("instruction_text_" + (_local1 + 1));
if (textBlock == null) {
break;
}
var _local2 = _root.mcs.createLabel(textBlock, "mcInstructions" + _local1, 50, 460, 430, 100);
_local2.t.setTextFormat(TXT_2);
var extra = ((_local1 == 0) ? 0 : (_local3));
_local2.slideTo(_local2._x, 70, _local3, "easeoutquart", extra + (_local1 * (_local3 + displayTime)));
_local2.slideTo(_local2._x, -200, _local3, "easeinquart", (_local1 + 1) * (_local3 + displayTime));
_local1++;
}
var mcLifeD = _root.mcs.attachMc("LifeLineDoubleA", 200, 270);
mcLifeD.gotoAndStop(10);
mcLifeD._alpha = 0;
mcLifeD.alphaTo(100, 0.3, "linear", (_local3 * 1.5) + ((_local1 - 1) * (_local3 + displayTime)));
mcLifeD.alphaTo(0, 0.3, "linear", _local1 * (_local3 + displayTime));
var mcLifeT = _root.mcs.attachMc("LifeLineTradeQ", 320, 270);
mcLifeT.gotoAndStop(10);
mcLifeT._alpha = 0;
mcLifeT.alphaTo(100, 0.3, "linear", (_local3 * 1.5) + ((_local1 - 1) * (_local3 + displayTime)));
mcLifeT.alphaTo(0, 0.3, "linear", _local1 * (_local3 + displayTime));
var mcStart = _root.mcs.attachMc("LetsPlay", 200, 344);
mcStart.onPress = function () {
_root.sounds.stop("introMusic");
_root.quiz.startGame();
};
mcStart.t.text = getText("play");
timer = new util.Timer(1000 * ((_local3 * 1.5) + (_local1 * (_local3 + displayTime))), {context:this, method:"startGame"});
}
function startGame() {
var _local1 = _root;
_local1.sounds.stop("instructionsMusic");
util.Logger.log("startGame()");
timer.stop();
_local1.mcs.cleanup();
_local1.mcRoundDial.gotoAndStop(1);
if (!_local1.quiz.DEBUG) {
fscommand ("gameStart");
}
gameStarted = true;
_local1.quiz.activeRound().start();
}
function createRound(roundNode) {
var _local2 = roundNode;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
_local3.push(createQuestion(_local2.childNodes[_local1]));
_local1++;
}
var round;
if (_local2.attributes.type == "classic") {
round = new ClassicRound(_local3);
} else if (_local2.attributes.type == "tricky") {
round = new TrickyRound(_local3);
} else if (_local2.attributes.type == "truefalse") {
round = new TrueFalseRound(_local3);
}
round.id = _local2.attributes.id;
round.text = util.Util.removeHTMLentities(_local2.attributes.text);
round.numQuestions = Number(_local2.attributes.numquestions);
round.qualification = Number(_local2.attributes.qualification);
round.timeLimit = Number(_local2.attributes.timelimit);
return(round);
}
function createQuestion(questionNode) {
var _local3 = new Question(questionNode.attributes.id, util.Util.removeHTMLentities(questionNode.attributes.text));
var _local2 = 0;
while (_local2 < questionNode.childNodes.length) {
var _local1 = questionNode.childNodes[_local2];
if (_local1.nodeName == "choice") {
_local3.addChoice(util.Util.removeHTMLentities(_local1.attributes.value), util.Util.removeHTMLentities(_local1.attributes.text));
} else if (_local1.nodeName == "answer") {
_local3.answer = util.Util.removeHTMLentities(_local1.attributes.text);
}
_local2++;
}
return(_local3);
}
function sendRoundData(round) {
var _local2 = this;
var _local3 = _root;
util.Logger.log("sendRoundData()");
_local3.mcs.cleanup();
_local3.mcBgEllips.play();
var _local1 = "<answers>\n";
_local1 = _local1 + _local2.generateRoundData(round);
_local1 = _local1 + "</answers>\n";
if (_local2.DEBUG) {
_local3.response = "4";
} else {
fscommand ("request", _local1);
}
_local2.intervalID = setInterval(_local2, "waitForNumCorrect", 50);
_local2.requestTime = getTimer();
}
function waitForNumCorrect() {
var _local1 = this;
var _local2 = _root;
if ((_local2.response != null) && (_local2.response != undefined)) {
_local2.mcBgEllips.stop();
clearInterval(_local1.intervalID);
_local1.activeRound().correctAnswersReceived(Number(_local2.response));
_local2.response = null;
} else if ((_local1.requestTime > 0) && ((getTimer() - _local1.requestTime) > (_local1.RESPONSE_TIMEOUT * 1000))) {
trace("DDDD");
clearInterval(_local1.intervalID);
_local1.nextRound(true);
}
}
function generateRoundData(round) {
var data = "";
var _local3 = 0;
while (_local3 < round.questions.length) {
var _local1 = round.questions[_local3];
if (!_local1.hasBeenShown) {
} else {
data = data + (((((("<answer questionid=\"" + _local1.id) + "\" time=\"") + _local1.answerTime) + "\" lifeline=\"") + _local1.lifeLine) + "\">");
var _local2 = 0;
while (_local2 < _local1.choices.length) {
if (_local1.choices[_local2].selected) {
data = data + (("<value>" + _local1.choices[_local2].value) + "</value>");
}
_local2++;
}
data = data + "</answer>\n";
}
_local3++;
}
return(data);
}
function sendPlayData() {
if (DEBUG) {
} else {
var _local2 = activeRound().activeQuestion();
var _local3 = ((("8787," + _local2.id) + " ") + _local2.lifeLine) + " ";
var _local1 = 0;
while (_local1 < _local2.choices.length) {
if (_local2.choices[_local1].selected) {
_local3 = _local3 + (_local2.choices[_local1].value + " ");
}
_local1++;
}
_local3 = _local3 + "=0";
fscommand ("playData", _local3);
}
}
function nextRound(skipPassCheck) {
var _local1 = this;
if (skipPassCheck || (_local1.activeRound().passed())) {
_local1.activeRoundIndex++;
if (_local1.activeRoundIndex == _local1.rounds.length) {
_local1.gameOver();
} else {
_root.mcRoundDial.gotoAndStop(_local1.activeRoundIndex + 1);
_local1.activeRound().start();
}
} else {
_local1.gameOver();
}
}
function activeRound() {
var _local1 = this;
if (_local1.activeRoundIndex < _local1.rounds.length) {
return(_local1.rounds[_local1.activeRoundIndex]);
}
return(null);
}
function getText(key) {
return(texts[key]);
}
function gameOver() {
var _local2 = this;
util.Logger.log("Game over");
_root.mcs.cleanup();
_root.vinjett.removeMovieClip();
var _local3 = "<answers>\n";
var _local1 = 0;
while (_local1 < _local2.rounds.length) {
_local3 = _local3 + _local2.generateRoundData(_local2.rounds[_local1]);
_local1++;
}
_local3 = _local3 + "</answers>\n";
if (!_local2.DEBUG) {
fscommand ("gameOver", _local3);
}
var mcGameOver = _root.mcs.createLabel(_root.quiz.getText("game_over"), "txtGameOver", 60, 140, 400, 80, true);
var mcGameOver = _root.mcs.createLabel(_root.quiz.getText("game_end"), "txtGameEnd", 60, 240, 400, 80);
}
static var INIT = 1000;
static var RUN = 1001;
static var GAME_OVER = 1002;
static var TXT_1 = new TextFormat("impact", 20, 16777215);
static var TXT_1_BIG = new TextFormat("impact", 26, 16777215);
static var TXT_2 = new TextFormat("garmond", 20, 16777215);
var gameStarted = false;
var DEBUG = false;
var intervalID = 0;
var DOUBLE_ANSWERS = 1;
var TRADE_QUESTION = 2;
var RESPONSE_TIMEOUT = 15;
}
Symbol 462 MovieClip [__Packages.util.Timer] Frame 0
class util.Timer
{
var playTime, nLoopDuration, updateInterval, __get__interval, bPaused, bRunning, nLoop, nLoops, callback, __get__callbackScope, __get__callbackMethod;
function Timer (inDuration, inCallBack, inLoops, dontStart) {
var _local1 = this;
var _local2 = inLoops;
var _local3 = inCallBack;
mx.events.EventDispatcher.initialize(_local1);
_local1.bPaused = false;
_local1.bRunning = false;
_local1.playTime = 0;
_local1.nLoop = 0;
_local1.nLoops = 1;
_local1.intervalID = -1;
_local1.updateInterval = 50;
if (inDuration != undefined) {
_local1.nLoopDuration = inDuration;
}
if (_local2 != undefined) {
_local1.nLoops = _local2;
}
if (_local2 != undefined) {
_local1.nLoops = _local2;
}
if (_local3 != undefined) {
_local1.callback = new util.Callback(_local3.context, _local3.method);
}
if (!dontStart) {
_local1.start(_local1.nLoopDuration);
}
}
function update() {
var _local1 = this;
_local1.playTime = getTimer() - _local1.startTime;
_local1.dispatchEvent({type:"progress", target:_local1, nLoopProgress:_local1.__get__loopProgress(), totalProgress:_local1.__get__totalProgress(), totalPercentage:_local1.__get__totalPercentage(), loop:_local1.nLoop, loops:_local1.nLoops});
if (_local1.playTime >= _local1.nLoopDuration) {
_local1.dispatchEvent({type:"loopReady", target:_local1, loop:_local1.nLoop, loops:_local1.nLoops});
if (_local1.nLoops > 0) {
if (_local1.nLoop == _local1.nLoops) {
_local1.dispatchEvent({type:"timerReady", target:_local1});
_local1.callback.fire(_local1);
clearInterval(_local1.intervalID);
_local1.bRunning = false;
} else {
_local1.nLoop++;
_local1.startTime = getTimer();
}
} else {
_local1.startTime = getTimer();
}
}
}
function start(inDuration) {
var _local1 = this;
_local1.dispatchEvent({type:"start", target:_local1, loops:_local1.nLoops});
if (inDuration != undefined) {
_local1.nLoopDuration = inDuration;
}
if (_local1.nLoops > 0) {
_local1.nLoop = 1;
}
_local1.startTime = getTimer();
_local1.bPaused = false;
_local1.bRunning = true;
clearInterval(_local1.intervalID);
_local1.intervalID = setInterval(_local1, "update", _local1.updateInterval);
}
function stop(Void) {
var _local1 = this;
_local1.dispatchEvent({type:"stop", target:_local1});
clearInterval(_local1.intervalID);
_local1.bRunning = false;
}
function pause(Void) {
var _local1 = this;
_local1.dispatchEvent({type:"pause", target:_local1});
clearInterval(_local1.intervalID);
_local1.bPaused = true;
}
function resume(Void) {
var _local1 = this;
if (_local1.bPaused) {
_local1.dispatchEvent({type:"resume", target:_local1});
_local1.bPaused = false;
_local1.startTime = getTimer() - _local1.playTime;
_local1.intervalID = setInterval(_local1, "update", _local1.updateInterval);
}
}
function reset(Void) {
var _local1 = this;
_local1.dispatchEvent({type:"reset", target:_local1});
stop();
_local1.start();
}
function get loopProgress() {
return(playTime);
}
function get totalProgress() {
var _local1 = this;
return(((_local1.nLoop - 1) * _local1.nLoopDuration) + _local1.playTime);
}
function get loopPercentage() {
return(int(Math.max(1, Math.min(100, (playTime / nLoopDuration) * 100))));
}
function get totalPercentage() {
var _local1 = this;
return(Math.max(0, Math.min(1, _local1.__get__totalProgress() / (_local1.nLoops * _local1.nLoopDuration))));
}
function get duration() {
return(nLoopDuration);
}
function set duration(value) {
nLoopDuration = ((value < 0) ? 0 : (value));
//return(duration);
}
function set interval(value) {
updateInterval = ((value < 1) ? 10 : (value));
//return(__get__interval());
}
function get paused() {
return(bPaused);
}
function get running() {
return(bRunning);
}
function get loop() {
return(nLoop);
}
function get loops() {
return(nLoops);
}
function set loops(value) {
nLoops = ((value < 0) ? 0 : (value));
//return(loops);
}
function set callbackScope(value) {
callback.__set__callbackObj(value);
//return(__get__callbackScope());
}
function set callbackMethod(value) {
callback.__set__callbackMethod(value);
//return(__get__callbackMethod());
}
}
Symbol 463 MovieClip [__Packages.util.Callback] Frame 0
class util.Callback
{
var callbackObjVal, callbackMethodVal;
function Callback (objParam, methodParam) {
callbackObj = (objParam);
callbackMethod = (methodParam);
}
function set callbackObj(objParam) {
callbackObjVal = objParam;
//return(callbackObj);
}
function get callbackObj() {
return(callbackObjVal);
}
function set callbackMethod(methodParam) {
callbackMethodVal = methodParam;
//return(callbackMethod);
}
function get callbackMethod() {
return(callbackMethodVal);
}
function fire() {
return(callbackObjVal[callbackMethodVal]());
}
}
Symbol 464 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
var _local3 = queue;
if (_local3 != undefined) {
var l = _local3.length;
var _local1;
_local1 = 0;
while (_local1 < l) {
var _local2 = _local3[_local1];
if (_local2 == handler) {
_local3.splice(_local1, 1);
return;
}
_local1++;
}
}
}
static function initialize(object) {
var _local1 = object;
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
_local1.addEventListener = _fEventDispatcher.addEventListener;
_local1.removeEventListener = _fEventDispatcher.removeEventListener;
_local1.dispatchEvent = _fEventDispatcher.dispatchEvent;
_local1.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local2 = eventObj;
var queueName = ("__q_" + _local2.type);
var queue = queueObj[queueName];
if (queue != undefined) {
var i;
for (i in queue) {
var _local1 = queue[i];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent == undefined) {
_local1[_local2.type](_local2);
} else {
_local1.handleEvent(_local2);
}
} else {
_local1.apply(queueObj, [_local2]);
}
}
}
}
function dispatchEvent(eventObj) {
var _local1 = eventObj;
var _local2 = this;
if (_local1.target == undefined) {
_local1.target = _local2;
}
_local2[_local1.type + "Handler"](_local1);
_local2.dispatchQueue(_local2, _local1);
}
function addEventListener(event, handler) {
var _local2 = this;
var _local1 = "__q_" + event;
if (_local2[_local1] == undefined) {
_local2[_local1] = new Array();
}
_global.ASSetPropFlags(_local2, _local1, 1);
_removeEventListener(_local2[_local1], event, handler);
_local2[_local1].push(handler);
}
function removeEventListener(event, handler) {
var _local1 = "__q_" + event;
_removeEventListener(this[_local1], event, handler);
}
static var _fEventDispatcher = undefined;
}
Symbol 465 MovieClip [__Packages.util.Logger] Frame 0
class util.Logger
{
function Logger () {
}
static function log(text) {
var _local1 = text;
if (state == QUIET) {
} else if (state == TRACE) {
trace(_local1);
} else if (state == WEB) {
fscommand ("flashdebug", _local1);
} else if (state == TEXTFIELD) {
_root.txtDebug.text = _root.txtDebug.text + (_local1 + newline);
}
}
static var QUIET = 100;
static var TRACE = 101;
static var WEB = 102;
static var TEXTFIELD = 103;
static var state = TRACE;
}
Symbol 466 MovieClip [__Packages.Round] Frame 0
class Round
{
var timer, activeLifeLine, text;
function Round (questions) {
var _local1 = this;
_local1.done = false;
_local1.numCorrect = 0;
_local1.qualifyPercentage = 0;
_local1.questions = questions;
_local1.activeLifeLine = 0;
_local1.activeQuestionIndex = 0;
_local1.questionNumber = 1;
Key.addListener(_local1);
Mouse.addListener(_local1);
}
function start() {
setState(PHASE_IN_ROUND);
}
function nextState(delay) {
var _local1 = this;
util.Logger.log("nextState()");
if (delay) {
_local1.timer = new util.Timer(delay, {context:_local1, method:"nextState"});
} else {
_local1.setState(_local1.state + 1);
}
}
function setState(s) {
var _local1 = this;
if (s) {
_local1.state = s;
}
switch (_local1.state) {
case PHASE_IN_ROUND :
util.Logger.log("PhaseIn Round");
if (_root.quiz.debug) {
_local1.phaseInRound();
} else {
_local1.phaseInRound();
}
return;
case PHASE_IN_QUESTION :
util.Logger.log("PhaseIn Question");
_local1.phaseInQuestion();
return;
case DISPLAY_QUESTION :
util.Logger.log("Display Question");
_local1.displayQuestion();
return;
case PHASE_OUT_QUESTION :
util.Logger.log("PhaseOut Question");
_local1.phaseOutQuestion();
return;
case PHASE_OUT_ROUND :
util.Logger.log("PhaseOut Round");
_local1.phaseOutRound();
return;
case PHASE_IN_RESULTS :
util.Logger.log("PhaseIn Results");
_local1.phaseInResults();
return;
case DISPLAY_RESULTS :
util.Logger.log("Display Results");
_local1.displayResults();
return;
case PHASE_OUT_RESULTS :
util.Logger.log("PhaseOut Results");
_local1.phaseOutResults();
}
}
function phaseInRound() {
}
function phaseInQuestion() {
var _local1 = this;
var _local2 = _root;
_local2.mcs.cleanup();
_local2.vinjett.removeMovieClip();
_local2.mclight.gotoAndPlay("questionlight");
_local1.displayQuestionNumber();
_local1.displayRoundLabel();
_local1.displayLifeLines();
}
function displayQuestion() {
var _local1 = this;
var _local3 = _root;
_local3.sounds.playLoop("MuzakLoop", "roundMusic", 100);
var _local2 = _local3.mcs.attachMc("Timer", 450, 220);
_local2._width = _local2._width * 0.7;
_local2._height = _local2._height * 0.7;
_local1.timer = new util.Timer(_local1.timeLimit * 1000, {context:_local1, method:"timeOut"});
_local1.timer.addEventListener("progress", _local2);
_local2.totalFrames = 17;
_local2.timeLimit = _local1.timeLimit;
_local2.progress = function (obj) {
var _local1 = this;
var _local2 = obj;
_local1.gotoAndStop(Math.round(_local1.totalFrames * _local2.totalPercentage));
var _local3 = Math.round(_local1.timeLimit * (1 - _local2.totalPercentage));
_local1.fg.text = (_local1.bg.text = _local3);
if (_local2.totalPercentage > 0.7) {
_root.sounds.playLoop("TickTock");
}
};
_local1.activeQuestion().hasBeenShown = true;
}
function phaseOutQuestion() {
nextQuestion();
}
function phaseOutRound() {
nextState();
}
function phaseInResults() {
var _local1 = this;
var _local2 = _root;
var txtTop = _local2.mcs.createLabel(_local2.quiz.getText("results"), "txtTop", 140, -100);
_local2.mcs.fit(txtTop.t, 300, 100, true);
_local1.centerOnSceen(txtTop);
txtTop.slideTo(txtTop._x, 70, 1, "easeoutbounce");
var mcQNum = _local2.mcs.attachMc("QNum", 250, 230);
mcQNum.gotoAndStop(0);
mcQNum.originalY = mcQNum._y;
var xmlString = _local2.quiz.getText("correct_answers");
xmlString = util.Util.replace(xmlString, "###numQuestions###", "" + _local1.numQuestions);
var result = util.Util.replace(xmlString, "###numCorrect###", "0");
var _local3 = _local2.mcs.createLabel(result, "txtResult", 100, 300);
_local2.mcs.fit(_local3.t, 300, 40, true);
_local1.centerOnSceen(_local3);
_local3._alpha = 0;
_local3.counter = 0;
_local3.numQuestions = _local1.numQuestions;
_local3.numCorrect = _local1.numCorrect;
_local3.result = xmlString;
_local3.counterDelay = 700;
_local3.init = function () {
var _local1 = this;
if (_local1.numCorrect > 0) {
_local1.loopReady();
_local1.timer = new util.Timer(_local1.counterDelay, {context:_local1, method:"done"}, Math.max(0, _local1.numCorrect - 1));
_local1.timer.addEventListener("loopReady", _local1);
} else {
_local1.done();
}
};
_local3.loopReady = function () {
var _local1 = this;
_local1.counter++;
if (_local1.counter > _local1.numCorrect) {
util.Logger.log("aborting in txtResult.loopReady!");
} else {
var _local2 = _root.top.mcQNum0;
_local2.gotoAndStop(_local1.counter + 1);
var _local3 = _local1.counter / _local1.numQuestions;
_local2._y = _local2.originalY - (_local3 * 12);
_local2._xscale = 70 + (_local3 * 110);
_local2._yscale = 70 + (_local3 * 110);
_root.sounds.play("Count" + _local1.counter);
var text = util.Util.replace(xmlString, "###numCorrect###", "" + _local1.counter);
_root.mcs.setText(_local1, text);
}
};
_local3.done = function () {
var _local3 = _root;
_local3.top.txtPassed._alpha = 100;
var _local1 = _local3.quiz.activeRound();
if (_local1.qualification > 0) {
var _local2 = (_local1.passed() ? "CountBuzz2" : "NegativeKlaxon2");
_local3.sounds.play(_local2);
}
};
_local3.alphaTo(100, 0.8, null, 0.5, {context:_local3, method:"init"});
if (_local1.qualification > 0) {
var txtPassed;
var pass = "";
if (_local1.passed()) {
pass = _local2.quiz.getText("qualified");
} else {
pass = util.Util.replace(_local2.quiz.getText("not_qualified"), "###qualification###", "" + _local1.qualification);
}
txtPassed = _local2.mcs.createLabel(pass, "txtPassed", 60, 350);
_local2.mcs.fit(txtPassed.t, 300, 30, true);
_local1.centerOnSceen(txtPassed);
txtPassed._alpha = 0;
}
_local1.timer = new util.Timer(2000 + (_local3.counterDelay * _local1.numCorrect), {context:_local1, method:"nextState"});
}
function centerOnSceen(mc) {
mc._x = (520 - mc._width) / 2;
}
function displayResults() {
timer = new util.Timer(4000, {context:this, method:"nextState"});
}
function phaseOutResults() {
_root.mcs.cleanup();
_root.quiz.nextRound();
}
function passed() {
var _local1 = this;
util.Logger.log((("numcorrect:" + _local1.numCorrect) + ", qualification:") + _local1.qualification);
return(_local1.numCorrect >= _local1.qualification);
}
function onKeyDown() {
var _local1 = this;
if (_local1.state == DISPLAY_QUESTION) {
var _local3 = Key.getAscii() - 48;
var _local2 = _root.top["mcChoiceNum" + (_local3 - 1)];
_local2.onRollOver();
_local2.onPress();
}
if ((_local1.state == PHASE_IN_RESULTS) || (_local1.state == DISPLAY_RESULTS)) {
_local1.nextState();
}
}
function onMouseDown() {
var _local1 = this;
if ((_local1.state == PHASE_IN_RESULTS) || (_local1.state == DISPLAY_RESULTS)) {
_local1.nextState();
}
}
function activeQuestion() {
var _local1 = this;
if (_local1.activeQuestionIndex < _local1.questions.length) {
return(_local1.questions[_local1.activeQuestionIndex]);
}
return(null);
}
function nextQuestion() {
var _local1 = this;
var _local2 = _root;
util.Logger.log("next question");
_local2.quiz.sendPlayData();
_local2.doBreak();
_local1.activeQuestionIndex++;
if (_local1.activeLifeLine != _local2.quiz.TRADE_QUESTION) {
_local1.questionNumber++;
}
_local1.activeLifeLine = 0;
if (_local1.questionNumber <= _local1.numQuestions) {
_local1.setState(PHASE_IN_QUESTION);
} else {
_local2.quiz.sendRoundData(_local1);
}
}
function correctAnswersReceived(numCorrect) {
var _local1 = this;
_local1.numCorrect = Math.min(numCorrect, _local1.numQuestions);
util.Logger.log("correct answers: " + _local1.numCorrect);
_local1.setState(PHASE_IN_RESULTS);
}
function choiceSelected(value, order) {
var _local1 = this;
if (_local1.state != DISPLAY_QUESTION) {
} else {
var maxSelectionsAllowed = ((_local1.activeLifeLine == _root.quiz.DOUBLE_ANSWERS) ? 2 : 1);
var _local2 = _local1.activeQuestion();
var _local3 = _local2.getSelectedChoices().length;
if (_local3 < maxSelectionsAllowed) {
if (order != 0) {
_root.top["mcChoiceNum" + (order - 1)].gotoAndStop(9 - order);
}
_root.sounds.stop("roundMusic");
_root.sounds.stop("TickTock");
_root.sounds.play("ConfirmationClunk", "clunk" + order);
_local2.choiceSelected(value);
_local3++;
if (_local3 == maxSelectionsAllowed) {
_local1.timer.stop();
_local2.answerTime = _local1.timer.totalProgress;
var delay = ((_local1 instanceof TrueFalseRound) ? 1000 : 200);
_local1.nextState(delay);
}
}
}
}
function timeOut() {
var _local1 = _root;
util.Logger.log("time out");
_local1.sounds.stop("roundMusic");
_local1.sounds.stop("TickTock");
_local1.sounds.play("NegativeKlaxon");
activeQuestion().hasBeenShown = true;
setState(PHASE_OUT_QUESTION);
}
function choiceHiliteOn(id) {
if (activeQuestion().choices[id - 1].selected) {
} else {
var _local1 = _root.top["mcChoiceNum" + (id - 1)];
_local1.scaleTo(120, 0.5);
}
}
function choiceHiliteOff(id) {
if (activeQuestion().choices[id - 1].selected) {
} else {
var _local1 = _root.top["mcChoiceNum" + (id - 1)];
_local1.scaleTo(100, 0.5);
}
}
function useLifeLine(num) {
var _local1 = this;
var _local2 = _root;
if (_local1.state != DISPLAY_QUESTION) {
} else if (_local1.activeLifeLine) {
} else {
util.Logger.log("User has used lifeline: " + num);
_local2.sounds.play("LifelineConfirm");
_local2.quiz.makeUnavailable(num);
_local1.activeLifeLine = num;
if (_local1.activeLifeLine == _local2.quiz.DOUBLE_ANSWERS) {
_local1.activeQuestion().lifeLine = "double";
} else if (_local1.activeLifeLine == _local2.quiz.TRADE_QUESTION) {
_local1.activeQuestion().lifeLine = "trade";
}
var _local3 = _local2.mcs.get("mcLifeLineDouble");
_local3.onRollOver = (_local3.onRollOut = (_local3.onPress = null));
var mcT = _local2.mcs.get("mcLifeLineTradeQ");
mcT.onRollOver = (mcT.onRollOut = (mcT.onPress = null));
if (_local1.activeLifeLine == _local2.quiz.TRADE_QUESTION) {
_local2.sounds.stop("roundMusic");
_local2.sounds.stop("TickTock");
_local1.nextState();
} else if (_local1.activeLifeLine == _local2.quiz.DOUBLE_ANSWERS) {
_local3.mcAnim.gotoAndPlay(33);
}
}
}
function displayLifeLines() {
var _local1 = _root;
if (this instanceof TrueFalseRound) {
} else {
var _local2 = _local1.mcs.get("mcLifeLineDouble");
var _local3 = _local1.mcs.get("mcLifeLineTradeQ");
if (!_local2) {
_local2 = _local1.mcs.attachMc("LifeLineDoubleA", 470, 298);
_local2.mcLabel.t.text = _local1.quiz.getText("lifeline_double");
_local2.mcAnim.gotoAndPlay(7);
_local2.onRollOver = function () {
this.gotoAndPlay(2);
};
_local2.onRollOut = function () {
this.gotoAndPlay(11);
};
_local2.onPress = function () {
_root.quiz.activeRound().useLifeLine(_root.quiz.DOUBLE_ANSWERS);
};
_local3 = _local1.mcs.attachMc("LifeLineTradeQ", 465, 355);
_local3.mcLabel.t.text = _local1.quiz.getText("lifeline_skip");
_local3.onRollOver = function () {
this.gotoAndPlay(2);
};
_local3.onRollOut = function () {
this.gotoAndPlay(11);
};
_local3.onPress = function () {
_root.quiz.activeRound().useLifeLine(_root.quiz.TRADE_QUESTION);
};
}
_local2._visible = _local1.quiz.isAvailable(_local1.quiz.DOUBLE_ANSWERS);
_local2.goToAndStop(((activeLifeLine == _local1.quiz.DOUBLE_ANSWERS) ? 2 : 1));
_local3._visible = _local1.quiz.isAvailable(_local1.quiz.TRADE_QUESTION);
_local3._alpha = 100;
_local3.goToAndStop(((activeLifeLine == _local1.quiz.TRADE_QUESTION) ? 2 : 1));
}
}
function displayQuestionNumber() {
var _local1 = _root;
var _local3 = this;
var mcQNum = _local1.mcs.attachMc("QNum", 100, 150);
mcQNum.gotoAndStop(_local3.questionNumber + 1);
var _local2 = _local1.mcs.attachMc("QText", 60, 50);
_local2.bg.text = (_local2.fg.text = _local1.quiz.getText("question_" + _local3.questionNumber).toUpperCase());
_local1.mcQnumber.gotoAndStop(_local3.questionNumber);
_local1.mcQnumber.numqs.text = _local3.numQuestions;
}
function displayRoundLabel() {
var _local1 = _root.mcs.createLabel(text, "mcRound", 250, 53, 230, 40);
_root.mcs.alignText(_local1.t, "right");
}
static var PHASE_IN_ROUND = 101;
static var PHASE_IN_QUESTION = 102;
static var DISPLAY_QUESTION = 103;
static var PHASE_OUT_QUESTION = 104;
static var PHASE_OUT_ROUND = 105;
static var PHASE_IN_RESULTS = 106;
static var DISPLAY_RESULTS = 107;
static var PHASE_OUT_RESULTS = 108;
static var ROUND_OVER = 109;
static var WAIT = 200;
}
Symbol 467 MovieClip [__Packages.util.Util] Frame 0
class util.Util
{
function Util () {
}
static function removeHTMLentities(text) {
var _local1 = text;
_local1 = replace(_local1, ">", "<");
_local1 = replace(_local1, "<", ">");
_local1 = replace(_local1, """, "\"");
_local1 = replace(_local1, "'", "'");
_local1 = replace(_local1, "&", "&");
return(_local1);
}
static function replace(string, find, replace) {
var _local1 = string;
var counter = 0;
while (counter < _local1.length) {
var _local2 = _local1.indexOf(find, counter);
if (_local2 == -1) {
break;
}
var _local3 = _local1.substr(0, _local2);
var after = _local1.substr(_local2 + find.length, _local1.length);
_local1 = (_local3 + replace) + after;
var counter = (_local3.length + replace.length);
}
return(_local1);
}
}
Symbol 468 MovieClip [__Packages.Question] Frame 0
class Question
{
var choices;
function Question (id, text) {
var _local1 = this;
_local1.choices = new Array();
_local1.id = id;
_local1.text = text;
_local1.answerTime = 0;
}
function choiceSelected(value) {
var _local1 = findChoiceWithValue(value);
_local1.selected = true;
util.Logger.log("User has selected " + _local1.text);
}
function getSelectedChoices() {
var _local2 = this;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.choices.length) {
if (_local2.choices[_local1].selected) {
_local3.push(_local2.choices[_local1]);
}
_local1++;
}
return(_local3);
}
function findChoiceWithValue(value) {
var _local2 = this;
var _local3 = value;
var _local1 = 0;
while (_local1 < _local2.choices.length) {
if (_local2.choices[_local1].value == _local3) {
return(_local2.choices[_local1]);
}
_local1++;
}
return(undefined);
}
function addChoice(value, text) {
choices.push(new Choice(value, text));
}
var hasBeenShown = false;
var lifeLine = "none";
}
Symbol 469 MovieClip [__Packages.Choice] Frame 0
class Choice
{
function Choice (value, text) {
var _local1 = this;
_local1.text = text;
_local1.value = value;
_local1.selected = false;
}
}
Symbol 470 MovieClip [__Packages.TrueFalseRound] Frame 0
class TrueFalseRound extends Round
{
var nextQuestion, state;
function TrueFalseRound (questions) {
super(questions);
util.Logger.log("creating truefalse round");
}
function phaseInRound() {
var _local2 = _root;
_local2.mcs.cleanup();
_local2.mcBgEllips.stop();
var _local1 = _local2.attachMovie("truefalse_" + _local2.quiz.language, "vinjett", 100000);
_local1._x = 23;
_local1._y = 50;
_local1._width = _local1._width * 0.9;
_local1._height = _local1._height * 0.9;
_local1.setMask(_local2.mcScreenMask2);
_local2.sounds.play("Morricone");
}
function phaseInQuestion() {
var _local2 = this;
super.phaseInQuestion();
var _local1 = _root.mcs.createLabel(_local2.activeQuestion().text, "mcQuestionText", 60, 180, 400, 80, true);
_root.mcs.addVibration(_local1, 2, 100);
_local1.slideTo(50, _local1._y - 70, 0.3, null, 1.8, {context:_local1, method:"startVibration"});
util.Logger.log(_local2.activeQuestion().answer);
var _local3 = _root.mcs.createLabel(_local2.activeQuestion().answer, "mcAnswerText", 60, 200, 320, 40, true);
_local3._alpha = 0;
_local3.alphaTo(100, 0.2, null, 2);
_local2.timer = new util.Timer(2000, {context:_local2, method:"nextState"});
}
function displayQuestion() {
var _local3 = this;
super.displayQuestion();
var _local2 = _root.mcs.attachMc("True", 160, 320);
var _local1 = _root.mcs.attachMc("False", 330, 310);
_local2.value = "true";
_local2.other = _local1;
_local1.value = "false";
_local1.other = _local2;
var press = function () {
var _local1 = this;
_local1.phasingOut = true;
_local1.label._x = -1000;
_local1.other.label._x = -1000;
_local1.gotoAndPlay("clicked");
_root.quiz.activeRound().choiceSelected(_local1.value);
};
var rollOver = function () {
if (!this.phasingOut) {
this.gotoAndPlay("mouseoverintro");
}
};
var rollOut = function () {
if (!this.phasingOut) {
this.gotoAndPlay("idle");
}
};
_local2.onPress = (_local1.onPress = press);
_local2.onRollOver = (_local1.onRollOver = rollOver);
_local2.onRollOut = (_local1.onRollOut = rollOut);
_local2.label = _root.mcs.createLabel(_root.quiz.getText("true"), "txtTrue", 140, 294, 80, 30);
_local1.label = _root.mcs.createLabel(_root.quiz.getText("false"), "txtFalse", 270, 294, 80, 30);
_root.mcs.alignText(_local2.label.t, "center");
_root.mcs.alignText(_local1.label.t, "center");
}
function phaseOutQuestion() {
_root.mcs.cleanUp();
nextQuestion();
}
function onKeyDown() {
super.onKeyDown();
if (state == Round.DISPLAY_QUESTION) {
var _local2 = Key.getAscii() - 48;
var _local1 = null;
if (_local2 == 1) {
_local1 = _root.top.mcTrue0;
}
if (_local2 == 2) {
_local1 = _root.top.mcFalse0;
}
_local1.onRollOver();
_local1.onPress();
}
}
}
Symbol 471 MovieClip [__Packages.ClassicRound] Frame 0
class ClassicRound extends Round
{
var activeQuestion, timer, text;
function ClassicRound (questions) {
super(questions);
util.Logger.log("creating classic round");
}
function phaseInRound() {
var _local2 = _root;
_local2.mcs.cleanup();
_local2.mcBgEllips._visible = false;
var _local1 = _local2.attachMovie("classic_" + _local2.quiz.language, "vinjett", 100000);
_local1._x = 45;
_local1._y = 50;
_local1._width = _local1._width * 0.8;
_local1._height = _local1._height * 0.8;
_local1.setMask(_local2.mcScreenMask2);
_local2.sounds.play("Classical");
}
function phaseInQuestion() {
var _local2 = this;
super.phaseInQuestion();
_root.mcBgEllips._visible = true;
_root.sounds.play("Blowing");
var question = _root.mcs.createLabel(_local2.activeQuestion().text, "mcQuestionText", 60, 180, 400, 70, true);
_root.mcs.addVibration(question, 2, 100);
question.slideTo(50, question._y - 60, 0.3, null, 1.8, {context:question, method:"startVibration"});
var _local1 = 0;
while (_local1 < _local2.activeQuestion().choices.length) {
var txt = _local2.activeQuestion().choices[_local1].text;
var cW = 320;
var cH = 40;
var txtChoice = _root.mcs.createLabel(txt, "mcChoiceText" + _local1, 110, 210 + (50 * _local1), 320, 40, true);
txtChoice.number = _local1 + 1;
txtChoice.value = _local2.activeQuestion().choices[_local1].value;
txtChoice.onPress = function () {
_root.quiz.activeRound().choiceSelected(this.value, this.number);
};
txtChoice.onRollOver = function () {
_root.quiz.activeRound().choiceHiliteOn(this.number);
};
txtChoice.onRollOut = function () {
_root.quiz.activeRound().choiceHiliteOff(this.number);
};
txtChoice._alpha = 0;
var _local3 = _root.mcs.attachMc("ChoiceNum", 40 + Math.pow(2, _local1 + 1), 205 + (50 * _local1));
_local3.goToAndStop(4 - _local1);
_local3.number = _local1 + 1;
_local3.value = _local2.activeQuestion().choices[_local1].value;
_local3.onPress = function () {
_root.quiz.activeRound().choiceSelected(this.value, this.number);
};
_local3.onRollOver = function () {
_root.quiz.activeRound().choiceHiliteOn(this.number);
};
_local3.onRollOut = function () {
_root.quiz.activeRound().choiceHiliteOff(this.number);
};
_local3._alpha = 0;
var x = function (d) {
util.Logger.log("tjena" + d);
};
var callback = {context:_local3, method:"gotoAndStop", args:12 - _local1};
_local3.alphaTo(100, 0.2, null, 2 + (_local1 * 0.1), callback);
txtChoice.alphaTo(100, 0.2, null, 2 + (_local1 * 0.1));
_local1++;
}
_local2.timer = new util.Timer(2000, {context:_local2, method:"nextState"});
}
function displayQuestion() {
super.displayQuestion();
}
function phaseOutQuestion() {
var _local1 = 0;
while (_local1 < activeQuestion().choices.length) {
var _local3 = activeQuestion().choices[_local1];
var _local2 = (_local3.selected ? 0.5 : 0);
_root.top["mcChoiceNum" + _local1].alphaTo(0, 0.4, null, _local2);
_root.top["mcChoiceText" + _local1].alphaTo(0, 0.4, null, _local2);
_local1++;
}
_root.top.mcQuestionText.alphaTo(0, 0.3);
timer = new util.Timer(1000, {context:this, method:"nextQuestion"});
}
function displayRoundLabel() {
var _local1 = _root.mcs.createLabel(text, "mcRound", 250, 53, 230, 40);
_local1.t.setTextFormat(MidasQuiz.TXT_2);
var _local2 = _local1.t.getTextFormat();
_local2.align = "right";
_local1.t.setTextFormat(_local2);
}
}
Symbol 472 MovieClip [__Packages.TrickyRound] Frame 0
class TrickyRound extends Round
{
var activeQuestion, timer;
function TrickyRound (questions) {
super(questions);
util.Logger.log("creating tricky round");
}
function phaseInRound() {
var _local2 = _root;
_local2.mcs.cleanup();
_local2.mcBgEllips.stop();
var _local1 = _local2.attachMovie("tricky_" + _local2.quiz.language, "vinjett", 100000);
_local1._x = 40;
_local1._y = 50;
_local1._width = _local1._width * 0.87;
_local1._height = _local1._height * 0.87;
_local1.setMask(_local2.mcScreenMask2);
_local2.sounds.play("PinkPanther");
}
function phaseInQuestion() {
super.phaseInQuestion();
var question = _root.mcs.createLabel(activeQuestion().text, "mcQuestionText", 60, 180, 400, 80, true);
_root.mcs.addVibration(question, 2, 100);
question.slideTo(50, question._y - 60, 0.3, null, 1.8, {context:question, method:"startVibration"});
var fPress = function () {
_root.quiz.activeRound().choiceSelected(this.value, this.number);
};
var fRollOver = function () {
_root.quiz.activeRound().choiceHiliteOn(this.number);
};
var fRollOut = function () {
_root.quiz.activeRound().choiceHiliteOff(this.number);
};
var _local1 = 0;
while (_local1 < activeQuestion().choices.length) {
var txt = activeQuestion().choices[_local1].text;
if (activeQuestion().choices[_local1].value == "none") {
txt = _root.quiz.getText("none_of_above");
}
var cW = 320;
var cH = 40;
var _local3 = _root.mcs.createLabel(txt, "mcChoiceText" + _local1, 110, 210 + (50 * _local1), 320, 40, true);
_local3._alpha = 0;
_local3.number = _local1 + 1;
_local3.value = activeQuestion().choices[_local1].value;
_local3.onPress = fPress;
_local3.onRollOver = fRollOver;
_local3.onRollOut = fRollOut;
var _local2 = _root.mcs.attachMc("ChoiceNum", 40 + Math.pow(2, _local1 + 1), 205 + (50 * _local1));
_local2._alpha = 0;
_local2.number = _local1 + 1;
_local2.value = activeQuestion().choices[_local1].value;
_local2.onPress = fPress;
_local2.onRollOver = fRollOver;
_local2.onRollOut = fRollOut;
var frame = ((_local2.value != "none") ? (12 - _local1) : (16 - _local1));
var callback = {context:_local2, method:"gotoAndStop", args:frame};
_local2.alphaTo(100, 0.2, null, 2 + (_local1 * 0.1), callback);
_local3.alphaTo(100, 0.2, null, 2 + (_local1 * 0.1));
_local1++;
}
timer = new util.Timer(2000, {context:this, method:"nextState"});
}
function phaseOutQuestion() {
var _local1 = 0;
while (_local1 < activeQuestion().choices.length) {
var _local3 = activeQuestion().choices[_local1];
var _local2 = (_local3.selected ? 0.5 : 0);
_root.top["mcChoiceNum" + _local1].alphaTo(0, 0.4, null, _local2);
_root.top["mcChoiceText" + _local1].alphaTo(0, 0.4, null, _local2);
_local1++;
}
_root.top.mcQuestionText.alphaTo(0, 0.3);
timer = new util.Timer(1000, {context:this, method:"nextQuestion"});
}
}
Symbol 473 MovieClip [__Packages.util.McManager] Frame 0
class util.McManager
{
var top, loadingCallback;
function McManager () {
var _local1 = this;
_local1.defaultFormat = null;
_local1.activeMCs = new Array();
_local1.swfCache = new Array();
_local1.depth = 1000;
_local1.top = _root.createEmptyMovieClip("top", _local1.depth++);
}
function setDefaultMask(mask) {
top.setMask(mask);
}
function loadSWF(className, url) {
var _local1 = this;
var id = ("mc" + className);
var _local3 = new Object();
var _local2 = _local1.top.createEmptyMovieClip(id, _root.mcScreen.getDepth() + (_local1.depth++));
_local2.loadMovie(url);
_local2._x = -10000;
_local3.id = id;
_local3.mc = _local2;
_local1.swfCache.push(_local3);
if (!_local1.loadingIntevalId) {
_local1.loadingIntevalId = setInterval(_local1, "checkLoadQueue", 100);
}
}
function checkLoadQueue() {
var _local2 = this;
clearInterval(_local2.loadingIntevalId);
_local2.loadingIntevalId = 0;
var _local3 = false;
var _local1 = 0;
while (_local1 < _local2.swfCache.length) {
if ((_local2.swfCache[_local1].mc.getBytesLoaded() < 20) || (_local2.swfCache[_local1].mc.getBytesLoaded() < _local2.swfCache[_local1].mc.getBytesTotal())) {
_local3 = true;
} else {
_local2.stopMovies(_local2.swfCache[_local1].mc);
}
_local1++;
}
if (_local3) {
_local2.loadingIntevalId = setInterval(_local2, "checkLoadQueue", 50);
} else if (_local2.loadingCallback) {
_local2.loadingCallback.context[_local2.loadingCallback.method](_local2.loadingCallback.args);
}
}
function stopMovies(location) {
var _local1 = location;
var _local2 = this;
for (var _local3 in _local1) {
if (typeof(_local1[_local3]) == "movieclip") {
_local1[_local3].stop();
_local2.stopMovies(_local1[_local3]);
}
}
}
function playMovies(location) {
var _local1 = location;
var _local2 = this;
for (var _local3 in _local1) {
if (typeof(_local1[_local3]) == "movieclip") {
_local1[_local3].play();
_local2.playMovies(_local1[_local3]);
}
}
}
function waitUntilAllLoaded(callback) {
loadingCallback = callback;
}
function getFromSWFCache(id) {
var _local2 = this;
var _local3 = id;
var _local1 = 0;
while (_local1 < _local2.swfCache.length) {
if (_local2.swfCache[_local1].id == _local3) {
return(_local2.swfCache[_local1].mc);
}
_local1++;
}
return(null);
}
function cleanup() {
var _local3 = this;
var _local2 = 0;
while (_local2 < _local3.activeMCs.length) {
var _local1 = _local3.activeMCs[_local2];
_local1.stopTween();
if (_local1 instanceof MovieClip) {
_local1.removeMovieClip();
} else if (_local1 instanceof TextField) {
_local1.removeTextField();
}
_local2++;
}
_local3.activeMCs = new Array();
_local3.depth = 1000;
}
function displayAnim(className, x, y, alpha) {
var _local2 = "mc" + className;
var _local1 = _root.top[_local2];
if (x != undefined) {
_local1._x = x;
}
if (y != undefined) {
_local1._y = y;
}
if (alpha != undefined) {
_local1._alpha = alpha;
}
playMovies(_local1);
}
function hideAnim(className) {
var _local1 = "mc" + className;
_root[_local1]._x = -10000;
stopMovies(_root[_local1]);
}
function attachMc(className, x, y, alpha) {
var _local3 = this;
var _local2 = ("mc" + className) + _local3.getHighestIndex(className);
_local3.top.attachMovie(className, _local2, _local3.depth++);
var _local1 = _root.top[_local2];
_local1.id = _local2;
_local3.activeMCs.push(_local1);
if (x != undefined) {
_local1._x = x;
}
if (y != undefined) {
_local1._y = y;
}
if (alpha != undefined) {
_local1._alpha = alpha;
}
return(_local1);
}
function createLabel(text, id, x, y, w, h, fitToSize) {
var _local2 = this;
var _local3 = id;
var round;
if (_local3 == null) {
_local3 = "mcText" + _local2.getHighestIndex("Text");
}
var _local1 = _local2.top.createEmptyMovieClip(_local3, _local2.depth++);
if (!w) {
w = 400;
}
if (!h) {
h = 30;
}
_local1.createTextField("t", _local2.depth, 0, 0, w, h);
_local1.id = _local3;
_local1.t.text = text;
_local1.t.embedFonts = true;
_local1.t.multiline = true;
_local1.t.wordWrap = true;
_local1.t.autoSize = "center";
_local1.t.selectable = false;
if (_root.quiz.DEBUG) {
_local1.t.border = 1;
}
if (x) {
_local1._x = x;
}
if (y) {
_local1._y = y;
}
if (_local2.defaultFormat) {
_local1.t.setTextFormat(_local2.defaultFormat);
}
_local2.activeMCs.push(_local1);
if (fitToSize) {
_local2.fit(_local1.t, w, h);
}
return(_local1);
}
function alignText(t, dir) {
var _local1 = t.getTextFormat();
_local1.align = dir;
t.setTextFormat(_local1);
}
function setText(mc, text) {
var _local1 = mc;
var _local2 = _local1.t.getTextFormat();
_local1.t.text = text;
_local1.t.setTextFormat(_local2);
}
function fit(t, w, h, forceOneLine) {
var _local1 = t;
if (!_local1.autoSize) {
_local1.autoSize = "left";
}
_local1.wordWrap = !forceOneLine;
var _local3 = _local1._height < h;
var done = false;
var counter = 0;
while ((!done) && ((counter++) < 100)) {
var tf = _local1.getTextFormat();
tf.size = tf.size + (_local3 ? 1 : -1);
_local1.setTextFormat(tf);
_local1._width = w;
var _local2 = _local1._height < h;
done = (_local3 ? (!_local2) : (_local2));
}
var tf = _local1.getTextFormat();
tf.size = tf.size - (_local3 ? 1 : -1);
_local1.setTextFormat(tf);
}
function getHighestIndex(className) {
var _local2 = _root;
var _local3 = className;
var _local1 = 0;
while (_local2.top[("mc" + _local3) + _local1] != undefined) {
_local1++;
}
return(_local1);
}
function get(id) {
var _local2 = this;
var _local3 = id;
var _local1 = 0;
while (_local1 < _local2.activeMCs.length) {
if (_local2.activeMCs[_local1].id.indexOf(_local3) != -1) {
return(_local2.activeMCs[_local1]);
}
_local1++;
}
return(null);
}
function getSeveral(id) {
var _local2 = this;
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.activeMCs.length) {
if (_local2.activeMCs[_local1].id.indexOf(id) != -1) {
_local3.push(_local2.activeMCs[_local1]);
}
_local1++;
}
return(_local3);
}
function addVibration(mc, maxDelta, moveTime) {
var _local1 = this;
var _local2 = mc;
_local2.maxDelta = (maxDelta ? (maxDelta) : 5);
_local2.moveTime = (moveTime ? (moveTime) : 0);
_local2.started = false;
_local2.startVibration = function () {
var _local1 = this;
_local1.startX = _local1._x;
_local1.startY = _local1._y;
_local1.getNewPos();
_local1.started = true;
};
_local2.onEnterFrame = function () {
var _local1 = this;
if (!_local1.started) {
} else {
var _local2 = 1;
if (moveTime > 0) {
_local2 = Math.min(1, (getTimer() - _local1.startTime) / _local1.moveTime);
}
_local1._x = _local1._x + ((_local1.toX - _local1._x) * _local2);
_local1._y = _local1._y + ((_local1.toY - _local1._y) * _local2);
if (_local2 == 1) {
_local1.getNewPos();
_local1.startTime = getTimer();
}
}
};
_local2.getNewPos = function () {
var _local1 = this;
_local1.toX = (_local1.startX - (_local1.maxDelta / 2)) + (Math.random() * _local1.maxDelta);
_local1.toY = (_local1.startY - (_local1.maxDelta / 2)) + (Math.random() * _local1.maxDelta);
};
}
}