Frame 1
function __com_mochibot__(swfid, mc, lv) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = ((((((((((("http://" + mbc) + "/my/core.swf?mv=5&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("d54cc23a", this, 10301);
function endAnim() {
clearMorphElements(0);
clearMorphElements(1);
clearMorphElements(2);
skip._visible = false;
_root.introanimok = true;
}
function stepMorphElements(n, m, changealpha, depv, arrv, progressive) {
_root.progframe = _root.progframe + progressive;
var _local3 = morphElements[n];
var _local7 = morphElements[m];
if (depv) {
_root["morph" + n]._alpha = _root["morph" + n]._alpha - (blowspeedmin * 2);
}
var _local9 = 0;
var _local2 = _local3.length - 1;
while (_local2 >= 0) {
var _local6 = {x:(-_local3[_local2].c._x) + _local7[_local2].p.x, y:(-_local3[_local2].c._y) + _local7[_local2].p.y};
var _local4 = Math.sqrt(Math.pow(_local6.x, 2) + Math.pow(_local6.y, 2));
if (_local2 < _root.progframe) {
_local3[_local2].s.x = _local3[_local2].s.x + ((_local6.x * 0.2) / _local4);
_local3[_local2].s.y = _local3[_local2].s.y + ((_local6.y * 0.2) / _local4);
_local3[_local2].s.x = _local3[_local2].s.x * 0.92;
_local3[_local2].s.y = _local3[_local2].s.y * 0.92;
_local3[_local2].c._x = _local3[_local2].c._x + (_local3[_local2].s.x * 6);
_local3[_local2].c._y = _local3[_local2].c._y + (_local3[_local2].s.y * 6);
if ((_local4 > 0) && (_local4 < 4)) {
_local3[_local2].s.x = 0;
_local3[_local2].s.y = 0;
_local3[_local2].c._x = _local7[_local2].p.x;
_local3[_local2].c._y = _local7[_local2].p.y;
}
if (changealpha > 0) {
var _local5 = _local4 - 2;
if (_local5 > 10) {
_local5 = 10;
} else if (_local5 < -0.3) {
_local5 = -0.3;
}
if ((_local3[_local2].c._alpha >= 0) && (_local3[_local2].c._alpha <= 100)) {
_local3[_local2].c._alpha = _local3[_local2].c._alpha + (_local5 * changealpha);
if (_local3[_local2].c._alpha < 0) {
_local3[_local2].c._alpha = 0;
} else if (_local3[_local2].c._alpha > 100) {
_local3[_local2].c._alpha = 100;
}
}
} else {
_local3[_local2].c._alpha = 100;
}
}
_local9 = _local9 + _local4;
_local2--;
}
_local9 = _local9 / _local3.length;
if (arrv && (_local9 <= 5)) {
var _local12 = (_root["morph" + m]._alpha = (5 - _local9) * 20);
}
return(_local9 <= 0.01);
}
function clearMorphElements(n) {
if ((morphElements[n].length + "") != "undefined") {
var _local1 = morphElements[n].length - 1;
while (_local1 >= 0) {
morphElements[n][_local1].c.removeMovieClip();
_local1--;
}
morphElements[n] = new Array();
}
}
function prepareMorphElements(n, m, alphainit, depv, arrv) {
_root.progframe = 0;
_root["morph" + n]._alpha = depv;
_root["morph" + m]._alpha = arrv;
var _local5 = morphElements[n];
var _local18 = morphElements[m];
var _local11 = Math.abs(_local18.length - _local5.length);
var _local6;
if (_local18.length > _local5.length) {
_local6 = _local5;
} else {
_local6 = _local18;
}
var _local9 = 0;
var _local2 = 0;
while (_local2 < _local11) {
var _local4 = _local9 + Math.ceil(((_local2 + 0) * (_local6.length - _local9)) / (_local11 - _local2));
_local9 = _local4 + 1;
_local6.splice(_local4, 0, {p:{x:_local6[_local4].p.x, y:_local6[_local4].p.y}, s:{x:0, y:0}, c:-1});
_local2++;
}
_local2 = _local5.length - 1;
while (_local2 >= 0) {
layer++;
_root.morphbase.duplicateMovieClip("mb_" + layer, layer);
var _local3 = _root["mb_" + layer];
_local3._x = _local5[_local2].p.x;
_local3._y = _local5[_local2].p.y;
_local3._alpha = alphainit;
_local5[_local2].c = _local3;
var _local8 = (Math.random() * Math.PI) * 2;
var _local7 = blowspeedmin + (Math.random() * (blowspeedmax - blowspeedmin));
var _local10 = {x:Math.cos(_local8) * _local7, y:Math.sin(_local8) * _local7};
_local5[_local2].s = _local10;
_local2--;
}
}
function createMorphElements(n, maxloop) {
morphElements[n] = new Array();
morphElementsSave[n] = new Array();
var _local2 = _root["morph" + n];
var _local3 = _local2.getBounds(_root);
var _local10 = 0;
var _local12 = true;
var _local9 = _local3.xMin;
while (_local9 < _local3.xMax) {
var _local8 = _local3.yMin;
while (_local8 < _local3.yMax) {
if (((_local2.hitTest(_local9 - 1, _local8, true) && (_local2.hitTest(_local9, _local8 - 1, true))) && (_local2.hitTest(_local9 + 1, _local8, true))) && (_local2.hitTest(_local9, _local8 + 1, true))) {
morphElements[n].push({p:{x:_local9, y:_local8}, s:{x:0, y:0}, c:-1});
morphElementsSave[n].push({p:{x:_local9, y:_local8}, s:{x:0, y:0}, c:-1});
}
_local10 = _local10 + 1;
_local8 = _local8 + dbase;
}
if ((maxloop > 0) && (_local10 >= maxloop)) {
_local12 = false;
break;
}
_local9 = _local9 + dbase;
}
return(_local12);
}
stop();
var layer = 0;
var dbase = 15;
var blowspeedmax = 3;
var blowspeedmin = 2;
var progframe = 0;
var morphElements = new Array();
var morphElementsSave = new Array();
_root.morph0._alpha = 0;
_root.morph1._alpha = 0;
_root.morph2._alpha = 0;
_root.morphbase._alpha = 0;
var preloadframe = 0;
var introanimok = false;
skip._visible = false;
createMorphElements(0, -1);
createMorphElements(1, -1);
createMorphElements(2, -1);
prepareMorphElements(0, 1, 100, 0, 0);
var morph1th = false;
var morph2th = false;
var endframe = -1;
var speedprogress = 0.01;
onEnterFrame = function () {
preloadframe++;
if (preloadframe > 0) {
speedprogress = speedprogress * 1.04;
if (!morph1th) {
morph1th = stepMorphElements(0, 1, 0, false, false, speedprogress);
if (morph1th) {
clearMorphElements(0);
clearMorphElements(1);
morphElements[1] = morphElementsSave[1];
layer = 0;
prepareMorphElements(1, 2, 100, 0, 0);
speedprogress = 0.1;
}
} else if (!morph2th) {
morph2th = stepMorphElements(1, 2, 0, false, false, speedprogress);
if (morph2th) {
endframe = preloadframe + 50;
}
} else {
stepMorphElements(1, 2, 10, false, false, 3);
loader._alpha = loader._alpha - 2;
skip._alpha = skip._alpha - 2;
if (preloadframe == endframe) {
endAnim();
}
}
}
};
Instance of Symbol 105 MovieClip "skip" in Frame 1
on (press) {
_root.endAnim();
_root.smoothGotoAndPlay("menu");
}
Frame 2
var PORTALVERSION = true;
if (PORTALVERSION) {
MochiAd.showPreGameAd({id:"fd06c2d9c181aff1", res:"600x400", background:9061647, color:5727236, outline:9078826, no_bg:true});
}
Frame 3
function getDistance(ob0, ob1) {
return(Math.sqrt(Math.pow(ob0.x - ob1.x, 2) + Math.pow(ob0.y - ob1.y, 2)));
}
function getMean(values) {
mean = 0;
i = 0;
while (i < values.length) {
mean = mean + values[i];
i++;
}
return(mean / values.length);
}
function getNewCoord(v, va, vb) {
return({a:((v.y * vb.x) - (v.x * vb.y)) / ((va.y * vb.x) - (va.x * vb.y)), b:((v.y * va.x) - (v.x * va.y)) / ((vb.y * va.x) - (vb.x * va.y))});
}
function getProjection(v, va) {
return(((v.y * va.y) + (v.x * va.x)) / ((va.y * va.y) + (va.x * va.x)));
}
function getNormedProjection(v, va) {
return((v.y * va.y) + (v.x * va.x));
}
function getPolaire(v) {
dx = v.x;
dy = v.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({a:a, d:d});
}
function getFreeLayerMin(ml) {
found = false;
var _local1 = ml;
while (_local1 < layers.length) {
if (layers[_local1].free == true) {
found = _local1;
break;
}
_local1++;
}
if (found == false) {
if (layers.length < ml) {
found = ml;
layers[found] = {clip:-1, free:true};
} else {
found = layers.length;
layers.push({clip:-1, free:true});
}
}
return(found);
}
function useLayer(l, c) {
layers[l] = {clip:c, free:false};
}
function freeLayer(l) {
layers[l].free = true;
}
function pseudoRand(f) {
randframe++;
if (randframe >= randArray.length) {
randframe = 0;
}
return(randArray[randframe] * f);
}
function approx(r, n) {
return(Math.round(r * n) / n);
}
function approxsup(r, n) {
return(Math.ceil(r * n) / n);
}
function approxinf(r, n) {
return(Math.floor(r * n) / n);
}
function bezierPoint(A, vt, B, wt) {
var _local2 = {x:Math.cos(vt), y:Math.sin(vt)};
var _local5 = {x:Math.cos(wt), y:Math.sin(wt)};
var _local4 = _local2.y / _local2.x;
var _local1 = _local5.y / _local5.x;
var _local10 = (((B.y - A.y) + (A.x * _local4)) - (B.x * _local1)) / (_local4 - _local1);
var _local9 = B.y + (_local1 * (_local10 - B.x));
return({x:_local10, y:_local9});
}
function getPolar(v) {
dx = v.x;
dy = v.y;
d = Math.sqrt((dx * dx) + (dy * dy));
if (d == 0) {
a = 0;
} else {
a = Math.acos(dx / d);
if (dy < 0) {
a = -a;
}
}
return({a:a, d:d});
}
function circlesIntersection(cp0, r0, cp1, r1) {
var _local10 = -1;
var _local2 = ((((((r1 * r1) - (r0 * r0)) - (cp1.x * cp1.x)) + (cp0.x * cp0.x)) - (cp1.y * cp1.y)) + (cp0.y * cp0.y)) / (2 * (cp0.y - cp1.y));
var _local5 = (cp0.x - cp1.x) / (cp0.y - cp1.y);
var _local6 = Math.pow(_local5, 2) + 1;
var _local4 = 2 * (((cp0.y - _local2) * _local5) - cp0.x);
var _local13 = ((((cp0.x * cp0.x) + (cp0.y * cp0.y)) + (_local2 * _local2)) - (r0 * r0)) - ((2 * _local2) * cp0.y);
var _local9 = (_local4 * _local4) - ((4 * _local6) * _local13);
if (_local9 >= 0) {
var _local12 = Math.sqrt(_local9);
var _local8 = ((-_local4) + _local12) / (2 * _local6);
var _local15 = _local2 - (_local8 * _local5);
var _local7 = ((-_local4) - _local12) / (2 * _local6);
var _local14 = _local2 - (_local7 * _local5);
_local10 = {p0:{x:_local8, y:_local15}, p1:{x:_local7, y:_local14}};
}
return(_local10);
}
function drawLand(l, ol, sl, colors, clip, clipwater, cliplandscape, clipline, force) {
if (((_root.scrollx <= (_root.lastscrollxdraw - ((_global.sW * 2) / 3))) || (_root.scrollx >= (_root.lastscrollxdraw + ((_global.sW * 2) / 3)))) || (force)) {
var _local4 = 0;
var _local7 = l.length;
var _local21 = false;
_root.lastscrollxdraw = _root.scrollx;
var _local23 = (-_root.scrollx) - _global.sW;
var _local12 = (-_root.scrollx) + (2 * _global.sW);
while (!_local21) {
var _local14 = Math.floor((_local4 + _local7) / 2);
if (l[_local14].left.x > _local23) {
_local7 = _local14;
if ((_local7 - _local4) <= 1) {
_local21 = true;
}
} else {
_local4 = _local14;
if ((_local7 - _local4) <= 1) {
_local21 = true;
}
}
}
var _local17 = new Array();
clip.clear();
var _local16 = -1000000;
clip.lineStyle(0, 0, 0);
var _local13;
var _local8 = sl.length - 1;
while (_local8 >= 0) {
clip.beginFill(colors[_local8], 100);
if (_local8 == 0) {
clip.moveTo(l[_local4].left.x, l[_local4].left.y);
var _local6 = _local4;
while (_local6 < l.length) {
clip.curveTo(l[_local6].bezleft.x, l[_local6].bezleft.y, l[_local6].middle.x, l[_local6].middle.y);
clip.curveTo(l[_local6].bezright.x, l[_local6].bezright.y, l[_local6].right.x, l[_local6].right.y);
_local16 = Math.max(_local16, l[_local6].bezright.y);
if (l[_local6].w == 0) {
_local17.push(_local6);
}
_local7 = _local6;
if (l[_local6].right.x > _local12) {
break;
}
_local6++;
}
} else {
_local13 = sl[_local8 - 1];
clip.moveTo(_local13[_local4].left.x, _local13[_local4].left.y);
var _local6 = _local4;
while (_local6 < _local13.length) {
clip.curveTo(_local13[_local6].bez.x, _local13[_local6].bez.y, _local13[_local6].right.x, _local13[_local6].right.y);
_local7 = _local6;
if (_local13[_local6].right.x > _local12) {
break;
}
_local6++;
}
}
_local13 = sl[_local8];
clip.lineTo(_local13[_local7].right.x, _local13[_local7].right.y);
var _local6 = _local7;
while (_local6 >= _local4) {
clip.curveTo(_local13[_local6].bez.x, _local13[_local6].bez.y, _local13[_local6].left.x, _local13[_local6].left.y);
_local6--;
}
clip.endFill();
_local8--;
}
if (qualityval == 0) {
clip.beginFill(colors[sl.length], 100);
_local13 = sl[sl.length - 1];
clip.moveTo(_local13[_local4].left.x, _local13[_local4].left.y);
clip.lineTo(_local13[_local4].left.x, _local16 + 150);
clip.lineTo(_local13[_local7].right.x, _local16 + 150);
clip.lineTo(_local13[_local7].right.x, _local13[_local7].right.y);
var _local6 = _local7;
while (_local6 >= _local4) {
clip.curveTo(_local13[_local6].bez.x, _local13[_local6].bez.y, _local13[_local6].left.x, _local13[_local6].left.y);
_local6--;
}
clip.endFill();
}
if (_root.freezecountdown < 0) {
var _local27 = "0x794E06";
var _local22 = {c:2237183, a:50};
var _local18 = false;
clip.filters = [];
} else {
var _local27 = "0xFFFFFF";
var _local22 = {c:11184895, a:80};
var _local18 = true;
clip.filters = [brightness_filter];
}
clipwater.clear();
var _local15 = _local17.length - 1;
while (_local15 >= 0) {
var _local6 = _local17[_local15];
clipwater.beginFill(_local22.c, _local22.a);
clipwater.moveTo(l[_local6].left.x, l[_local6].left.y);
clipwater.curveTo(l[_local6].bezleft.x, l[_local6].bezleft.y, l[_local6].middle.x, l[_local6].middle.y);
clipwater.curveTo(l[_local6].bezright.x, l[_local6].bezright.y, l[_local6].right.x, l[_local6].right.y);
clipwater.curveTo(l[_local6 + 1].bezleft.x, l[_local6 + 1].bezleft.y, l[_local6 + 1].middle.x, l[_local6 + 1].middle.y);
clipwater.curveTo(l[_local6 + 1].bezright.x, l[_local6 + 1].bezright.y, l[_local6 + 1].right.x, l[_local6 + 1].right.y);
clipwater.endFill();
waterLayer++;
if (waterLayer >= 160) {
waterLayer = 150;
}
if (clipWaters[_local6]._visible != true) {
cliplandscape.wave.duplicateMovieClip("wave_" + waterLayer, waterLayer);
cliplandscape["wave_" + waterLayer]._x = l[_local6].left.x - 10;
cliplandscape["wave_" + waterLayer]._y = l[_local6].left.y;
cliplandscape["wave_" + waterLayer].insidesnow._visible = _local18;
cliplandscape["wave_" + waterLayer].insidewave._visible = !_local18;
cliplandscape["wave_" + waterLayer].mask._xscale = ((l[_local6 + 1].right.x - l[_local6].left.x) + 20) / 6;
clipWaters[_local6] = cliplandscape["wave_" + waterLayer];
} else {
clipWaters[_local6].insidesnow._visible = _local18;
clipWaters[_local6].insidewave._visible = !_local18;
}
_local15--;
}
var _local24 = Math.floor(_local23 / quant);
var _local25 = Math.floor(_local12 / quant);
var _local6 = _local24;
while (_local6 <= _local25) {
if (ol[_local6].length != undefined) {
_local8 = 0;
while (_local8 < ol[_local6].length) {
if (ol[_local6][_local8]._clip._visible != true) {
bonusLayer++;
if (bonusLayer >= 130) {
bonusLayer = 100;
}
ol[_local6][_local8].newClip(cliplandscape, bonusLayer);
}
_local8++;
}
}
_local6++;
}
clipline.clear();
clipline.lineStyle(5, _local27);
_local6 = _local4;
while (_local6 < l.length) {
clipline.moveTo(l[_local6].left.x, l[_local6].left.y);
clipline.curveTo(l[_local6].bezleft.x, l[_local6].bezleft.y, l[_local6].middle.x, l[_local6].middle.y);
clipline.curveTo(l[_local6].bezright.x, l[_local6].bezright.y, l[_local6].right.x, l[_local6].right.y);
if (l[_local6].right.x > _local12) {
break;
}
_local6++;
}
}
}
function buildObjects(ld) {
var _local5 = new Array();
var _local18 = 1;
var _local17 = 0;
var _local4 = 10;
while (_local4 < ld.length) {
var _local6 = ld[_local4];
if ((_local6.s == _local18) && (_local6.s == -1)) {
var _local11 = pseudoRand(100);
if (_local11 > (98 - ((_local4 * 5) / ld.length))) {
var _local3 = Math.min(_local4 + 20, ld.length - 1);
var _local10 = ld[_local3].left.x;
if ((_local10 - _local17) > 2000) {
_local17 = _local10;
var _local16 = ld[_local3].right.y - 400;
var _local12 = Math.floor(_local6.left.x / quant);
if (_local5[_local12].length == undefined) {
_local5[_local12] = new Array();
}
_local5[_local12].push(new MalusWheel(Math.min(Math.floor((_local4 * 4) / ld.length), 2), _local10, _local16, _local3));
}
}
if (_local11 < (55 + ((_local4 * 38) / ld.length))) {
var _local1 = _local6.left.x;
var _local2 = (_local6.right.y - 50) - pseudoRand(100);
var _local8 = Math.floor(_local1 / quant);
if (_local5[_local8].length == undefined) {
_local5[_local8] = new Array();
}
var _local14 = pseudoRand(100);
var _local13 = false;
if (_local6.w == 1) {
if (_local11 < 11) {
_local13 = true;
var _local15 = new BonusFreeze(_local1, _local2 - 50);
_local5[_local8].push(_local15);
}
}
if (!_local13) {
if (_local14 < (45 - ((_local4 * 18) / ld.length))) {
var _local3 = Math.floor(pseudoRand(2));
while (_local3 >= 0) {
var _local15 = new BonusStar(_local1, _local2 - (50 * _local3));
_local5[_local8].push(_local15);
_local3--;
}
} else {
var _local9 = pseudoRand(100);
if (_local9 < 18) {
var _local15 = new BonusFire(_local1, _local2 - 50);
} else if (_local9 < 45) {
var _local15 = new BonusCata(_local1, _local2);
} else if (_local9 < 58) {
var _local15 = new BonusWing(_local1, _local2 - 50);
} else if (_local9 < 73) {
var _local15 = new BonusTime(_local1, _local2 - 50);
} else if (_local9 < 82) {
var _local15 = new MalusCata(_local1, _local2);
} else if (_local9 < 87) {
var _local15 = new MalusEarthquake(_local1, _local2 - 20);
} else {
var _local15 = new MalusBubble(_local1, _local2 - 20);
}
_local5[_local8].push(_local15);
}
}
}
}
_local18 = _local6.s;
_local4++;
}
return(_local5);
}
function buildColData(l, addd) {
var _local16 = new Array();
var _local4 = -1;
var _local3;
var _local2;
var _local17;
var _local5;
var _local7 = 0;
while (_local7 < l.length) {
var _local1 = l[_local7];
var _local8 = _local1.center;
_local2 = _local1.r;
if (_local4 == -1) {
_local3 = {x:_local1.left.x - _local8.x, y:_local1.left.y - _local8.y};
_local4 = {x:_local8.x + (((_local2 + (addd * _local1.s)) * _local3.x) / _local2), y:_local8.y + (((_local2 + (addd * _local1.s)) * _local3.y) / _local2)};
}
_local3 = {x:_local1.right.x - _local8.x, y:_local1.right.y - _local8.y};
_local5 = {x:_local8.x + (((_local2 + (addd * _local1.s)) * _local3.x) / _local2), y:_local8.y + (((_local2 + (addd * _local1.s)) * _local3.y) / _local2)};
_local16.push({left:{x:_local4.x, y:_local4.y}, right:{x:_local5.x, y:_local5.y}, center:_local8, r:_local2 + (addd * _local1.s), s:_local1.s});
_local4 = {x:_local5.x, y:_local5.y};
_local7++;
}
return(_local16);
}
function buildDrawData(l, addd) {
var _local5 = new Array();
var _local3 = -1;
var _local9;
var _local4;
var _local22;
var _local10;
var _local2 = -1;
var _local7 = 0;
while (_local7 < l.length) {
var _local1 = l[_local7];
var _local14 = _local1.center;
_local4 = _local1.r;
if ((_local4 + (addd * _local1.s)) < 0) {
if (_local2 == -1) {
_local2 = _local7 - 1;
}
_local5.push({left:_local3, right:_local3, center:_local3, bez:_local3, r:0, s:0});
} else {
if (_local3 == -1) {
_local9 = {x:_local1.left.x - _local14.x, y:_local1.left.y - _local14.y};
_local3 = {x:_local14.x + (((_local4 + (addd * _local1.s)) * _local9.x) / _local4), y:_local14.y + (((_local4 + (addd * _local1.s)) * _local9.y) / _local4)};
}
if (_local2 != -1) {
inter = circlesIntersection(_local5[_local2].center, _local5[_local2].r, _local14, _local4 + (addd * _local1.s));
if (inter == -1) {
interp = {x:(_local5[_local2].left.x + _local3.x) / 2, y:(_local5[_local2].left.y + _local3.y) / 2};
} else if (inter.p0.y > inter.p1.y) {
interp = inter.p0;
} else {
interp = inter.p1;
}
_local5[_local2].right = interp;
var _local12 = bezierPoint(_local5[_local2].left, l[_local2].lAng + (Math.PI/2), interp, l[_local2].rAng + (Math.PI/2));
_local5[_local2].bez = _local12;
_local3 = interp;
var _local6 = _local2 + 1;
while (_local6 < _local7) {
_local5[_local6] = {left:{x:interp.x, y:interp.y}, right:{x:interp.x, y:interp.y}, center:interp, bez:{x:interp.x, y:interp.y}, r:0, s:0};
_local6++;
}
_local2 = -1;
}
_local9 = {x:_local1.right.x - _local14.x, y:_local1.right.y - _local14.y};
_local10 = {x:_local14.x + (((_local4 + (addd * _local1.s)) * _local9.x) / _local4), y:_local14.y + (((_local4 + (addd * _local1.s)) * _local9.y) / _local4)};
var _local13 = bezierPoint(_local3, _local1.lAng + (Math.PI/2), _local10, _local1.rAng + (Math.PI/2));
_local5.push({left:{x:_local3.x, y:_local3.y}, right:{x:_local10.x, y:_local10.y}, center:_local14, bez:_local13, r:_local4 + (addd * _local1.s), s:_local1.s});
_local3 = {x:_local10.x, y:_local10.y};
}
_local7++;
}
return(_local5);
}
function buildLandscape(n, minr, maxr) {
var _local10 = new Array();
var _local32 = (Math.PI/4);
var _local31 = 2.35619449019234;
var _local4 = 3.078760800518;
var _local7 = {x:0, y:0};
var _local5;
var _local9;
var _local6;
var _local3 = -1;
var _local2 = 5000;
var _local1 = 2.93215314335047;
var _local8;
var _local11 = false;
var _local13 = 0;
while (true) {
_local8 = -1;
if (_local11) {
_local1 = 0.20943951023932;
}
_local6 = {x:_local7.x + ((_local2 * Math.cos(_local4)) * _local3), y:_local7.y + ((_local2 * Math.sin(_local4)) * _local3)};
_local5 = {x:_local6.x - ((_local3 * _local2) * Math.cos(_local1)), y:_local6.y - ((_local3 * _local2) * Math.sin(_local1))};
_local9 = {x:_local6.x - ((_local3 * _local2) * Math.cos((_local4 + _local1) / 2)), y:_local6.y - ((_local3 * _local2) * Math.sin((_local4 + _local1) / 2))};
var _local14 = bezierPoint(_local7, _local4 + (Math.PI/2), _local9, ((_local4 + _local1) / 2) + (Math.PI/2));
var _local17 = bezierPoint(_local9, ((_local4 + _local1) / 2) + (Math.PI/2), _local5, _local1 + (Math.PI/2));
if ((_local3 < 0) && (!_local11)) {
if (((Math.abs(_local7.y - _local5.y) >= 20) && (pseudoRand(100) < 40)) && (_local13 > 2)) {
_local8 = 0;
}
}
_local10.push({left:_local7, middle:_local9, right:_local5, center:_local6, bezleft:_local14, bezright:_local17, r:_local2, s:_local3, lAng:_local4, rAng:_local1, w:_local8});
_local4 = _local1;
if (_local8 == 0) {
_local2 = ((2 * minr) + _local2) + pseudoRand((minr + maxr) - _local2);
_local8++;
_local6 = {x:_local5.x + ((_local2 * Math.cos(_local4)) * _local3), y:_local5.y + ((_local2 * Math.sin(_local4)) * _local3)};
_local1 = Math.asin((_local7.y - _local6.y) / _local2);
if ((_local1 <= 0) || ((_local1 < 0.3) && (_local10[_local10.length - 2].left.y > (_local7.y - 70)))) {
trace(_local1);
_local8 = -1;
_local10[_local10.length - 1].w = -1;
}
}
if (_local8 < 0) {
if (_local11) {
_local2 = 5000;
_local1 = 0.0628318530717959;
} else {
_local2 = minr + pseudoRand(maxr);
_local1 = ((Math.PI/2) + ((_local3 * Math.PI) / 4)) + ((Math.PI / (12 - (6 * (_local5.x / n)))) * ((-50 + pseudoRand(100)) / 50));
}
}
_local7 = _local5;
if (_local8 < 0) {
_local6 = {x:_local7.x + ((_local2 * Math.cos(_local4)) * _local3), y:_local7.y + ((_local2 * Math.sin(_local4)) * _local3)};
}
_local5 = {x:_local6.x - ((_local3 * _local2) * Math.cos(_local1)), y:_local6.y - ((_local3 * _local2) * Math.sin(_local1))};
_local9 = {x:_local6.x - ((_local3 * _local2) * Math.cos((_local4 + _local1) / 2)), y:_local6.y - ((_local3 * _local2) * Math.sin((_local4 + _local1) / 2))};
_local14 = bezierPoint(_local7, _local4 + (Math.PI/2), _local9, ((_local4 + _local1) / 2) + (Math.PI/2));
_local17 = bezierPoint(_local9, ((_local4 + _local1) / 2) + (Math.PI/2), _local5, _local1 + (Math.PI/2));
_local10.push({left:_local7, middle:_local9, right:_local5, center:_local6, bezleft:_local14, bezright:_local17, r:_local2, s:_local3, lAng:_local4, rAng:_local1, w:_local8});
if ((_local3 < 0) && (_local1 < 0.3)) {
_local2 = minr + pseudoRand(50);
} else {
_local2 = minr + pseudoRand(maxr);
}
_local4 = _local1;
_local1 = (Math.PI/2) + ((Math.PI / (12 - (6 * (_local5.x / n)))) * ((-50 + pseudoRand(100)) / 50));
_local7 = _local5;
_local3 = -_local3;
if (_local11) {
break;
}
if ((_local5.x > n) && (_local3 < 0)) {
_local11 = true;
}
_local13++;
}
return(_local10);
}
function loadMap(m) {
landdrawdata = new Array();
objects = new Array();
checkpoints = new Array();
countdownmaxes = new Array();
var _local1 = m.indexOf("_", 0);
var _local40 = m.substring(0, _local1);
if ((_local40 == "v1.00") && (_local1 != -1)) {
_local1 = _local1 + 1;
var _local2 = m.indexOf("_", _local1);
var _local39 = Number(m.substring(_local1, _local2));
_local1 = _local2 + 1;
var _local8 = 0;
var _local16 = 0;
var _local15 = 0;
while (_local15 < _local39) {
_local2 = m.indexOf("_", _local1);
var _local14 = Number(m.substring(_local1, _local2)) / virg;
checkpoints.push(_local14 + _local8);
_local8 = _local14 + _local8;
_local1 = _local2 + 1;
_local2 = m.indexOf("_", _local1);
var _local21 = Number(m.substring(_local1, _local2));
countdownmaxes.push((_local21 * framerate) - 1);
_local1 = _local2 + 1;
_local15++;
}
_local2 = m.indexOf("_", _local1);
var _local24 = Number(m.substring(_local1, _local2));
_local1 = _local2 + 1;
if (_local24 > 0) {
_local8 = 0;
_local16 = 0;
_local2 = m.indexOf("_", _local1);
var _local18 = Number(m.substring(_local1, _local2)) / virg;
_local1 = _local2 + 1;
_local2 = m.indexOf("_", _local1);
var _local17 = Number(m.substring(_local1, _local2)) / virg;
_local1 = _local2 + 1;
_local8 = _local18;
_local16 = _local17;
_local2 = m.indexOf("_", _local1);
var _local19 = Number(m.substring(_local1, _local2));
_local1 = _local2 + 1;
landdrawdata.push({left:{x:_local18, y:_local17}, middle:{x:0, y:0}, right:{x:0, y:0}, center:{x:0, y:0}, bezleft:{x:0, y:0}, bezright:{x:0, y:0}, r:0, s:0, lAng:_local19, rAng:0, w:-1});
_local15 = 1;
while (_local15 < (_local24 + 1)) {
_local2 = m.indexOf("_", _local1);
_local18 = Number(m.substring(_local1, _local2)) / virg;
_local1 = _local2 + 1;
_local2 = m.indexOf("_", _local1);
_local17 = Number(m.substring(_local1, _local2)) / virg;
_local1 = _local2 + 1;
_local2 = m.indexOf("_", _local1);
_local19 = Number(m.substring(_local1, _local2));
_local1 = _local2 + 1;
if (_local15 < _local24) {
landdrawdata.push({left:{x:_local18 + _local8, y:_local17 + _local16}, middle:{x:0, y:0}, right:{x:0, y:0}, center:{x:0, y:0}, bezleft:{x:0, y:0}, bezright:{x:0, y:0}, r:0, s:0, lAng:_local19, rAng:0, w:-1});
}
landdrawdata[_local15 - 1].right.x = _local18 + _local8;
landdrawdata[_local15 - 1].right.y = _local17 + _local16;
_local8 = landdrawdata[_local15 - 1].right.x;
_local16 = landdrawdata[_local15 - 1].right.y;
landdrawdata[_local15 - 1].rAng = _local19;
if (landdrawdata[_local15 - 1].rAng < landdrawdata[_local15 - 1].lAng) {
landdrawdata[_local15 - 1].s = -1;
} else {
landdrawdata[_local15 - 1].s = 1;
}
var _local11 = (((-1 * ((Math.tan(landdrawdata[_local15 - 1].rAng) * landdrawdata[_local15 - 1].right.x) - (Math.tan(landdrawdata[_local15 - 1].lAng) * landdrawdata[_local15 - 1].left.x))) + landdrawdata[_local15 - 1].right.y) - landdrawdata[_local15 - 1].left.y) / (-1 * (Math.tan(landdrawdata[_local15 - 1].rAng) - Math.tan(landdrawdata[_local15 - 1].lAng)));
var _local13 = (Math.tan(landdrawdata[_local15 - 1].lAng) * (_local11 - landdrawdata[_local15 - 1].left.x)) + landdrawdata[_local15 - 1].left.y;
landdrawdata[_local15 - 1].center.x = _local11;
landdrawdata[_local15 - 1].center.y = _local13;
landdrawdata[_local15 - 1].r = Math.sqrt(Math.pow(landdrawdata[_local15 - 1].right.x - _local11, 2) + Math.pow(landdrawdata[_local15 - 1].right.y - _local13, 2));
var _local9 = (landdrawdata[_local15 - 1].lAng + landdrawdata[_local15 - 1].rAng) / 2;
landdrawdata[_local15 - 1].middle.x = _local11 - ((landdrawdata[_local15 - 1].s * landdrawdata[_local15 - 1].r) * Math.cos(_local9));
landdrawdata[_local15 - 1].middle.y = _local13 - ((landdrawdata[_local15 - 1].s * landdrawdata[_local15 - 1].r) * Math.sin(_local9));
var _local20 = bezierPoint(landdrawdata[_local15 - 1].left, landdrawdata[_local15 - 1].lAng + (Math.PI/2), landdrawdata[_local15 - 1].middle, _local9 + (Math.PI/2));
var _local23 = bezierPoint(landdrawdata[_local15 - 1].middle, _local9 + (Math.PI/2), landdrawdata[_local15 - 1].right, landdrawdata[_local15 - 1].rAng + (Math.PI/2));
landdrawdata[_local15 - 1].bezleft = _local20;
landdrawdata[_local15 - 1].bezright = _local23;
_local15++;
}
}
_local2 = m.indexOf("_", _local1);
var _local38 = Number(m.substring(_local1, _local2));
_local1 = _local2 + 1;
_local15 = 0;
while (_local15 < _local38) {
_local2 = m.indexOf("_", _local1);
var _local5 = Number(m.substring(_local1, _local2));
_local1 = _local2 + 1;
_local2 = m.indexOf("_", _local1);
var _local10 = Number(m.substring(_local1, _local2));
_local1 = _local2 + 1;
if (_local5 == -1) {
landdrawdata[_local10].w = 0;
landdrawdata[_local10 + 1].w = 1;
} else {
_local2 = m.indexOf("_", _local1);
var _local4 = (Number(m.substring(_local1, _local2)) / virg) + landdrawdata[_local10].left.x;
_local1 = _local2 + 1;
_local2 = m.indexOf("_", _local1);
var _local6 = (Number(m.substring(_local1, _local2)) / virg) + landdrawdata[_local10].left.y;
_local1 = _local2 + 1;
var _local12 = Math.floor(_local4 / quant);
if (objects[_local12].length == undefined) {
objects[_local12] = new Array();
}
var _local7;
if (_local5 == 0) {
_local7 = new BonusStar(_local4, _local6);
} else if (_local5 == 1) {
_local7 = new BonusFire(_local4, _local6);
} else if (_local5 == 2) {
_local7 = new BonusCata(_local4, _local6);
} else if (_local5 == 3) {
_local7 = new BonusWing(_local4, _local6);
} else if (_local5 == 4) {
_local7 = new BonusTime(_local4, _local6);
} else if (_local5 == 5) {
_local7 = new MalusEarthquake(_local4, _local6);
} else if (_local5 == 6) {
_local7 = new MalusCata(_local4, _local6);
} else if (_local5 == 7) {
_local7 = new MalusBubble(_local4, _local6);
} else if (_local5 == 8) {
_local2 = m.indexOf("_", _local1);
var _local22 = m.substring(_local1, _local2);
_local1 = _local2 + 1;
_local7 = new BonusLabel(_local4, _local6, _local22);
}
objects[_local12].push(_local7);
}
_local15++;
}
}
}
function smoothGotoAndPlay(f) {
tutoagent.clearit();
goaway = f;
transit._visible = true;
transit.gotoAndPlay("close");
}
function getAlphaNum(number) {
if (number < 0) {
signe = "-";
number = -number;
} else {
signe = "";
}
toReturn = "";
if (number == 0) {
toReturn = "0";
} else {
while (number > 0) {
lunite = number % baseAlphaNum;
if (lunite < 10) {
toReturn = String.fromCharCode(lunite + 48) + toReturn;
} else {
toReturn = String.fromCharCode(lunite + 55) + toReturn;
}
number = (number - lunite) / baseAlphaNum;
}
}
return((signe + "") + toReturn);
}
function getNumber(alphanum) {
if (alphanum.substring(0, 1) == "-") {
nsigne = -1;
} else {
nsigne = 1;
}
toReturn = 0;
l = alphanum.length;
var _local1 = 0;
_local1 = 0;
while (_local1 < l) {
lunite = alphanum.charCodeAt(_local1);
if ((lunite >= 48) && (lunite < 58)) {
toReturn = ((toReturn * baseAlphaNum) + lunite) - 48;
} else if ((lunite >= 65) && (lunite < 183)) {
toReturn = ((toReturn * baseAlphaNum) + lunite) - 55;
}
_local1++;
}
return(nsigne * toReturn);
}
function loadDataAndPlay(therecordid) {
if (PORTALVERSION) {
var _local5 = Base64.Decode("MS4wMF/Ch8KnX0vCjkhMwol5wofCisKIScKHesKJMEtcwofCmMKIMsKIWkvCiMKpNcKISkvCiMKJOcKJwq8zwolQaTXCh33CiVfCh8KIwohuSkvCiMKHwofCiG/CjcKgScKIel/CiMKgwod5TF3CiTBYwohOSlvCiMKHwofCj0jCjsKQScKIWl/CiFBcSW3CiUfCh3jCiMKKN8KHe8KKX8KMwpBJwoh6T8KIUMKHwqlcXcKJwodowojCjkpbwol/wo1ZOcKIek/CiTlsScKHwo3CicKHaMKISjdrwohnwod/SMKNMjnCi3pfwonCrDlpwofCjcKId2jCiMKKN2vCiHdvSMKNOUnCicKaT8KIwoBpwofCqkxtacKIMFjCiMKqN8KIV8KIa8KJf8KLMUk5woo1wohNwojCp8KHwpjCiE5Ka8KIZ2hPwo1QwofCmcKJak/CiVBcWW3CiMKHaMKIwopOwohbwonCn8KMwpk5wojCl08zSEzCjcKZwojClzloasKHwovCh8KvwovCmTnCiMKaX1doTMKJNMKHwok5wog1V8KHwojCiFvCiDXCh8KKwofCm0/CiGdoTMKJV8KHwrDCicKowohLwohsScKJXcKJwoo3wofCm0/CiFfCh3hMwoxrV2xQwofCqGlaW8KHwp/CiDDCisKITFlawokywofCisKHwolawojCoGnCh8KNwpDCqzfCicKMXcKHfsKIa8KIel9XworCkMKIT8KIwpjCh8KMwojCqcKHemnCiGrCicKpwod6wohnS8KHfDlIwohpwofCncKMR1hOwojCi0rCiVlMasKHwokwwohIWsKNW8KHwozCh3dJSsKHwqjCicKXwofCqcKJM8KHeMKJwpfCicKJwonCqkjCiDTCh8Kfwop3wohoR0hMwod5asKMR8KIWMKIwrBHwohpWMKKesKIScKIV8KHwojCh8Kawod5wod7wohaXFnCh8KnSsKIMcKIwqfCh8KbwohMwofCicKHesKISMKJecKHfUfCicKqbkjCiHfCicKZwolKWGtsScKISzNPwogwwop4TMKKZ8KKUMKIacKISsKHwonCh3rCh8KpWsKIaMKIaU3CjDQ3wofCnE3CiVfCiTFawolrwofCjMKINMKHwozCh8KuwofCiVrCh8KLWcKHekzCh3vCh8KsWVpbTMKHwqlLwojCp0rCh3/CinhcwpF5wolawofCicKIwprCh3nCiHc5WsKIWVrCiHlowolLwofCikdPTDHCh8KpwofCgErCh3laZ0nCh3pIT8KKeVDCh8KnwohbTzPCiMKcOTFJwog0wofCnEtKTEfCh3hpR0oxwod5TcKLSks3wogyTUzCiVfCiGhKwooywofCp2hOSsKJwovCiMKHaMKIwo/CicKAwofCr1doTMKIa2zCicKZwod6UEdbWEzCh8KZwohdXlpLT8KIMMKIwojCh3xZaktMWWprwofCjMKHe2xrwofCp2hgScKISsKHwpzCh3nCiEfCh3pPSMKLMFDCiMKJwojCilvCh8KsMcKIScKHwqrCiDRPwod8UMKHwotPwonCgMKIT8KIR8KHwohMwojChznCi3vCiTXCh8KbwohYwofCrMKHeWpbwofCnMKIbzTCh8KnXDFgWcKHwpvCh8KcwofCmsKHe8KIb8KJV8KHwqhcwonCqVrCiDJwalfCh8KYwod/woppYMKIwprCiDTCh3nCjHfCiEjCiXzCiF3CiDdrwofCjE3Ch8KeW8KIfUzCh8KKN8KHd8KHwp9LwolYTMKJS8KIbMKId8KIwqjCicKbwpdHfMKMNMKHwpzCh8Krwog1wofCq8KITMKHwovCh8KMwohLwolswod7wop8wofCm8KRXMKIS8KHfGvCh3zCh8KpwofCijlHSMKIwqlKWcKHwqfCh8KaMV/CiTI5wofCjcKITsKJe09KwojCgEnCiFfCh8KYwopMwoh6S0/Cink5wojCj0rCiGdMMcKKScKHworCiEdowofCqcKIakvCisKHwosxTMKKwqvCh3zCiMKLwod8ScKISktJOWxrbErCh8KJasKIb0tHwogxbGlqwohJUEtKacKHwpxKX1dowotLwohnwofCrFAxwohJS8KISkdPwofCmEzCiMKpSsKHwqtcwod5altsaVpbXMKHwotcaUrCh8KHUElKwogxwohbWcKHwozCiFdYT0pLWTnCiFpZWlxLXMKHwonCh3rCh8KpwofCh18zaFvCl141wofCsMKHwplKwohbXFlHSsKIwotMMcKIf8KIecKHworCh3nCiMKqwofCqWrCh3laR3DCiFtIwofCnEnCiHvCiTNHT0wxwojClznCiUvCh3zCh8KrwofCrEnCiMKIwohbasKHwq/Ch3fCh8KATFlNwod6N2vCiDFMaVtawofCmcKHfDNrTMKHwpldwojCijdbT8KHwpfCh3wxwojCl2DCiFvCiEzCh3vCiDVIWcKHwpszwod/wotXwod4WTXCiDQzwofCnMKHwqnCiGpLOUfCh8KfwonCiFzCh8KJSsKLwofCh8KgwojCmUrCiDLCh8KqWG9bwohZNVDCh8KbSk/Ch8KAwod/wogwwohIXMKIe8KIV0xYwolrwohsR8KHwqjCiMKbwojCiTVqOUdLSMKHfF/CiHfCh8Krwoh8wofCkEnCiMKYasKIwofCiHvCiXlMwofCjcKJwphKN8KJZ8KKWWrCh3hrwod/wo8yOcKIT0rCiMKgWcKHwppPwolHWEzCiUdwworCm8KIwpxJwogxSsKHecKISzNPwofCkMKISU1MSjdbT8KJwofCicKoTMKHecKHesKIMsKHwppbwofCjMKIwpvCiDDCiEhMwod5wofCmmvCh8KJNcKHwopLwog1woh7wohswozCmcKIWzPCiMKnaEzCiMKHYMKIwpvCijVbwofCnEjCiEnCiFtsS8KIWl9HwofCmFxJwofCisKIaVrCiMKLV2hcwofCqcKHworCh8KZwofCisKIV8KIaMKIwonCh8KqwohbwofCjFnCh8Kawod7wod3TMKISMKJMsKHesKIa8KHwqxJwogzS1dsaMKJS1k1wohLM8KIwpk1wofCimfCh8Kowol7R8KHwoxYwonCm2BZTUzCisKewofCrcKIN1szX8KJwqzCh8Krwod5OcKKSl/Ch8KHwojCqFzCiHnCh3szaTlcWllKwod3T0jCh8KZwofCimlqworCiVBnM8KHeMKHwpltwolqR07Ch3tPwosxwpdZwqdMSMKKecKHesKKwqlQasKHwplawofCl8KIWUrCiGtcwogyWsKIMcKHecKJS0czbFhZwofCj0rCh8Kbwok1wo9pwofCmzNwwofCicKHwppXXGjCh3nCiH9LM8KIwofCicKowod8WcKKazPCh8KASVpMW0lMSsKIW1/Ch3dYwofCnFlqwokywokzwofCiVrCiDLCiEpZwohgS1xKwod5wofCi0dMwofCmGrCh8KpWllaX8KHeVBPwod6UF/Ch8KQT1BLR1zCiHkxwol9wow0N201woowwofCqMKIMzfCimlHwofCiErCicKpwofCmsKHwplNwofCp8KHwpjCh3o3wofCqcKIalnCiErCh8KHaTFawokywofCp8KHeMKIwopZwofCl2jCh8KvSkvCjHDCiMKPwod5NcKISkvCjTnCiDjCiEdYTMKId3DCh8KbwonCn8KHeGxpwod6wofCq8KJbElqW8KKeTnCh3pvwofCl2hMwojCm8KHwqk5woh8wohrSkdMwod7SEzCh8KJaktPwopHwofCiGxpwofCqsKHeWpLwofCiTVQW8KHwopcwofCqW3CiMKnwozCnkpLX8KKSExpSmnCh8KKwop7wod8wohXYMKKWMKIacKHwp9LM8KHwpw5SW3CiTdaScKINm5Kwod7T8KHwofCiEhMwoprwohMwod7wod3XFDCh3jCicKZXcKIR8KISMKHwpo3wonCl8KHwojCiEvCh8KcwohvS8KIZ1hcwonCm8KHwpzCiGvCh8KcRzlpwod6SMKHwqltwohua2xNwofCl8KIMUpOwol7SWxKW0nCiEwzR8KHeMKJNMKHf8KIZ1wxwopLwofCjMKHwpvCh8KcwofCh8KHe8KHfDlYwofCqcKHfcKIwp7CiDbCh8KHaFo3wol7R0zCh8KYwoo4S8KIR1hMwoxbwod8a1dcUMKHwolYwofCizNfwog5XEtJNcKHwopbX8KKwqzCiMKLbMKHwonCh8KLM0dsMcKQMnBKwod3WcKHwohKwohLT8KIwpk5wod/M8KHeTnCiMKaT8KHwqBJwojCr0czwohYbMKRecKIwqpZwohKwohJwojCqlnCiFc5WmnCh3jCh38zwo/CiVrCh3lawonCqWDCiDPCh8KHwohbTMKHwojCiFvCh3/CilxZSkvCiHfCh8KIXGnCh8KawofCiVrCh8KpwofCisKHwpvCiMKnwod4cEnCijVLRzUzwofCmMKHwoldwohuSltPV8KIaFzCisKLwofClzXCh3vCh8KQMWzCh8KJwohNwohuS8KHwpxdZ1oxwonCqU7CiFdYwol9wofCjkpLT8KIZ1hcwolrwofCnGvCh8KXwod8UEhrXMKIS2nCh8KPSsKJwoxJSllqwod5wofCisKHwqvCh8KXwofCqMKHwoxpwofCiktcWcKHwopbaTlMSsKIeU3CiMKKN8KHwotPwohXaGzCi2tcV1DCh3jCh8KpTcKHezM3bMKHwolNwofCijdHW0/Ch8KYbMKLW8KHwpBcSV3Ch8KeSktfwofCl1hMwotrwog1W2xZUErCh8KHwofCmVoxwofCmcKINsKIWjfCiMKbT8KIV2hcworCq0dMS8KHwojCh3w5wofCqU3CiEo3S19HaMKHfFnCh8KbM8KHwozCijTCh3zCilvCh3xJWsKHwplwSzNHbEjCiFnCh3ppasKIwo9bwonCp8KJNTHCh8KQwofCiUrCh3lqR0vCh3xIacKIwo3CiMKuSktHT8KKaMKXX8KMScKIasKHwqnCiMKKwohLwofCnMKIa2xQwofCqWpnwod4wofCicKIS09HM8KQSFzCh8KZasKIW8KHwozCiMKpwofCmkvCiWfCkjFcwojCmcKHworCiDTCh8Kcwod3W2zCh8KLUFzCh8KpwofCmMKHwqpLT8KJMMKJWExJwogzwofCmWrCh8KLwofCjEnCh8KaS0dYTMKJwqlgR8KHwphKT8KIwovCiEfCh8KYTGlawod7wofCsEnCiGpPwohswokwUMKISGnCiErCh8KbT8KJwpBZwow4M8KKcMKHwo9gb8KHwqdsMcKJS8KHwqzCiGBHScKISMKIa8KHwqxNwod+wod7wohsWkfCiMKbXMKHe1/Ch8KITFDCiFnCh8KLbEdKW2hMwohJbcKJN0rCh8KLT8KIMFhMwok0wohnwohYbFDCiTRvZ8KHwphcScKHwrBPWzNcWWrCh3fCh8KYwojCicKHwprCiGnCh8KKwohLwofCrMKHwpvCh3xJwok0M8KMSTnCijNPYFnCicKPSjlJwolnWMKJNcKIMMKIeEpLwohJwofCj0rCiGBHSWrCh8KvwofCgMKHf8KIaFzCl0fCicKHwprCiMKpwonClzlKwofCqVhKX8KIaVBqR1/Ch8KbwoxcwofCqTlvMcKHworCh8KLwog1wojCh8KHeVDCiMKISsKHwolqwofCn0vCi0k1wolrM8KLZ8KHwqhMwow0wofCnEnCh3rCiMKJWsKIZ1jCiUnCiDNbwofCh2w5SMKJwo9LYMKHwp9Hwoh4TMKISVrCiMKbwod8wohZasKIaVpHUMKIeMKKe8KIb8KIZ8KJMcKHfMKKwqvCh8KsSTlnwod4WsKHe8KHwo/Ch8KgScKHek/Ch8KAScKIbzNnwofCiMKHwok5TGvCiHwzX0vCh3zCiDTCh3xrbMKHe8KIMMKHfDHCkGlawofCmWrCh8KZwofCisKHwplawofCmcKJMDlaaF/CicKrwogwSMKXSjVJwokzwofCmcKLwqrCh8KZwofCqsKHwpnCh8KKwol7bMKMS8KHfMKIMmrCiDlHwojCi1xYwogywofCq8KIXE3CizDCh8KowofCjsKJwqdbSk/CiUxZOU3Ci8KYXsKHesKIW8KHfGnCiDNpTcKIZ1haN8KHwonCh8KLwoo2TMKJezfCh8KdTMKNR8KHwohewonCi0rCiFfCh3zCh8KYwoh9ScKNR8KHeMKHfsKKwofCiMKqwog0wohPwojCrFk5wofCrcKIXjHCiErCh3fCiXltwojCiks3b8KIaFBMScKHworCh8KZwofCisKKb0vCh8Kwwod5wolaX8KHwpzCi8KJwod6wofCq8KHfFk5R0pIwoh5aktZXFpHwofCmVhKwofCicKHwo3CiWpOV19LworCqMKIwqw5ScKHfcKIakvCh8KcScKLZ8KHwqhuwohaW8KITMKHe2xpwofCisKHwq9LwpdTwpk1wojChzNIwotJwofCsMKJMFjCh3rCiEnCik9LM8KRR8KHwphsWcKHworCh3nCh3rCiMKLwofCnMKHwolwW8KJX0pwWcKJR08zSEzCh3nCh8KQW8KHfMKHeltHT0hMwod5YMKINE9Kwo85wofCn8KIR8KITDHCh8KpwofCqsKIwpBLwod/wogwwofCiGzCiEvCiFBJwojCjMKIwotPSsKKR2hcScKHwpszwogyNcKINDPCiMKQb8KJMMKHwohswofCm8KHfFlqW8KHwpdMaMKIW2DCh8KPwod3wofCmFzCjknCh8Kwwod3ajFPwol7wolcwofCm8KHfMKHwpBJRzPCiFhJwofCmkvCh8KcwofCicKHwqpLb8KIR8KHwqjCh3xJOWvCh8KKwoh5XMKHwq9LM8KHwozCijRHWExZwogzS8KHwqzCh8KZwogwOcKHwo8zMcKJNMKIR8KIcMKIT8KKwrBvwofCgMKHwq/Cjnk5wopaT8KIWMKHfMKHwqvCh8KcSWDCh3tHSsKIaUwxwok0T0rCicKZOcKIV0pPwohowod8wpF5asKIwqnCh3rCh8KZwod6wogywod6wod5wohKwod5wohHOWoxX8KNWcKHeldgwofCmVjCiEvCh3xvSzPCh8Kwwoh/V8KHeEzCjGnCiDNZUMKHwo3Ch8KOwojCik9LwokwwohYXMKJcMKHecKHwqfCh3pPSMKJSVBrSlxJwofCimtJTMKHem/CiFnCh8KKaVrCiVlqOUvCh3lsasKHwplNwol3MzdbT8KKWMKJMMKXTEjCl0g1ScKKWsKIa8KHwozCiEtcwogyWsKHwqtswojCiVrCiFdQwohLXMKJwqlKwojCq1zCiGlqwofCmMKJwpnCi2pXwofCqMKHwonCh8KaW1/Ch8KHwogxXFnCh8KKwohJwofCisKJwovCi8KHWEzCiMKrTMKHwovCh8Kswoo0wop5OcKHwqwzWUpfwolXaMKIecKHesKHe8KIwqfCiDHCh3zCh8KJasKINGxJwod6WcKIRzlaMcKHf8KIcGvCiDDCh3jCh8KMWU3CjGduSFpbwog1W2zCiMKpTcKHejdrwofCr8KHwodoTMKJMGDCillKwofCqMKJf8KHe0fCh3hMwofCmcKHesKJaUrCiMKrXElKUE9nSTlawogxwofCqWpJTcKHwpo3S8KHwp/Ch8KAb1dITMKJd1DCiDTCiGk1wofCijHCiUfCh3jCh8KpwofCqmlbwohsTcKMR8KHeE7Ch8KaS1xrwod8R8KHwolIW2rCiDjCiMKAwojCh1/CiHhswogyWsKIeUrCiDBowolpwod3M1DCh38xwolLwovCrFnCh8KawofCl1jCicKrwo7Cl8KRWExJwohawod5wod6S8KHwozCh8KLR8KHfEjCiWnCh8KLM8KIXFnCiDNbwod8V0vCh3zCiDHCiWvCjcKQSV1Mwoh6SzdHb8KHeEzCiXlQwonCq8KIwp8zwo7CiTnCiDgzZ8KHwowxwoh3UMKKS8KIaTXCiGhKwohZXcKHwq5LwofCrMKHworCh8KnWMKIWcKHwptcV8KHekjCiMKLT8KHwofCiMKMMcKHwplqwonCmcKHwopXaMKJa8KIwrBHTEhZwonCizNPwojCoMKHwp/CiHzCh8KgwofCicKHwprCh8KbwofCh0/Ch8KYXMKHwqnCiMKKwofCqVBLwohswod6X0tHwojCqMKKTEk5XcKIwo5KR09Ia8KXV0xwwoh3wofCi1xIwohZwod6WWrCh8KPwofCmWDCiHrCiEfCiGjCiMKPW8KIZ2BJWMKHwozCh8KbXDPCh3tnwofCiExpwofCi8KHwq1Mwoo0N8KIfUzCh8KuS8KITUzCicKrN8KJNjXCiHo3a2zCh31rTm/CiFBJTMKHwqtHM09YwpdTwpxpwogzwolJwofCisKIacKHesKLwotcwohJasKIS0zCiEtcwol3UMKKwqjCiMKJwofCq8KHwppcwojCiV3CjMKXwofCiMKHfsKKwodaT0vCjsKcOVvCh8KMwofCi09YTDnCiTLCh8KLwojCisKIX8KKwok5wojCj0pnwohoSTnCiMKMasKHwptPwofCjMKHwplgwojCm08zwohJOcKIOEpXwohMMcKMe2xLwofCjMKIOUnCh8KXSk9IwpJJwod6acKIwpczOcKIWMKHwplKT1DCiEvCiXxZWm9Hwod4wolHW8KJwpjCi0dYwo7Cp8KJTDlJTcKKejdLT8KHwqk5worCrzNYYFnCiMKnwofCrDFNwoleS1rCiV1JNcKJwofCh8KqNzHCh8KbX8KKwok5woozZ8KHf8KIaFzCj8KpwofCqmnCh3pZwotHOVrCiDJawofCiTHCiDPCh8KXT0hHSMKJwotcwofCq1zCiHvCh3xrwofCjEfCh8KISVBaaVrCiWtHTGjCh8KZwohXSzNPwonCmFzCkknCicKKwod5UFrCh8KHSTHCh8KrwokwTDNPSMKMwqlawohpYMKJwppJa1pXTzXCh8KIwo00wojCrMKHecKIesKIwotMR1Bbwog4aEzCiMKbXFlqwofCqVrCiMKpWsKIe0zCh3lawofCm0zCh8KnW1w5wod7XFjCiElawofCicKHwqvCh8KKX8KHd8KKwqwxwotbwog5ScKHesKHwqlaT0dYXMKSMsKHwqBLwod6aVzCiFrCh8KPS8KIcElqT8KHd8KIMUzCh8KZasKHwolaWcKIM8KHwplqwofCicKHwprCiDLCh8KQwogwSzNsWVjCiU3Ch8KuS1zCh31eXcKHwp5rWsKHwpzCiWdfS8KIWEzCh8KZwohgwohLM8KHwp/CiExQScKHwqpbT1fCimhMwonCqWrCijDCh8KAwod7bMKHwqhvwok0wolsa8KHwoxHOcKIeMKIMltcSmlawofCm0zCisKXWcKISG9KS2k1UGtPM8KHwpBPwo3Cl8KKwohMwofCqcKHesKIeUrCh8KbwofCjMKIWWczS2hMacKJWmdbaMKHwpzCiDTCjVfCicKcMcKHecKIYEvCh8KawofCj1dowod8wohLwot8wod7wog1wod5wolwRzNLXE9IwohLwonCh0jCl1VsScKHwqrCh8KpWsKHwqlqwofCqWrCh3nCh3rCh3nCh8KqwofCicKHwprCh8KZwofCisKHwonCh8KKwohLwod8wonCi0zCiMKbTMKHwoDCiGfCjUtswohYSWrCiDLCiTRKbF9LwofCrGvCiWdYaTlcwofCqltcwofCn1fCh8KAMcKIb8KHwqBJW8KHemlcazNswohrT0fCiFhMwol7wohcwoprwofCjMKHwptcwojCmVDCiDPCiGlnSk8xwogyUMKJSsKHwqtHXFjCh8KJwod6wofCm0/Ch8KMwohLTDlfUElaSVpZSmfCh3lYwojCmmtJX0rCh8KQV1zCiGjCiGnCh8KaR2hLV1hMR0jCh3nCiH8zS8KJYG9nWGzCh8KJWmnCh8KrM8KITFvCh8KAScKHwppswod7TFtJV0wxwolfSzPCiFzCjcKpwofCqlnCiEpXYElYwogzacKKwopNSUpOS0dMT0jCiGlaacKHeklaUE/Ch8KbwofCh2hcwooyUFrCiElXaMKINsKLSzdKV0/CicKowpVcOW1ZwofCizNewofCn8KHfFvCiDlMWV3Ch8KOSsKIMlrCiDLCh3rCh3fCh8KvSFvCl0lnaFxZcE9gwohKwojCh2tcwohJWsKIwotcMcKIS8KHwo1JNcKJWzM3V8KHwplNNcKHejdbwofCn8KIYFnCh8KKwofCn8KHeEzCiGlKwod5WmlKwolZVzPCh8KAWMKIScKHwopLwod5WmnCiGpHNUlIwofCmsKHecKIM8KHwpvCh8KZwofCjzPCiHDCh8KPwohZOcKHwp9Kwog5wofCqcKIwodfM8KJwojCh8KMSTnCiDRsM2dLbE9YwojCi1zCiDTCh8KAScKISm/Ch3dYXMKQecKHworCh3nCh8KqWcKHwqrCh8KZwofCoEfCh8KIwofCqk/Ch8KbworCjDlLT8KXSndMSMKJR8KIMcKMMsKIUMKHworCiDJawonCmVrCiEtMwofCl8KKSUhKwok0T8KKwozCiEvCh8KcS8KINcKHwpk5WldZSErCiDLCh8Kqwod5wohbwojCnMKHwpdab0jCiMKLTMKHe8KHfMKHe8KHwpzCiUtMaWrCiGtcR1toTMKHwpvCi3fCiDHCiFxnwod4Z2hXaGdoZ2jCiDDCh8KIV8KHwojCicKnaMKMWcKIwqrCiFlaZ8KHwqhLTDlpW8KITMKHe8KHwopMSU3CiE5LRzNvwofCrDHCiMKJSldgwod5wojCqFrCiHfCiHnCicKKSMKIacKHwovCh8KnSmwxwolZwos2wok0N0dKwod8McKIwofCiTLCiGrCiGnCh8KrSl/CiEhMwohrUGnCiUdcMzFvaWo5T8KHwovCh8KHXEg=");
var _local3 = "30619";
var _local4 = "Yanism";
launch(_local4, _local3, _local5);
return(undefined);
}
demandeParcours = new LoadVars();
demandeParcours.params = _root.game_id;
demandeParcours.sendAndLoad("get_bestdata.php", demandeParcours, "POST");
demandeParcours.onLoad = function () {
launch(this.user, this.score, this.data);
};
}
function launch(theuser, thescore, thedata) {
_root.demouser = theuser;
var _local3 = thedata.indexOf("_", 0);
var _local16 = thedata.substring(0, _local3);
_root.record = new Array();
if (((_local16 == "1.00") || (_local16 == "1.00e")) && (_local3 != -1)) {
if (_local16 == "1.00e") {
easyflip = true;
}
_local3 = _local3 + 1;
var _local12 = 0;
var _local11 = 0;
while (_local3 < thedata.length) {
var _local6 = getNumber(thedata.substring(_local3, _local3 + 1));
var _local2 = -1;
var _local5 = 0;
if (_local6 < 64) {
_local2 = _local6 % 16;
_local5 = (_local6 - _local2) / 16;
} else {
_local5 = _local6 % 16;
var _local7 = ((_local6 - 64) - _local5) / 16;
_local5 = _local5 * (Math.pow(128, _local7 - 1) * 8);
var _local4 = 0;
while (_local4 < (_local7 - 1)) {
_local3++;
var _local8 = getNumber(thedata.substring(_local3, _local3 + 1));
_local5 = _local5 + ((_local8 * Math.pow(128, (_local7 - 2) - _local4)) * 8);
_local4++;
}
_local3++;
var _local10 = getNumber(thedata.substring(_local3, _local3 + 1));
_local2 = _local10 % 16;
_local5 = _local5 + ((_local10 - _local2) / 16);
}
var _local13 = -1;
var _local15 = -1;
if (_local2 == 0) {
_local13 = 32;
_local15 = true;
} else if (_local2 == 1) {
_local13 = 32;
_local15 = false;
} else if (_local2 == 2) {
_local13 = 37;
_local15 = true;
} else if (_local2 == 3) {
_local13 = 37;
_local15 = false;
} else if (_local2 == 4) {
_local13 = 39;
_local15 = true;
} else if (_local2 == 5) {
_local13 = 39;
_local15 = false;
} else if (_local2 == 6) {
_local13 = 40;
_local15 = true;
} else if (_local2 == 7) {
_local13 = 40;
_local15 = false;
} else if (_local2 == 8) {
_local13 = 38;
_local15 = true;
} else if (_local2 == 9) {
_local13 = 38;
_local15 = false;
}
_local3++;
_local11 = _local11 + _local5;
_root.record[_local12] = {frame:_local11, code:_local13, down:_local15};
_local12++;
}
replay = true;
_root.loadreplay = -1;
_root.gotoAndPlay("start");
} else {
_root.loadreplay = -1;
_root.transit.gotoAndPlay("open");
}
}
stop();
var framerate = 35;
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_global.sW = 600;
_global.sH = 400;
var tutorial = false;
var easyflip = false;
var replay = false;
var bar = 1;
var usercar = -1;
var landdrawdata = new Array();
var objects = new Array();
var landcoldata = new Array();
var landcoldata2 = new Array();
var bestscore;
var testedit = false;
var virg = 100;
var game_id = "3_1149712513";
var demouser = "";
var local = false;
var timeunlimited = false;
if (!local) {
editb._visible = false;
if ((_url.indexOf("pepere.org") != -1) || (PORTALVERSION)) {
} else {
startb._visible = false;
replayb._visible = false;
checktuto._visible = false;
checkeasy._visible = false;
}
} else {
game_id = "1_1178800164";
}
if (alreadyload != true) {
var tutoShown = [false, false, false, false, false, false, false, false];
var tutoagent = new Tuto(missy);
_quality = "HIGH";
var qualityval = 0;
var tutoenabled = 1;
var easyenabled = 1;
var editmap = "";
var map = "";
_root.bestscore = 0;
_root.muteallsounds = 0;
var levelSound = new Sound();
levelSound.attachSound("LevelSound");
var bonusSound = new Sound();
bonusSound.attachSound("BonusSound");
var malusSound = new Sound();
malusSound.attachSound("MalusSound");
var squeakSound = new Sound();
squeakSound.attachSound("SqueakSound");
var cracSound = new Sound();
cracSound.attachSound("CracSound");
var badSound = new Sound();
badSound.attachSound("BadSound");
var coinSound = new Sound();
coinSound.attachSound("CoinSound");
var checkSound = new Sound();
checkSound.attachSound("CheckSound");
var birdSound = new Sound();
birdSound.attachSound("BirdSound");
var cataSound = new Sound();
cataSound.attachSound("CataSound");
var popSound = new Sound();
popSound.attachSound("PopSound");
var ahoogaSound = new Sound();
ahoogaSound.attachSound("AhoogaSound");
var windSound = new Sound();
windSound.attachSound("WindSound");
var bipSound = new Sound();
bipSound.attachSound("BipSound");
createEmptyMovieClip("QuakeSoundMC", 10000002);
var quakeSound = new Sound(QuakeSoundMC);
quakeSound.attachSound("QuakeSound");
createEmptyMovieClip("ChocSoundMC", 10000000);
var chocSound = new Sound(ChocSoundMC);
chocSound.attachSound("ChocSound");
createEmptyMovieClip("WaterSoundMC", 10000001);
var waterSound = new Sound(WaterSoundMC);
waterSound.attachSound("WaterSound");
var alreadyload = true;
levelSound.start();
}
muter.gotoAndStop(_root.muteallsounds + 1);
qualitytoggle.gotoAndStop(_root.qualityval + 1);
checktuto.gotoAndStop(_root.tutoenabled + 1);
checkeasy.gotoAndStop(_root.easyenabled + 1);
var layers = new Array();
var randframe = -1;
var randArray = [0.34, 0.92, 0.9, 0.35, 0.94, 0.3, 0.8, 0.19, 0.16, 0.76, 0.32, 0.13, 0.59, 0.65, 0.99, 0.21, 0.52, 0.97, 0.21, 0.31, 0.72, 0.14, 0.33, 0.34, 0.01, 0.75, 0.24, 0.38, 0.5, 0.05, 0.47, 0.72, 0.32, 0.34, 0.32, 0.54, 0.66, 0.16, 0.62, 0.18, 0.39, 0.42, 0.34, 0.54, 0.18, 0.5, 0.46, 0.67, 0.58, 0.77, 0.94, 0.13, 0.37, 0.72, 0.09, 0.36, 0.74, 0.36, 0.54, 0.07, 0.22, 0.09, 0.5, 0.34, 0.09, 0.39, 0.98, 0.02, 0.43, 0.56, 0.58, 0.04, 0.57, 0.88, 0.43, 0.75, 0.53, 0.44, 0.43, 0.78, 0.72, 0.42, 0.24, 0.03, 0.94, 0.07, 0.29, 0.55, 0.73, 0.05, 0.06, 0.9, 0.43, 0.35, 0.38, 0.96, 0.7, 0.88, 0.9, 0.9, 0.46, 0.63, 0.36, 0.38, 0.37, 0.32, 0.6, 0.06, 0.74, 0.49, 0.67, 0.06, 0.6, 0.71, 0.25, 0.32, 0.97, 0.33, 0.78, 0.53, 0.37, 0.46, 0.32, 0.75, 0.62, 0.96, 0.3, 0, 0.61, 0.3, 0.17, 0.88, 0.16, 0.47, 0.99, 0.45, 0.43, 0.5, 0.57, 0.89, 0.08, 0.35, 0.05, 0.17, 0.57, 0.32, 0.09, 0.49, 0.48, 0.28, 0.72, 0.64, 0.91, 0.75, 0.57, 0.32, 0.68, 0.54, 0.99, 0.16, 0.19, 0.88, 0.81, 0.31, 0.2, 0.79, 0.44, 0.17, 0.21, 0.41, 0.43, 0.66, 0.25, 0.54, 0.31, 0.66, 0.56, 0.17, 0.92, 0.43, 0.28, 0.9, 0.05, 0.61, 0.29, 0.05, 0.06, 0.9, 0.91, 0.66, 0.49, 0.25, 0.34, 0.88, 0.88, 0.25, 0.18, 0.18, 0.37, 0.2, 0.48, 0.84, 0.21, 0.88, 0.88, 0.72, 0.49, 0.54, 0.41, 0.17, 0.31, 0.12, 0.8, 0.37, 0.32, 0.26, 0.58, 0.42, 0.38, 0.69, 0.09, 0.62, 0.42, 0.77, 0.23, 0.12, 0.89, 0.33, 0.7, 0.41, 0.39, 0.09, 0.15, 0.08, 0.67, 0.35, 0.5, 0.57, 0.05, 0.65, 0.77, 0.79, 0.98, 0.87, 0.99, 0.57, 0.29, 0.77, 0.98, 0.03, 0.14, 0.44, 0.56, 0.6, 0.79, 0.01, 0.79, 0.85, 0.26, 0.78, 0.82, 0.79, 0.16, 0.95, 0.22, 0.93, 0.02, 0.63, 0.24, 0.31, 0.75, 0.27, 0.91, 0.1, 0.06, 0.25, 0.68, 0.9, 0.47, 0.25, 0.88, 0.83, 0.29, 0.25, 0.5, 0.87, 0.85, 0.73, 0.68, 0.73, 0.35, 0.36, 0.46, 0.33, 0.27, 0.64, 0.02, 0.81, 0.85, 0.29, 0.4, 0.09, 0.33, 0.68, 0.58, 0.89, 0.8, 0.78, 0.95, 0.8, 0.02, 0.32, 0.09, 0.6, 0.04, 0.36, 0.32, 0.23, 0.65, 0.92, 0.45, 0.27, 0.84, 0.73, 0.06, 0.2, 0.05, 0.41, 0.19, 0.5, 0.62, 0.97, 0.39, 0.55, 0.76, 0.83, 0.57, 0.57, 0.68, 0, 0.52, 0.78, 0.24, 0.7, 0.43, 0.77, 0.29, 0.39, 0.31, 0.66, 0.34, 0.12, 0.47, 0.03, 0.54, 0.56, 0.09, 0.23, 0.5, 0.57, 0.4, 0.63, 0.13, 0.13, 0.99, 0.28, 0.68, 0.12, 0.2, 0.02, 0.36, 0.3, 0.02, 0.56, 0.94, 0.76, 0.33, 0.17, 0.11, 0.89, 0.25, 0.28, 0.84, 0.91, 0.98, 0.36, 0.41, 0.49, 0.32, 0.14, 0.42, 0.41, 0.64, 0.17, 0.43, 0.94, 0.2, 0.52, 0.95, 0.88, 0.42, 0.29, 0.52, 0.26, 0.96, 0.84, 0.77, 0.79, 0.84, 0.24, 0.27, 0.13, 0.3, 0.9, 0.44, 0.45, 0.51, 0.55, 0.31, 0.31, 0.86, 0.17, 0.52, 0.28, 0.64, 0.82, 0.29, 0.68, 0.99, 0.95, 0.27, 0, 0.23, 0.35, 0.29, 0.08, 0.46, 0.31, 0.11, 0.46, 0.25, 0.07, 0.12, 0.88, 0.48, 0.54, 0.32, 0.35, 0.2, 0.06, 0.83, 0.77, 0.93, 0.76, 0.85, 0.1, 0.66, 0.61, 0.6, 0.38, 0.75, 0.49, 0.08, 0.45, 0.86, 0.32, 0.78, 0.4, 0.37, 0.16, 0.28, 0.6, 0.92, 0.32, 0.4, 0.96, 0.09, 0.64, 0.37, 0.59, 0.58, 0.66, 0.84, 0.2, 0.73, 0.21, 0.66, 0.96, 0.73, 0.12, 0.4, 0, 0.33, 0.89, 0.07, 0.7, 0.25, 0.28, 0.67, 0.55, 0.94, 0.65, 0.95, 0.36, 0.08, 0.52, 0.59, 0.67, 0.06, 0.91, 0.07, 0.05, 0.24, 0.15, 0.94, 0.31, 0.6, 0.03, 0.58, 0.66, 0.49, 0.39, 0.55, 0.69, 0.01, 0.91, 0.12, 0.77, 0.23, 0.31, 0.03, 0.44, 0.69, 0.42, 0.26, 0.02, 0.92, 0.04, 0.28, 0.06, 0.42, 0.78, 0.51, 0.39, 0.28, 0.61, 0.36, 0.65, 0.09, 0.99, 0, 0.79, 0.7, 0.34, 0.12, 0.7, 0.66, 0.54, 0.25, 0, 0.32, 0.13, 0.47, 0.46, 0.46, 0.34, 0.99, 0.5, 0.9, 0.24, 0.8, 0.81, 0.97, 0.65, 0.58, 0.57, 0.18, 0.81, 0.29, 0.93, 0.94, 0.74, 0.29, 0.1, 0.47, 0.37, 0.26, 0.43, 0.57, 0.26, 0.59, 0.76, 0.24, 0.74, 0.29, 0.59, 0.32, 0.19, 0.93, 0.66, 0.42, 0.79, 0.56, 0.01, 0.22, 0.24, 0.11, 0.7, 0.01, 0.29, 0.94, 0.99, 0.54, 0.12, 0.46, 0.88, 0.86, 0.22, 0.57, 0.59, 0.06, 0.6, 0.11, 0.85, 0.33, 0.15, 0.63, 0.02, 0.14, 0.72, 0.82, 0.47, 0.31, 0.77, 0.92, 0.01, 0.95, 0.92, 0.46, 0.95, 0.64, 0.92, 0.03, 0.57, 0, 0.48, 0.87, 0.96, 0.27, 0.94, 0.38, 0.57, 0.69, 0.75, 0.71, 0.43, 0.86, 0.84, 0.33, 0.04, 0.72, 0.61, 0.85, 0.09, 0.12, 0.42, 0.03, 0.65, 0.16, 0.43, 0.71, 0.04, 0.93, 0.56, 0.57, 0.28, 0.26, 0.27, 0.12, 0.05, 0.19, 0.7, 0.61, 0.76, 0.34, 0.35, 0.16, 0.55, 0.47, 0.66, 0.07, 0.38, 0.15, 0.03, 0.8, 0.17, 0.03, 0.78, 0.92, 0.54, 0.79, 0.01, 0.13, 0.61, 0.2, 0.39, 0.21, 0.61, 0.66, 0.39, 0.6, 0.45, 0.81, 0.06, 0.59, 0.01, 0.07, 0.26, 0.73, 0.88, 0.97, 0.48, 0.81, 0.38, 0.17, 0.23, 0.57, 0.82, 0.86, 0.1, 0.92, 0.7, 0.75, 0.4, 0.66, 0.18, 0.83, 0.31, 0.18, 0.22, 0.82, 0.9, 0.74, 0.32, 0.92, 0.53, 0.28, 0.95, 0.81, 0.07, 0.7, 0.16, 0.96, 0.95, 0.09, 0.39, 0.66, 0.51, 0.72, 0.62, 0.81, 0.01, 0.62, 0.89, 0.67, 0.72, 0.11, 0.75, 0.7, 0.42, 0.44, 0.73, 0.14, 0.84, 0.94, 0.13, 0.18, 0.52, 0.06, 0.39, 0.8, 0.57, 0.47, 0.83, 0.13, 0.89, 0.49, 0.95, 0.77, 0.76, 0.64, 0.88, 0.17, 0.37, 0.68, 0.28, 0.35, 0.19, 0.28, 0.23, 0.76, 0.69, 0.71, 0.91, 0.6, 0.13, 0.14, 0.23, 0.46, 0.03, 0.33, 0.87, 0.85, 0.56, 0.2, 0.51, 0.83, 0.02, 0.72, 0.56, 0.96, 0.96, 0.67, 0.37, 0.32, 0.85, 0.29, 0.5, 0.82, 0.64, 0.7, 0.26, 0.19, 0.59, 0.2, 0.08, 0.24, 0.67, 0.94, 0.3, 0.69, 0.05, 0.57, 0.02, 0.54, 0.42, 0.8, 0.28, 0.27, 0.52, 0.62, 0.28, 0.09, 0.34, 0.08, 0.19, 0.68, 0.84, 0.43, 0.9, 0.19, 0.92, 0.5, 0.2, 0.68, 0.27, 0.7, 0.99, 0.55, 0.76, 0.84, 0.7, 0.09, 0.06, 0.38, 0.99, 0.34, 0.52, 0.87, 0.64, 0.99, 0.89, 0.2, 0.48, 0.73, 0.09, 0.82, 0.96, 0.72, 0.24, 0.66, 0.37, 0.13, 0.71, 0.68, 0.06, 0.25, 0.39, 0.38, 0.16, 0.95, 0.41, 0.57, 0.9, 0.87, 0.17, 0.67, 0.67, 0.69, 0.37, 0.63, 0.62, 0.15, 0.69, 0.18, 0.82, 0.46, 0.96, 0.6, 0.99, 0.06, 0.33, 0.79, 0.7, 0.99, 0.39, 0.06, 0.56, 0.99, 0.3, 0.69, 0.89, 0.37, 0.67, 0.01, 0.1, 0.26, 0.64, 0.53, 0.91, 0.1, 0.05, 0.09, 0.67, 0.94, 0.1, 0.52, 0.87, 0.03, 0.5, 0.86, 0.66, 0.77, 0.47, 0.07, 0.54, 0.32, 0.83, 0.98, 0.68, 0.83, 0.45, 0.52, 0.69, 0.3, 0.02, 0.9, 0.53, 0.27, 0.04, 0.65, 0.86, 0.51, 0.51, 0.17, 0.11, 0.64, 0.61, 0.38, 0.72, 0.26, 0.2, 0.11, 0.28, 0.25, 0.99, 0.19, 0.6, 0.83, 0.41, 0.55, 0.35, 0.98, 0.47, 0.3, 0.94, 0.06, 0.67, 0.95, 0.33, 0.93, 0.44, 0.07, 0.52, 0.13, 0.47, 0.93, 0.79, 0.57, 0.44, 0.6, 0.41, 0.64, 0.53, 0.19, 0.73, 0.92, 0.92, 0.61, 0.93, 0.05, 0.19, 0.44, 0.28, 0.5, 0.03, 0.12, 0.33, 0.17, 0.27, 0.16, 0.81, 0.6, 0.94, 0.24, 0.79, 0, 0.72, 0.98, 0.62, 0.54, 0.88, 0.52, 0.06, 0.15, 0.82, 0.82, 0.26, 0.69, 0.72, 0.99, 0.48, 0.66, 0.85, 0.06, 0.08, 0.69, 0.25, 0.36, 0.81, 0.8, 0.6, 0.74, 0.56, 0.4, 0.52, 0.39, 0.95, 0.83, 0.62, 0.73, 0.4, 0.52, 0.96, 0.09, 0.68, 0.46, 0.62, 0.87, 0.05, 0.2, 0.24, 0.19, 0.73, 0.89, 0.12, 0.6, 0.74, 0.27, 0.43, 0.4, 0.01, 0.71, 0.07, 0, 0.47, 0.2, 0.07, 0.55, 0.76, 0.67, 0, 0.22, 0.06, 0.64, 0.96, 0.5, 0.61, 0.05, 0.01, 0.96, 0.75, 0.98, 0.45, 0.48, 0.31, 0.2, 0.01, 0.86, 0.45, 0.61, 0.5, 0.16, 0.85, 0.44, 0.73, 0.22, 0.77, 0.22, 0.22, 0.18, 0.34, 0.26, 0.42, 0.66, 0.23, 0.29, 0.44, 0.96, 0.86, 0.51, 0.08, 0.46, 0.97, 0.82, 0.95, 0.65, 0.17, 0.73, 0.12, 0.78, 0.24, 0.6, 0.08, 0.91, 0.27, 0.73, 0.98, 0.73, 0.66, 0.87, 0.13, 0.64, 0.83, 0.82, 0.04, 0.07, 0.56, 0.53, 0.65, 0.04, 0.32, 0.89, 0.62, 0.19, 0.24, 0.27, 0.19, 0.97, 0.71, 0.66, 0.89, 0.77, 0.13, 0.46, 0.12, 0.44, 0.24, 0.58, 0.67, 0.17, 0.21, 0.04, 0.65, 0.62, 0.33, 0.27, 0.59, 0, 0.72, 0.05, 0.77, 0.05, 0.38, 0.51, 0.24, 0.95, 0.57, 0.51, 0.18, 0.57, 0.47, 0.39, 0.1, 0.71, 0.47, 0, 0.85, 0.2, 0.14, 0.05, 0.23, 0.6, 0.9, 0.48, 0.94, 0.7, 0.76, 0.03, 0.22, 0.21, 0.03, 0.5, 0.84, 0.46, 0.77, 0.39, 0.9, 0.64, 0.46, 0.28, 0.98, 0.68, 0.74, 0.55, 0.28, 0.54, 0.18, 0.99, 0.23, 0.19, 0.75, 0.7, 0.43, 0.81, 0.86, 0.88, 0.71, 0.78, 0.96, 0.83, 0.67, 0.92, 0.43, 0.83, 0.52, 0.85, 0.6, 0.32, 0.07, 0.98, 0.53, 0.83, 0.42, 0, 0.19, 0.19, 0.02, 0.67, 0.96, 0.67, 0.63, 0.34, 0.28, 0.98, 0.73, 0.22, 0.6, 0.63, 0.49, 0.86, 0.28, 0.77, 0.38, 0.67, 0.19, 0.9, 0.48, 0.01, 0.11, 0.18, 0.23, 0.22, 0.49, 0.05, 0.75, 0.19, 0.23, 0.42, 0.92, 0.29, 0.46, 0.88, 0.71, 0.75, 0.07, 0.67, 0.27, 0.7, 0.44, 0.54, 0.18, 0.71, 0.15, 0.33, 0.42, 0.7, 0.35, 0.91, 0.29, 0.04, 0.35, 0.31, 0.81, 0.61, 0.07, 0.62, 0.18, 0.56, 0.43, 0.03, 0.98, 0.76, 0.53, 0.7, 0.47, 0.25, 0.7, 0.04, 0.74, 0.39, 0.97, 0.37, 0.74, 0.1, 0.05, 0.49, 0.94, 0.5, 0, 0.03, 0.94, 0.63, 0.12, 0.85, 0.32, 0.05, 0.92, 0.78, 0.35, 0.57, 0.24, 0.86, 0.89, 0.51, 0.92, 0.98, 0.51, 0.32, 0.79, 0.26, 0.83, 0.35, 0.42, 0.3, 0.74, 0, 0.13, 0.52, 0.68, 0.26, 0.17, 0.11, 0.67, 0.06, 0.4, 0.46, 0.39, 0.79, 0.88, 0.39, 0.96, 0.71, 0.14, 0.94, 0.71, 0.64, 0.84, 0.67, 0.27, 0.49, 0.67, 0.8, 0.27, 0.34, 0.99, 0.15, 0.41, 0.62, 0.18, 0.07, 0.7, 0.48, 0.38, 0.98, 0.3, 0.07, 0.47, 0.41, 0.27, 0.69, 0.29, 0.85, 0.16, 0.16, 0.05, 0.67, 0.99, 0.22, 0.01, 0.43, 0.04, 0.51, 0.27, 0.43, 0.64, 0.85, 0.21, 0.42, 0.79, 0.85, 0.33, 0.13, 0.24, 0.31, 0.63, 0.68, 0.92, 0.09, 0.34, 0.28, 0.21, 0.69, 0.54, 0.3, 0.95, 0.85, 0.57, 0.54, 0.16, 0.57, 0.52, 0.71, 0.26, 0.09, 0.81, 0.13, 0.57, 0.03, 0.8, 0.88, 0.72, 0.23, 0.66, 0.86, 0.39, 0.23, 0.34, 0.66, 0.93, 0.35, 0.25, 0.57, 0.14, 0.42, 0.44, 0.98, 0.5, 0.62, 0.64, 0.72, 0.6, 0.29, 0.76, 0.78, 0.92, 0.99, 0.25, 0.7, 0.81, 0.06, 0.48, 0.74, 0.85, 0.53, 0.44, 0.95, 0, 0.31, 0.54, 0.97, 0.87, 0.6, 0.81, 0.49, 0.62, 0.1, 0.05, 0.8, 0.6, 0.43, 0.77, 0.54, 0.75, 0.49, 0.5, 0.26, 0.3, 0.01, 0.92, 0.63, 0.65, 0.17, 0.62, 0.11, 0.65, 0.88, 0.35, 0.93, 0.16, 0.15, 0.23, 0.38, 0.78, 0.08, 0.89, 0.86, 0.94, 0.1, 0.3, 0.94, 0.59, 0.53, 0.38, 0.28, 0.52, 0.48, 0.26, 0.55, 0.74, 0.2, 0.78, 0.12, 0.58, 0.65, 0.88, 0, 0.88, 0.04, 0.41, 0.23, 0.54, 0.74, 0.63, 0.51, 0.06, 0.11, 0.61, 0.43, 0.76, 0.94, 0.5, 0.63, 0.72, 0.37, 0.21, 0.33, 0.78, 0.37, 0.8, 0.37, 0.34, 0.13, 0.51, 0, 0.89, 0.11, 0.16, 0.64, 0.35, 0.01, 0.86, 0.12, 0.14, 0.84, 0.13, 0.84, 0.26, 0.37, 0.13, 0.57, 0.99, 0.28, 0.13, 0.8, 0.08, 0.45, 0.77, 0.56, 0.68, 0.83, 0.57, 0.78, 0.84, 0.94, 0.48, 0.14, 0.31, 0.56, 0.7, 0.96, 0.29, 0.95, 0.57, 0.15, 0.22, 0.32, 0.95, 0.43, 0.99, 0.89, 0.85, 0.81, 0.16, 0.89, 0.78, 0.46, 0.48, 0.47, 0.4, 0.38, 0.99, 0.71, 0.13, 0.33, 0.02, 0.47, 0.66, 0.04, 0.13, 0.02, 0.33, 0.81, 0.56, 0.84, 0.52, 0.31, 0.32, 0.62, 0.49, 0.12, 0.46, 0.33, 0.73, 0.09, 0.22, 0.56, 0.57, 0.58, 0.22, 0.14, 0.5, 0.22, 0.27, 0.53, 0.93, 0.1, 0.57, 0.77, 0.23, 0.28, 0.15, 0.76, 0.73, 0.12, 0.94, 0.12, 0.31, 0.53, 0.72, 0.02, 0.89, 0.23, 0.53, 0.54, 0.98, 0.28, 0.25, 0.53, 0.1, 0.2, 0.75, 0.4, 0.76, 0.49, 0.32, 0.16, 0.52, 0.44, 0.67, 0.85, 0.72, 0.69, 0.95, 0.87, 0.28, 0.67, 0.56, 0.37, 0.11, 0.4, 0.17, 0.98, 0.32, 0.41, 0.67, 0.44, 0.73, 0.23, 0.23, 0.69, 0.48, 0.58, 0.72, 0.69, 0.81, 0.93, 0.57, 0.55, 0.72, 0.88, 0.35, 0.45, 0.16, 0.93, 0.86, 0.07, 0.78, 0.8, 0.21, 0.91, 0.56, 0.74, 0.71, 0.03, 0.61, 0.62, 0.32, 0.54, 0.52, 0.26, 0.64, 0.45, 0.23, 0.35, 0.16, 0.49, 0.07, 0.14, 0.13, 0.44, 0.64, 0.12, 0.14, 0.82, 0.55, 0.76, 0.48, 0.28, 0.21, 0.95, 0.75, 0.96, 0.22, 0.37, 0.74, 0.08, 0.49, 0.76, 0.88, 0.95, 0.59, 0.89, 0.07, 0.65, 0.09, 0.02, 0.73, 0.24, 0.38, 0.45, 0.4, 0.69, 0.64, 0.05, 0.52, 0.16, 0.24, 0.01, 0.36, 0.86, 0.56, 0.45, 0.43, 0.81, 0.2, 0.85, 0.41, 0.45, 0.54, 0.6, 0.51, 0.9, 0.3, 0.33, 0.16, 0.89, 0.71, 0.78, 0.15, 0.63, 0.41, 0.51, 0.29, 0.82, 0.83, 0.71, 0.18, 0.63, 0.87, 0.39, 0.06, 0.49, 0.73, 0.85, 0.22, 0.03, 0.34, 0.85, 0.61, 0.9, 0.4, 0.83, 0.07, 0.54, 0.21, 0.7, 0.23, 0.49, 0.24, 0.68, 0.02, 0.01, 0.32, 0.53, 0.5, 0.75, 0.62, 0.71, 0.83, 0.09, 0.44, 0.19, 0.64, 0.63, 0.81, 0.12, 0.23, 0.26, 0.35, 0.98, 0.39, 0.76, 0.59, 0.11, 0.45, 0.09, 0.71, 0.59, 0.45, 0.51, 0.89, 0.06, 0.2, 0.29, 0.88, 0.43, 0.81, 0.54, 0.38, 0.44, 0.9, 0.32, 0.47, 0.78, 0.22, 0.77, 0.64, 0.28, 0.98, 0.76, 0.95, 0.45, 0.57, 0.03, 0.67, 0.86, 0.15, 0.49, 0.23, 0.18, 0.2, 0.95, 0.92, 0.81, 0.88, 0.78, 0.73, 0.58, 0.65, 0.17, 0.13, 0.66, 0.85, 0.51, 0.33, 0.26, 0.93, 0.32, 0.08, 0.51, 0.83, 0.66, 0.18, 0.03, 0.51, 0.28, 0.05, 0.75, 0.79, 0.94, 0.82, 0.79, 0.25, 0.73, 0.88, 0.37, 0.21, 0.8, 0.66, 0.71, 0.58, 0.52, 0.91, 0.2, 0.64, 0.86, 0.59, 0.09, 0.89, 0.82, 0.74, 0.69, 0.56, 0.02, 0.76, 0, 0.34, 0.89, 0.67, 0.54, 0.05, 0.04, 0.73, 0.85, 0.88, 0.92, 0.56, 0.6, 0.49, 0.82, 0, 0.2, 0.78, 0.49, 0.09, 0.13, 0.56, 0.01, 0.64, 0.29, 0.74, 0.54, 0.64, 0.98, 0.99, 0.8, 0.41, 0.3, 0.53, 0.26, 0.05, 0.27, 0.74, 0.58, 0.34, 0.81, 0.42, 0.83, 0.56, 0.64, 0.85, 0.97, 0.05, 0.97, 0.44, 0.78, 0.2, 0.15, 0.83, 0.78, 0.92, 0.64, 0.72, 0.42, 0.4, 0.16, 0.37, 0.61, 0.82, 0.31, 0.05, 0.91, 0.44, 0.7, 0.02, 0.85, 0.62, 0.18, 0.44, 0.41, 0.02, 0.37, 0.51, 0.25, 0.3, 0.74, 0.52, 0.56, 0.32, 0.03, 0.58, 0.85, 0.85, 0.11, 0.96, 0.94, 0.19, 0.03, 0.04, 0.37, 0.73, 0.99, 0.62, 0.01, 0.64, 0.94, 0.28, 0.92, 0.38, 0.5, 0.57, 0.83, 0.9, 0.21, 0.19, 0.15, 0.29, 0.56, 0.62, 0.13, 0.54, 0.33, 0.03, 0.4, 0.63, 0.39, 0.43, 0.04, 0.82, 0.37, 0.08, 0.11, 0.45, 0.43, 0, 0.85, 0.71, 0.76, 0.86, 0.09, 0.41, 0.92, 0.87, 0.67, 0.59, 0.45, 0.06, 0.55, 0.78, 0.76, 0.94, 0.87, 0.65, 0.84, 0.39, 0.75, 0.44, 0.57, 0.72, 0.09, 0.23, 0.16, 0.92, 0.86, 0.69, 0.97, 0.22, 0.43, 0.36, 0.23, 0.78, 0.64, 0.18, 0.06, 0.19, 0.26, 0.62, 0.76, 0.7, 0.14, 0.03, 0.46, 0.65, 0.38, 0.35, 0.76, 0.42, 0.17, 0.86, 0.23, 0.5, 0.29, 0.87, 0.79, 0.21, 0.85, 0.15, 0.18, 0.68, 0.85, 0.89, 0.16, 0.51, 0.05, 0.88, 0.25, 0.5, 0.99, 0.8, 0.63, 0.3, 0.12, 0.94, 0.22, 0.98, 0.66, 0.8, 0.99, 0.35, 0.19, 0.81, 0.68, 0.74, 0.54, 0.4, 0.3, 0.37, 0.5, 0.07, 0.93, 0.06, 0.39, 0.19, 0.56, 0.36, 0.51, 0.64, 0.27, 0.49, 0.26, 0.29, 0.01, 0.01, 0.92, 0.52, 0.83, 0.3, 0.13, 0.24, 0.28, 0.8, 0.51, 0.76, 0.69, 0.36, 0.1, 0.98, 0.03, 0.82, 0.97, 0.35, 0.97, 0.75, 0.99, 0.42, 0.76, 0.29, 0.81, 0.59, 0.47, 0.49, 0.48, 0.46, 0.26, 0.54, 0.69, 0.36, 0.11, 0.3, 0.76, 0.65, 0.56, 0.59, 0.15, 0.17, 0.79, 0.66, 0.8, 0.02, 0.05, 0.3, 0.57, 0.23, 0.51, 0.93, 0.2, 0.92, 0.8, 0.07, 0.43, 0.28, 0.02, 0, 0.12, 0.05, 0.55, 0.79, 0.24, 0.26, 0.3, 0.36, 0.14, 0.43, 0.98, 0.33, 0.83, 0.71, 0.8, 0.13, 0.72, 0.48, 0.14, 0.28, 0.26, 0.87, 0.09, 0.18, 0.21, 0.48, 0.21, 0.28, 0.79, 0.57, 0.65, 0.35, 0.66, 0.18, 0.93, 0.84, 0.54, 0.01, 0.77, 0.75, 0.73, 0.81, 0.42, 0.54, 0.24, 0.24, 0.54, 0.31, 0.21, 0.23, 0.83, 0.64, 0.75, 0.39, 0.77, 0.87, 0.16, 0.95, 0.72, 0.17, 0.49, 0.05, 0.78, 0.47, 0.09, 0.29, 0.26, 0.67, 0.12, 0.03, 0.63, 0.66, 0.75, 0.93, 0.82, 0.64, 0.43, 0.77, 0.23, 0.52, 0.58, 0.72, 0.5, 0.7, 0.01, 0.74, 0.86, 0.67, 0.52, 0.19, 0.09, 0.4, 0, 0.8, 0.85, 0.08, 0.77, 0.98, 0.11, 0.43, 0.83, 0.99, 0.25, 0.79, 0.75, 0.3, 0.91, 0.73, 0.94, 0.38, 0.35, 0.11, 0.13, 0.43, 0.81, 0.59, 0.88, 0.82, 0.34, 0.39, 0.86, 0.21, 0.65, 0.54, 0.43, 0.46, 0.46, 0.49, 0.72, 0.87, 0.99, 0.89, 0.27, 0.75, 0.55, 0.01, 0.84, 0.03, 0.82, 0.43, 0.21, 0.66, 0.11, 0.71, 0.61, 0.52, 0.28, 0.76, 0.01, 0.97, 0.31, 0.56, 0.87, 0.86, 0.14, 0.28, 0.23, 0.3, 0.06, 0.19, 0.71, 0.92, 0.3, 0.96, 0.02, 0.23, 0.72, 0.48, 0.86, 0.64, 0.65, 0.55, 0.5, 0.87, 0.52, 0.54, 0.45, 0.47, 0.88, 0.19, 0.01, 0.5, 0.06, 0.11, 0.45, 0.48, 0.2, 0.58, 0.25, 0.05, 0.24, 0.38, 0.9, 0.24, 0.77, 0.91, 0.64, 0.35, 0.86, 0.49, 0.64, 0.45, 0.61, 0.45, 0.19, 0.94, 0.92, 0.55, 0.47, 0.24, 0.31, 0.14, 0.54, 0.05, 0.69, 0.53, 0.66, 0.08, 0.11, 0.35, 0.2, 0.45, 0.78, 0.38, 0.42, 0.21, 0.49, 0.01, 0.46, 0.17, 0.08, 0.11, 0.54, 0.21, 0.16, 0.07, 0.49, 0.66, 0.71, 0.78, 0.89, 0.86, 0.79, 0.5, 0.92, 0.84, 0.99, 0.67, 0.13, 0.73, 0.44, 0.84, 0.77, 0.86, 0.97, 0.78, 0.41, 0.48, 0.83, 0.51, 0.23, 0.72, 0.14, 0.73, 0.49, 0.61, 0.33, 0.21, 0.31, 0.93, 0.31, 0.99, 0.83, 0.32, 0.19, 0.36, 0.68, 0.47, 0.64, 0.25, 0.97, 0.07, 0.29, 0.54, 0.7, 0.46, 0.34, 0.78, 0.42, 0.67, 0.68, 0.66, 0.44, 0.12, 0.34, 0.25, 0.39, 0.35, 0.15, 0.09, 0.05, 0.78, 0.06, 0.3, 0.43, 0.21, 0.08, 0.32, 0.33, 0.54, 0.52, 0.79, 0.74, 0.61, 0.22, 0.5, 0.75, 0.24, 0.71, 0.41, 0.46, 0.41, 0.21, 0.71, 0.43, 0.3, 0.59, 0.21, 0.04, 0.73, 0, 0.94, 0.55, 0.66, 0.69, 0.96, 0.09, 0.9, 0.59, 0.38, 0.01, 0.23, 0.65, 0.3, 0.45, 0.2, 0.28, 0.33, 0.95, 0.96, 0.44, 0.52, 0.94, 0.47, 0.01, 0.61, 0.76, 0.77, 0.9, 0.74, 0.08, 0.14, 0.6, 0.96, 0.11, 0.69, 0.29, 0.03, 0.63, 0.63, 0.44, 0.1, 0.86, 0, 0.44, 0.08, 0.03, 0.05, 0.57, 0.11, 0.07, 0.89, 0.42, 0.35, 0.94, 0.89, 0.81, 0.33, 0.18, 0.41, 0.76, 0.99, 0.43, 0.98, 0.74, 0.07, 0.99, 0.88, 0.61, 0.31, 0.14, 0.79, 0.3, 0.6, 0.62, 0.21, 0.11, 0.26, 0.23, 0.66, 0.55, 0.2, 0.09, 0.35, 0.85, 0.53, 0.14, 0.5, 0.19, 0.64, 0.37, 0.31, 0.69, 0.96, 0.6, 0.72, 0.64, 0.95, 0.04, 0.44, 0.02, 0.16, 0.54, 0.71, 0.18, 0.93, 0.64, 0.67, 0.61, 0.48, 0.1, 0.41, 0.93, 0.74, 0.07, 0.38, 0.5, 0.65, 0.28, 0.23, 0.47, 0.42, 0.82, 0.81, 0.69, 0.85, 0.9, 0.69, 0.42, 0.56, 0.85, 0.29, 0.01, 0.07, 0.17, 0.68, 0.44, 0.8, 0.92, 0.42, 0.71, 0.36, 0.5, 0.07, 0.04, 0.24, 0.92, 0.46, 0.91, 0.39, 0.96, 0.45, 0.39, 0.5, 0.69, 0.89, 0.1, 0.58, 0.35, 0.93, 0.05, 0.95, 0.4, 0.8, 0.79, 0.75, 0.65, 0.15, 0.71, 0.22, 0.04, 0.08, 0.94, 0.39, 0.69, 0.98, 0.05, 0.09];
var bonusLayer = 100;
var waterLayer = 150;
var clipWaters = new Array();
var lastscrollxdraw = (_global.sW * 10);
var brightness_array = [0.6, 0, 0, 0, 100, 0, 0.6, 0, 0, 100, 0, 0, 1, 0, 100, 0, 0, 0, 1, 0];
var brightness_filter = (new flash.filters.ColorMatrixFilter(brightness_array));
var quant = 128;
var hex = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F");
var goaway = -1;
var loadreplay = -1;
transit.gotoAndPlay("open");
titleo.gotoAndStop(34);
var introframe = 0;
this.onEnterFrame = function () {
if (introframe == 40) {
titleo.gotoAndPlay(1);
}
if ((startb.hitTest(_root._xmouse, _root._ymouse, true) && (startb._visible)) || (helpb.hitTest(_root._xmouse, _root._ymouse, true))) {
quickhelp._x = quickhelp._x + ((20 - quickhelp._x) * 0.2);
} else {
quickhelp._x = quickhelp._x + ((-250 - quickhelp._x) * 0.1);
}
introframe++;
};
var baseAlphaNum = 128;
Array.prototype.insert = function (index, value) {
if (index < 0) {
return(undefined);
}
var _local2 = this.slice();
var _local3 = _local2.splice(index);
_local2[index] = value;
_local2 = _local2.concat(_local3);
return(_local2);
};
Instance of Symbol 166 MovieClip in Frame 3
on (press) {
getURL ("http://www.pepere.org/flash-games_1/", "_blank");
}
Instance of Symbol 169 MovieClip "startb" in Frame 3
on (press) {
_root.levelSound.stop();
_root.easyflip = _root.easyenabled;
_root.smoothGotoAndPlay("start");
}
Instance of Symbol 175 MovieClip "checktuto" in Frame 3
on (press) {
_root.tutoenabled++;
if (_root.tutoenabled >= 2) {
_root.tutoenabled = 0;
}
this.gotoAndStop(_root.tutoenabled + 1);
}
Instance of Symbol 189 MovieClip "helpb" in Frame 3
on (press) {
_root.tutorial = true;
_root.easyflip = _root.easyenabled;
_root.levelSound.stop();
_root.smoothGotoAndPlay("start");
}
Instance of Symbol 192 MovieClip "replayb" in Frame 3
on (press) {
_root.loadreplay = 0;
_root.levelSound.stop();
_root.smoothGotoAndPlay("start");
}
Instance of Symbol 194 MovieClip "editb" in Frame 3
on (press) {
_root.levelSound.stop();
_root.smoothGotoAndPlay("edit");
}
Instance of Symbol 217 MovieClip "qualitytoggle" in Frame 3
on (press) {
_root.qualityval++;
if (_root.qualityval >= 3) {
_root.qualityval = 0;
}
this.gotoAndStop(_root.qualityval + 1);
}
Instance of Symbol 219 MovieClip "editb" in Frame 3
on (press) {
_root.levelSound.stop();
_root.smoothGotoAndPlay("credits");
}
Instance of Symbol 221 MovieClip "checkeasy" in Frame 3
on (press) {
_root.easyenabled++;
if (_root.easyenabled >= 2) {
_root.easyenabled = 0;
}
this.gotoAndStop(_root.easyenabled + 1);
}
Instance of Symbol 224 MovieClip "highscoreb" in Frame 3
on (press) {
getURL ("http://www.pepere.org/flash-development_1_3x/flash-game-jump-gear-random_u_82.html", "_blank");
}
Instance of Symbol 228 MovieClip "muter" in Frame 3
on (press) {
_root.muteallsounds++;
if (_root.muteallsounds >= 2) {
_root.muteallsounds = 0;
}
this.gotoAndStop(_root.muteallsounds + 1);
}
Frame 4
function newWheel(t, wx, wy, idx, as) {
var _local1 = new ModelBase(t, wx, wy, idx);
_local1.addSpeed(as);
cars.push(_local1);
}
function dispNextCheck(pixels) {
nextcheck.toto.meters.text = Math.floor(pixels / 10);
progr.info.text = "LEVEL " + (_root.curcheckpoint + 1);
nextcheck._visible = true;
nextcheck.gotoAndPlay(1);
}
function keyup(k) {
if ((!_root.replay) && (!_root.gameoverb)) {
if (_root.scrolllandline.keyUpAction(k)) {
_root.record.push({frame:_root.frame, down:false, code:k});
_root.onekeydown = (((_root.leftDown | _root.rightDown) | _root.upDown) | _root.downDown) | _root.spaceDown;
}
}
}
function startHappyHour() {
if (happyhourtime < 0) {
birdSound.start(0, 100);
happyhourtime = framerate * 30;
happyhour._visible = true;
happyhour.gotoAndPlay(2);
happyscore = 0;
happyscoretext = 0;
happyhour.demicolor.points.text = happyscoretext;
if (nexthappyhourscore < 5000) {
nexthappyhourscore = (nexthappyhourscore * 2) + 1000;
} else {
nexthappyhourscore = nexthappyhourscore * 2;
}
if (((!replay) && (!tutoShown[7])) && (tutoenabled == 1)) {
tutoShown[7] = tutoagent.showit("<font color=\"#FF9955\">Happy hour 30 seconds !</font>.<br><br>All points x2.<br><br>Next happy hours :<br><font color=\"#FF6633\">2000</font> points<br><font color=\"#FF6633\">5000</font> points<br><font color=\"#FF6633\">10000</font> points<br><font color=\"#FF6633\">20000</font> points<br>...", [], false, true, 7, 0);
}
}
}
function happyscoredisplay() {
if (happyscore != happyscoretext) {
if ((frame % 2) == 0) {
var _local1 = Math.ceil((happyscore - happyscoretext) * 0.3);
happyscoretext = happyscoretext + _local1;
happyhour.demicolor.points.text = happyscoretext;
}
}
}
function pauseit() {
if ((_root.nofuel < 0) && (!_root.gameoverb)) {
gamepause = true;
pauseobj._visible = true;
pauseobj.play();
}
}
function unpauseit() {
gamepause = false;
pauseobj.stop();
pauseobj._visible = false;
if (!replay) {
if (!_root.rightDown) {
if (Key.isDown(39)) {
_root.scrolllandline.downKey(39);
}
}
if (!_root.leftDown) {
if (Key.isDown(37)) {
_root.scrolllandline.downKey(37);
}
}
if (!_root.upDown) {
if (Key.isDown(38)) {
_root.scrolllandline.downKey(38);
}
}
if (!_root.downDown) {
if (Key.isDown(40)) {
_root.scrolllandline.downKey(40);
}
}
if (!_root.spaceDown) {
if (Key.isDown(32)) {
_root.scrolllandline.downKey(32);
}
}
}
}
function gameover() {
if (!gameoverb) {
levelSound.start();
gameoverb = true;
if (happyhourtime > -1) {
happyhourtime = 0;
}
if (!replay) {
if (score > bestscore) {
save();
}
}
}
}
function addScore(as) {
score = score + as;
if (happyhourtime > -1) {
happyscore = happyscore + (2 * as);
score = score + as;
}
}
function boost(n) {
if (boostcountdown < 0) {
tract = tract * boostratio;
usercar.heavyWheels(boostratio);
usercar.clipwl0.gotoAndStop(2);
usercar.clipwl1.gotoAndStop(2);
}
boostcountdown = n * framerate;
if ((!replay) && (tutoenabled == 1)) {
if (!tutoShown[1]) {
if (!easyflip) {
tutoShown[1] = tutoagent.showit("<font color=\"#FF9955\">Burning tyres</font>.<br><br>Boost speed. Press simultaneously the up, left and right arrow keys for maximum efficiency.", [1, 2, 4], false, false, 7, 0);
} else {
tutoShown[1] = tutoagent.showit("<font color=\"#FF9955\">Burning tyres</font>.<br><br>Boost speed.", [1, 2, 4], false, false, 7, 0);
}
}
}
}
function fly(n) {
if (flycountdown < 0) {
usercar.bodyFly(flyratio);
usercar.clipc.fly._visible = true;
}
flycountdown = n * framerate;
if ((!replay) && (tutoenabled == 1)) {
if (!tutoShown[2]) {
tutoShown[2] = tutoagent.showit("<font color=\"#FF9955\">Wings</font>.<br><br>Press the up arrow key to fly forward.", [4], false, false, 7, 0);
}
}
}
function timeblock(n) {
timebloccountdown = n * framerate;
if ((!replay) && (tutoenabled == 1)) {
if (!tutoShown[3]) {
tutoShown[3] = tutoagent.showit("<font color=\"#FF9955\">Time stop</font>.<br><br>Coutdown is stopped for 10 seconds.", [4], false, false, 7, 0);
}
}
}
function cata(n) {
usercar.addSpeed({x:n, y:-Math.abs(n)});
}
function bubble(n) {
if (bubblecountdown < 0) {
usercar.bubble(true);
}
bubblecountdown = n * framerate;
if ((!replay) && (tutoenabled == 1)) {
if (!tutoShown[0]) {
tutoShown[0] = tutoagent.showit("<font color=\"#FF9955\">Bubble</font>.<br><br>Press the spacebar to escape the bubble quicker.", [0], false, false, 7, 0);
}
}
}
function earthquakeit(n) {
eqcountdown = n * framerate;
}
function freezeit(n) {
windSound.start();
cracSound.start();
freezecountdown = n * framerate;
drawLand(landdrawdata, objects, smoothland, colors, scrollland.landclip, scrollland.landclipwater, scrolllandscape, scrolllandline.landclipline, true);
var _local1 = cars.length - 1;
while (_local1 >= 0) {
cars[_local1].checkFreeze();
_local1--;
}
}
function longTimeInWater() {
if (((!replay) && (tutoenabled == 1)) && (!easyflip)) {
if (!tutoShown[4]) {
tutoShown[4] = tutoagent.showit("<font color=\"#FF9955\">Stuck in the water?</font>.<br><br>Press the right arrow key to improve the adherence on the ground and get out of the water quicker.", [2], false, false, 12, 0);
}
}
}
function jumpVert() {
if (((!replay) && (tutoenabled == 1)) && (!easyflip)) {
if (((bubblecountdown < 0) && (flycountdown < 0)) && (frame > (5 * framerate))) {
if (!tutoShown[5]) {
tutoShown[5] = tutoagent.showit("<font color=\"#FF9955\">Balance problems?</font>.<br><br>In vertical position, press simultaneously the left and right arrow key to get back quicker to the horizontal position.", [1, 2], false, false, 10, 0);
if (tutoShown[5]) {
pauseit();
}
}
}
}
}
function save() {
if (PORTALVERSION) {
return(undefined);
}
_root.saving = true;
_root.backb._visible = false;
_root.infotxt.infotxt.text = "Wait...";
srecord = new LoadVars();
srecord.params = _root.game_id;
srecord.score = _root.score;
srecord.sendAndLoad("record.php", srecord, "POST");
srecord.onLoad = function () {
_root.infotxt.infotxt.text = "";
_root.infotxt._visible = true;
if (((this.result + "") != "undefined") && (this.result > 0)) {
_root.infotxt.infotxt.text = (("Rank " + this.result) + " / ") + this.total;
} else {
_root.infotxt.infotxt.text = this.error;
}
if ((((this.recordid + "") != "undefined") && (this.recordid >= 0)) && (this.result < 5)) {
_root.infotxt.infotxt.text = _root.infotxt.infotxt.text + "\nSaving...";
if (easyflip) {
sonparcours = "1.00e_";
} else {
sonparcours = "1.00_";
}
var _local8 = 0;
var _local3 = 0;
while (_local3 < _root.record.length) {
var _local5 = _root.record[_local3].frame - _local8;
var _local4 = -1;
if (_root.record[_local3].code == 32) {
if (_root.record[_local3].down == true) {
_local4 = 0;
} else {
_local4 = 1;
}
} else if (_root.record[_local3].code == 37) {
if (_root.record[_local3].down == true) {
_local4 = 2;
} else {
_local4 = 3;
}
} else if (_root.record[_local3].code == 39) {
if (_root.record[_local3].down == true) {
_local4 = 4;
} else {
_local4 = 5;
}
} else if (_root.record[_local3].code == 40) {
if (_root.record[_local3].down == true) {
_local4 = 6;
} else {
_local4 = 7;
}
} else if (_root.record[_local3].code == 38) {
if (_root.record[_local3].down == true) {
_local4 = 8;
} else {
_local4 = 9;
}
}
var _local6 = 0;
if (_local5 < 4) {
var _local7 = (_local5 * 16) + _local4;
} else {
if (_local5 < 128) {
_local6 = 1;
} else if (_local5 < 16384) {
_local6 = 2;
} else if (_local5 < 2097152) {
_local6 = 3;
}
var _local7 = (((64 + (_local6 * 16)) * Math.pow(128, _local6)) + (_local5 * 16)) + _local4;
}
sonparcours = sonparcours + _root.getAlphaNum(_local7);
_local8 = _root.record[_local3].frame;
_local3++;
}
myParcours = new LoadVars();
myParcours.data = sonparcours;
myParcours.recordid = this.recordid;
myParcours.params = _root.game_id;
myParcours.sendAndLoad("set_data.php", myParcours, "POST");
myParcours.onLoad = function () {
_root.infotxt.infotxt.text = (("Rank " + srecord.result) + " / ") + srecord.total;
_root.saving = false;
_root.backb._visible = true;
};
} else {
_root.saving = false;
_root.backb._visible = true;
}
};
}
stop();
var nbskies = 8;
var frame = 0;
var endscoremove = 0;
var score = 0;
var scoretext = 0;
var carjump = false;
var carbigjump = false;
var bigjumpmin = 320;
var bigjumpminscore = 520;
var jumpscore = 0;
var bigjumpscore = 0;
var recepframe = -1;
var bigrecepframe = -1;
var lastrooffloorframe = -1;
var wheelR = 15;
var speedscale = 1.7;
var jumphigh = 3.2;
var earthquake = {x:0, y:0};
var onekeydown = false;
var weight = new Array();
_root.weight[0] = 1;
_root.weight[1] = 1;
_root.weight[2] = 1;
var tract = 0;
var jump = -1;
var rightDown = false;
var leftDown = false;
var upDown = false;
var downDown = false;
var spaceDown = false;
minyk._visible = false;
finalcount.gotoAndStop(1);
finalcount._visible = false;
if (easyflip) {
_root.weight[0] = 2.5;
_root.weight[1] = 2.5;
_root.weight[2] = 0.7;
jumphigh = 4;
}
BonusStar.lastsoundframe = -1;
var checkpoints = [10000, 24000, 40000, 58000, 78000, 100000, 124000, 150000, 178000, 208000, 240000, 280000];
var countdownmaxes = new Array();
var i = 0;
while (i < checkpoints.length) {
countdownmaxes[i] = (framerate * 60) - 1;
i++;
}
var curcheckpoint = 0;
if ((!replay) && ((tutoenabled == 1) || (tutorial))) {
if (!tutoShown[6]) {
tutoShown[6] = tutoagent.showit("Hello, I'm <font color=\"#7777FF\">Tutty</font>, your tutorial agent!<br><br>I will guide you through the game.", [0, 1, 2, 3, 4], false, true, 6, 3);
}
}
if (tutorial) {
nextcheck.stop();
nextcheck._visible = false;
landdrawdata = buildLandscape(checkpoints[0], 30, 330);
objects = new Array();
tutoagent.showit("<font color=\"#FF9955\">Controls</font><br><br>Press the <font color=\"#7777FF\">space bar</font> to <font color=\"#7777FF\">jump</font>.<br>Press the <font color=\"#7777FF\">up</font> arrow key to <font color=\"#7777FF\">move forward</font> (rotate the front wheel).<br>Press the <font color=\"#7777FF\">down</font> arrow key to <font color=\"#7777FF\">move backward</font> (rotate the back wheel).", [0, 3, 4], false, true, 30, 2);
if (!easyflip) {
tutoagent.showit("<font color=\"#FF9955\">Balance</font><br>Press the <font color=\"#7777FF\">left</font> arrow key to <font color=\"#7777FF\">increase the weight of the back wheel</font>. Press the <font color=\"#7777FF\">right</font> arrow key to <font color=\"#7777FF\">increase the weight of front wheel</font>.<br>The heavy wheel falls down faster and make the car flip right or left depending on its position.", [1, 2], false, true, 30, 2);
} else {
tutoagent.showit("<font color=\"#FF9955\">Balance</font><br>Press the <font color=\"#7777FF\">left</font> arrow key to <font color=\"#7777FF\">flip left</font>. Press the <font color=\"#7777FF\">right</font> arrow key to <font color=\"#7777FF\">flip right</font>.", [1, 2], false, true, 30, 2);
}
tutoagent.showit("<font color=\"#FF9955\">Goal of the game</font><br><br>Reach as many checkpoints as possible and <font color=\"#7777FF\">earn as many points as possible</font>. Each checkpoint must be reached in <font color=\"#7777FF\">limited time</font>.", [], false, true, 20, 2);
tutoagent.showit("<font color=\"#FF9955\">Score</font><br><br>Grab the <font color=\"#7777FF\">bonus stars</font>.<br><br>Perform <font color=\"#7777FF\">flips, backflips or long jumps</font>, and stay stable during 2 seconds after the landing.<br><br>Reach the checkpoints with as much remaining <font color=\"#7777FF\">bonus time</font> as possible.", [], false, true, 30, 2);
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br>Keep an eye on the <font color=\"#7777FF\">top-right countdown</font>, when it becomes <font color=\"#FF0000\">red and BIG</font>, it means that you are late.", [], false, true, 20, 2);
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br>When the time runs out, you can't accelerate anymore but you still have <font color=\"#7777FF\">5 seconds to reach the next checkpoint</font>, by using the jumps and your remaining speed.", [], false, true, 20, 2);
if (!easyflip) {
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br><font color=\"#7777FF\">Improve your adherence by pressing the right arrow key</font> and increasing the weight of the front wheel. Very useful to get out of the water or to climb hills.", [2], false, true, 20, 2);
}
if (!easyflip) {
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br>When the car is in the air in the vertical position, <font color=\"#7777FF\">pressing simultaneously the left and right arrow keys</font>, is the most efficient way to get it back to the horizontal position.", [1, 2], false, true, 30, 2);
}
if (!easyflip) {
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br>Increasing the weight of the wheels by pressing the left and right arrow keys, results in <font color=\"#7777FF\">a quicker fall down</font>. Useful to match the curve.", [1, 2], false, true, 30, 2);
}
if (!easyflip) {
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br>When you catch the Burning tyres powerup, press simultaneously the up, left and right arrow keys for maximum efficiency.", [1, 2, 4], false, true, 10, 2);
}
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br>When you are trapped in a bubble, press the spacebar as many times as possible to escape quicker.", [0], false, true, 10, 2);
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br>When you catch the wing powerup, press the up arrow to fly forward.", [4], false, true, 10, 2);
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br>Wing + Burning tyres + Bubble = Lethal weapon.", [4], false, true, 10, 2);
tutoagent.showit("<font color=\"#FF9955\">Tips</font><br><br>To avoid cheaters, you can only save your score if you are a registered member of pepere.org. <a href='http://www.pepere.org/login.php?lang=1' target='_blank'><font color=\"#333333FF\">Register</font></a> before achieving an unbelievable score.", [], false, true, 15, 2);
tutoagent.showit("<font color=\"#FF9955\">Good luck</font><br><br>You are ready to play, bye bye!", [], false, true, 5, 2);
} else {
if (map == "") {
landdrawdata = buildLandscape(checkpoints[checkpoints.length - 1], 30, 200);
objects = buildObjects(landdrawdata);
} else {
loadMap(map);
}
dispNextCheck(checkpoints[curcheckpoint]);
}
var countdown = (countdownmaxes[curcheckpoint] + 1);
checkpoints[-1] = 0;
var maximumx = landdrawdata[landdrawdata.length - 1].right.x;
landcoldata = buildColData(landdrawdata, wheelR);
landcoldata2 = buildColData(landdrawdata, 30);
landcoldata3 = buildColData(landdrawdata, 23);
var smoothland = new Array();
smoothland[0] = buildDrawData(landdrawdata, -10);
smoothland[1] = buildDrawData(landdrawdata, -25);
var colors = new Array();
if (qualityval == 0) {
colors[0] = 16774613 /* 0xFFF5D5 */;
colors[1] = 15656357 /* 0xEEE5A5 */;
colors[2] = 15189114 /* 0xE7C47A */;
} else {
colors[0] = 16774613 /* 0xFFF5D5 */;
colors[1] = 15645644 /* 0xEEBBCC */;
colors[2] = 15189114 /* 0xE7C47A */;
}
scrollland.createEmptyMovieClip("landclip", 10);
scrollland.landclip.cacheAsBitmap = true;
scrollland.createEmptyMovieClip("landclipwater", 10000);
scrollland.landclip.cacheAsBitmap = true;
scrolllandline.createEmptyMovieClip("landclipline", 10);
scrolllandline.landclipline.cacheAsBitmap = true;
var scrollx = 0;
var scrolly = 0;
var nofuel = -1;
var lastcheckpoint = 0;
var neededspeed = 0;
var actualspeed = 0;
var cars = new Array();
usercar = new Model(100, 0);
cars[0] = usercar;
var replayid = 0;
if (!replay) {
minik._y = 450;
minik._visible = false;
record = new Array();
infotxt._visible = false;
_root.infotxt.infotxt.text = "";
} else {
minik._visible = true;
minik._y = 350;
infotxt._visible = true;
_root.infotxt.infotxt.text = ("Demo by >> " + demouser) + " <<";
}
var happyhourtime = -1;
var happyscore = 0;
var happyscoretext = 0;
happyhour._visible = false;
var nexthappyhourscore = 500;
if (qualityval == 0) {
diffScroll = function () {
var _local2 = (scrollx * 0.1) % 1500;
var _local1 = 370 + (scrolly * 0.05);
hill0._x = _local2;
hill0._y = _local1;
if (hill0._x < -900) {
hill1._x = hill0._x + 1499.8;
hill1._y = hill0._y;
hill1._visible = true;
} else {
hill1._visible = false;
}
if (happyhour._visible) {
if (happyhourtime > -1) {
happyhour.mask._y = -350 - (400 - hill0._y);
happyhourtime--;
if (happyhourtime == -1) {
birdSound.stop();
happyhour.gotoAndPlay("bye");
}
}
happyscoredisplay();
}
};
} else {
hill0._visible = false;
hill1._visible = false;
diffScroll = function () {
if (happyhour._visible) {
if (happyhourtime > -1) {
happyhourtime--;
if (happyhourtime == -1) {
birdSound.stop();
happyhour.gotoAndPlay("bye");
}
}
happyscoredisplay();
}
};
}
if (!tutorial) {
checkSound.start();
ahoogaSound.start();
} else {
progr.info.text = "TUTORIAL";
}
var gamepause;
unpauseit();
var acceleration = 1;
transit.gotoAndPlay("open");
this.onEnterFrame = function () {
var _local14 = 0;
while (_local14 < acceleration) {
if (!gamepause) {
if (replay) {
while (record[replayid].frame == frame) {
if (record[replayid].down) {
scrolllandline.keyDownAction(record[replayid].code);
} else {
scrolllandline.keyUpAction(record[replayid].code);
}
replayid++;
}
} else if (_root.onekeydown) {
if (_root.rightDown) {
if (!Key.isDown(39)) {
keyup(39);
}
}
if (_root.leftDown) {
if (!Key.isDown(37)) {
keyup(37);
}
}
if (_root.upDown) {
if (!Key.isDown(38)) {
keyup(38);
}
}
if (_root.downDown) {
if (!Key.isDown(40)) {
keyup(40);
}
}
if (_root.spaceDown) {
if (!Key.isDown(32)) {
keyup(32);
}
}
}
var _local13 = {x:cars[0].pL[0].x - 100, y:cars[0].pL[0].y - 250};
scrollx = scrollx + (((-_local13.x) - scrollx) * 0.2);
if (scrollx > 0) {
scrollx = 0;
} else if (scrollx < ((-maximumx) + 600)) {
scrollx = (-maximumx) + 600;
}
scrolly = scrolly + (((-_local13.y) - scrolly) * 0.2);
drawLand(landdrawdata, objects, smoothland, colors, scrollland.landclip, scrollland.landclipwater, scrolllandscape, scrolllandline.landclipline, false);
if (_root.jump > -1) {
_root.jump++;
if (_root.jump > 7) {
_root.jump = -1;
if (bubblecountdown > -1) {
bubblecountdown = Math.ceil(bubblecountdown * 0.8);
squeakSound.start();
}
} else {
_root.bar = _root.bar + (((jumphigh - _root.bar) * 0.05) * ((_root.jump * 4) + 1));
}
} else if (_root.spaceDown) {
_root.bar = _root.bar + ((0.7 - _root.bar) * 0.1);
} else {
_root.bar = _root.bar + ((1 - _root.bar) * 0.2);
}
if (nofuel >= 0) {
tract = 0;
if (!gameoverb) {
nofuel++;
}
}
var _local5 = cars.length - 1;
while (_local5 >= 0) {
cars[_local5].memo();
cars[_local5].tract();
cars[_local5].gravity(0.17 * speedscale);
cars[_local5].moveIt();
cars[_local5].distConstraint();
cars[_local5].landConstraint();
_local5--;
}
if (easyflip) {
if (_root.rightDown) {
usercar.rotateIt(0.002);
}
if (_root.leftDown) {
usercar.rotateIt(-0.002);
}
}
_local5 = cars.length - 1;
while (_local5 >= 0) {
var _local3 = _local5 - 1;
while (_local3 >= 0) {
cars[_local5].objConstraint(cars[_local3]);
_local3--;
}
_local5--;
}
_local5 = cars.length - 1;
while (_local5 >= 0) {
cars[_local5].newSpeed();
cars[_local5].showIt();
if (cars[_local5].pL[0].x < ((-scrollx) - 100)) {
cars[_local5].free();
cars.splice(_local5, 1);
}
_local5--;
}
var _local4 = Math.floor(usercar.pL[2].x / quant);
_local5 = _local4 - 1;
while (_local5 <= (_local4 + 1)) {
if (objects[_local5].length != undefined) {
var _local3 = objects[_local5].length - 1;
while (_local3 >= 0) {
var _local6 = objects[_local5][_local3];
if (_local6.checkHit(usercar)) {
if (_local6.action()) {
objects[_local5].splice(_local3, 1);
}
}
_local6.anim();
_local3--;
}
}
_local5++;
}
_local5 = _local4 + 2;
while (_local5 <= (_local4 + 5)) {
if (objects[_local5].length != undefined) {
var _local3 = objects[_local5].length - 1;
while (_local3 >= 0) {
var _local6 = objects[_local5][_local3];
_local6.anim();
_local3--;
}
}
_local5++;
}
if (!usercar.fly[2]) {
lastrooffloorframe = frame;
}
if (!carjump) {
if (((frame - lastrooffloorframe) > (usercar.flying + 15)) && (((usercar.flying > 30) && (Math.abs(usercar.clipc._rotation) >= 90)) || ((usercar.flying > 5) && (Math.abs(usercar.clipc._rotation) >= 120)))) {
jumpmeter.startit();
carjump = true;
jumpmeter.rot(usercar.clipc._rotation);
}
} else if ((recepframe < 0) && (usercar.flying > 5)) {
jumpmeter.rot(usercar.clipc._rotation);
} else {
recepframe++;
if ((recepframe <= 60) && (jumpmeter.locked != 0)) {
if (recepframe == 0) {
jumpscore = ((-jumpmeter.locked) + 2) * 10;
jumpmeter.score(jumpscore);
}
jumpmeter.rot2(recepframe / 60);
if (!usercar.fly[2]) {
recepframe = -1;
carjump = false;
jumpmeter.endit();
}
} else {
if (jumpmeter.locked != 0) {
addScore(jumpscore);
}
recepframe = -1;
carjump = false;
jumpmeter.endit();
}
}
jumpmeter.trans();
if (!bigcarjump) {
if ((((frame - lastrooffloorframe) > (usercar.flying + 15)) && (usercar.flying > 30)) && ((usercar.pL[2].x - usercar.lastgroundx) >= bigjumpmin)) {
bigjumpmeter.startit();
bigcarjump = true;
bigjumpmeter.rot(usercar.pL[2].x - usercar.lastgroundx);
}
} else if ((bigrecepframe < 0) && (usercar.flying > 30)) {
bigjumpmeter.rot(usercar.pL[2].x - usercar.lastgroundx);
} else {
bigrecepframe++;
if ((bigrecepframe <= 60) && (bigjumpmeter.locked != 0)) {
if (bigrecepframe == 0) {
bigjumpscore = Math.ceil((usercar.lastjumplong - bigjumpminscore) / 10);
if (bigjumpscore < 1) {
bigjumpscore = 1;
}
bigjumpmeter.score(bigjumpscore);
}
bigjumpmeter.rot2(bigrecepframe / 60);
if (!usercar.fly[2]) {
bigrecepframe = -1;
bigcarjump = false;
bigjumpmeter.endit();
}
} else {
if (bigjumpmeter.locked != 0) {
addScore(bigjumpscore);
}
bigrecepframe = -1;
bigcarjump = false;
bigjumpmeter.endit();
}
}
bigjumpmeter.trans();
scrollland._x = scrollx;
scrollland._y = scrolly + earthquake.y;
scrolllandline._x = scrollx;
scrolllandline._y = scrolly + earthquake.y;
scrolllandscape._x = scrollx;
scrolllandscape._y = scrolly + earthquake.y;
diffScroll();
if (scoretext < score) {
if ((frame % 3) == 0) {
var _local15 = Math.ceil((score - scoretext) * 0.2);
scoretext = scoretext + _local15;
if (scoretext == score) {
endscoremove = frame;
}
mainscore.score.htmlText = ("<font color=\"#FF0000\">" + scoretext) + "</font>";
mainscore._xscale = (mainscore._yscale = 145 + (_local15 * 5));
} else {
mainscore.score.htmlText = ("<font color=\"#006600\">" + scoretext) + "</font>";
mainscore._xscale = (mainscore._yscale = 130);
}
} else if ((frame - endscoremove) < 20) {
mainscore._xscale = (mainscore._yscale = 100 + (70 * Math.cos((((frame - endscoremove) / 20) * Math.PI) / 2)));
var _local17 = hex[Math.floor((16 * (20 - (frame - endscoremove))) / 20)];
var _local16 = hex[Math.floor((7 * (frame - endscoremove)) / 20)];
var _local12 = ((((((_local17 + "") + _local17) + "") + _local16) + "") + _local16) + "00";
mainscore.score.htmlText = ((("<font color=\"#" + _local12) + "\">") + scoretext) + "</font>";
}
if ((checkpoints[curcheckpoint] + scrollx) <= (_global.sW + 30)) {
var _local7 = (checkpoints[curcheckpoint] + scrollx) - _global.sW;
if (_local7 >= 0) {
_local7 = 0;
checkpointborder._x = (_local7 + _global.sW) + 30;
} else if (_local7 <= (-_global.sW)) {
_local7 = -_global.sW;
} else {
if ((checkpointborder._currentframe > 10) && (!gameoverb)) {
checkpointborder.gotoAndPlay(1);
}
checkpointborder._x = _local7 + _global.sW;
}
_root["sky" + (curcheckpoint % nbskies)]._x = _local7;
_root["sky" + ((curcheckpoint + 1) % nbskies)]._x = _local7 + _global.sW;
if (usercar.pL[2].x > checkpoints[curcheckpoint]) {
if (!gameoverb) {
lastcheckpoint = checkpoints[curcheckpoint];
nofuel = -1;
finalcount.gotoAndStop(1);
finalcount._visible = false;
checkpointborder.gotoAndPlay("disappear");
addScore((100 + Math.ceil(countdown / framerate)) * (curcheckpoint + 1));
if (curcheckpoint >= (checkpoints.length - 1)) {
gameover();
} else {
checkSound.start();
ahoogaSound.start();
curcheckpoint++;
dispNextCheck(checkpoints[curcheckpoint] - checkpoints[curcheckpoint - 1]);
countdown = countdownmaxes[curcheckpoint];
if (score >= nexthappyhourscore) {
startHappyHour();
}
}
}
}
} else if ((checkpoints[curcheckpoint - 1] + scrollx) >= -100) {
var _local7 = (checkpoints[curcheckpoint - 1] + scrollx) - _global.sW;
if (_local7 <= (-_global.sW)) {
_local7 = -_global.sW;
} else if (_local7 >= 0) {
_local7 = 0;
} else {
checkpointborder._x = _local7 + _global.sW;
}
_root["sky" + ((curcheckpoint - 1) % nbskies)]._x = _local7;
_root["sky" + (curcheckpoint % nbskies)]._x = _local7 + _global.sW;
}
frame++;
if ((countdown % framerate) == 0) {
var _local12 = "006600";
var _local9 = 0;
if ((!gameoverb) && (nofuel < 0)) {
if (timebloccountdown > -1) {
countdown = countdown + framerate;
timebloccountdown = timebloccountdown - framerate;
countdownobj._visible = !countdownobj._visible;
if (timebloccountdown <= -1) {
countdownobj._visible = true;
}
}
progr.refreshProgress((usercar.pL[2].x - checkpoints[curcheckpoint - 1]) / (checkpoints[curcheckpoint] - checkpoints[curcheckpoint - 1]));
if ((countdownmaxes[curcheckpoint] - countdown) >= (framerate * 10)) {
neededspeed = (checkpoints[curcheckpoint] - usercar.pL[2].x) / countdown;
actualspeed = (usercar.pL[2].x - lastcheckpoint) / (countdownmaxes[curcheckpoint] - countdown);
var _local8 = actualspeed / neededspeed;
if (_local8 < 0) {
_local8 = 0;
}
if (_local8 < 1) {
var _local11 = hex[15 - Math.floor(_local8 * 6)];
var _local10 = Math.floor(_local8 * 6);
_local12 = ((((((_local11 + "") + _local11) + "") + _local10) + "") + _local10) + "00";
_local9 = 140 * Math.cos((_local8 * Math.PI) / 2);
}
}
if (boostcountdown > -1) {
boostcountdown = boostcountdown - framerate;
if (boostcountdown <= -1) {
tract = tract / boostratio;
usercar.heavyWheels(1);
usercar.clipwl0.gotoAndStop(1);
usercar.clipwl1.gotoAndStop(1);
}
}
if (flycountdown > -1) {
flycountdown = flycountdown - framerate;
if (flycountdown <= -1) {
usercar.bodyFly(1);
usercar.clipc.fly._visible = false;
}
}
if (bubblecountdown > -1) {
bubblecountdown = bubblecountdown - framerate;
if (bubblecountdown <= -1) {
usercar.bubble(false);
}
}
if (eqcountdown > -1) {
eqcountdown = eqcountdown - framerate;
if (eqcountdown <= -1) {
_root.quakeSound.stop();
earthquake.y = 0;
}
}
if (freezecountdown > -1) {
freezecountdown = freezecountdown - framerate;
if (freezecountdown <= -1) {
waterSound.start();
drawLand(landdrawdata, objects, smoothland, colors, scrollland.landclip, scrollland.landclipwater, scrolllandscape, scrolllandline.landclipline, true);
_local5 = cars.length - 1;
while (_local5 >= 0) {
cars[_local5].unfreeze();
_local5--;
}
}
}
} else {
countdownobj._visible = true;
}
countdownobj._xscale = (countdownobj._yscale = 100 + _local9);
countdownobj._y = 15 + (_local9 * 0.2);
countdownobj.score.htmlText = ((("<font color=\"#" + _local12) + "\">") + Math.floor(countdown / framerate)) + "</font>";
}
if (boostcountdown > -1) {
usercar.clipwl0.wheelflame.red._x = -2 + random(4);
usercar.clipwl0.wheelflame.red._y = -2 + random(4);
usercar.clipwl1.wheelflame.red._x = -2 + random(4);
usercar.clipwl1.wheelflame.red._y = -2 + random(4);
usercar.clipwl0.wheelflame.yellow._x = -2 + random(4);
usercar.clipwl0.wheelflame.yellow._y = -2 + random(4);
usercar.clipwl1.wheelflame.yellow._x = -2 + random(4);
usercar.clipwl1.wheelflame.yellow._y = -2 + random(4);
}
if (eqcountdown > -1) {
earthquake.y = pseudoRand(12 * Math.cos(frame * 0.01));
_root.quakeSound.setVolume(60 + (40 * Math.cos(frame * 0.01)));
}
if (!gameoverb) {
if (nofuel < 0) {
countdown--;
if (countdown <= 0) {
if (timeunlimited) {
countdown = -1;
} else if (tutorial) {
countdown = countdownmaxes[curcheckpoint] + 1;
} else {
finalcount.gotoAndPlay(1);
finalcount._visible = true;
nofuel = 0;
}
}
}
}
}
_local14++;
}
};
var gameoverb = false;
var boostcountdown = -1;
var boostratio = 2;
var flycountdown = -1;
var flyratio = -0.2;
var timebloccountdown = -1;
var bubblecountdown = -1;
var eqcountdown = -1;
var freezecountdown = -1;
var saving = false;
Instance of Symbol 302 MovieClip "scrolllandline" in Frame 4
onClipEvent (keyDown) {
if ((Key.getAscii() == 112) || (Key.getAscii() == 80)) {
if (_root.gamepause) {
_root.unpauseit();
} else {
_root.pauseit();
}
} else if ((!_root.replay) && (!_root.gameoverb)) {
t = Key.getCode();
downKey(t);
}
}
onClipEvent (load) {
function downKey(t) {
if (keyDownAction(t)) {
_root.onekeydown = true;
_root.record.push({frame:_root.frame, down:true, code:t});
}
}
function keyDownAction(t) {
toreturn = false;
if (_root.gamepause) {
return(toreturn);
}
if (t == 39) {
if (!_root.rightDown) {
_root.minik.key(2, 2);
_root.rightDown = true;
if (!_root.easyflip) {
_root.weight[1] = 3;
}
_root.cars[0].frontWheel(6);
toreturn = true;
}
} else if (t == 37) {
if (!_root.leftDown) {
_root.minik.key(1, 2);
_root.leftDown = true;
if (!_root.easyflip) {
_root.weight[0] = 3;
}
_root.cars[0].backWheel(6);
toreturn = true;
}
} else if (t == 38) {
if (!_root.upDown) {
_root.minik.key(4, 2);
_root.upDown = true;
_root.tract = 1;
if (_root.boostcountdown > -1) {
_root.tract = _root.tract * _root.boostratio;
}
toreturn = true;
}
} else if (t == 40) {
if (!_root.downDown) {
_root.minik.key(3, 2);
_root.downDown = true;
_root.tract = -1;
if (_root.boostcountdown > -1) {
_root.tract = _root.tract * _root.boostratio;
}
toreturn = true;
}
} else if (t == 32) {
if (!_root.spaceDown) {
_root.minik.key(0, 2);
_root.spaceDown = true;
toreturn = true;
}
}
return(toreturn);
}
function keyUpAction(t) {
toreturn = false;
if (_root.gamepause) {
return(toreturn);
}
if (t == 39) {
if (_root.rightDown) {
_root.minik.key(2, 1);
toreturn = true;
_root.rightDown = false;
if (!_root.easyflip) {
_root.weight[1] = 1;
}
_root.cars[0].frontWheel(0);
}
} else if (t == 37) {
if (_root.leftDown) {
_root.minik.key(1, 1);
toreturn = true;
_root.leftDown = false;
if (!_root.easyflip) {
_root.weight[0] = 1;
}
_root.cars[0].backWheel(0);
}
} else if (t == 38) {
if (_root.upDown) {
_root.minik.key(4, 1);
toreturn = true;
_root.upDown = false;
if (!_root.downDown) {
_root.tract = 0;
}
}
} else if (t == 40) {
if (_root.downDown) {
_root.minik.key(3, 1);
toreturn = true;
_root.downDown = false;
if (!_root.upDown) {
_root.tract = 0;
}
}
} else if (t == 32) {
if (_root.spaceDown) {
_root.minik.key(0, 1);
toreturn = true;
_root.spaceDown = false;
if ((_root.bar < 1) && (_root.jump == -1)) {
_root.jump = 0;
}
}
}
return(toreturn);
}
}
Instance of Symbol 364 MovieClip "backb" in Frame 4
on (press) {
_root.levelSound.stop();
_root.smoothGotoAndPlay("menu");
}
Instance of Symbol 397 MovieClip "avrap" in Frame 4
on (press) {
if (!_root.gameoverb) {
_root.acceleration = _root.acceleration + 2;
}
}
Instance of Symbol 399 MovieClip "avnor" in Frame 4
on (press) {
_root.acceleration = 1;
}
Frame 5
function init() {
var _local2 = completeElem({left:{x:0, y:0}, lAng:approx(2.9845130209103, 100), rAng:approx((Math.PI/2), 10), s:-1, r:50, bonus:new Array(), w:-1});
editlanddrawdata.push(_local2);
var _local1 = completeElem({left:editlanddrawdata[0].right, lAng:editlanddrawdata[0].rAng, rAng:approx((Math.PI/4), 10), s:-1, r:50, bonus:new Array(), w:-1});
editlanddrawdata.push(_local1);
miny = editlanddrawdata[curn].left.y - 200;
dragPoint(0);
movePoint(editlanddrawdata[0].right.x, editlanddrawdata[0].right.y);
computeFollowingNodes();
curmoven = -1;
draw(curn, editline);
}
function completeElem(newElem) {
var _local2 = {x:newElem.left.x + ((newElem.s * newElem.r) * Math.cos(newElem.lAng)), y:newElem.left.y + ((newElem.s * newElem.r) * Math.sin(newElem.lAng))};
var _local3 = (newElem.lAng + newElem.rAng) / 2;
var _local4 = {x:_local2.x - ((newElem.s * newElem.r) * Math.cos(_local3)), y:_local2.y - ((newElem.s * newElem.r) * Math.sin(_local3))};
var _local5 = {x:_local2.x - ((newElem.s * newElem.r) * Math.cos(newElem.rAng)), y:_local2.y - ((newElem.s * newElem.r) * Math.sin(newElem.rAng))};
var _local6 = bezierPoint(newElem.left, newElem.lAng + (Math.PI/2), _local4, _local3 + (Math.PI/2));
var _local8 = bezierPoint(_local4, _local3 + (Math.PI/2), _local5, newElem.rAng + (Math.PI/2));
var _local7 = {left:newElem.left, middle:_local4, right:_local5, center:_local2, lAng:newElem.lAng, rAng:newElem.rAng, bezleft:_local6, bezright:_local8, r:newElem.r, s:newElem.s, bonus:newElem.bonus, w:newElem.w};
return(_local7);
}
function addSegment(n) {
var _local4 = editlanddrawdata[n].rAng;
var _local6;
var _local14;
var _local15;
if (editlanddrawdata[n].s == editlanddrawdata[n - 1].s) {
if (editlanddrawdata[n].s == 1) {
_local15 = [-1, -1, 1, 1];
_local6 = (_local4 + secureAng) / 2;
_local14 = [(_local4 + _local6) / 2, _local6, (_local4 + _local6) / 2, _local4];
} else if (editlanddrawdata[n].s == -1) {
_local15 = [1, 1, -1, -1];
_local6 = ((_local4 + Math.PI) - secureAng) / 2;
_local14 = [(_local4 + _local6) / 2, _local6, (_local4 + _local6) / 2, _local4];
}
} else if (editlanddrawdata[n].s == -1) {
_local15 = [-1, 1, 1, -1];
_local6 = _local4;
_local14 = [(_local4 + secureAng) / 2, _local6, ((_local4 + Math.PI) - secureAng) / 2, _local4];
} else if (editlanddrawdata[n].s == 1) {
_local15 = [1, -1, -1, 1];
_local6 = _local4;
_local14 = [((_local4 + Math.PI) - secureAng) / 2, _local6, (_local4 + secureAng) / 2, _local4];
}
var _local1 = 0;
while (_local1 < 4) {
var _local2 = editlanddrawdata[n + _local1];
var _local5 = completeElem({left:_local2.right, lAng:_local2.rAng, rAng:_local14[_local1], s:_local15[_local1], r:50, bonus:new Array(), w:-1});
editlanddrawdata = editlanddrawdata.insert((n + _local1) + 1, _local5);
_local1++;
}
dragPoint(n);
computeFollowingNodes();
curmoven = -1;
draw(curn, editline);
}
function draw(n, clipline) {
while (editlanddrawdata[n].w > 0) {
n++;
}
minx = editlanddrawdata[n].left.x;
_root.xtext.text = "X: " + (Math.round(minx * 10) / 10);
var _local8 = 0;
while (_local8 < nbbonus) {
_root.editwaterline["bl" + _local8].removeMovieClip();
_local8++;
}
nbbonus = 0;
clipline.clear();
var _local17 = minx;
screenPoints = new Array();
stageBonus = new Array();
var _local15 = new Array();
while (_local17 < (minx + 600)) {
if ((n % 2) == 0) {
clipline.lineStyle(5, "0x099E56");
} else {
clipline.lineStyle(5, "0x693E06");
}
clipline.moveTo(editlanddrawdata[n].left.x - minx, editlanddrawdata[n].left.y - miny);
clipline.curveTo(editlanddrawdata[n].bezleft.x - minx, editlanddrawdata[n].bezleft.y - miny, editlanddrawdata[n].middle.x - minx, editlanddrawdata[n].middle.y - miny);
clipline.curveTo(editlanddrawdata[n].bezright.x - minx, editlanddrawdata[n].bezright.y - miny, editlanddrawdata[n].right.x - minx, editlanddrawdata[n].right.y - miny);
screenPoints.push({n:n, x:editlanddrawdata[n].right.x - minx, y:editlanddrawdata[n].right.y - miny});
var _local3 = editlanddrawdata[n].bonus.length - 1;
while (_local3 >= 0) {
var _local5 = editlanddrawdata[n].bonus[_local3].bonus;
_root.editwaterline["bonusp" + _local5].duplicateMovieClip("bl" + nbbonus, nbbonus + 100);
_root.editwaterline["bl" + nbbonus]._x = (editlanddrawdata[n].bonus[_local3].x + editlanddrawdata[n].left.x) - minx;
_root.editwaterline["bl" + nbbonus]._y = (editlanddrawdata[n].bonus[_local3].y + editlanddrawdata[n].left.y) - miny;
if (_local5 == 8) {
_root.editwaterline["bl" + nbbonus].infotxt.text = editlanddrawdata[n].bonus[_local3].t;
_root.editwaterline["bl" + nbbonus].infotxt.border = true;
_root.editwaterline["bl" + nbbonus].infotxt._height = _root.editwaterline["bl" + nbbonus].infotxt.textHeight + 20;
_root.editwaterline["bl" + nbbonus].infotxt._width = _root.editwaterline["bl" + nbbonus].infotxt.textWidth + 20;
}
stageBonus.push({bonus:editlanddrawdata[n].bonus[_local3].bonus, clip:_root.editwaterline["bl" + nbbonus], txt:editlanddrawdata[n].bonus[_local3].t, index1:n, index2:_local3});
nbbonus++;
_local3--;
}
if (editlanddrawdata[n].w == 0) {
_local15.push(n);
}
n++;
_local17 = editlanddrawdata[n].left.x;
}
var _local16 = false;
if (editcheckpoints.length > 0) {
if (editcheckpoints[lastcheckpoint].x >= minx) {
if (editcheckpoints[lastcheckpoint].x < (minx + 600)) {
_local16 = true;
_root.checkpointborderedit._x = editcheckpoints[lastcheckpoint].x - minx;
_root.checkpointborderedit.infotxt.text = editcheckpoints[lastcheckpoint].time + " seconds";
} else {
var _local7 = lastcheckpoint - 1;
while ((_local7 >= 0) && (editcheckpoints[_local7].x >= minx)) {
if (editcheckpoints[_local7].x < (minx + 600)) {
lastcheckpoint = _local7;
_local16 = true;
_root.checkpointborderedit.infotxt.text = editcheckpoints[lastcheckpoint].time + " seconds";
_root.checkpointborderedit._x = editcheckpoints[lastcheckpoint].x - minx;
break;
}
_local7--;
}
}
} else {
var _local7 = lastcheckpoint + 1;
while ((_local7 < editcheckpoints.length) && (editcheckpoints[_local7].x < (minx + 600))) {
if (editcheckpoints[_local7].x >= minx) {
lastcheckpoint = _local7;
_local16 = true;
_root.checkpointborderedit.infotxt.text = editcheckpoints[lastcheckpoint].time + " seconds";
_root.checkpointborderedit._x = editcheckpoints[lastcheckpoint].x - minx;
break;
}
_local7++;
}
}
}
if (!_local16) {
_root.checkpointborderedit._x = -100;
}
if (curmoven < 0) {
_root.editwaterline.clear();
_root.editwaterline.lineStyle(0, 0, 0);
var _local9 = _local15.length - 1;
while (_local9 >= 0) {
var _local4 = _local15[_local9];
_root.editwaterline.beginFill(2237183, 50);
_root.editwaterline.moveTo(editlanddrawdata[_local4].left.x - minx, editlanddrawdata[_local4].left.y - miny);
_root.editwaterline.curveTo(editlanddrawdata[_local4].bezleft.x - minx, editlanddrawdata[_local4].bezleft.y - miny, editlanddrawdata[_local4].middle.x - minx, editlanddrawdata[_local4].middle.y - miny);
_root.editwaterline.curveTo(editlanddrawdata[_local4].bezright.x - minx, editlanddrawdata[_local4].bezright.y - miny, editlanddrawdata[_local4].right.x - minx, editlanddrawdata[_local4].right.y - miny);
_root.editwaterline.curveTo(editlanddrawdata[_local4 + 1].bezleft.x - minx, editlanddrawdata[_local4 + 1].bezleft.y - miny, editlanddrawdata[_local4 + 1].middle.x - minx, editlanddrawdata[_local4 + 1].middle.y - miny);
_root.editwaterline.curveTo(editlanddrawdata[_local4 + 1].bezright.x - minx, editlanddrawdata[_local4 + 1].bezright.y - miny, editlanddrawdata[_local4 + 1].right.x - minx, editlanddrawdata[_local4 + 1].right.y - miny);
_root.editwaterline.endFill();
_local9--;
}
}
if (curmoven >= 0) {
clipline.lineStyle(2, "0x367EC9");
clipline.moveTo(CPmoving.left.x - minx, CPmoving.left.y - miny);
clipline.curveTo(CPmoving.bezleft.x - minx, CPmoving.bezleft.y - miny, CPmoving.middle.x - minx, CPmoving.middle.y - miny);
clipline.curveTo(CPmoving.bezright.x - minx, CPmoving.bezright.y - miny, CPmoving.right.x - minx, CPmoving.right.y - miny);
clipline.lineStyle(0.5, "0x39FE36");
clipline.moveTo(CPmoving.center.x - minx, CPmoving.center.y - miny);
clipline.lineTo((CPmoving.center.x - minx) - ((Math.cos(CPmoving.limitRAng) * 1000) * CPmoving.s), (CPmoving.center.y - miny) - ((Math.sin(CPmoving.limitRAng) * 1000) * CPmoving.s));
clipline.moveTo(CPmoving.center.x - minx, CPmoving.center.y - miny);
clipline.lineTo((CPmoving.center.x - minx) - ((Math.cos(CPmoving.lAng) * 1000) * CPmoving.s), (CPmoving.center.y - miny) - ((Math.sin(CPmoving.lAng) * 1000) * CPmoving.s));
}
}
function dragPoint(n) {
curmoven = n;
var _local7 = (editlanddrawdata[n].center.x - editlanddrawdata[n].left.x) / (editlanddrawdata[n].center.y - editlanddrawdata[n].left.y);
var _local4 = editlanddrawdata[n].left.x - (_local7 * editlanddrawdata[n].left.y);
_root.CPmoving = {n:n, left:editlanddrawdata[n].left, middle:editlanddrawdata[n].middle, right:editlanddrawdata[n].right, bezright:editlanddrawdata[n].bezright, bezleft:editlanddrawdata[n].bezleft, center:editlanddrawdata[n].center, a:_local7, b:_local4, s:editlanddrawdata[n].s, r:editlanddrawdata[n].r, lAng:editlanddrawdata[n].lAng, rAng:editlanddrawdata[n].rAng, limitRAng:editlanddrawdata[n].rAng};
}
function movePoint(x, y) {
x = approx(x, virg);
y = approx(y, virg);
var _local7 = 2 * ((CPmoving.left.y - y) + (CPmoving.a * (CPmoving.left.x - x)));
if (_local7 != 0) {
var _local2 = ((((Math.pow(CPmoving.left.y, 2) - (y * y)) + Math.pow(CPmoving.left.x, 2)) - (x * x)) + ((2 * CPmoving.b) * (x - CPmoving.left.x))) / _local7;
var _local4 = (CPmoving.a * _local2) + CPmoving.b;
var _local5 = Math.sqrt(Math.pow(x - _local4, 2) + Math.pow(y - _local2, 2));
if (_local5 > minR) {
if ((_local2 * CPmoving.s) > (CPmoving.left.y * CPmoving.s)) {
var _local3 = approx(_root.getPolar({x:(_local4 - x) * CPmoving.s, y:(_local2 - y) * CPmoving.s}).a, 100);
if (((((_local3 * CPmoving.s) < ((Math.PI/2) + ((CPmoving.s * Math.PI) / 2))) && ((_local3 * CPmoving.s) > (CPmoving.lAng * CPmoving.s))) && (_local3 > secureAng)) && (_local3 < (Math.PI - secureAng))) {
CPmoving.right = {x:x, y:y};
CPmoving.center.x = _local4;
CPmoving.center.y = _local2;
CPmoving.r = _local5;
CPmoving.rAng = _local3;
var _local6 = {x:_local4 - ((CPmoving.s * _local5) * Math.cos((CPmoving.lAng + CPmoving.rAng) / 2)), y:_local2 - ((CPmoving.s * _local5) * Math.sin((CPmoving.lAng + CPmoving.rAng) / 2))};
var _local8 = bezierPoint(CPmoving.left, CPmoving.lAng + (Math.PI/2), _local6, ((CPmoving.lAng + CPmoving.rAng) / 2) + (Math.PI/2));
var _local9 = bezierPoint(_local6, ((CPmoving.lAng + CPmoving.rAng) / 2) + (Math.PI/2), {x:x, y:y}, CPmoving.rAng + (Math.PI/2));
CPmoving.bezleft = _local8;
CPmoving.bezright = _local9;
CPmoving.middle = _local6;
draw(curn, editline);
}
}
}
}
}
function getNP(p, allover) {
if (allover) {
var _local6 = 0;
var _local7 = editlanddrawdata.length;
var _local1;
while (true) {
var _local4 = _local1;
_local1 = Math.floor((_local6 + _local7) / 2);
if (_local1 == _local4) {
break;
}
if (p.x < editlanddrawdata[_local1].left.x) {
_local7 = _local1 + 1;
} else if (p.x >= editlanddrawdata[_local1].right.x) {
_local6 = _local1;
} else {
return(_local1);
}
}
} else {
var _local5 = minx;
var _local2 = curn;
while (_local5 < (minx + 600)) {
if ((p.x >= editlanddrawdata[_local2].left.x) && (p.x < editlanddrawdata[_local2].right.x)) {
return(_local2);
}
_local2++;
_local5 = editlanddrawdata[_local2].left.x;
}
}
return(-1);
}
function sortCheckpoints() {
var _local4 = new Array();
var _local2 = 0;
while (_local2 < editcheckpoints.length) {
var _local1 = _local2;
while (_local1 < editcheckpoints.length) {
if (editcheckpoints[_local1].x < editcheckpoints[_local2].x) {
var _local3 = editcheckpoints[_local2];
editcheckpoints[_local2] = editcheckpoints[_local1];
editcheckpoints[_local1] = _local3;
}
_local1++;
}
_local2++;
}
}
function addBonus(nb, p, lab, allover) {
if (nb == -2) {
var _local5 = false;
var _local2 = 0;
while (_local2 < editcheckpoints.length) {
if (Math.abs(p.x - editcheckpoints[_local2].x) < 800) {
_local5 = true;
break;
}
_local2++;
}
if (!_local5) {
if (lab == "") {
labelask._y = 150;
labelask.infotxt.text = "Enter the number of seconds to reach this checkpoint";
if (curmovebonustxt != "") {
labelask.inputtxt.text = curmovebonustxt;
} else {
labelask.inputtxt.text = "60";
}
editcheckpoints.push({x:approx(p.x, virg), time:60});
_root.labelOK = function () {
if ((Number(labelask.inputtxt.text) + "") != "NaN") {
labelask._y = -500;
editcheckpoints[editcheckpoints.length - 1].time = Math.round(Number(labelask.inputtxt.text));
sortCheckpoints();
curmovebonus = bonusnotmoved;
draw(curn, editline);
}
};
} else {
editcheckpoints.push({x:approx(p.x, virg), time:Number(lab)});
sortCheckpoints();
curmovebonus = bonusnotmoved;
draw(curn, editline);
}
}
} else if (nb == -1) {
curmovebonus = bonusnotmoved;
var _local4 = getNP(p);
var _local7 = editlanddrawdata[_local4].w;
if (_local7 >= 0) {
editlanddrawdata[_local4 - _local7].w = -1;
editlanddrawdata[(_local4 - _local7) + 1].w = -1;
draw(curn, editline);
} else if (editlanddrawdata[_local4].s == -1) {
if (editlanddrawdata[_local4 - 1].s == -1) {
_local4--;
}
editlanddrawdata[_local4].w = 0;
editlanddrawdata[_local4 + 1].w = 1;
dragPoint(_local4);
computeFollowingNodes();
curmoven = -1;
draw(curn, editline);
}
} else {
var _local4 = getNP(p, allover);
if (_local4 >= 0) {
if (nb == 8) {
if (lab == "") {
labelask._y = 150;
labelask.infotxt.text = "Enter the label that will be displayed during the game";
if (curmovebonustxt != "") {
labelask.inputtxt.text = curmovebonustxt;
} else {
labelask.inputtxt.text = "Label";
}
editlanddrawdata[_local4].bonus.push({bonus:nb, x:p.x - editlanddrawdata[_local4].left.x, y:p.y - editlanddrawdata[_local4].left.y, t:"Label"});
labelvar1 = editlanddrawdata[_local4].bonus;
_root.labelOK = function () {
curmovebonus = bonusnotmoved;
labelask._y = -500;
labelvar1[labelvar1.length - 1].t = labelask.inputtxt.text;
draw(curn, editline);
};
} else {
editlanddrawdata[_local4].bonus.push({bonus:nb, x:p.x - editlanddrawdata[_local4].left.x, y:p.y - editlanddrawdata[_local4].left.y, t:lab});
curmovebonus = bonusnotmoved;
draw(curn, editline);
}
} else {
curmovebonus = bonusnotmoved;
editlanddrawdata[_local4].bonus.push({bonus:nb, x:p.x - editlanddrawdata[_local4].left.x, y:p.y - editlanddrawdata[_local4].left.y, t:""});
draw(curn, editline);
}
}
}
}
function computeFollowingNodes() {
editlanddrawdata[curmoven].center = CPmoving.center;
editlanddrawdata[curmoven].middle = CPmoving.middle;
editlanddrawdata[curmoven].r = CPmoving.r;
editlanddrawdata[curmoven].rAng = CPmoving.rAng;
editlanddrawdata[curmoven].right = CPmoving.right;
editlanddrawdata[curmoven].bezleft = CPmoving.bezleft;
editlanddrawdata[curmoven].bezright = CPmoving.bezright;
if (editlanddrawdata[curmoven].w == 0) {
if (editlanddrawdata[curmoven].left.y >= editlanddrawdata[curmoven].right.y) {
editlanddrawdata[curmoven].w = -1;
editlanddrawdata[curmoven + 1].w = -1;
}
}
var _local1 = curmoven + 1;
while (_local1 < editlanddrawdata.length) {
var _local4 = editlanddrawdata[_local1 - 1].bonus;
var _local2 = _local4.length - 1;
while (_local2 >= 0) {
if ((_local4[_local2].x + editlanddrawdata[_local1 - 1].left.x) >= editlanddrawdata[_local1 - 1].right.x) {
editlanddrawdata[_local1].bonus.push({bonus:_local4[_local2].bonus, x:(editlanddrawdata[_local1 - 1].left.x + _local4[_local2].x) - editlanddrawdata[_local1 - 1].right.x, y:(editlanddrawdata[_local1 - 1].left.y + _local4[_local2].y) - editlanddrawdata[_local1 - 1].right.y, t:_local4[_local2].t});
_local4.splice(_local2, 1);
}
_local2--;
}
if (editlanddrawdata[_local1].lAng != editlanddrawdata[_local1 - 1].rAng) {
var _local10 = Math.abs(editlanddrawdata[_local1].rAng - editlanddrawdata[_local1].lAng);
editlanddrawdata[_local1].lAng = editlanddrawdata[_local1 - 1].rAng;
if (editlanddrawdata[_local1].s == 1) {
if (editlanddrawdata[_local1].lAng >= editlanddrawdata[_local1].rAng) {
editlanddrawdata[_local1].rAng = ((editlanddrawdata[_local1].lAng + Math.PI) - secureAng) / 2;
}
} else if (editlanddrawdata[_local1].lAng <= editlanddrawdata[_local1].rAng) {
editlanddrawdata[_local1].rAng = (editlanddrawdata[_local1].lAng + secureAng) / 2;
}
editlanddrawdata[_local1].r = editlanddrawdata[_local1].r * (_local10 / Math.abs(editlanddrawdata[_local1].rAng - editlanddrawdata[_local1].lAng));
if (editlanddrawdata[_local1].r < minR) {
editlanddrawdata[_local1].r = minR;
}
}
editlanddrawdata[_local1].left = editlanddrawdata[_local1 - 1].right;
editlanddrawdata[_local1].center = {x:editlanddrawdata[_local1].left.x + ((editlanddrawdata[_local1].s * editlanddrawdata[_local1].r) * Math.cos(editlanddrawdata[_local1].lAng)), y:editlanddrawdata[_local1].left.y + ((editlanddrawdata[_local1].s * editlanddrawdata[_local1].r) * Math.sin(editlanddrawdata[_local1].lAng))};
if (editlanddrawdata[_local1].w == 1) {
if (editlanddrawdata[_local1 - 1].left.y < (editlanddrawdata[_local1].center.y + (editlanddrawdata[_local1].r * Math.sin(secureAng)))) {
var _local11 = Math.abs((editlanddrawdata[_local1 - 1].left.y - editlanddrawdata[_local1].left.y) / Math.sin(editlanddrawdata[_local1].lAng));
editlanddrawdata[_local1].r = _local11 / (1 - (Math.sin(secureAng) / Math.cos(editlanddrawdata[_local1].lAng - (Math.PI/2))));
editlanddrawdata[_local1].center = {x:editlanddrawdata[_local1].left.x + ((editlanddrawdata[_local1].s * editlanddrawdata[_local1].r) * Math.cos(editlanddrawdata[_local1].lAng)), y:editlanddrawdata[_local1].left.y + ((editlanddrawdata[_local1].s * editlanddrawdata[_local1].r) * Math.sin(editlanddrawdata[_local1].lAng))};
}
editlanddrawdata[_local1].rAng = Math.asin((editlanddrawdata[_local1 - 1].left.y - editlanddrawdata[_local1].center.y) / editlanddrawdata[_local1].r);
}
var _local8 = editlanddrawdata[_local1].rAng;
var _local3 = virg;
if (editlanddrawdata[_local1].s > 0) {
var _local5 = approxinf(editlanddrawdata[_local1].rAng, _local3);
while ((((_local5 <= editlanddrawdata[_local1].lAng) || (_local5 <= secureAng)) || (_local5 >= (Math.PI - secureAng))) && (_local3 < 1000000000)) {
_local3 = _local3 * 10;
_local5 = approxinf(editlanddrawdata[_local1].rAng, _local3);
}
} else {
var _local5 = approxsup(editlanddrawdata[_local1].rAng, _local3);
while ((((_local5 >= editlanddrawdata[_local1].lAng) || (_local5 <= secureAng)) || (_local5 >= (Math.PI - secureAng))) && (_local3 < 1000000000)) {
_local3 = _local3 * 10;
_local5 = approxsup(editlanddrawdata[_local1].rAng, _local3);
}
}
editlanddrawdata[_local1].rAng = _local5;
var _local6 = (editlanddrawdata[_local1].lAng + editlanddrawdata[_local1].rAng) / 2;
editlanddrawdata[_local1].middle = {x:editlanddrawdata[_local1].center.x - ((editlanddrawdata[_local1].s * editlanddrawdata[_local1].r) * Math.cos(_local6)), y:editlanddrawdata[_local1].center.y - ((editlanddrawdata[_local1].s * editlanddrawdata[_local1].r) * Math.sin(_local6))};
editlanddrawdata[_local1].right = {x:approx(editlanddrawdata[_local1].center.x - ((editlanddrawdata[_local1].s * editlanddrawdata[_local1].r) * Math.cos(_local8)), virg), y:approx(editlanddrawdata[_local1].center.y - ((editlanddrawdata[_local1].s * editlanddrawdata[_local1].r) * Math.sin(_local8)), virg)};
var _local9 = bezierPoint(editlanddrawdata[_local1].left, editlanddrawdata[_local1].lAng + (Math.PI/2), editlanddrawdata[_local1].middle, _local6 + (Math.PI/2));
var _local12 = bezierPoint(editlanddrawdata[_local1].middle, _local6 + (Math.PI/2), editlanddrawdata[_local1].right, editlanddrawdata[_local1].rAng + (Math.PI/2));
editlanddrawdata[_local1].bezleft = _local9;
editlanddrawdata[_local1].bezright = _local12;
if (editlanddrawdata[_local1].w == 0) {
if (editlanddrawdata[_local1].left.y >= editlanddrawdata[_local1].right.y) {
editlanddrawdata[_local1].w = -1;
editlanddrawdata[_local1 + 1].w = -1;
}
}
_local1++;
}
}
function exportMap() {
editmap = "v1.00_";
editmap = editmap + (editcheckpoints.length + "_");
var _local4;
var _local5;
_local4 = 0;
var _local3 = 0;
while (_local3 < editcheckpoints.length) {
editmap = editmap + (((((editcheckpoints[_local3].x - _local4) * virg) + "_") + editcheckpoints[_local3].time) + "_");
_local4 = editcheckpoints[_local3].x;
_local3++;
}
editmap = editmap + (editlanddrawdata.length + "_");
var _local6 = 0;
_local4 = 0;
_local5 = 0;
_local3 = 0;
while (_local3 < editlanddrawdata.length) {
_local6 = _local6 + editlanddrawdata[_local3].bonus.length;
if (editlanddrawdata[_local3].w == 0) {
_local6++;
}
editmap = editmap + ((((((approx(editlanddrawdata[_local3].left.x - _local4, virg) * virg) + "_") + (approx(editlanddrawdata[_local3].left.y - _local5, virg) * virg)) + "_") + editlanddrawdata[_local3].lAng) + "_");
_local4 = approx(editlanddrawdata[_local3].left.x, virg);
_local5 = approx(editlanddrawdata[_local3].left.y, virg);
_local3++;
}
editmap = editmap + ((((((approx(editlanddrawdata[editlanddrawdata.length - 1].right.x - _local4, virg) * virg) + "_") + (approx(editlanddrawdata[editlanddrawdata.length - 1].right.y - _local5, virg) * virg)) + "_") + editlanddrawdata[editlanddrawdata.length - 1].rAng) + "_");
editmap = editmap + (_local6 + "_");
_local3 = 0;
while (_local3 < editlanddrawdata.length) {
var _local2 = editlanddrawdata[_local3].bonus;
var _local1 = 0;
while (_local1 < _local2.length) {
editmap = editmap + (((((((_local2[_local1].bonus + "_") + _local3) + "_") + (approx(_local2[_local1].x, virg) * virg)) + "_") + (approx(_local2[_local1].y, virg) * virg)) + "_");
if (_local2[_local1].bonus == 8) {
editmap = editmap + (_local2[_local1].t + "_");
}
_local1++;
}
if (editlanddrawdata[_local3].w == 0) {
editmap = editmap + (("-1_" + _local3) + "_");
}
_local3++;
}
trace(editmap);
}
stop();
var minR = 40;
var secureAng = 0.15707963267949;
var miny = 0;
var minx = 0;
var editlanddrawdata = new Array();
var screenPoints = new Array();
var stageBonus = new Array();
var editcheckpoints = new Array();
var curmoven = -1;
var bonusnotmoved = -3;
var nbbbonus = 9;
var origbonuspos;
var curmovebonus = bonusnotmoved;
var curmovebonustxt = "";
var curn = 0;
var CPmoving;
transit.gotoAndPlay("open");
if (map == "") {
init();
addSegment(1);
} else {
loadMap(map);
var i = 0;
while (i < landdrawdata.length) {
editlanddrawdata.push({bonus:new Array(), left:landdrawdata[i].left, middle:landdrawdata[i].middle, right:landdrawdata[i].right, lAng:landdrawdata[i].lAng, rAng:landdrawdata[i].rAng, bezleft:landdrawdata[i].bezleft, bezright:landdrawdata[i].bezright, r:landdrawdata[i].r, s:landdrawdata[i].s, w:landdrawdata[i].w, center:landdrawdata[i].center});
i++;
}
var i = 0;
while (i < objects.length) {
if (objects[i].length != undefined) {
var j = 0;
while (j < objects[i].length) {
addBonus(objects[i][j].ident, {x:objects[i][j]._x, y:objects[i][j]._y}, objects[i][j]._label, true);
j++;
}
}
i++;
}
var i = 0;
while (i < checkpoints.length) {
editcheckpoints.push({x:checkpoints[i], time:(countdownmaxes[i] + 1) / framerate});
i++;
}
}
var nbbonus = -1;
var lastcheckpoint = 0;
var labelvar1;
this.onMouseDown = function () {
if (labelask._y < 0) {
if (curmoven >= 0) {
computeFollowingNodes();
if (editlanddrawdata[curmoven].w >= 1) {
dragPoint(curmoven - 1);
computeFollowingNodes();
}
curmoven = -1;
draw(curn, editline);
} else if (curmovebonus > bonusnotmoved) {
var _local2 = _root.trash.getBounds();
_local2.xMin = _local2.xMin + _root.trash._x;
_local2.xMax = _local2.xMax + _root.trash._x;
_local2.yMin = _local2.yMin + _root.trash._y;
_local2.yMax = _local2.yMax + _root.trash._y;
_root["bonus" + curmovebonus]._x = origbonuspos.x;
_root["bonus" + curmovebonus]._y = origbonuspos.y;
if ((((_xmouse > _local2.xMin) && (_xmouse < _local2.xMax)) && (_ymouse > _local2.yMin)) && (_ymouse < _local2.yMax)) {
curmovebonus = bonusnotmoved;
} else {
addBonus(curmovebonus, {x:_xmouse + minx, y:_ymouse + miny}, "", false);
}
} else {
var _local4 = false;
if (!_local4) {
var _local3 = stageBonus.length - 1;
while (_local3 >= 0) {
var _local2 = stageBonus[_local3].clip.getBounds();
_local2.xMin = _local2.xMin + stageBonus[_local3].clip._x;
_local2.xMax = _local2.xMax + stageBonus[_local3].clip._x;
_local2.yMin = _local2.yMin + stageBonus[_local3].clip._y;
_local2.yMax = _local2.yMax + stageBonus[_local3].clip._y;
if (stageBonus[_local3].clip.hitTest(_root._xmouse, _root._ymouse, true)) {
stageBonus[_local3].clip.removeMovieClip();
curmovebonus = stageBonus[_local3].bonus;
curmovebonustxt = stageBonus[_local3].txt;
origbonuspos = {x:_root["bonus" + curmovebonus]._x, y:_root["bonus" + curmovebonus]._y};
editlanddrawdata[stageBonus[_local3].index1].bonus.splice(stageBonus[_local3].index2, 1);
_local4 = true;
draw(curn, editline);
break;
}
push({bonus:editlanddrawdata[n].bonus[j].bonus, clip:_root["bl" + nbbonus], index1:n, index2:j});
_local3--;
}
}
if (!_local4) {
var _local3 = bonusnotmoved + 1;
while (_local3 < nbbbonus) {
var _local2 = _root["bonus" + _local3].getBounds();
_local2.xMin = _local2.xMin + _root["bonus" + _local3]._x;
_local2.xMax = _local2.xMax + _root["bonus" + _local3]._x;
_local2.yMin = _local2.yMin + _root["bonus" + _local3]._y;
_local2.yMax = _local2.yMax + _root["bonus" + _local3]._y;
if ((((_xmouse > _local2.xMin) && (_xmouse < _local2.xMax)) && (_ymouse > _local2.yMin)) && (_ymouse < _local2.yMax)) {
curmovebonus = _local3;
curmovebonustxt = "";
origbonuspos = {x:_root["bonus" + curmovebonus]._x, y:_root["bonus" + curmovebonus]._y};
_local4 = true;
break;
}
_local3++;
}
}
if (!_local4) {
var _local3 = 0;
while (_local3 < screenPoints.length) {
var _local5 = {x:_xmouse - screenPoints[_local3].x, y:_ymouse - screenPoints[_local3].y};
var _local6 = Math.pow(_local5.x, 2) + Math.pow(_local5.y, 2);
if (_local6 < 100) {
_local4 = true;
dragPoint(screenPoints[_local3].n);
break;
}
_local3++;
}
}
if (!_local4) {
if (_root.checkpointborderedit.hitTest(_root._xmouse, _root._ymouse, true)) {
curmovebonus = -2;
curmovebonustxt = editcheckpoints[lastcheckpoint].time;
editcheckpoints.splice(lastcheckpoint, 1);
origbonuspos = {x:_root["bonus" + curmovebonus]._x, y:_root["bonus" + curmovebonus]._y};
_local4 = true;
draw(curn, editline);
}
}
}
}
};
var ymoveframe = 0;
var xmoveframe = 0;
var xlastmoveframe = 0;
var scrolllimit = 20;
this.onEnterFrame = function () {
if (curmoven >= 0) {
movePoint(_xmouse + minx, _ymouse + miny);
} else if (curmovebonus > bonusnotmoved) {
if (labelask._y < 0) {
_root["bonus" + curmovebonus]._x = _xmouse;
_root["bonus" + curmovebonus]._y = _ymouse;
}
} else {
if (_xmouse < scrolllimit) {
if (curn > 0) {
if (xmoveframe == 0) {
xlastmoveframe = xmoveframe - 1000;
}
xmoveframe++;
if ((xmoveframe - xlastmoveframe) >= Math.floor(200 / (10 + xmoveframe))) {
xlastmoveframe = xmoveframe;
curn = curn - Math.ceil(xmoveframe / 100);
}
if (curn < 0) {
curn = 0;
}
draw(curn, editline);
}
} else if (_xmouse > (600 - scrolllimit)) {
if (curn < (editlanddrawdata.length - 1)) {
if (xmoveframe == 0) {
xlastmoveframe = xmoveframe - 1000;
}
xmoveframe++;
if ((xmoveframe - xlastmoveframe) >= Math.floor(200 / (10 + xmoveframe))) {
xlastmoveframe = xmoveframe;
curn = curn + Math.ceil(xmoveframe / 100);
}
if (curn > (editlanddrawdata.length - 1)) {
curn = editlanddrawdata.length - 1;
}
draw(curn, editline);
}
} else {
xmoveframe = 0;
}
if (_ymouse < scrolllimit) {
ymoveframe++;
miny = miny - Math.log(Math.pow(ymoveframe, 4));
draw(curn, editline);
} else if (_ymouse > (400 - scrolllimit)) {
ymoveframe++;
miny = miny + Math.log(Math.pow(ymoveframe, 4));
draw(curn, editline);
} else {
ymoveframe = 0;
}
}
};
Instance of Symbol 406 MovieClip "editline" in Frame 5
onClipEvent (keyDown) {
if ((!_root.replay) && (!_root.gameoverb)) {
t = Key.getCode();
if (keyDownAction(t)) {
_root.onekeydown = true;
_root.record.push({frame:_root.frame, down:true, code:t});
}
}
}
onClipEvent (load) {
function keyDownAction(t) {
toreturn = false;
if (t == 39) {
if (!_root.rightDown) {
_root.rightDown = true;
_root.weight[1] = 2.7;
if (_root.boostcountdown < 0) {
_root.weight[1] = _root.weight[1] * _root.boostratio;
}
_root.cars[0].frontWheel(6);
toreturn = true;
}
} else if (t == 37) {
if (!_root.leftDown) {
_root.leftDown = true;
_root.weight[0] = 2.7;
if (_root.boostcountdown < 0) {
_root.weight[0] = _root.weight[0] * _root.boostratio;
}
_root.cars[0].backWheel(6);
toreturn = true;
}
} else if (t == 38) {
if (!_root.upDown) {
_root.upDown = true;
_root.tract = 1;
if (_root.boostcountdown > -1) {
_root.tract = _root.tract * _root.boostratio;
}
toreturn = true;
}
} else if (t == 40) {
if (!_root.downDown) {
_root.downDown = true;
_root.tract = -1;
if (_root.boostcountdown > -1) {
_root.tract = _root.tract * _root.boostratio;
}
toreturn = true;
}
} else if (t == 32) {
if (!_root.spaceDown) {
_root.spaceDown = true;
toreturn = true;
}
}
return(toreturn);
}
function keyUpAction(t) {
toreturn = false;
if (t == 39) {
toreturn = true;
_root.rightDown = false;
_root.weight[1] = 1;
_root.cars[0].frontWheel(0);
} else if (t == 37) {
toreturn = true;
_root.leftDown = false;
_root.weight[0] = 1;
_root.cars[0].backWheel(0);
} else if (t == 38) {
toreturn = true;
_root.upDown = false;
if (!_root.downDown) {
_root.tract = 0;
}
} else if (t == 40) {
toreturn = true;
_root.downDown = false;
if (!_root.upDown) {
_root.tract = 0;
}
} else if (t == 32) {
toreturn = true;
_root.spaceDown = false;
if ((_root.bar < 1) && (_root.jump == -1)) {
_root.jump = 0;
}
}
return(toreturn);
}
}
Instance of Symbol 414 MovieClip "editwaterline" in Frame 5
onClipEvent (keyDown) {
if ((!_root.replay) && (!_root.gameoverb)) {
t = Key.getCode();
if (keyDownAction(t)) {
_root.onekeydown = true;
_root.record.push({frame:_root.frame, down:true, code:t});
}
}
}
onClipEvent (load) {
function keyDownAction(t) {
toreturn = false;
if (t == 39) {
if (!_root.rightDown) {
_root.rightDown = true;
_root.weight[1] = 2.7;
if (_root.boostcountdown < 0) {
_root.weight[1] = _root.weight[1] * _root.boostratio;
}
_root.cars[0].frontWheel(6);
toreturn = true;
}
} else if (t == 37) {
if (!_root.leftDown) {
_root.leftDown = true;
_root.weight[0] = 2.7;
if (_root.boostcountdown < 0) {
_root.weight[0] = _root.weight[0] * _root.boostratio;
}
_root.cars[0].backWheel(6);
toreturn = true;
}
} else if (t == 38) {
if (!_root.upDown) {
_root.upDown = true;
_root.tract = 1;
if (_root.boostcountdown > -1) {
_root.tract = _root.tract * _root.boostratio;
}
toreturn = true;
}
} else if (t == 40) {
if (!_root.downDown) {
_root.downDown = true;
_root.tract = -1;
if (_root.boostcountdown > -1) {
_root.tract = _root.tract * _root.boostratio;
}
toreturn = true;
}
} else if (t == 32) {
if (!_root.spaceDown) {
_root.spaceDown = true;
toreturn = true;
}
}
return(toreturn);
}
function keyUpAction(t) {
toreturn = false;
if (t == 39) {
toreturn = true;
_root.rightDown = false;
_root.weight[1] = 1;
_root.cars[0].frontWheel(0);
} else if (t == 37) {
toreturn = true;
_root.leftDown = false;
_root.weight[0] = 1;
_root.cars[0].backWheel(0);
} else if (t == 38) {
toreturn = true;
_root.upDown = false;
if (!_root.downDown) {
_root.tract = 0;
}
} else if (t == 40) {
toreturn = true;
_root.downDown = false;
if (!_root.upDown) {
_root.tract = 0;
}
} else if (t == 32) {
toreturn = true;
_root.spaceDown = false;
if ((_root.bar < 1) && (_root.jump == -1)) {
_root.jump = 0;
}
}
return(toreturn);
}
}
Instance of Symbol 416 MovieClip "plusb" in Frame 5
on (press) {
_root.addSegment(_root.curn);
}
Instance of Symbol 431 MovieClip "saveb" in Frame 5
on (press) {
_root.exportMap();
}
Frame 6
stop();
transit.gotoAndPlay("open");
Symbol 28 MovieClip [CheckThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 39 MovieClip [CheckBoxAssets] Frame 1
#initclip 44
mx.controls.CheckBox.prototype.adjustFocusRect = function () {
var _local4 = this._parent.focus_mc;
var _local2 = this.iconName;
var _local3 = this.getStyle("themeColor");
if (_local3 == undefined) {
_local3 = 8453965 /* 0x80FF4D */;
}
var _local8 = _local2._width + 4;
var _local5 = _local2._height + 4;
_local4.setSize(_local8, _local5, 0, 100, _local3);
var _local7 = _local2._x;
var _local6 = _local2._y;
_local4.move((this.x - 2) + _local7, (this.y + _local6) - 2);
};
#endinitclip
Symbol 41 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 43 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 46 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 48 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 51 MovieClip [Defaults] Frame 1
#initclip 45
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 52 MovieClip [UIObjectExtensions] Frame 1
#initclip 46
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 53 MovieClip [UIObject] Frame 1
#initclip 47
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 56 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 57 MovieClip Frame 1
#initclip 48
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 58 MovieClip [FocusRect] Frame 1
#initclip 49
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 59 MovieClip [FocusManager] Frame 1
#initclip 50
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 60 MovieClip [UIComponentExtensions] Frame 1
#initclip 51
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 61 MovieClip [UIComponent] Frame 1
#initclip 52
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 62 MovieClip [SimpleButton] Frame 1
#initclip 53
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 63 MovieClip [Border] Frame 1
#initclip 54
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 64 MovieClip [RectBorder] Frame 1
#initclip 55
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 65 MovieClip [ButtonSkin] Frame 1
#initclip 56
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 66 MovieClip [Button] Frame 1
#initclip 57
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 62 MovieClip [SimpleButton] in Symbol 66 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 67 MovieClip [CheckBox] Frame 1
#initclip 58
Object.registerClass("CheckBox", mx.controls.CheckBox);
#endinitclip
stop();
Instance of Symbol 66 MovieClip [Button] in Symbol 67 MovieClip [CheckBox] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 92 MovieClip Frame 1
largeurBarre = getProperty(barre, _width);
Symbol 92 MovieClip Frame 2
stop();
onEnterFrame = function () {
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes - loaded_bytes;
pourcentage = loaded_bytes / total_bytes;
percent_done = int(pourcentage * 100);
setProperty(barre, _width , int(largeurBarre * pourcentage));
ifFrameLoaded (1) {
if (_root.introanimok) {
_root.gotoAndStop(2);
}
_root.skip._visible = true;
}
};
Symbol 92 MovieClip Frame 3
gotoAndPlay (2);
Symbol 105 MovieClip Frame 1
stop();
var mouseover = false;
onRollOut = function () {
mouseover = false;
};
onRollOver = function () {
mouseover = true;
gotoAndPlay (2);
};
Symbol 105 MovieClip Frame 9
gotoAndStop (1);
Symbol 434 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.5");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 435 MovieClip [__Packages.Tuto] Frame 0
class Tuto
{
var clip, dispArray;
function Tuto (c) {
clip = c;
clip.pilote = this;
clip.frame = -1;
clip.endframe = -1;
clip._visible = false;
clip.endCurrent = function () {
if (this.frame < (this.endframe - 10)) {
this.frame = this.endframe - 10;
}
};
init();
}
function init() {
dispArray = new Array();
}
function clearit() {
clip.endCurrent();
dispArray = new Array();
}
function tutoEnd() {
clip._visible = false;
clip.stop();
clip.onEnterFrame = -1;
dispArray.splice(0, 1);
nextTuto();
}
function initCurrentTutoKeys() {
if (dispArray.length > 0) {
if (dispArray[0].keys.length == 0) {
clip.minik._visible = false;
} else {
clip.minik._visible = true;
clip.minik.releaseall();
var _local2 = 0;
while (_local2 < dispArray[0].keys.length) {
clip.minik.key(dispArray[0].keys[_local2], 2);
_local2++;
}
}
}
}
function nextTuto() {
if (dispArray.length > 0) {
clip.play();
clip.say.htmlText = dispArray[0].text;
clip.delayframe = dispArray[0].delay * _root.framerate;
clip.endframe = clip.delayframe + (dispArray[0].time * _root.framerate);
clip.frame = 0;
clip.onEnterFrame = function () {
if (this.frame > -1) {
if (this.frame == 1) {
this.pilote.initCurrentTutoKeys();
}
if (this.frame >= this.delayframe) {
if ((this.frame - this.delayframe) <= 10) {
this._visible = true;
this._y = 600 - ((this.frame - this.delayframe) * 40);
} else if (this.frame >= (this.endframe - 10)) {
this._y = 600 - ((this.endframe - this.frame) * 40);
}
}
this.frame++;
if (this.frame >= this.endframe) {
this.frame = -1;
this.pilote.tutoEnd();
}
}
};
}
}
function showit(txt, kb, force, queue, time, delay) {
var _local2 = {text:txt, keys:kb, time:time, delay:delay};
if (dispArray.length > 0) {
if ((!force) && (!queue)) {
return(false);
}
if (force) {
if (dispArray.length == 1) {
dispArray.push(_local2);
clip.endCurrent();
return(true);
}
if (queue) {
return(true);
}
return(false);
}
dispArray.push(_local2);
return(true);
}
dispArray.push(_local2);
nextTuto();
return(true);
}
}
Symbol 436 MovieClip [__Packages.Powerups] Frame 0
class Powerups
{
var _clip, clipmodelname, _x, _y;
function Powerups () {
init();
}
function init() {
}
function setClip(c) {
_clip = c;
}
function newClip(baseclip, layer) {
baseclip[clipmodelname].duplicateMovieClip((clipmodelname + "_") + layer, layer);
baseclip[(clipmodelname + "_") + layer]._x = _x;
baseclip[(clipmodelname + "_") + layer]._y = _y;
_clip = baseclip[(clipmodelname + "_") + layer];
}
function action() {
}
function checkHit(c) {
if (((Math.sqrt(Math.pow(c.pL[2].x - _x, 2) + Math.pow(c.pL[2].y - _y, 2)) < 50) || (Math.sqrt(Math.pow(c.pL[1].x - _x, 2) + Math.pow(c.pL[1].y - _y, 2)) < 40)) || (Math.sqrt(Math.pow(c.pL[0].x - _x, 2) + Math.pow(c.pL[0].y - _y, 2)) < 40)) {
return(true);
}
return(false);
}
function anim() {
}
var _label = "";
var _r = 20;
}
Symbol 437 MovieClip [__Packages.BonusTime] Frame 0
class BonusTime extends Powerups
{
var init, _x, _y, clipmodelname, _clip;
function BonusTime (x, y) {
super();
init();
_x = x;
_y = y;
clipmodelname = "time";
}
function action() {
super.action();
_clip.gotoAndPlay(2);
_root.timeblock(10);
_root.bonusSound.start();
return(true);
}
var ident = 4;
}
Symbol 438 MovieClip [__Packages.BonusFire] Frame 0
class BonusFire extends Powerups
{
var init, _x, _y, clipmodelname, _clip;
function BonusFire (x, y) {
super();
init();
_x = x;
_y = y;
clipmodelname = "fire";
}
function action() {
super.action();
_clip.gotoAndPlay(2);
_root.boost(10);
_root.bonusSound.start();
return(true);
}
var ident = 1;
}
Symbol 439 MovieClip [__Packages.BonusCata] Frame 0
class BonusCata extends Powerups
{
var init, _x, _y, clipmodelname, _clip;
function BonusCata (x, y) {
super();
init();
_x = x;
_y = y;
clipmodelname = "cata";
}
function action() {
super.action();
_clip.gotoAndPlay(2);
_root.cata(13);
_root.cataSound.start();
return(true);
}
var ident = 2;
}
Symbol 440 MovieClip [__Packages.Base64] Frame 0
class Base64 extends Object
{
static var _CharsReverseLookup;
var _base64Str, _base64Count;
function Base64 () {
super();
}
static function Encode(str) {
var _local1 = new Base64();
return(_local1.encodeBase64(str));
}
static function Decode(str) {
var _local1 = new Base64();
return(_local1.decodeBase64(str));
}
static function StringReplaceAll(source, find, replacement) {
return(source.split(find).join(replacement));
}
static function InitReverseChars() {
_CharsReverseLookup = new Array();
var _local1 = 0;
while (_local1 < _Chars.length) {
_CharsReverseLookup[_Chars[_local1]] = _local1;
_local1++;
}
return(true);
}
static function UrlDecode(str) {
str = StringReplaceAll(str, "\\", " ");
str = unescape(str);
return(str);
}
static function UrlEncode(str) {
str = escape(str);
str = StringReplaceAll(str, "\\", "%2B");
str = StringReplaceAll(str, "%20", "+");
return(str);
}
function setBase64Str(str) {
_base64Str = str;
_base64Count = 0;
}
function readBase64() {
if (_base64Str == undefined) {
return(_EndOfInput);
}
if (_base64Count >= _base64Str.length) {
return(_EndOfInput);
}
var _local2 = _base64Str.charCodeAt(_base64Count) & 255;
_base64Count++;
return(_local2);
}
function encodeBase64(str) {
setBase64Str(str);
var _local3 = "";
var _local2 = new Array(3);
var _local5 = 0;
var _local4 = false;
while ((!_local4) && (((_local2[0] = readBase64())) != _EndOfInput)) {
_local2[1] = readBase64();
_local2[2] = readBase64();
_local3 = _local3 + _Chars[_local2[0] >> 2];
if (_local2[1] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[0] << 4) & 48) | (_local2[1] >> 4)];
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[1] << 2) & 60) | (_local2[2] >> 6)];
_local3 = _local3 + _Chars[_local2[2] & 63];
} else {
_local3 = _local3 + _Chars[(_local2[1] << 2) & 60];
_local3 = _local3 + "=";
_local4 = true;
}
} else {
_local3 = _local3 + _Chars[(_local2[0] << 4) & 48];
_local3 = _local3 + "=";
_local3 = _local3 + "=";
_local4 = true;
}
_local5 = _local5 + 4;
if (_local5 >= 76) {
_local3 = _local3 + newline;
_local5 = 0;
}
}
return(_local3);
}
function readReverseBase64() {
if (_base64Str == undefined) {
return(_EndOfInput);
}
while (true) {
if (_base64Count >= _base64Str.length) {
return(_EndOfInput);
}
var _local2 = _base64Str.charAt(_base64Count);
_base64Count++;
if (_CharsReverseLookup[_local2]) {
return(_CharsReverseLookup[_local2]);
}
if (_local2 == "A") {
return(0);
}
}
}
function ntos(n) {
var _local1 = n.toString(16);
if (_local1.length == 1) {
_local1 = "0" + _local1;
}
_local1 = "%" + _local1;
return(unescape(_local1));
}
function decodeBase64(str) {
setBase64Str(str);
var _local3 = "";
var _local2 = new Array(4);
var _local4 = false;
while (((!_local4) && (((_local2[0] = readReverseBase64())) != _EndOfInput)) && (((_local2[1] = readReverseBase64())) != _EndOfInput)) {
_local2[2] = readReverseBase64();
_local2[3] = readReverseBase64();
_local3 = _local3 + ntos(((_local2[0] << 2) & 255) | (_local2[1] >> 4));
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[1] << 4) & 255) | (_local2[2] >> 2));
if (_local2[3] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[2] << 6) & 255) | _local2[3]);
} else {
_local4 = true;
}
} else {
_local4 = true;
}
}
return(_local3);
}
function toHex(n) {
var _local4 = "";
var _local3 = true;
var _local1 = 32;
while (_local1 > 0) {
_local1 = _local1 - 4;
var _local2 = (n >> _local1) & 15;
if ((!_local3) || (_local2 != 0)) {
_local3 = false;
_local4 = _local4 + _Digits[_local2];
}
}
return(((_local4 == "") ? "0" : (_local4)));
}
function pad(str, len, pad) {
var _local2 = str;
var _local1 = str.length;
while (_local1 < len) {
_local2 = pad + _local2;
_local1++;
}
return(_local2);
}
function encodeHex(str) {
var _local4 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local4 = _local4 + pad(toHex(str.charCodeAt(_local2) & 255), 2, "0");
_local2++;
}
return(_local4);
}
function decodeHex(str) {
var _local5 = "";
var _local3 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local3 = _local3 + str.charAt(_local2);
if (_local3.length == 2) {
_local5 = _local5 + ntos(parseInt("0x" + _local3));
_local3 = "";
}
_local2++;
}
return(_local5);
}
static var _EndOfInput = -1;
static var _Chars = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
static var _CharsReverseLookupInited = InitReverseChars();
static var _Digits = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
}
Symbol 441 MovieClip [__Packages.BonusStar] Frame 0
class BonusStar extends Powerups
{
var init, _x, _y, clipmodelname, _clip;
function BonusStar (x, y) {
super();
init();
_x = x;
_y = y;
clipmodelname = "star";
}
function action() {
super.action();
_clip.gotoAndPlay(2);
_root.addScore(10);
if ((_root.frame - lastsoundframe) > 3) {
_root.coinSound.start();
lastsoundframe = _root.frame;
}
return(true);
}
function anim() {
if ((_clip._x >= ((-_root.scrollx) - 40)) && (_clip._x <= (((-_root.scrollx) + _global.sW) + 40))) {
_frame = _frame + 0.25;
_clip._rotation = Math.cos(_frame) * 30;
}
}
var _frame = random(100);
var ident = 0;
static var lastsoundframe = -1;
}
Symbol 442 MovieClip [__Packages.BonusLabel] Frame 0
class BonusLabel extends Powerups
{
var init, _x, _y, _label, clipmodelname, _clip;
function BonusLabel (x, y, label) {
super();
init();
_x = x;
_y = y;
_label = label;
clipmodelname = "bonusp8";
}
function action() {
super.action();
return(true);
}
function newClip(baseclip, layer) {
baseclip[clipmodelname].duplicateMovieClip((clipmodelname + "_") + layer, layer);
baseclip[(clipmodelname + "_") + layer]._x = _x;
baseclip[(clipmodelname + "_") + layer]._y = _y;
_clip = baseclip[(clipmodelname + "_") + layer];
baseclip[(clipmodelname + "_") + layer].infotxt.text = _label;
baseclip[(clipmodelname + "_") + layer].infotxt._height = baseclip[(clipmodelname + "_") + layer].infotxt.textHeight + 20;
baseclip[(clipmodelname + "_") + layer].infotxt._width = baseclip[(clipmodelname + "_") + layer].infotxt.textWidth + 20;
}
var ident = 8;
}
Symbol 443 MovieClip [__Packages.MalusCata] Frame 0
class MalusCata extends Powerups
{
var init, _x, _y, clipmodelname, _clip;
function MalusCata (x, y) {
super();
init();
_x = x;
_y = y;
clipmodelname = "catam";
}
function action() {
super.action();
_clip.gotoAndPlay(2);
_root.cata(-20);
_root.malusSound.start();
_root.cataSound.start();
return(true);
}
function checkHit(c) {
if (((Math.sqrt(Math.pow(c.pL[2].x - _x, 2) + Math.pow(c.pL[2].y - _y, 2)) < 40) || (Math.sqrt(Math.pow(c.pL[1].x - _x, 2) + Math.pow(c.pL[1].y - _y, 2)) < 30)) || (Math.sqrt(Math.pow(c.pL[0].x - _x, 2) + Math.pow(c.pL[0].y - _y, 2)) < 30)) {
return(true);
}
return(false);
}
var ident = 6;
}
Symbol 444 MovieClip [__Packages.BonusFreeze] Frame 0
class BonusFreeze extends Powerups
{
var init, _x, _y, _ybas, clipmodelname, _clip;
function BonusFreeze (x, y) {
super();
init();
_x = x;
_y = y;
_ybas = _y;
clipmodelname = "freeze";
}
function action() {
super.action();
_clip.gotoAndPlay(2);
_root.freezeit(10);
return(true);
}
function anim() {
if ((_clip._x >= ((-_root.scrollx) - 40)) && (_clip._x <= (((-_root.scrollx) + _global.sW) + 40))) {
_frame = _frame + 0.1;
_y = (_clip._y = _ybas + (Math.cos(_frame) * 40));
}
}
var ident = 3;
var _frame = 0;
}
Symbol 445 MovieClip [__Packages.MalusEarthquake] Frame 0
class MalusEarthquake extends Powerups
{
var init, _x, _y, clipmodelname, _clip;
function MalusEarthquake (x, y) {
super();
init();
_x = x;
_y = y;
clipmodelname = "earthquakem";
}
function action() {
super.action();
_clip.gotoAndPlay(2);
_root.earthquakeit(12);
_root.malusSound.start();
_root.quakeSound.start(0, 100);
return(true);
}
function checkHit(c) {
if (((Math.sqrt(Math.pow(c.pL[2].x - _x, 2) + Math.pow(c.pL[2].y - _y, 2)) < 40) || (Math.sqrt(Math.pow(c.pL[1].x - _x, 2) + Math.pow(c.pL[1].y - _y, 2)) < 30)) || (Math.sqrt(Math.pow(c.pL[0].x - _x, 2) + Math.pow(c.pL[0].y - _y, 2)) < 30)) {
return(true);
}
return(false);
}
var ident = 5;
}
Symbol 446 MovieClip [__Packages.BonusWing] Frame 0
class BonusWing extends Powerups
{
var init, _x, _y, _ybas, clipmodelname, _clip;
function BonusWing (x, y) {
super();
init();
_x = x;
_y = y;
_ybas = _y;
clipmodelname = "wing";
}
function action() {
super.action();
_clip.gotoAndPlay(2);
_root.fly(10);
_root.bonusSound.start();
_root.windSound.start();
return(true);
}
function anim() {
if ((_clip._x >= ((-_root.scrollx) - 40)) && (_clip._x <= (((-_root.scrollx) + _global.sW) + 40))) {
_frame = _frame + 0.1;
_y = (_clip._y = _ybas + (Math.cos(_frame) * 40));
}
}
var ident = 3;
var _frame = 0;
}
Symbol 447 MovieClip [__Packages.MalusWheel] Frame 0
class MalusWheel extends Powerups
{
var init, _x, _y, type, idx, clipmodelname;
function MalusWheel (t, x, y, idxx) {
super();
init();
_x = x;
_y = y;
type = t;
idx = idxx;
clipmodelname = "";
}
function checkHit(c) {
return(true);
}
function newClip(baseclip, layer) {
if (!launched) {
launched = true;
if ((_x > ((-_root.scrollx) + 630)) || (_y < ((-_root.scrolly) - 30))) {
_root.newWheel(type, _x, _y, idx, {x:0, y:0});
_root.newWheel(type, _x + 50, _y - 300, idx, {x:5, y:0});
_root.newWheel(type, _x + 100, _y - 600, idx, {x:10, y:0});
_root.newWheel(type, _x + 150, _y - 900, idx, {x:15, y:0});
_root.newWheel(type, _x + 200, _y - 1200, idx, {x:20, y:0});
}
}
}
function action() {
return(true);
}
var ident = 10;
var launched = false;
}
Symbol 448 MovieClip [__Packages.MalusBubble] Frame 0
class MalusBubble extends Powerups
{
var init, _x, _y, _ybas, clipmodelname, _clip;
function MalusBubble (x, y) {
super();
init();
_x = x;
_y = y;
_ybas = _y;
clipmodelname = "bubblem";
}
function action() {
super.action();
_clip.gotoAndPlay(2);
_root.bubble(10);
_root.malusSound.start();
return(true);
}
function anim() {
if ((_clip._x >= ((-_root.scrollx) - 40)) && (_clip._x <= (((-_root.scrollx) + _global.sW) + 40))) {
_frame = _frame + 0.05;
_y = (_clip._y = _ybas + (Math.cos(_frame) * 40));
}
}
var ident = 7;
var _frame = 0;
}
Symbol 449 MovieClip [__Packages.ModelCommon] Frame 0
class ModelCommon
{
var pL, gravityraps, resistraps, sL, lastcix, colidata;
function ModelCommon () {
}
function showIt() {
}
function gravity(g) {
var _local2 = pL.length - 1;
while (_local2 >= 0) {
pL[_local2].speed.y = pL[_local2].speed.y + ((pL[_local2].m * g) * gravityraps[_local2]);
_local2--;
}
}
function tract() {
}
function memo() {
var _local2 = pL.length - 1;
while (_local2 >= 0) {
pL[_local2].xM = pL[_local2].x;
pL[_local2].yM = pL[_local2].y;
_local2--;
}
}
function moveIt() {
var _local2 = pL.length - 1;
while (_local2 >= 0) {
if (!pL[_local2].freeze) {
pL[_local2].x = pL[_local2].x + pL[_local2].speed.x;
pL[_local2].y = pL[_local2].y + pL[_local2].speed.y;
}
_local2--;
}
}
function newSpeed() {
var _local2 = pL.length - 1;
while (_local2 >= 0) {
pL[_local2].speed.x = (pL[_local2].x - pL[_local2].xM) * resistraps[_local2];
pL[_local2].speed.y = (pL[_local2].y - pL[_local2].yM) * resistraps[_local2];
_local2--;
}
}
function addSpeed(as) {
var _local2 = pL.length - 1;
while (_local2 >= 0) {
pL[_local2].speed.x = pL[_local2].speed.x + as.x;
pL[_local2].speed.y = pL[_local2].speed.y + as.y;
_local2--;
}
}
function distConstraint() {
var _local13 = false;
var _local8 = sL.length - 1;
while (_local8 >= 0) {
var _local6 = sL[_local8];
var _local4 = _local6.p0;
var _local3 = _local6.p1;
var _local12 = _local4.x - _local3.x;
var _local11 = _local4.y - _local3.y;
var _local10 = _root.getDistance(_local4, _local3);
var _local7 = _root.bar;
if (_local7 > 1.1) {
if (_local8 == 0) {
_local7 = 1.1;
} else if (_local8 == 1) {
_local7 = _local7 + ((_local7 - 1.1) * 0.04);
}
}
var _local5 = (_local10 - (_local6.rL * _local7)) / _local10;
var _local9 = _local5;
_local5 = _local5 * _local6.w0;
_local9 = _local9 * _local6.w1;
if (!_local4.freeze) {
_local4.x = _local4.x - (_local12 * _local5);
_local4.y = _local4.y - (_local11 * _local5);
}
if (!_local3.freeze) {
_local3.x = _local3.x + (_local12 * _local9);
_local3.y = _local3.y + (_local11 * _local9);
}
if (Math.abs(_local5) > 0.4) {
_local13 = true;
}
_local8--;
}
if (_local13) {
_root.chocSound.setVolume(100);
_root.chocSound.start();
}
}
function objConstraint(car) {
var _local3 = pL.length - 1;
while (_local3 >= 0) {
var _local2 = car.pL.length - 1;
while (_local2 >= 0) {
var _local5 = {x:pL[_local3].x - car.pL[_local2].x, y:pL[_local3].y - car.pL[_local2].y};
var _local11 = Math.pow(_local5.x, 2) + Math.pow(_local5.y, 2);
var _local12 = Math.pow(pL[_local3].r + car.pL[_local2].r, 2);
if (_local11 < _local12) {
var _local6 = Math.sqrt(_local11);
var _local10 = (pL[_local3].r + car.pL[_local2].r) - _local6;
var _local7 = {x:(_local5.x * _local10) / _local6, y:(_local5.y * _local10) / _local6};
var _local9;
var _local8;
if (car.pL[_local2].freeze) {
_local9 = 1;
_local8 = 0;
} else if (pL[_local3].freeze) {
_local9 = 0;
_local8 = 1;
} else {
_local9 = car.pL[_local2].m / (pL[_local3].m + car.pL[_local2].m);
_local8 = pL[_local3].m / (pL[_local3].m + car.pL[_local2].m);
}
car.pL[_local2].x = car.pL[_local2].x - (_local7.x * _local8);
car.pL[_local2].y = car.pL[_local2].y - (_local7.y * _local8);
pL[_local3].x = pL[_local3].x + (_local7.x * _local9);
pL[_local3].y = pL[_local3].y + (_local7.y * _local9);
if (pL[_local3].y < car.pL[_local2].y) {
if ((pL[_local3].tract.x == 0) && (pL[_local3].tract.y == 0)) {
pL[_local3].tract = {x:((-_local5.y) * 0.9) / _local6, y:(_local5.x * 0.9) / _local6};
}
} else if ((car.pL[_local2].tract.x == 0) && (car.pL[_local2].tract.y == 0)) {
car.pL[_local2].tract = {x:(_local5.y * 0.9) / _local6, y:((-_local5.x) * 0.9) / _local6};
}
}
_local2--;
}
_local3--;
}
}
function waterEffect(i, proportion) {
gravityraps[i] = (1 - (0.3 * proportion)) * gravityref;
resistraps[i] = resist - (0.15 * proportion);
}
function landConstraint() {
var _local14 = false;
var _local5 = pL.length - 1;
while (_local5 >= 0) {
var _local3 = pL[_local5];
if (!_local3.freeze) {
_local3.inwater = false;
var _local8 = false;
var _local4 = lastcix.i;
var _local9 = 1;
if (_local3.x < lastcix.x) {
_local9 = -1;
}
var _local7 = 0;
while ((!_local8) && (_local7 < 10)) {
if ((colidata[_local4].left.x <= _local3.x) && (colidata[_local4].right.x > _local3.x)) {
_local8 = true;
lastcix.i = _local4;
lastcix.x = _local3.x;
} else {
_local4 = _local4 + _local9;
}
_local7++;
}
resistraps[_local5] = resist;
gravityraps[_local5] = gravityref;
_local3.tract = {x:0, y:0};
if (_root.freezecountdown < 0) {
if ((_root.landdrawdata[lastcix.i].w == 0) || (_root.landdrawdata[lastcix.i - 1].w == 0)) {
var _local6;
if (_root.landdrawdata[lastcix.i].w == 0) {
_local6 = _root.landdrawdata[lastcix.i].left.y + _root.earthquake.y;
} else {
_local6 = _root.landdrawdata[lastcix.i - 1].left.y + _root.earthquake.y;
}
var _local11 = _local3.y - _local6;
if (_local11 > 0) {
_local3.inwater = true;
_local14 = true;
var _local10 = 1;
if (_local11 < _local3.r) {
_local10 = _local11 / _local3.r;
}
waterEffect(_local5, _local10);
}
}
_local3 = landIndexConst(_local3, _local4, 0);
} else {
if ((((_root.landdrawdata[lastcix.i].w == 0) || (_root.landdrawdata[lastcix.i - 1].w == 0)) || ((_root.landdrawdata[lastcix.i - 2].w == 0) && (_root.landdrawdata[lastcix.i].center.x > _local3.x))) || ((_root.landdrawdata[lastcix.i + 1].w == 0) && (_root.landdrawdata[lastcix.i].center.x < _local3.x))) {
if (_root.landdrawdata[lastcix.i].w == 0) {
var _local6 = _root.landdrawdata[lastcix.i].left.y + _root.earthquake.y;
} else if (_root.landdrawdata[lastcix.i - 1].w == 0) {
var _local6 = _root.landdrawdata[lastcix.i - 1].left.y + _root.earthquake.y;
} else if (_root.landdrawdata[lastcix.i - 2].w == 0) {
var _local6 = _root.landdrawdata[lastcix.i - 2].left.y + _root.earthquake.y;
} else if (_root.landdrawdata[lastcix.i + 1].w == 0) {
var _local6 = _root.landdrawdata[lastcix.i + 1].left.y + _root.earthquake.y;
}
var _local11 = _local3.y - _local6;
if (_local11 > (-_local3.r)) {
_local3.y = _local6 - _local3.r;
_local3.tract = {x:0.3, y:0};
resistraps[_local5] = 1;
}
}
_local3 = landIndexConst(_local3, _local4, 0);
}
}
_local5--;
}
if (_local14) {
inwatertime++;
if (!inwater) {
inwater = true;
_root.waterSound.setVolume(100);
_root.waterSound.start();
}
} else {
inwater = false;
inwatertime = 0;
}
}
function checkFreeze() {
var _local2 = pL.length - 1;
while (_local2 >= 0) {
pL[_local2].freeze = pL[_local2].inwater;
_local2--;
}
}
function unfreeze() {
var _local2 = pL.length - 1;
while (_local2 >= 0) {
pL[_local2].freeze = false;
_local2--;
}
}
function tractTolerance() {
return(false);
}
function landIndexConst(p, index, iter) {
var _local6 = {x:p.x - colidata[index].center.x, y:p.y - (colidata[index].center.y + _root.earthquake.y)};
var _local5 = Math.sqrt(Math.pow(_local6.x, 2) + Math.pow(_local6.y, 2));
if (colidata[index].s == 1) {
if ((_local5 < colidata[index].r) || (p.y > (colidata[index].center.y + _root.earthquake.y))) {
p.x = colidata[index].center.x + ((colidata[index].r * _local6.x) / _local5);
p.y = (colidata[index].center.y + _root.earthquake.y) + ((colidata[index].r * _local6.y) / _local5);
if ((((colidata[index].left.x <= p.x) && (colidata[index].right.x > p.x)) && (p.y <= (colidata[index].center.y + _root.earthquake.y))) || (iter >= 10)) {
p.tract = {x:(-_local6.y) / _local5, y:_local6.x / _local5};
} else {
if (p.x <= colidata[index].center.x) {
index--;
} else {
index++;
}
p = landIndexConst(p, index, iter + 1);
}
} else if (tractTolerance()) {
if (_local5 < (colidata[index].r + tracttolerance)) {
p.tract = {x:(-_local6.y) / _local5, y:_local6.x / _local5};
}
}
} else if ((_local5 > colidata[index].r) && ((p.y > (colidata[index].left.y + _root.earthquake.y)) || (p.y > (colidata[index].right.y + _root.earthquake.y)))) {
p.x = colidata[index].center.x + ((colidata[index].r * _local6.x) / _local5);
p.y = (colidata[index].center.y + _root.earthquake.y) + ((colidata[index].r * _local6.y) / _local5);
if (((colidata[index].left.x <= p.x) && (colidata[index].right.x > p.x)) || (iter >= 10)) {
p.tract = {x:_local6.y / _local5, y:(-_local6.x) / _local5};
} else {
if (p.x < colidata[index].left.x) {
index--;
} else {
index++;
}
p = landIndexConst(p, index, iter + 1);
}
} else if (tractTolerance()) {
if ((_local5 > (colidata[index].r - tracttolerance)) && ((p.y > ((colidata[index].left.y + _root.earthquake.y) - tracttolerance)) || (p.y > ((colidata[index].right.y + _root.earthquake.y) - tracttolerance)))) {
p.tract = {x:_local6.y / _local5, y:(-_local6.x) / _local5};
}
}
return(p);
}
var coefbars = 0.5;
var resist = 0.991;
var scale = 1;
var gravityref = 1;
var tracttolerance = 8;
var inwater = false;
var inwatertime = 0;
var freeze = false;
}
Symbol 450 MovieClip [__Packages.ModelBase] Frame 0
class ModelBase extends ModelCommon
{
var tracttolerance, coefbars, resist, gravityref, colidata, scale, lastcix, pL, memo, sL, layer1, clipw, layer2, clipwl, resistraps, gravityraps;
function ModelBase (type, ix, iy, idx) {
super();
init(type, ix, iy, idx);
}
function init(type, ix, iy, idx) {
tracttolerance = 4;
coefbars = 0.5;
resist = 0.98;
gravityref = 0.03;
var _local5;
if (type == 0) {
colidata = _root.landcoldata;
_local5 = 0.5;
} else if (type == 1) {
colidata = _root.landcoldata3;
_local5 = 0.75;
} else if (type == 2) {
colidata = _root.landcoldata2;
_local5 = 1;
}
gravityref = gravityref / _local5;
scale = 1.75 * _local5;
lastcix = {i:idx, x:(colidata[idx].left.x + colidata[idx].right.x) / 2};
pL = [];
pL[0] = {x:ix + 0, y:iy + 0, r:21 * scale, m:30 * _local5, speed:{x:0, y:0}, tract:{x:0, y:0}, inwater:false, freeze:false};
memo();
sL = [];
var _local4 = 0;
while (_local4 < sL.length) {
var _local3 = sL[_local4];
_local3.rL = _root.getDistance(_local3.p0, _local3.p1);
_local4++;
}
layer1 = _root.getFreeLayerMin(20);
_root.useLayer(layer1, 0);
_root.scrollland.hazardwheel.duplicateMovieClip("hazardwheel_" + layer1, layer1);
clipw = _root.scrollland["hazardwheel_" + layer1];
clipw._xscale = (clipw._yscale = scale * 100);
layer2 = _root.getFreeLayerMin(20);
_root.useLayer(layer2, 0);
_root.scrolllandline.hazardwheel.duplicateMovieClip("hazardwheelline_" + layer2, layer2);
clipwl = _root.scrolllandline["hazardwheelline_" + layer2];
clipwl._xscale = (clipwl._yscale = scale * 100);
resistraps = [resist];
gravityraps = [gravityref];
}
function free() {
clipw.removeMovieClip();
clipwl.removeMovieClip();
_root.freeLayer(layer1);
_root.freeLayer(layer2);
}
function showIt() {
clipw._x = (clipwl._x = pL[0].x);
clipw._y = (clipwl._y = pL[0].y);
clipw._rotation = clipw._rotation + rots;
clipwl._rotation = clipw._rotation;
if ((pL[0].tract.x != 0) || (pL[0].tract.y != 0)) {
var _local2 = (Math.sqrt(Math.pow(pL[0].speed.x, 2) + Math.pow(pL[0].speed.y, 2)) * 180) / ((2 * pL[0].r) * Math.PI);
if (pL[0].speed.x < 0) {
_local2 = _local2 * -1;
}
rots = rots + ((_local2 - rots) * 0.1);
} else {
rots = rots * 0.97;
}
}
function tract() {
var _local2 = -0.3;
rots = rots + (_local2 * 0.3);
pL[0].speed.x = pL[0].speed.x + (pL[0].tract.x * _local2);
pL[0].speed.y = pL[0].speed.y + (pL[0].tract.y * _local2);
}
function distConstraint() {
}
function tractTolerance() {
return(true);
}
var rots = 0;
}
Symbol 451 MovieClip [__Packages.Model] Frame 0
class Model extends ModelCommon
{
var tracttolerance, gravityref, coefbars, resist, bubbleb, colidata, lastcix, scale, pL, memo, sL, clipc, clipcl, clipw0, clipw1, clipwl0, clipwl1, clippen, resistraps, gravityraps, inwatertime;
function Model (ix, iy) {
super();
init(ix, iy);
}
function init(ix, iy) {
tracttolerance = 8;
gravityref = 1;
coefbars = 0.5;
resist = 0.991;
bubbleb = false;
colidata = _root.landcoldata;
_root.scrollland.bubble.swapDepths(12);
_root.scrollland.bubble._visible = false;
lastcix = {i:0, x:-1000};
scale = _root.wheelR / 20;
pL = [];
pL[0] = {x:ix + 0, y:iy + (50 * scale), r:20 * scale, m:1, speed:{x:0, y:0}, tract:{x:0, y:0}, inwater:false, freeze:false};
pL[1] = {x:ix + (60 * scale), y:iy + (50 * scale), r:20 * scale, m:1, speed:{x:0, y:0}, tract:{x:0, y:0}, inwater:false, freeze:false};
pL[2] = {x:ix + (30 * scale), y:iy + (10 * scale), r:20 * scale, m:1.25, speed:{x:0, y:0}, tract:{x:0, y:0}, inwater:false, freeze:false};
memo();
sL = [];
sL[0] = {p0:pL[0], p1:pL[1], w0:coefbars, w1:coefbars, col:true};
sL[1] = {p0:pL[1], p1:pL[2], w0:coefbars, w1:coefbars, col:true};
sL[2] = {p0:pL[2], p1:pL[0], w0:coefbars, w1:coefbars, col:true};
var _local4 = 0;
while (_local4 < sL.length) {
var _local3 = sL[_local4];
_local3.rL = _root.getDistance(_local3.p0, _local3.p1);
_local4++;
}
clipc = _root.scrollland.carbody;
clipc.fly._visible = false;
clipc._xscale = (clipc._yscale = scale * 100);
clipcl = _root.scrolllandline.carbodyline;
clipcl._xscale = (clipcl._yscale = scale * 100);
clipc.swapDepths(11);
clipw0 = _root.scrollland.wheel0;
clipw0._xscale = (clipw0._yscale = scale * 100);
clipw1 = _root.scrollland.wheel1;
clipw1._xscale = (clipw1._yscale = scale * 100);
clipwl0 = _root.scrolllandline.wheelline0;
clipwl0._xscale = (clipwl0._yscale = scale * 100);
clipwl1 = _root.scrolllandline.wheelline1;
clipwl1._xscale = (clipwl1._yscale = scale * 100);
var _local5 = _root.getFreeLayerMin(0);
clippen = _root.scrollland.createEmptyMovieClip("pen", _local5);
resistraps = [resist, resist, resist];
gravityraps = [gravityref, gravityref, gravityref];
}
function bubble(b) {
bubbleb = b;
if (bubbleb) {
_root.scrollland.bubble._visible = true;
} else {
_root.popSound.start();
_root.scrollland.bubble._visible = false;
}
}
function bodyFly(r) {
pL[2].m = 1.25 * r;
}
function heavyWheels(r) {
pL[0].m = 1 * r;
pL[1].m = 1 * r;
}
function backWheel(lf) {
clipwl0._xscale = (clipwl0._yscale = scale * (100 + lf));
if (lf > 0) {
clipw0.gotoAndStop(2);
} else {
clipw0.gotoAndStop(1);
}
}
function frontWheel(lf) {
clipwl1._xscale = (clipwl1._yscale = scale * (100 + lf));
if (lf > 0) {
clipw1.gotoAndStop(2);
} else {
clipw1.gotoAndStop(1);
}
}
function showIt() {
var _local3 = pL[0].y - _root.earthquake.y;
var _local7 = pL[1].y - _root.earthquake.y;
var _local6 = pL[2].y - _root.earthquake.y;
oldrot = clipc._rotation;
clipc._x = (clipcl._x = pL[2].x);
clipc._y = (clipcl._y = _local6);
var _local8 = _root.getPolar({x:pL[1].x - pL[0].x, y:_local7 - _local3});
clipc._rotation = (clipcl._rotation = (_local8.a * 180) / Math.PI);
clipw0._x = (clipwl0._x = pL[0].x);
clipw0._y = (clipwl0._y = _local3);
clipw1._x = (clipwl1._x = pL[1].x);
clipw1._y = (clipwl1._y = _local7);
clipw0._rotation = clipw0._rotation + rots0;
clipwl0._rotation = clipw0._rotation;
clipw1._rotation = clipw1._rotation + rots1;
clipwl1._rotation = clipw1._rotation;
if ((pL[0].tract.x != 0) || (pL[0].tract.y != 0)) {
var _local5 = (Math.sqrt(Math.pow(pL[0].speed.x, 2) + Math.pow(pL[0].speed.y, 2)) * 180) / ((2 * pL[0].r) * Math.PI);
if (pL[0].speed.x < 0) {
_local5 = _local5 * -1;
}
rots0 = rots0 + ((_local5 - rots0) * 0.1);
} else {
rots0 = rots0 * 0.97;
}
if ((pL[1].tract.x != 0) || (pL[1].tract.y != 0)) {
var _local4 = (Math.sqrt(Math.pow(pL[1].speed.x, 2) + Math.pow(pL[1].speed.y, 2)) * 180) / ((2 * pL[1].r) * Math.PI);
if (pL[1].speed.x < 0) {
_local4 = _local4 * -1;
}
rots1 = rots1 + ((_local4 - rots1) * 0.1);
} else {
rots1 = rots1 * 0.97;
}
if (bubbleb) {
_root.scrollland.bubble._xscale = (_root.scrollland.bubble._yscale = 100 * (1 + ((_root.bar - 1) * 0.4)));
_root.scrollland.bubble._xscale = _root.scrollland.bubble._xscale + (10 * Math.cos(_root.frame * 0.5));
_root.scrollland.bubble._yscale = _root.scrollland.bubble._yscale + (10 * Math.sin(_root.frame * 0.5));
_root.scrollland.bubble._x = ((pL[0].x + pL[1].x) + (pL[2].x * 1.25)) / 3.25;
_root.scrollland.bubble._y = ((_local3 + pL[1].y) + (_local6 * 1.25)) / 3.25;
}
if (inwatertime > (2 * _root.framerate)) {
_root.longTimeInWater();
}
if (flying > (1 * _root.framerate)) {
if (((clipc._rotation > -95) && (clipc._rotation < -85)) || ((clipc._rotation > 85) && (clipc._rotation < 95))) {
if (pL[2].y < (((colidata[lastcix.i].left.y + colidata[lastcix.i].right.y) / 2) - 100)) {
_root.jumpVert();
}
}
}
}
function gravity(g) {
if (!bubbleb) {
var _local3 = pL.length - 1;
while (_local3 >= 0) {
pL[_local3].speed.y = pL[_local3].speed.y + (((pL[_local3].m * _root.weight[_local3]) * g) * gravityraps[_local3]);
_local3--;
}
}
}
function rotateIt(v) {
if (((v < 0) && (rotatespeed > 0)) || ((v > 0) && (rotatespeed < 0))) {
rotatespeed = 0;
} else {
rotatespeed = rotatespeed + v;
}
if (rotatespeed > 0.017) {
rotatespeed = 0.017;
} else if (rotatespeed < -0.017) {
rotatespeed = -0.017;
}
var _local7 = ((pL[0].x + pL[1].x) + pL[2].x) / 3;
var _local6 = ((pL[0].y + pL[1].y) + pL[2].y) / 3;
var _local2 = pL.length - 1;
while (_local2 >= 0) {
var _local3 = {x:pL[_local2].x - _local7, y:pL[_local2].y - _local6};
pL[_local2].x = pL[_local2].x + ((-_local3.y) * rotatespeed);
pL[_local2].y = pL[_local2].y + (_local3.x * rotatespeed);
_local2--;
}
}
function tract() {
var _local3 = _root.tract * _root.speedscale;
fly[0] = (pL[0].tract.x == 0) && (pL[0].tract.y == 0);
fly[1] = (pL[1].tract.x == 0) && (pL[1].tract.y == 0);
fly[2] = (pL[2].tract.x == 0) && (pL[2].tract.y == 0);
if ((fly[0] && (fly[1])) && (fly[2])) {
flying++;
} else {
flying = 0;
lastjumplong = pL[2].x - lastgroundx;
lastgroundx = pL[2].x;
}
if (_local3 > 0) {
rots1 = rots1 + 0.2;
pL[1].speed.x = pL[1].speed.x + (pL[1].tract.x * _local3);
pL[1].speed.y = pL[1].speed.y + (pL[1].tract.y * _local3);
if (_root.flycountdown > -1) {
pL[2].speed.x = pL[2].speed.x + (_local3 * 0.27);
}
if (fly[1]) {
flyingfrontwheel++;
} else {
flyingfrontwheel = 0;
}
if (flyingfrontwheel > 30) {
if (clipc.eye._currentframe < 36) {
clipc.eye.gotoAndPlay(36);
}
} else if (clipc.eye._currentframe >= 36) {
clipc.eye.gotoAndPlay(1);
}
} else if (_local3 < 0) {
rots0 = rots0 - 0.2;
pL[0].speed.x = pL[0].speed.x + (pL[0].tract.x * _local3);
pL[0].speed.y = pL[0].speed.y + (pL[0].tract.y * _local3);
if (_root.flycountdown > -1) {
pL[2].speed.x = pL[2].speed.x + (_local3 * 0.15);
}
if (clipc.eye._currentframe < 36) {
clipc.eye.gotoAndPlay(36);
}
} else if (clipc.eye._currentframe < 36) {
clipc.eye.gotoAndPlay(36);
}
if (_root.jump == 2) {
if (clipc.eye._currentframe < 36) {
clipc.eye.gotoAndPlay(31);
} else {
clipc.eye.gotoAndPlay(61);
}
}
}
function distConstraint() {
var _local3 = {x:pL[1].y - pL[0].y, y:-(pL[1].x - pL[0].x)};
var _local5 = {x:pL[2].x - pL[0].x, y:pL[2].y - pL[0].y};
var _local9 = (_local3.x * _local5.x) + (_local3.y * _local5.y);
if (_local9 <= 0) {
var _local4 = {x:-_local3.y, y:_local3.x};
var _local7 = (_local4.x * _local5.x) + (_local4.y * _local5.y);
var _local6 = Math.pow(_local4.x, 2) + Math.pow(_local4.y, 2);
pL[2].x = pL[0].x + ((_local4.x * _local7) / _local6);
pL[2].y = pL[0].y + ((_local4.y * _local7) / _local6);
var _local8 = {x:((pL[0].x + pL[1].x) + (_local3.x * 0.2)) / 2, y:((pL[0].y + pL[1].y) + (_local3.y * 0.2)) / 2};
pL[2].y = pL[2].y + ((_local8.y - pL[2].y) * 0.15);
pL[2].y = pL[2].y + ((_local8.y - pL[2].y) * 0.15);
}
super.distConstraint();
}
function waterEffect(i, proportion) {
if (i <= 1) {
gravityraps[i] = (1 - (0.3 * proportion)) * gravityref;
} else {
gravityraps[i] = (1 - (0.7 * proportion)) * gravityref;
}
if (_root.boostcountdown > -1) {
proportion = proportion * 0.7;
}
resistraps[i] = resist - (0.15 * proportion);
}
function tractTolerance() {
return(_root.boostcountdown > -1);
}
var rots0 = 0;
var rots1 = 0;
var oldrot = 0;
var rotatespeed = 0;
var flyingfrontwheel = 0;
var flying = 0;
var fly = new Array();
var lastgroundx = -1;
var lastjumplong = -1;
}
Symbol 18 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local2 = __width;
var _local3 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local2, oldHeight:_local3});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = createObject(className.symbolOwner.symbolName, id, depth, initobj);
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.123";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 19 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.123";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 20 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.123";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 21 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initializing, labelPath, initIcon, getState, enabled, phase, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
if (initializing) {
labelPath.visible = true;
}
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local10 = (__width - borderW) - borderW;
var _local11 = (__height - borderW) - borderW;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local9 = Math.min(_local10 - _local7, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local10 - _local9) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local10 - _local9) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local9;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local11 - _local6) / 2;
_local4 = (_local11 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local9 = Math.min(_local10, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local10 - _local9) / 2;
_local2._x = (_local10 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local11 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local11 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
if (initializing) {
_local2.visible = false;
}
} else {
delete labelPath.__text;
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(((labelPath.__text != undefined) ? (labelPath.__text) : (labelPath.text)));
}
function get label() {
return(getLabel());
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(3, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.2.123";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 22 MovieClip [__Packages.mx.controls.CheckBox] Frame 0
class mx.controls.CheckBox extends mx.controls.Button
{
var _getTextFormat, labelPath, iconName;
function CheckBox () {
super();
}
function onRelease() {
super.onRelease();
}
function init() {
super.init();
}
function size() {
super.size();
}
function get emphasized() {
return(undefined);
}
function calcPreferredHeight() {
var _local5 = _getTextFormat();
var _local3 = _local5.getTextExtent2(labelPath.text).height;
var _local4 = iconName._height;
var _local2 = 0;
if ((__labelPlacement == "left") || (__labelPlacement == "right")) {
_local2 = Math.max(_local3, _local4);
} else {
_local2 = _local3 + _local4;
}
return(Math.max(14, _local2));
}
function set toggle(v) {
//return(toggle);
}
function get toggle() {
}
function set icon(v) {
//return(icon);
}
function get icon() {
}
static var symbolName = "CheckBox";
static var symbolOwner = mx.controls.CheckBox;
static var version = "2.0.2.123";
var className = "CheckBox";
var ignoreClassStyleDeclaration = {Button:1};
var btnOffset = 0;
var __toggle = true;
var __selected = false;
var __labelPlacement = "right";
var __label = "CheckBox";
var falseUpSkin = "";
var falseDownSkin = "";
var falseOverSkin = "";
var falseDisabledSkin = "";
var trueUpSkin = "";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "";
var falseUpIcon = "CheckFalseUp";
var falseDownIcon = "CheckFalseDown";
var falseOverIcon = "CheckFalseOver";
var falseDisabledIcon = "CheckFalseDisabled";
var trueUpIcon = "CheckTrueUp";
var trueDownIcon = "CheckTrueDown";
var trueOverIcon = "CheckTrueOver";
var trueDisabledIcon = "CheckTrueDisabled";
var clipParameters = {label:1, labelPlacement:1, selected:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.CheckBox.prototype.clipParameters, mx.controls.Button.prototype.clipParameters);
var centerContent = false;
var borderW = 0;
}
Symbol 68 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 69 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 70 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 71 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 72 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 73 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 74 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 75 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 76 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 77 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 78 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 79 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.123";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 80 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 81 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 82 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 83 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 84 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 85 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.123";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 86 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.2.123";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 87 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 112 MovieClip Frame 10
var rd = random(100);
if (rd < 90) {
gotoAndPlay (1);
}
Symbol 112 MovieClip Frame 14
gotoAndPlay (1);
Symbol 119 MovieClip Frame 10
var rd = random(100);
if (rd < 80) {
gotoAndPlay (1);
}
Symbol 119 MovieClip Frame 18
var rd = random(100);
if (rd < 80) {
gotoAndPlay (10);
} else {
gotoAndPlay (1);
}
Symbol 126 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 2
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 2
stop();
Symbol 132 MovieClip Frame 1
function key(id, i) {
this["key" + id].gotoAndStop(i);
}
function releaseall() {
var _local2 = 0;
while (_local2 < 5) {
this["key" + _local2].gotoAndStop(1);
_local2++;
}
}
Instance of Symbol 135 MovieClip in Symbol 136 MovieClip Frame 1
on (press) {
_parent.endCurrent();
}
Symbol 161 MovieClip Frame 21
stop();
_visible = false;
Symbol 161 MovieClip Frame 45
stop();
if (_root.loadreplay > -1) {
_root.loadDataAndPlay(loadreplay);
} else {
_root.gotoAndPlay(_root.goaway);
}
Symbol 169 MovieClip Frame 1
stop();
var mouseover = false;
onRollOut = function () {
mouseover = false;
};
onRollOver = function () {
mouseover = true;
gotoAndPlay (2);
_root.bipSound.start();
};
Symbol 169 MovieClip Frame 9
gotoAndStop (1);
Symbol 186 MovieClip Frame 66
stop();
Symbol 189 MovieClip Frame 1
stop();
var mouseover = false;
onRollOut = function () {
mouseover = false;
};
onRollOver = function () {
mouseover = true;
_root.bipSound.start();
gotoAndPlay (2);
};
Symbol 189 MovieClip Frame 9
gotoAndStop (1);
Symbol 192 MovieClip Frame 1
stop();
var mouseover = false;
onRollOut = function () {
mouseover = false;
};
onRollOver = function () {
mouseover = true;
_root.bipSound.start();
gotoAndPlay (2);
};
Symbol 192 MovieClip Frame 9
gotoAndStop (1);
Symbol 194 MovieClip Frame 1
stop();
var mouseover = false;
onRollOut = function () {
mouseover = false;
};
onRollOver = function () {
mouseover = true;
gotoAndPlay (2);
};
Symbol 194 MovieClip Frame 9
gotoAndStop (1);
Symbol 217 MovieClip Frame 1
stop();
_root._quality = "HIGH";
Symbol 217 MovieClip Frame 2
stop();
_root._quality = "MEDIUM";
Symbol 217 MovieClip Frame 3
stop();
_root._quality = "LOW";
Symbol 219 MovieClip Frame 1
stop();
var mouseover = false;
onRollOut = function () {
mouseover = false;
};
onRollOver = function () {
mouseover = true;
_root.bipSound.start();
gotoAndPlay (2);
};
Symbol 219 MovieClip Frame 9
gotoAndStop (1);
Symbol 224 MovieClip Frame 1
stop();
var mouseover = false;
onRollOut = function () {
mouseover = false;
};
onRollOver = function () {
mouseover = true;
_root.bipSound.start();
gotoAndPlay (2);
};
Symbol 224 MovieClip Frame 9
gotoAndStop (1);
Symbol 228 MovieClip Frame 1
stop();
_root.levelSound.setVolume(100);
Symbol 228 MovieClip Frame 2
stop();
_root.levelSound.setVolume(0);
Symbol 234 MovieClip Frame 1
_visible = false;
stop();
Symbol 234 MovieClip Frame 40
stop();
Symbol 234 MovieClip Frame 79
_visible = false;
stop();
Symbol 244 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 21
_visible = false;
stop();
Symbol 250 MovieClip Frame 30
gotoAndPlay (1);
Symbol 258 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 21
_visible = false;
stop();
Symbol 265 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 21
_visible = false;
stop();
Symbol 269 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 21
_visible = false;
stop();
Symbol 274 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 21
_visible = false;
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 21
_visible = false;
stop();
Symbol 280 MovieClip Frame 1
stop();
Symbol 280 MovieClip Frame 21
_visible = false;
stop();
Symbol 284 MovieClip Frame 1
stop();
Symbol 284 MovieClip Frame 21
_visible = false;
stop();
Symbol 290 MovieClip Frame 1
stop();
Symbol 290 MovieClip Frame 21
_visible = false;
stop();
Symbol 297 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 2
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 2
stop();
Symbol 317 MovieClip Frame 30
gotoAndPlay((random(4) * 30) + 1);
Symbol 317 MovieClip Frame 60
gotoAndPlay((random(4) * 30) + 1);
Symbol 317 MovieClip Frame 90
gotoAndPlay((random(4) * 30) + 1);
Symbol 317 MovieClip Frame 120
gotoAndPlay((random(4) * 30) + 1);
Symbol 317 MovieClip Frame 150
gotoAndPlay((random(4) * 30) + 1);
Symbol 320 MovieClip Frame 30
var rd = random(100);
if (rd < 90) {
gotoAndPlay (1);
}
Symbol 320 MovieClip Frame 35
gotoAndPlay (1);
Symbol 320 MovieClip Frame 60
var rd = random(100);
if (rd < 90) {
gotoAndPlay (36);
}
Symbol 320 MovieClip Frame 64
gotoAndPlay (36);
Symbol 324 MovieClip Frame 17
_root.layers[_layer].free = true;
stop();
Symbol 325 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 21
_visible = false;
stop();
Symbol 334 MovieClip Frame 1
score.text = thescore;
Symbol 334 MovieClip Frame 31
gotoAndPlay (1);
Symbol 336 MovieClip Frame 1
Symbol 337 MovieClip Frame 1
function startit() {
if (!showit) {
_visible = true;
locked = 0;
aRef = 0;
star180._visible = true;
star180.gotoAndStop(1);
showit = true;
this.demi2._rotation = 0;
this.demicolor2._rotation = 0;
scoreobj._visible = false;
titleobj.score.text = "";
}
}
function endit() {
showit = false;
}
function trans() {
if (_visible) {
if (showit) {
posx = posx + ((posvisx - posx) * 0.3);
} else {
posx = posx + ((posnotvisx - posx) * 0.1);
if (Math.abs(posx - posnotvisx) < 1) {
_visible = false;
}
}
_x = posx;
}
}
function rot(a) {
var _local3 = false;
if (_visible) {
if (locked != 0) {
a = 180 * locked;
}
if (a < 0) {
this.demi._rotation = 0;
this.demicolor._rotation = a;
titleobj.score.text = "BACKFLIP";
} else {
this.demi._rotation = 180;
this.demicolor._rotation = a + 180;
titleobj.score.text = "FLIP";
}
a = a + (360 - (aRef - 180));
a = (a - (Math.floor(a / 360) * 360)) - 180;
if (Math.abs(a) > 90) {
_local3 = true;
var _local4 = aRef;
if (a > 0) {
aRef = aRef + 90;
} else {
aRef = aRef - 90;
}
if (aRef < 0) {
aRef = aRef + 360;
}
if (aRef >= 360) {
aRef = aRef - 360;
}
if (aRef == 180) {
if (_local4 == 90) {
locked = 1;
this.demi._rotation = 180;
this.demicolor._rotation = 0;
titleobj.score.text = "FLIP";
} else {
locked = -1;
this.demi._rotation = 0;
this.demicolor._rotation = 180;
titleobj.score.text = "BACKFLIP";
}
this["star" + aRef].gotoAndPlay(2);
}
}
}
return(_local3);
}
function rot2(rap) {
titleobj.score.text = "LANDING";
var _local2 = (-(rap * 180)) * locked;
if (_local2 < 0) {
this.demi2._rotation = 0;
this.demicolor2._rotation = -_local2;
} else {
this.demi2._rotation = 180;
this.demicolor2._rotation = (-_local2) + 180;
}
}
function score(s) {
scoreobj.thescore = s;
scoreobj.score.text = s;
scoreobj._visible = true;
}
var aRef = 0;
var locked = 0;
scoreobj._visible = false;
var posvisx = 70;
var posnotvisx = -100;
var posx = posnotvisx;
var showit = false;
Instance of Symbol 334 MovieClip "scoreobj" in Symbol 337 MovieClip Frame 1
onClipEvent (load) {
var thescore = 0;
}
Instance of Symbol 336 MovieClip "titleobj" in Symbol 337 MovieClip Frame 1
/* no clip actions */
Symbol 344 MovieClip Frame 1
function startit() {
if (!showit) {
_visible = true;
locked = 0;
aRef = 0;
star180._visible = true;
star180.gotoAndPlay(1);
showit = true;
this.demi._x = 0;
this.demiend._x = 0;
scoreobj._visible = false;
titleobj.score.text = "BIG JUMP";
}
}
function endit() {
showit = false;
}
function trans() {
if (_visible) {
if (showit) {
posx = posx + ((posvisx - posx) * 0.3);
} else {
posx = posx + ((posnotvisx - posx) * 0.15);
if (Math.abs(posx - posnotvisx) < 1) {
_visible = false;
}
}
_x = posx;
}
}
function rot(a) {
var _local4 = false;
if (_visible) {
if (locked != 0) {
a = _root.bigjumpminscore;
if (star180._currentframe <= 2) {
star180.gotoAndPlay(3);
}
}
if (a > _root.bigjumpminscore) {
_local4 = true;
locked = 1;
star180.gotoAndPlay(2);
a = _root.bigjumpminscore;
}
this.demi._x = (this.demiend._x = -50 + ((50 * (a - _root.bigjumpmin)) / (_root.bigjumpminscore - _root.bigjumpmin)));
}
return(_local4);
}
function rot2(rap) {
titleobj.score.text = "LANDING";
this.demi._x = (this.demiend._x = 50 * rap);
}
function score(s) {
scoreobj.thescore = s;
scoreobj.score.text = s;
scoreobj._visible = true;
}
var aRef = 0;
var locked = 0;
scoreobj._visible = false;
var posvisx = 70;
var posnotvisx = -100;
var posx = posnotvisx;
var showit = false;
Instance of Symbol 334 MovieClip "scoreobj" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
var thescore = 0;
}
Instance of Symbol 336 MovieClip "titleobj" in Symbol 344 MovieClip Frame 1
/* no clip actions */
Symbol 346 MovieClip Frame 1
Symbol 355 MovieClip Frame 1
_visible = true;
Symbol 355 MovieClip Frame 10
gotoAndPlay (1);
Symbol 355 MovieClip Frame 21
_visible = false;
stop();
Symbol 362 MovieClip Frame 1
function refreshProgress(p) {
progresspos._x = 2 + (196 * p);
}
Symbol 364 MovieClip Frame 1
stop();
var mouseover = false;
onRollOut = function () {
mouseover = false;
};
onRollOver = function () {
mouseover = true;
gotoAndPlay (2);
};
Symbol 364 MovieClip Frame 9
gotoAndStop (1);
Symbol 384 MovieClip Frame 10
_root.badSound.start();
Symbol 384 MovieClip Frame 45
_root.badSound.start();
Symbol 384 MovieClip Frame 80
_root.badSound.start();
Symbol 384 MovieClip Frame 115
_root.badSound.start();
Symbol 384 MovieClip Frame 150
_root.badSound.start();
Symbol 384 MovieClip Frame 185
_root.gameover();
_root.badSound.start();
stop();
Symbol 392 MovieClip Frame 75
_visible = false;
gotoAndStop (1);
Instance of Symbol 135 MovieClip in Symbol 428 MovieClip Frame 1
on (press) {
_root.labelOK();
}
Symbol 431 MovieClip Frame 1
stop();
var mouseover = false;
onRollOut = function () {
mouseover = false;
};
onRollOver = function () {
mouseover = true;
gotoAndPlay (2);
};
Symbol 431 MovieClip Frame 9
gotoAndStop (1);