Frame 1
Stage.scaleMode = "noscale";
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
my_cm.builtInItems.quality = true;
this.menu = my_cm;
_root.stop();
_root.createEmptyMovieClip("loader", _root.getNextHighestDepth());
_root.loader.onEnterFrame = function () {
if ((_root._framesloaded > 0) and (_root._currentframe == 1)) {
_root.gotoAndStop(2);
this.removeMovieClip();
}
};
mainXml = new XML();
mainXml.ignoreWhite = true;
mainXml.onLoad = function (success) {
if (success) {
_root.xmlSuccess = true;
}
};
_root.xmlSuccess = false;
if (_url.indexOf("http://") != -1) {
var todaydate = new Date();
var rndd = ((("" + todaydate.getFullYear()) + todaydate.getMonth()) + todaydate.getDate());
mainXml.load("instinct.xml?rnd=" + rndd);
} else {
mainXml.load("instinct.xml");
}
Frame 2
var ldr = _root.stLoader;
_root.stop();
preFlagWrapping = function () {
var _local6 = _root.stLoader.picHolder.preFlagShadowBmp;
var _local2 = _root.stLoader.picHolder.preFlagShadowTileBmp;
var _local7 = _root.stLoader.picHolder;
_local7.numCount = _local7.numCount + 3;
var _local4 = -1;
while (_local4 < (int(_local6.height / _local2.height) + 1)) {
var _local3 = new flash.geom.Rectangle(0, (_local2.height * _local4) + (_local7.numCount % _local2.height), _local2.width, _local2.height);
var _local5 = new flash.geom.Matrix(1, 0, 0, 1, _local3.x, _local3.y);
_local6.draw(_local2, _local5, new flash.geom.ColorTransform(), null, _local3);
_local4++;
}
};
preFlagSetup = function () {
var _local3 = (_root.stLoader.picHolder.preFlagShadowBmp = new flash.display.BitmapData(131, 177, false, 16777215));
var _local4 = (_root.stLoader.picHolder.preFlagShadowTileBmp = flash.display.BitmapData.loadBitmap("preshadow"));
_root.stLoader.picHolder.attachBitmap(_local3, 0);
_root.stLoader.picHolder.numCount = 0;
_root.stLoader.picHolder.onEnterFrame = function () {
preFlagWrapping();
};
this.numCount = 0;
};
preFlagSetup();
_root.createEmptyMovieClip("globalSound", _root.getNextHighestDepth());
_root.globalSound.createEmptyMovieClip("soundLib", _root.globalSound.getNextHighestDepth());
_root.globalSound._visible = false;
loadMovie ("instinct_sounds.swf", _root.globalSound.soundLib);
preloadercover._alpha = 100;
ldr.backCount = 20;
ldr.onEnterFrame = function () {
if (preloadercover._alpha > 3) {
preloadercover._alpha = preloadercover._alpha - 5;
} else {
preloadercover._visible = false;
this.onEnterFrame = function () {
var _local3 = int((_root.getBytesLoaded() * 100) / _root.getBytesTotal());
var _local4 = int((_root.globalSound.soundLib.getBytesLoaded() * 100) / _root.globalSound.soundLib.getBytesTotal());
if ((_local3 == 100) and (_local4 == 100)) {
preloadercover._visible = true;
if (!this.backCount) {
if (preloadercover._alpha < 96) {
preloadercover._alpha = preloadercover._alpha + 5;
} else {
this.swapDepths(666);
this.removeMovieClip();
_root.play();
}
} else {
this.backCount--;
}
}
};
}
};
ldr.createEmptyMovieClip("pCounter", ldr.getNextHighestDepth());
ldr.pCounter.p = 0;
ldr.pCounter.ps = 0;
ldr.pCounter.onEnterFrame = function () {
var _local4 = (_root.getBytesLoaded() * 100) / _root.getBytesTotal();
var _local3 = (_root.globalSound.soundLib.getBytesLoaded() * 100) / _root.globalSound.soundLib.getBytesTotal();
this.p = this.p + ((_local4 - this.p) / 5);
this._parent.bigarrow._rotation = (this.p / 100) * 270;
if (!isNaN(_local3)) {
this.ps = this.ps + ((_local3 - this.ps) / 5);
this._parent.smallarrow._rotation = (this.ps / 100) * 102;
} else {
this._parent.smallarrow._rotation = 0;
}
};
Frame 3
_root._visible = false;
stw = 1004;
sth = 600;
globalDown = 10;
globalPause = (onGroundPause = false);
underGroundPause = true;
globalAcceptedOffset = (globalOffset = 0);
_root.xMouseOffset = 0;
_root.groundDepth = 228;
initStart = function () {
_root._visible = true;
back_bmp = new flash.display.BitmapData(stw, sth, false, 0);
createAndInitDirector();
_root.attachBitmap(back_bmp, _root.getNextHighestDepth());
var back_mc = _root.attachMovie("intro", "intro_mc", _root.getNextHighestDepth());
startWaterFlow();
back_mc.stop();
back_mc.moon_mc._y = sth;
back_mc.moon_mc.inc = 3;
back_mc.moon_mc.dec = 0.7;
back_mc.hand.stop();
back_mc._y = globalDown;
back_mc.onEnterFrame = function () {
if (Math.abs(this.moon_mc._y - 81) > 1) {
this.moon_mc._y = 81 - ((this.moon_mc._y - 81) / this.moon_mc.inc);
(((this.moon_mc.inc * this.moon_mc.dec) > 1.2) ? ((this.moon_mc.inc = this.moon_mc.inc * this.moon_mc.dec)) : ((this.moon_mc.inc = 1.2)));
} else {
this.moon_mc._y = 81;
if (!skyline) {
skyline = flash.display.BitmapData.loadBitmap("sky_line.gif");
sky_was_blue = new flash.display.BitmapData(stw, sth, false, 0);
_root.createEmptyMovieClip("glow_mc", _root.getNextHighestDepth());
with (_root.glow_mc) {
var radius = 660;
fillType = "radial";
colors = [9698046, 8774117, 7322815, 4024169, 0];
alphas = [100, 100, 100, 100, 100];
ratios = [0, 80, 112, 160, 255];
spreadMethod = "pad";
interpolationMethod = "RGB";
focalPointRatio = 0;
matrix = new flash.geom.Matrix();
matrix.createGradientBox(radius, radius, 0, 0, 0);
beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod, interpolationMethod, focalPointRatio);
moveTo(0, 0);
lineTo(0, radius);
lineTo(radius, radius);
lineTo(radius, 0);
lineTo(0, 0);
endFill();
}
sky_was_blue.draw(skyline, new flash.geom.Matrix(stw / 2, 0, 0, 1, 0, 0));
sky_was_blue.draw(_root.glow_mc, new flash.geom.Matrix(1, 0, 0, 1, (stw / 2) - (_root.glow_mc._width / 2), (sth / 2) - (_root.glow_mc._height / 2)), null, "screen");
_root.glow_mc.removeMovieClip();
skyline.dispose();
} else {
if (!this.skylinecltrns) {
this.skylinecltrns = new flash.geom.ColorTransform(1, 1, 1, 0.01, 0, 0, 0, 0);
} else if (this.skylinecltrns.alphaMultiplier < 1) {
this.skylinecltrns.alphaMultiplier = this.skylinecltrns.alphaMultiplier * 1.3;
} else {
this.skylinecltrns.alphaMultiplier = 1;
sky_was_blue.dispose();
delete this.onEnterFrame;
this.gotoAndPlay(2);
var i = 0;
while (i < 2) {
var water_mc = this.river.createEmptyMovieClip("waterTile" + i, this.river.getNextHighestDepth());
water_mc.attachBitmap(waterBmp, water_mc.getNextHighestDepth());
water_mc._x = ((220 + ((stw - 440) * i)) - (water_mc._width / 2)) + this.river._x;
i++;
}
this.objectsToReveal = [this.front_ground, this.river, this.middle_ground, this.back_ground];
this.objectsToReveal.push(this.cloud_06, this.cloud_03, this.cloud_02, this.cloud_04, this.cloud_05, this.cloud_01);
this.objectXOffsets = [300, 110, 70, 30];
this.objectXOffsets.push(25, 12, 15, 20, 20, 15);
var i = 0;
while (i < this.objectsToReveal.length) {
var obj = this.objectsToReveal[i];
obj.xOffset = this.objectXOffsets[i];
obj.targetX = obj._x;
obj.targetY = obj._y;
obj.stop();
if (obj._name.indexOf("cloud") == -1) {
obj._y = sth;
obj.breaks = i * 6;
obj.inc = 5;
obj.dec = 0.7;
obj.onEnterFrame = function () {
if (!this.breaks) {
if (Math.abs(this._y - this.targetY) > 1) {
this._y = this.targetY - ((this._y - this.targetY) / this.inc);
(((this.inc * this.dec) > 1.1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1.1)));
} else if (this._currentframe != this._totalframes) {
this.nextFrame();
(((this._currentframe == 60) and (this._name == "front_ground")) ? startWagen() : 1);
} else {
((this._name != "river") ? ((this.cacheAsBitmap = true)) : 1);
delete this.onEnterFrame;
}
} else {
this.breaks--;
}
};
} else {
obj._y = -obj._height;
obj.breaks = (11 - i) * 2;
obj.inc = 22 - (i * 2);
obj.dec = 0.7;
obj.nextNum = i + 1;
obj.ncounter = 0;
obj.ncounterInc = 0.314159265358979;
}
i++;
}
this.objectsToReveal[4].onEnterFrame = function () {
if (this._parent.back_ground._currentframe != 1) {
if ((this._parent.objectsToReveal[this.nextNum] and (!this._parent.objectsToReveal[this.nextNum].onEnterFrame)) and (!this.breaks)) {
this._parent.objectsToReveal[this.nextNum].onEnterFrame = this.onEnterFrame;
}
this.breaks--;
if (!this.free) {
if (Math.abs(this._y - this.targetY) > 1) {
this._y = this._y + ((this.targetY - this._y) / this.inc);
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
} else {
this.free = true;
this.ncounter = this.ncounter + this.ncounterInc;
this.ncounterInc = this.ncounterInc * 0.98;
this._y = this.targetY + (15 * Math.sin(this.ncounter));
}
} else {
if (!this.cacheAsBitmap) {
((!this.nonCacheable) ? ((this.cacheAsBitmap = true)) : 1);
}
this.nextFrame();
this.ncounter = this.ncounter + this.ncounterInc;
this.ncounterInc = this.ncounterInc * 0.98;
this._y = this.targetY + (15 * Math.sin(this.ncounter));
if ((this.ncounter > Math.PI) and (this._currentframe >= this._totalframes)) {
if (this._parent.objectsToReveal[this.nextNum]._name.indexOf("cloud") == -1) {
startMoonFlow();
}
delete this.onEnterFrame;
}
}
}
};
}
back_bmp.draw(sky_was_blue, new flash.geom.Matrix(1, 0, 0, 1, 0, 0), this.skylinecltrns);
}
}
};
_root.attachMovie("sceneBorder", "sceneBorder", _root.getNextHighestDepth());
_root.sceneBorder.goMenu.stop();
_root.sceneBorder.sndSys.stop();
_root.sceneBorder._alpha = 0;
_root.sceneBorder.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
} else {
this._alpha = 100;
delete this.onEnterFrame;
}
};
initSound();
};
startWagen = function () {
((!admin) ? ((contentMc = _root.createEmptyMovieClip("contentMc", _root.getNextHighestDepth()))) : 1);
((!admin) ? ((bottomMc = _root.createEmptyMovieClip("bottomMc", _root.getNextHighestDepth()))) : 1);
((!admin) ? (bottomMc.swapDepths(_root.sceneBorder)) : 1);
(admin ? ((_root.intro_mc._y = globalDown)) : 1);
contentMc._y = globalDown;
(admin ? (_root.attachMovie("sceneBorder", "sceneBorder", _root.getNextHighestDepth())) : 1);
(admin ? (initSound()) : 1);
wagenPause = true;
var _local3 = contentMc.attachMovie("sofa", "sofa", contentMc.getNextHighestDepth());
contentMc.createEmptyMovieClip("cargoPlaceHolder", contentMc.getNextHighestDepth());
var _local2 = contentMc.attachMovie("wagen", "wagen", contentMc.getNextHighestDepth());
_local3._y = (_local2._y = 390);
_local2.targetX = (_local3.targetX = intro_mc.front_ground.targetX + intro_mc.front_ground._width);
_local2.xOffset = (_local3.xOffset = _root.intro_mc.front_ground.xOffset + 50);
var _local4 = _local2.front_wheel;
var _local5 = _local2.back_wheel;
_local4.radius = 37.75;
_local5.radius = 42.5;
_local2.head_mc.xPos = _local2.head_mc._x;
_local2.head_mc.yPos = _local2.head_mc._y;
_local2.front_corp_mc.xPos = _local2.front_corp_mc._x;
_local2.front_corp_mc.yPos = _local2.front_corp_mc._y;
_local2.nonCacheable = true;
_root.intro_mc.objectsToReveal.push(_local3, _local2);
((!admin) ? (placeMachine()) : 1);
createAltMenu();
};
wagenMove = function (offset) {
if (((!globalPause) and (!onGroundPause)) and (!wagenPause)) {
var _local1 = contentMc.wagen;
var _local5 = contentMc.sofa;
var _local2 = _local1.front_wheel;
var _local4 = _local1.back_wheel;
_local2._rotation = _local2._rotation + (((offset / _local2.radius) * 180) / Math.PI);
_local4._rotation = _local4._rotation + (((offset / _local4.radius) * 180) / Math.PI);
_local5.targetX = _local5.targetX + offset;
_local1.targetX = _local1.targetX + offset;
_local1.cargo.targetX = _local1.cargo.targetX + offset;
_local1.head_mc._x = _local1.head_mc.xPos + (10 * Math.cos((_local2._rotation / 180) * Math.PI));
_local1.head_mc._y = _local1.head_mc.yPos + (4 * Math.sin((_local2._rotation / 180) * Math.PI));
_local1.front_corp_mc._y = _local1.front_corp_mc.yPos + Math.cos(getTimer() / 15);
}
};
startMoonFlow = function () {
var _local3 = _root.intro_mc.moon_mc;
hand = _root.intro_mc.hand;
_local3.cacheAsBitmap = true;
_local3.centerPoint = new flash.geom.Point((stw / 2) - (_local3._width / 2), sth + 1500);
_local3.ancorPoint = new flash.geom.Point(_local3._x, _local3._y);
_local3.radius = Math.sqrt(Math.pow(_local3.centerPoint.x - _local3.ancorPoint.x, 2) + Math.pow(_local3.centerPoint.y - _local3.ancorPoint.y, 2));
_local3.angRad = Math.atan2(_local3.centerPoint.y - _local3._y, _local3.centerPoint.x - _local3._x) + Math.PI;
_local3.inc = 0.00314159265358979;
if (!_root.admin) {
hand.play();
hand.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.swapDepths(666);
this.removeMovieClip();
}
};
} else {
_root.toDoList.push([_root.moonFlow, true]);
}
};
moonFlow = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2 = _root.intro_mc.moon_mc;
_local2.angRad = _local2.angRad - _local2.inc;
_local2._x = _local2.centerPoint.x + (_local2.radius * Math.cos(_local2.angRad));
_local2._y = _local2.centerPoint.y + (_local2.radius * Math.sin(_local2.angRad));
if (Math.cos(_local2.angRad) < -0.5) {
_local2.angRad = 5.1;
}
}
};
createAndInitDirector = function () {
_root.createEmptyMovieClip("dir_mc", _root.getNextHighestDepth());
_root.toDoList = [[mouseCapture], [moveGrounds, true]];
_root.dir_mc.onEnterFrame = function () {
var _local2 = 0;
while (_local2 < _root.toDoList.length) {
if ((_root.toDoList[_local2][1] != _root.onGroundPause) and (_root.toDoList[_local2][1] == undefined)) {
_root.toDoList[_local2][0](_root.toDoList[_local2][3], _root.toDoList[_local2][4], _root.toDoList[_local2][5], _root.toDoList[_local2][6]);
}
if ((_root.toDoList[_local2][2] != _root.underGroundPause) and (_root.toDoList[_local2][2] == undefined)) {
_root.toDoList[_local2][0](_root.toDoList[_local2][3], _root.toDoList[_local2][4], _root.toDoList[_local2][5], _root.toDoList[_local2][6]);
}
if ((_root.toDoList[_local2][1] == undefined) and (_root.toDoList[_local2][1] == undefined)) {
_root.toDoList[_local2][0](_root.toDoList[_local2][3], _root.toDoList[_local2][4], _root.toDoList[_local2][5], _root.toDoList[_local2][6]);
}
_local2++;
}
};
};
moveGrounds = function () {
if ((!globalPause) and (!onGroundPause)) {
_root.globalOffset = _root.globalOffset + ((_root.globalAcceptedOffset - _root.globalOffset) / 30);
var _local3 = 0;
while (_local3 < _root.intro_mc.objectsToReveal.length) {
var _local2 = _root.intro_mc.objectsToReveal[_local3];
if (!_local2.draget) {
_local2._x = _local2.targetX - ((_root.xMouseOffset * _local2.xOffset) * _root.globalOffset);
}
_local3++;
}
}
};
_root.onGroundXMDel = 5;
mouseCapture = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2;
if ((_xmouse >= 0) and (_xmouse < 1004)) {
_local2 = (_xmouse - (stw / 2)) / (stw / 2);
} else {
((_xmouse < 0) ? (_local2 = -1) : (_local2 = 1));
}
_root.onGroundXMDel = _root.onGroundXMDel + ((5 - _root.onGroundXMDel) / 15);
_root.xMouseOffset = _root.xMouseOffset + ((_local2 - _root.xMouseOffset) / _root.onGroundXMDel);
}
};
startWaterFlow = function () {
waterTileBmp = flash.display.BitmapData.loadBitmap("water_tile");
waveTileBmp = flash.display.BitmapData.loadBitmap("wave_tile");
waterBmp = new flash.display.BitmapData(524, waterTileBmp.height + 20, false, 10344431);
var _local3 = _root.createEmptyMovieClip("waterFlow_mc", _root.getNextHighestDepth());
_local3.tiles = int(waterBmp.width / waterTileBmp.width) + 2;
var _local2 = 0;
while (_local2 < _local3.tiles) {
var _local5 = (_local3["rect" + _local2] = waterTileBmp.rectangle.clone());
_local5.offset(_local2 * waterTileBmp.width, 0);
_local2++;
}
_local3.waveTiles = int(waterBmp.width / waveTileBmp.width) + 2;
_local2 = 0;
while (_local2 < _local3.waveTiles) {
var _local5 = (_local3["waveRect" + _local2] = waveTileBmp.rectangle.clone());
_local5.offset(_local2 * waveTileBmp.width, 11);
var _local4 = (_local3["waveRectBottom" + _local2] = waveTileBmp.rectangle.clone());
_local4.offset((_local2 * waveTileBmp.width) - (waveTileBmp.width / 6), 31);
_local2++;
}
_root.toDoList.push([waterFlow, true, undefined, _local3]);
};
waterFlow = function (neptune) {
if ((!globalPause) and (!onGroundPause)) {
var _local4 = 0;
while (_local4 < neptune.tiles) {
var _local2 = neptune["rect" + _local4];
((_local2.x > (waterTileBmp.width * (neptune.tiles - 1))) ? ((_local2.x = -waterTileBmp.width)) : (_local2.offset(1, 0)));
var _local6 = new flash.geom.Matrix(1, 0, 0, 1, _local2.x, 0);
waterBmp.draw(waterTileBmp, _local6, null, null, _local2);
_local4++;
}
_local4 = 0;
while (_local4 < neptune.waveTiles) {
var _local2 = neptune["waveRect" + _local4];
((_local2.x <= (-waveTileBmp.width)) ? ((_local2.x = (waveTileBmp.width * (neptune.waveTiles - 1)) - 3)) : (_local2.offset(-1, 0)));
var _local6 = new flash.geom.Matrix(1, 0, 0, 1, _local2.x, _local2.y);
waterBmp.draw(waveTileBmp, _local6, null, "screen", _local2);
var _local1 = neptune["waveRectBottom" + _local4];
((_local1.x <= (-waveTileBmp.width)) ? ((_local1.x = (waveTileBmp.width * (neptune.waveTiles - 1)) - 3)) : (_local1.offset(-1.5, 0)));
var _local5 = new flash.geom.Matrix(1, 0, 0, 1, _local1.x, _local1.y);
waterBmp.draw(waveTileBmp, _local5, null, "screen", _local1);
_local4++;
}
}
};
Frame 4
describeSleepein = function (mach) {
mach.cacheAsBitmap = false;
mach.targetXX = (_root.stw / 2) - 110;
mach.xInc = 40;
mach.onEnterFrame = function () {
if ((Math.abs(this.wing_r._rotation) > 2) and (!_root.admin)) {
this.wing_r._rotation = this.wing_r._rotation - (this.wing_r._rotation / 2);
this.wing_l._rotation = this.wing_l._rotation - (this.wing_l._rotation / 2);
} else {
this.incounter = 0;
this.incincounter = 0.0314159265358979;
this.onEnterFrame = function () {
var _local6 = this.wing_l._rotation;
this.wing_r._rotation = -45 * Math.sin(this.incounter);
this.wing_l._rotation = 45 * Math.sin(this.incounter);
if ((_local6 > 35) and (this.wing_l._rotation < 35)) {
playNow("wings");
}
if (this.incincounter < (Math.PI/4)) {
this.incounter = this.incounter + ((this.incincounter * (Math.sin(this.incounter) > 0)) + ((this.incincounter / 2) * (Math.sin(this.incounter) <= 0)));
this.incincounter = this.incincounter + 0.0314159265358979;
} else {
if (this._y > 60) {
this.tmpyinc = ((8 * Math.sin(this.incounter)) * (Math.sin(this.incounter) < 0)) + ((2 * Math.sin(this.incounter)) * (Math.sin(this.incounter) > 0));
this._y = this._y + this.tmpyinc;
} else {
this.incincounter = (Math.PI/2);
this.yinc = 0.6;
this.onEnterFrame = function () {
this.xOffset = this.xOffset + ((_root.intro_mc.front_ground.xOffset - this.xOffset) / this.xInc);
this.targetX = this.targetX + ((this.targetXX - this.targetX) / this.xInc);
var _local5 = this.incounter;
this.wing_r._rotation = -45 * Math.sin(this.incounter);
this.wing_l._rotation = 45 * Math.sin(this.incounter);
if (this._y < 125) {
this._y = this._y + (this.tmpyinc + this.yinc);
if (this._y > 125) {
this._y = this._y + ((125 - this._y) / 2);
playNow("machine_fallin");
}
this.yinc = this.yinc * 1.2;
this.incounter = this.incounter + this.incincounter;
this.oldBodyY = this.oldBody._y;
} else {
((this._currentframe == 1) ? (this.play()) : 1);
this._y = 128;
if (this.incincounter > 0.261799387799149) {
this.incounter = this.incounter + this.incincounter;
this.incincounter = this.incincounter * 0.8;
} else {
if (this.incounter > (Math.PI*2)) {
this.incounter = this.incounter % (Math.PI*2);
}
if (Math.abs(this.incounter) > 0.1) {
this.incounter = this.incounter - (this.incounter / 5);
} else {
var _local4 = contentMc.attachMovie("live_machine", "machine", contentMc.getNextHighestDepth(), {_x:int(this._x), _y:int(this._y)});
_local4.xOffset = this.xOffset;
_local4.targetX = this.targetX;
_local4.wing_r._x = this.wing_r._x;
_local4.wing_r._y = this.wing_r._y;
_local4.wing_r._rotation = this.wing_r._rotation;
_local4.wing_l._x = this.wing_l._x;
_local4.wing_l._y = this.wing_l._y;
_local4.wing_l._rotation = this.wing_l._rotation;
_local4.mouthOpen._visible = false;
fishMask = contentMc.attachMovie("fish_mask", "fishMask", contentMc.getNextHighestDepth(), {_x:608, _y:319});
fishMask._visible = 0;
fishMask.xOffset = _local4.xOffset;
fishMask.targetX = _local4.targetX + 215;
wakeUpMachine(_local4, fishMask);
var _local3 = 0;
while (_local3 < _root.intro_mc.objectsToReveal.length) {
if (_root.intro_mc.objectsToReveal[_local3] == this) {
_root.intro_mc.objectsToReveal.splice(_local3, 1);
_local3 = _root.intro_mc.objectsToReveal.length;
}
_local3++;
}
_root.intro_mc.objectsToReveal.push(_local4);
this.swapDepths(_local4);
this.removeMovieClip();
}
}
this.wing_r._y = this.wing_r._y + (this.oldBody._y - this.oldBodyY);
this.wing_l._y = this.wing_l._y + (this.oldBody._y - this.oldBodyY);
this.oldBodyY = this.oldBody._y;
}
if ((Math.sin(_local5) / Math.abs(Math.sin(_local5))) != (Math.sin(this.incounter) / Math.abs(Math.sin(this.incounter)))) {
if ((!isNaN(this.incounter)) and ((Math.sin(_local5) / Math.abs(Math.sin(_local5))) < 0)) {
playNow("wings" + ((1 - (Math.sin(_local5) / Math.abs(Math.sin(_local5)))) / 2));
}
}
};
}
_local6 = this.incounter;
this.incounter = this.incounter + ((this.incincounter * (Math.sin(this.incounter) > 0)) + ((this.incincounter / 2) * (Math.sin(this.incounter) <= 0)));
this.xOffset = this.xOffset + ((_root.intro_mc.front_ground.xOffset - this.xOffset) / this.xInc);
this.targetX = this.targetX + ((this.targetXX - this.targetX) / this.xInc);
}
};
}
};
};
placeMachine = function () {
var _local4 = contentMc.createEmptyMovieClip("machineBuildController", contentMc.getNextHighestDepth());
var _local3 = contentMc.attachMovie("sleepin_machine", "sleepin_machine", contentMc.getNextHighestDepth());
_local3.stop();
_local3.wing_r._rotation = 50;
_local3.wing_l._rotation = -50;
_local3.swapDepths(contentMc.cargoPlaceHolder);
_local3.cacheAsBitmap = true;
_local3._y = 170;
_local3.xOffset = contentMc.wagen.xOffset;
_local3.targetX = contentMc.wagen.targetX + 110;
_root.intro_mc.objectsToReveal.push(_local3);
contentMc.wagen.cargo = _local3;
wagenPause = false;
_local4.wagenStopCounter = 10;
(_root.admin ? (wagenMove(-900)) : 1);
_local4.onEnterFrame = function () {
if (contentMc.wagen.targetX > 500) {
wagenMove(-15);
} else {
if ((contentMc.wagen.targetX < 350) and (!contentMc.sleepin_machine.onEnterFrame)) {
describeSleepein(contentMc.sleepin_machine);
}
if (Math.abs(300 - contentMc.wagen.targetX) < 3) {
this.wagenStopCounter--;
if (!this.wagenStopCounter) {
contentMc.wagen.cargo.swapDepths(contentMc.cargoPlaceHolder);
delete contentMc.wagen.cargo;
this.onEnterFrame = function () {
if (contentMc.wagen.targetX > (_root.intro_mc.front_ground.targetX - contentMc.wagen._width)) {
if (this.wagenStopCounter > -15) {
this.wagenStopCounter = this.wagenStopCounter - 0.75;
}
wagenMove(this.wagenStopCounter);
} else {
if (!wagenPause) {
wagenPause = true;
}
delete this.onEnterFrame;
}
};
}
}
var _local3 = (300 - contentMc.wagen.targetX) / 15;
wagenMove(_local3);
}
};
};
wagenMakeAMove = function (targX) {
var _local2 = contentMc.wagen;
wagenPause = false;
_local2._x = (_local2.targetX = intro_mc.front_ground._x + intro_mc.front_ground._width);
_local2.getToX = targX;
_local2.onEnterFrame = function () {
var _local2 = (this.getToX - this.targetX) / 30;
wagenMove(_local2);
};
};
Frame 5
machineStartLive = function () {
var _local2 = contentMc.machine;
_local2.wishList = [];
_local2.wishList.push([_root.eyeShackin, 1]);
_local2.wishList.push([_root.titanShakin, 4]);
_local2.wishList.push([_root.reelRotation, 4]);
_local2.wishList.push([_root.pipeShakin, 3]);
_local2.wishList.push([_root.tubeShakin, 5]);
_local2.wishList.push([_root.wingsShakin, 3]);
_local2.inProccessList = [];
_root.toDoList.push([_root.machineLive, true]);
prepareContentLoading();
describeLook();
};
machineLive = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2 = contentMc.machine;
if ((!random(20)) and _local2.wishList.length) {
var _local4 = random(_local2.wishList.length);
var _local3 = _local2.wishList[_local4];
if (!random(_local3[1])) {
_local2.wishList.splice(_local4, 1);
_root.toDoList.push([_local3[0], true]);
_local2.inProccessList.push(_local3);
}
}
if (_local2.inProccessList.length) {
if (_local2.cacheAsBitmap) {
_local2.cacheAsBitmap = false;
}
} else if (!_local2.cacheAsBitmap) {
_local2.cacheAsBitmap = true;
}
}
};
topTubeBlow = function () {
var _local2 = contentMc.machine.top_tube;
if (((!globalPause) and (!onGroundPause)) and _root.realyClearToBlowUp) {
if (!_local2.inProcess) {
_local2.inProcess = true;
_local2.play();
} else {
_local2.play();
if (_local2._currentframe == _local2._totalframes) {
_local2.stop();
_local2.inProcess = false;
}
}
} else if (_root.realyClearToBlowUp) {
_local2.stop();
} else {
_local2.gotoAndStop(1);
}
};
wingsShakin = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2 = contentMc.machine.wing_r;
var _local3 = contentMc.machine.wing_l;
if (!_local2.inProcess) {
_local2.inProcess = true;
_local2.countDown = 50 + random(50);
_local2.incounter = 0;
_local2.incincounter = 0.0314159265358979;
} else {
if (_local2.countDown) {
_local2.countDown--;
_local2._rotation = 45 * Math.sin(_local2.incounter);
_local3._rotation = -45 * Math.sin(_local2.incounter);
var _local4 = _local2.incounter;
_local2.incounter = _local2.incounter + ((_local2.incincounter * (Math.sin(_local2.incounter) < 0)) + ((_local2.incincounter / 2) * (Math.sin(_local2.incounter) >= 0)));
((_local2.incincounter < 1.0471975511966) ? ((_local2.incincounter = _local2.incincounter + 0.0314159265358979)) : 1);
if ((Math.sin(_local4) / Math.abs(Math.sin(_local4))) != (Math.sin(_local2.incounter) / Math.abs(Math.sin(_local2.incounter)))) {
if (!isNaN(_local2.incounter)) {
playNow("machine.wings");
}
}
} else if (Math.abs(_local2._rotation) > 1) {
_local2._rotation = _local2._rotation - (_local2._rotation / 3);
_local3._rotation = _local3._rotation - (_local3._rotation / 3);
} else {
_local2._rotation = 0;
_local3._rotation = 0;
_local2.inProcess = false;
}
if (!_local2.inProcess) {
killMeFromLists(_root.wingsShakin);
}
}
}
};
tubeShakin = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2 = contentMc.machine.smoke_tube;
if (!_local2.inProcess) {
playNow("machine.tube");
_local2.inProcess = true;
_local2.countDown = 15 + random(15);
_local2.tx = _local2._x;
_local2.ty = _local2._y;
} else {
if (_local2.countDown) {
_local2.countDown--;
_local2._x = (_local2.tx + 1) - (2 * random(2));
_local2._y = (_local2.ty + 1) - (2 * random(2));
if (_local2.countDown == 2) {
playNow("machine.steam");
}
} else {
_local2._x = _local2.tx;
_local2._y = _local2.ty;
_local2.inProcess = false;
}
if (!_local2.inProcess) {
stopNow("machine.tube");
doSmoke(_local2._parent._x + _local2._x, _local2._parent._y + _local2._y, -3, -4, _local2._parent.xOffset, _local2._parent.targetX + _local2._x);
killMeFromLists(_root.tubeShakin);
}
}
} else {
stopNow("machine.steam");
stopNow("machine.tube");
}
};
pipeShakin = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2 = contentMc.machine.mouth;
if (!_local2.inProcess) {
_local2.inProcess = true;
_local2.moveTypes = [["flip", 10 + random(16)], ["flipAndSideWatch", 26]];
_local2.moveType = _local2.moveTypes[random(_local2.moveTypes.length)];
} else {
if (_local2.moveType[0] == "flip") {
_local2.gotoAndStop(1);
_local2.pipe._x = 22;
_local2.pipe._y = 17;
_local2.pipe._rotation = -8;
if (_local2.moveType[1]) {
_local2.moveType[1]--;
} else {
_local2.gotoAndStop(_local2._totalframes);
_local2.pipe._x = 20;
_local2.pipe._y = 27;
_local2.pipe._rotation = 0;
_local2.inProcess = false;
if (_local2._visible) {
playNow("machine.breathe_away");
doSmoke(_local2._parent._x + 150, _local2._parent._y + 177, 8, -7, _local2._parent.xOffset, _local2._parent.targetX + 150);
}
}
}
if (_local2.moveType[0] == "flipAndSideWatch") {
if (_local2.moveType[1] == 16) {
_local2.pipe._rotation = _local2.pipe._rotation + ((4 * random(4)) * (1 - (2 * random(2))));
}
if (_local2.moveType[1]) {
_local2.moveType[1]--;
} else {
_local2.pipe._rotation = 0;
_local2.inProcess = false;
}
}
if (!_local2.inProcess) {
killMeFromLists(_root.pipeShakin);
}
}
}
};
reelRotation = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2 = contentMc.machine.tape_reel;
if (!_local2.inProcess) {
playNow("machine.reel");
_local2.inProcess = true;
_local2.countDown = 50 + random(20);
_local2.rAng = 0;
_local2.rtAng = (5 + random(12)) * (1 - (2 * random(2)));
} else {
if (_local2.countDown) {
_local2.countDown--;
_local2.rAng = _local2.rAng + ((_local2.rtAng - _local2.rAng) / 3);
} else if (_local2.rAng > 0.2) {
stopNow("machine.reel");
_local2.rAng = _local2.rAng - (_local2.rAng / 3);
} else {
_local2.inProcess = false;
}
_local2.base._rotation = _local2.base._rotation + _local2.rAng;
if (!_local2.inProcess) {
stopNow("machine.reel");
killMeFromLists(_root.reelRotation);
}
}
} else {
stopNow("machine.reel");
}
};
titanShakin = function () {
var _local2 = contentMc.machine.titan;
if ((!globalPause) and (!onGroundPause)) {
if (!_local2.inProcess) {
playNow("machine.titan");
_local2.inProcess = true;
_local2.countDown = 15 + random(10);
_local2.titan_wheel.play();
_local2.tx = _local2._x;
_local2.ty = _local2._y;
} else {
if (_local2.countDown) {
_local2.countDown--;
_local2.titan_wheel.play();
} else {
_local2._x = _local2.tx;
_local2._y = _local2.ty;
_local2.inProcess = false;
_local2.titan_wheel.stop();
}
if (!_local2.inProcess) {
stopNow("machine.titan");
killMeFromLists(_root.titanShakin);
}
}
} else {
_local2.titan_wheel.stop();
stopNow("machine.titan");
}
};
eyeShackin = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2 = contentMc.machine.eye;
if (!_local2.inProcess) {
_local2.inProcess = true;
_local2.moveTypes = [["flip", 2 + random(3)], ["flipAndSideWatch", 16], ["sideWatch", 20 + random(20)]];
_local2.moveType = _local2.moveTypes[random(_local2.moveTypes.length)];
_local2.delayCount = _local2.moveType[1];
} else {
if (_local2.moveType[0] == "flip") {
if (_local2.moveType[1]) {
_local2.moveType[1]--;
_local2._visible = !_local2._visible;
} else {
_local2._visible = true;
_local2.inProcess = false;
}
}
if (_local2.moveType[0] == "sideWatch") {
_local2._visible = true;
if ((_local2.moveType[1] == _local2.delayCount) or (_local2.moveType[1] == 1)) {
_local2._visible = false;
}
var _local3 = new Object();
_local3.x = _local2.iris._x;
_local3.y = _local2.iris._y;
_local2.iris.localToGlobal(_local3);
var _local5 = 10;
var _local4 = Math.atan2(_ymouse - _local3.y, _xmouse - _local3.x);
_local2.iris._x = _local5 * Math.cos(_local4);
_local2.iris._y = _local5 * Math.sin(_local4);
if (_local2.moveType[1]) {
_local2.moveType[1]--;
} else {
_local2.iris._x = 0;
_local2.iris._y = 0;
_local2._visible = true;
_local2.inProcess = false;
}
}
if (_local2.moveType[0] == "flipAndSideWatch") {
_local2._visible = true;
if (_local2.moveType[1] == 16) {
_local2._visible = false;
var _local5 = 5 + random(10);
var _local4 = (2 * Math.random()) * Math.PI;
_local2.iris._x = _local5 * Math.cos(_local4);
_local2.iris._y = _local5 * Math.sin(_local4);
}
if (_local2.moveType[1] == 1) {
_local2._visible = false;
_local2.iris._x = 0;
_local2.iris._y = 0;
}
if (_local2.moveType[1]) {
_local2.moveType[1]--;
} else {
_local2._visible = true;
_local2.inProcess = false;
}
}
if (!_local2.inProcess) {
killMeFromLists(_root.eyeShackin);
}
}
}
};
killMeFromLists = function (func, getBack) {
var _local3 = contentMc.machine;
var _local2 = 0;
while (_local2 < _local3.inProccessList.length) {
if (_local3.inProccessList[_local2][0] == func) {
if (!getBack) {
_local3.wishList.push(_local3.inProccessList[_local2]);
}
_local3.inProccessList.splice(_local2, 1);
_local2 = _local3.inProccessList.length;
}
_local2++;
}
_local2 = 0;
while (_local2 < _root.toDoList.length) {
if (_root.toDoList[_local2][0] == func) {
_root.toDoList.splice(_local2, 1);
_local2 = _root.toDoList.length;
}
_local2++;
}
};
doSmoke = function (tx, ty, vx, vy, xOffset, targetX) {
var _local4 = contentMc.attachMovie("smoke_cloud", "smoke_cloud" + contentMc.getNextHighestDepth(), contentMc.getNextHighestDepth(), {_x:tx, _y:ty});
_local4.vx = vx;
_local4.vy = vy;
_local4.counts = 0;
_local4.xOffset = xOffset;
_local4.targetX = targetX;
_local4.stop();
_root.intro_mc.objectsToReveal.push(_local4);
_local4.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
this.counts++;
this.xOffset = this.xOffset + 1;
if (this._currentframe != this._totalframes) {
if (this.counts % 2) {
this.nextFrame();
}
} else {
((!this.cacheAsBitmap) ? ((this.cacheAsBitmap = true)) : 1);
if ((this.vx + this.vy) < 0.2) {
if (this._alpha > 2) {
this._alpha = this._alpha * 0.8;
} else {
var _local3 = 0;
while (_local3 < _root.intro_mc.objectsToReveal.length) {
if (_root.intro_mc.objectsToReveal[_local3] == this) {
_root.intro_mc.objectsToReveal.splice(_local3, 1);
_local3 = _root.intro_mc.objectsToReveal.length;
}
_local3++;
}
this.removeMovieClip();
}
}
}
this.targetX = this.targetX + this.vx;
this._y = this._y + this.vy;
this.vx = this.vx * 0.7;
this.vy = this.vy * 0.95;
}
};
};
flagWrapping = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local5 = flagShadowBmp;
var _local1 = flagShadowTileBmp;
var _local6 = contentMc.standart;
_local6.numCount = _local6.numCount + 3;
var _local3 = -1;
while (_local3 < (int(_local5.width / _local1.width) + 1)) {
var _local2 = new flash.geom.Rectangle((_local1.width * _local3) + (_local6.numCount % _local1.width), 0, _local1.width, _local1.height);
var _local4 = new flash.geom.Matrix(1, 0, 0, 1, _local2.x, _local2.y);
_local5.draw(_local1, _local4, new flash.geom.ColorTransform(), null, _local2);
_local3++;
}
}
};
flagSetup = function () {
flagBodyBmp = flash.display.BitmapData.loadBitmap("flag.jpg");
flagMaskBmp = flash.display.BitmapData.loadBitmap("flag_mask.gif");
flagBmp = new flash.display.BitmapData(flagBodyBmp.width, flagBodyBmp.height, true, 4278190080);
flagBmp.draw(flagBodyBmp);
flagBmp.copyChannel(flagMaskBmp, flagMaskBmp.rectangle, new flash.geom.Point(0, 0), 1, 8);
flagBodyBmp.dispose();
flagMaskBmp.dispose();
var _local3 = contentMc.attachMovie("start_flag", "standart", contentMc.getNextHighestDepth(), {_x:300, _y:232});
_local3.swapDepths(contentMc.machine);
_local3.ang = -1.37008346281555;
_local3.xOffset = _root.intro_mc.front_ground.xOffset;
_local3.targetX = 520;
_root.intro_mc.objectsToReveal.push(_local3);
_local3.onEnterFrame = function () {
if (this._y > 80) {
this.targetX = this.targetX + (15 * Math.cos(this.ang));
this._y = this._y + (15 * Math.sin(this.ang));
} else {
fbody = this.flagBody;
fbody.ang = this.ang;
fbody.flagBack.attachBitmap(flagBmp, fbody.getNextHighestDepth(), "auto", true);
delete this.onEnterFrame;
fbody.PIing = 0;
var _local4 = (flagShadowBmp = new flash.display.BitmapData(129, 105, false, 16777215));
var _local5 = (flagShadowTileBmp = flash.display.BitmapData.loadBitmap("flagShadowTile.gif"));
fbody.flagShadow.attachBitmap(_local4, 0);
this.numCount = 0;
_root.toDoList.push([_root.flagWrapping, true]);
playNow("machine.standart");
fbody.onEnterFrame = function () {
if (this._y > 34) {
this.PIing = this.PIing + 0.628318530717959;
var _local2 = 3 * (1 + Math.cos(this.PIing));
this._x = this._x + (_local2 * Math.cos(this.ang));
this._y = this._y + (_local2 * Math.sin(this.ang));
} else {
stopNow("machine.standart");
delete this.onEnterFrame;
}
};
}
};
};
wakeUpMachine = function (ma) {
ma.loader_mouth._visible = false;
ma.eye._visible = false;
ma.eye.stop();
ma.mouth.stop();
ma.smoke_tube.stop();
ma.top_tube.stop();
ma.titan.titan_wheel.stop();
ma.titan.tx = ma.titan._x;
ma.titan._x = ma.titan._x + 50;
ma.eyeCountDown = 15;
ma.onEnterFrame = function () {
if (this.eyeCountDown) {
this.eyeCountDown--;
if (this.eyeCountDown < 4) {
this.eye._visible = !this.eye._visible;
}
} else {
this.eye._visible = true;
((this.mouth._currentframe == 1) ? (this.mouth.play()) : 1);
(((this.smoke_tube._currentframe == 1) and (this.mouth._totalframes == this.mouth._currentframe)) ? (this.smoke_tube.play()) : 1);
if ((this.mouth._totalframes == this.mouth._currentframe) and (!this.titan.onEnterFrame)) {
this.titan.inc = 50;
this.titan.dec = 0.9;
this.titan.titan_wheel.play();
flagSetup();
this.titan.onEnterFrame = function () {
if (Math.abs(this.tx - this._x) > 1) {
this._x = this._x + ((this.tx - this._x) / this.inc);
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
} else {
this._x = this.tx;
this.titan_wheel.stop();
_root.globalAcceptedOffset = 1;
this._parent.cacheAsBitmap = true;
machineStartLive();
delete this.onEnterFrame;
delete this._parent.onEnterFrame;
}
};
}
}
};
};
lookDescribeAsButton = function () {
var _local5 = _root.contentMc.look;
var _local3 = _local5.btn;
_local3.enabled = true;
_local3.onRollOver = function () {
this._parent.lglow._visible = true;
this._parent.lglow._alpha = 0;
this._parent.lglow.tl = 0;
this._parent.lglow.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
if (this.tl < 90) {
this.tl = this.tl + 20;
} else {
this.tl = 90;
}
this._alpha = (this.tl + (5 * Math.cos(getTimer() / 50))) + (5 * Math.sin(getTimer() / 10));
}
};
};
_local3.onRollOut = (_local3.onReleaseOutside = function () {
this.cacheAsBitmap = false;
this._parent.lglow.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
if (this.tl > 10) {
this.tl = this.tl - 10;
this._alpha = (this.tl + (5 * Math.cos(getTimer() / 50))) + (5 * Math.sin(getTimer() / 10));
} else {
this.tl = 0;
this._visible = false;
delete this.onEnterFrame;
}
}
};
});
_local3.onRelease = function () {
playNow("undergroundPreloader");
this._parent.hole._visible = (this._parent.door._visible = true);
this._parent.lglow.gotoAndStop(2);
this.enabled = false;
this._parent.light.outa = this._parent.lglow._alpha;
this._parent.scales._visible = true;
this._parent.scales.ty = this._parent.scales._y;
this._parent.scales.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2 = -86;
if (Math.abs(_local2 - this._y) > 1) {
this._y = _local2 + ((_local2 - this._y) / 4);
} else {
startLoadBottom();
delete this.onEnterFrame;
}
}
};
};
};
describeLook = function () {
var _local3 = _root.contentMc.attachMovie("look", "look", _root.contentMc.getNextHighestDepth(), {_x:301, _y:470});
_local3.hole._visible = (_local3.scales._visible = (_local3.welcome._visible = (_local3.door._visible = false)));
_local3.btn.enabled = false;
_local3.targetX = _local3._x;
_local3.xOffset = _local3._parent.machine.xOffset;
_root.intro_mc.objectsToReveal.push(_local3);
_local3.light._visible = (_local3.lglow._visible = false);
_local3.lglow._alpha = (_local3.light._alpha = 0);
_local3.lglow.gotoAndStop(1);
_local3.onEnterFrame = function () {
if (this._currentframe != this._totalframes) {
this.nextFrame();
} else {
delete this.onEnterFrame;
lookDescribeAsButton();
}
};
};
getBackBottomPreloader = function () {
var _local4 = _root.contentMc.look;
_local4.scales.v = 1;
_local4.scales.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
this.v = this.v * 2;
if (this._y < (this.ty + 800)) {
this._y = this._y + this.v;
} else {
this._parent.btn.enabled = true;
this._parent.light.tl = 0;
this._parent.btn.onRollOver = function () {
this._parent.light._visible = true;
this._parent.light.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
((this.tl < 100) ? ((this.tl = this.tl + 20)) : ((this.tl = 100)));
this._alpha = (this._parent.lglow._alpha / 100) * this.tl;
}
};
};
this._parent.btn.onRollOut = (this._parent.btn.onReleaseOutside = function () {
this._parent.light.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
if (this.tl > 0) {
this.tl = this.tl - 20;
this._alpha = (this._parent.lglow._alpha / 100) * this.tl;
} else {
this.tl = 0;
this._visible = false;
this._alpha = 0;
}
}
};
});
this._parent.btn.onRelease = (this._parent.welcome.onRelease = function () {
this.enabled = false;
getBottom();
});
if (this._parent.hitTest(_xmouse, _ymouse, true)) {
this._parent.btn.onRollOver();
}
this._parent.welcome._visible = true;
playNow("welcomeDownStart");
this._parent.welcome.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local2 = -56;
if (Math.abs(_local2 - this._y) > 1) {
this._y = _local2 + ((_local2 - this._y) / 4);
} else {
delete this.onEnterFrame;
}
}
};
this.swapDepths(666);
this.removeMovieClip();
}
}
};
};
startLoadBottom = function () {
var _local3 = _root.bottomMc;
_local3.createEmptyMovieClip("cntnt", _local3.getNextHighestDepth());
_local3._visible = false;
_local3._y = sth + _root.groundDepth;
loadMovie ("instinct_bottom.swf", _local3.cntnt);
_local3.rp = 0;
_local3.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local5 = this.cntnt;
var _local6 = _local5.getBytesLoaded();
var _local4 = _local5.getBytesTotal();
var _local3 = (_local6 * 100) / _local4;
if ((!isNaN(_local3)) and (_local4 > 10)) {
this.rp = this.rp + ((_local3 - this.rp) / 5);
_root.contentMc.look.scales.arr._rotation = 18.5 + (3.415 * this.rp);
}
if ((_local3 == 100) and (this.rp > 99)) {
getBackBottomPreloader();
delete this.onEnterFrame;
}
}
};
};
Frame 6
createContentClip = function (mc) {
makeMyBitmaps(mc);
mc.absoluteNum = _root.mainXml.firstChild.childNodes[0].childNodes.length;
mc.condition = 0;
var _local9 = Math.cos(((mc.num * Math.PI) * Math.PI) / 7.2);
var _local4 = Math.cos(((mc.num * Math.PI) * Math.PI) / 5.1);
var _local7 = 280;
var _local8 = 700;
var _local6 = (stw / 2) - _local8;
var _local5 = (_local8 * 2) - _local7;
mc.xOffset = _root.intro_mc.front_ground.xOffset;
mc.targetX = contentMc.machine.targetX + 105;
mc._y = contentMc.machine._y;
mc.realY = 230 + (150 * _local9);
mc.realXscale = 65 + (20 * _local4);
mc.nestDepth = int(2000 + ((20 * _local4) * 10));
mc._xscale = (mc._yscale = 60);
mc.realXOffset = (_root.intro_mc.front_ground.xOffset - 100) + (_local4 * 100);
if (mc.num >= (mc.absoluteNum / 2)) {
mc.realTargetX = (_local6 + _local7) + ((_local5 / (mc.absoluteNum - 1)) * (mc.num - 1));
} else {
mc.realTargetX = _local6 + ((_local5 / (mc.absoluteNum - 1)) * (((mc.absoluteNum - 1) / 2) - (mc.num - 1)));
}
if (mc.realTargetX < 10) {
mc.realTargetX = 10;
}
if (mc.realTargetX > (stw - 10)) {
mc.realTargetX = stw - 10;
}
mc.secondarity = false;
mc.subscripted = false;
mc.scriptHolder._visible = 0;
_root.intro_mc.objectsToReveal.push(mc);
oneMoreMenuItem(mc);
mc.onEnterFrame = function () {
if ((((_root.clearToBlowOut == this.num) and _root.realyClearToBlowUp) and (!globalPause)) and (!onGroundPause)) {
if (!this.blowDown) {
this.blewY = Math.abs((this.realTargetX - this.targetX) / 3);
this.blowDown = 0.8;
this.inc = 15;
this.dec = 0.7;
this.countDown = 2;
this.setMask(contentMc.clipMask);
contentMc.actualyInTheTube = this;
_root.toDoList.push([topTubeBlow, true]);
contentMc.machine.inProccessList.push(topTubeBlow);
}
if (contentMc.machine.top_tube._currentframe == contentMc.machine.top_tube._totalframes) {
contentMc.machine.top_tube.gotoAndStop(1);
contentMc.machine.top_tube.inProcess = false;
killMeFromLists(_root.topTubeBlow, true);
this._visible = true;
playNow("machine.plop");
this.swapDepths(contentMc.getNextHighestDepth());
this.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
if (contentMc.actualyInTheTube == this) {
delete contentMc.actualyInTheTube;
}
if ((Math.abs(this.realY - this._y) > 1) or (Math.abs(this.realXOffset - this.xOffset) > 1)) {
this._y = this._y + (((this.realY - this._y) / this.inc) - this.blewY);
this.xOffset = this.xOffset + ((this.realXOffset - this.xOffset) / this.inc);
this.targetX = this.targetX + ((this.realTargetX - this.targetX) / this.inc);
if (Math.abs(this.realXscale - this._yscale) > 3) {
this._yscale = this._yscale + ((this.realXscale - this._yscale) / this.inc);
this._xscale = this._yscale;
} else {
this._xscale = (this._yscale = this.realXscale);
if (!this.cNew) {
((!this.cacheAsBitmap) ? ((this.cacheAsBitmap = true)) : 1);
} else {
((!this.magical._visible) ? ((this.magical._visible = true)) : 1);
((!this.img.cacheAsBitmap) ? ((this.img.cacheAsBitmap = true)) : 1);
}
}
this.blewY = this.blewY * this.blowDown;
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
if (!this.countDown) {
} else {
if (this.countDown == 1) {
_root.clearToBlowOut++;
this.swapDepths(this.nestDepth);
getObjectsToFront();
}
this.countDown--;
}
} else {
this._xscale = (this._yscale = this.realXscale);
if (!this.cNew) {
this.cacheAsBitmap = true;
} else {
this.magical._visible = true;
this.img.cacheAsBitmap = true;
}
this._y = this.realY;
this.xOffset = this.realXOffset;
this.targetX = this.realTargetX;
setupClipAsButton(this);
this.swapDepths(this.nestDepth);
getObjectsToFront();
delete this.onEnterFrame;
}
this.setMask(null);
}
};
}
}
};
};
loadMyBitmap = function (img) {
img.loadSum = 0;
img.xTimer = getTimer();
img.rLoadSum = 0;
img.onEnterFrame = function () {
contentMc.machine.loader_mouth.gotoAndStop(1);
this.loadSum = (this.pic.getBytesLoaded() * 100) / this.pic.getBytesTotal();
if (!isNaN(this.loadSum)) {
this.rLoadSum = this.rLoadSum + ((this.loadSum - this.rLoadSum) / 2);
if ((!globalPause) and (!onGroundPause)) {
this.loader._rotation = (80 * this.rLoadSum) / 100;
}
} else if ((!globalPause) and (!onGroundPause)) {
this.loader._rotation = 0;
}
if ((this.loadSum == 100) and (this.rLoadSum > 98)) {
this._parent.needToLoad--;
if (!this._parent.needToLoad) {
if (this._parent.num < (_root.mainXml.firstChild.childNodes[0].childNodes.length - 1)) {
_root.startContentLoading(contentMc["clipHolder" + (this._parent.num + 1)]);
} else {
contentMc.clipLoader.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
if (!this.chain2) {
playNow("machine.chain");
this.chain2 = true;
}
if (this._currentframe != 2) {
this.prevFrame();
} else {
stopNow("machine.chain");
var _local3 = 0;
while (_local3 < _root.intro_mc.objectsToReveal.length) {
if (_root.intro_mc.objectsToReveal[_local3] == this) {
_root.intro_mc.objectsToReveal.splice(_local3, 1);
_local3 = _root.intro_mc.objectsToReveal.length;
}
_local3++;
}
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
createContentClip(this._parent);
}
delete this.onEnterFrame;
} else if ((getTimer() - this.xTimer) > 180000) {
_root.loadMyBitmap(this);
}
};
img.pic.removeMovieClip();
img.createEmptyMovieClip("pic", img.getNextHighestDepth());
loadMovie ((("content/" + img._parent.cFolder) + "/") + img.imgurl, img.pic);
};
startContentLoading = function (mc) {
var _local4 = ["01.jpg", "01a.jpg", "02.jpg", "02a.jpg"];
mc.needToLoad = 4;
var _local1 = 0;
while (_local1 < 4) {
var _local2 = mc.createEmptyMovieClip("img" + _local1, mc.getNextHighestDepth());
_local2.num = _local1;
_local2.loader = contentMc.clipLoader.prel["loader" + _local1];
_local2.imgurl = _local4[_local1];
loadMyBitmap(_local2);
_local1++;
}
};
allMagicStuffOff = function () {
var _local2 = 0;
while (_local2 < _root.newClips.length) {
var _local3 = _root.newClips[_local2];
_local3.magical._visible = false;
_local2++;
}
};
allMagicStuffOn = function () {
var _local2 = 0;
while (_local2 < _root.newClips.length) {
var _local3 = _root.newClips[_local2];
_local3.magical._visible = true;
_local2++;
}
};
prepareContentLoading = function () {
_root.newClips = [];
_root.clearToBlowOut = 0;
_root.realyClearToBlowUp = true;
var _local10 = contentMc.attachMovie("clipMask", "clipMask", contentMc.getNextHighestDepth(), {_x:0, _y:contentMc.machine._y - 10});
var _local11 = contentMc.attachMovie("clipHitTest", "clipHitTest", contentMc.getNextHighestDepth(), {_x:0, _y:_local10._y});
_local11.targetX = (_local10.targetX = contentMc.machine.targetX + 67);
_local11.xOffset = (_local10.xOffset = contentMc.machine.xOffset);
_root.intro_mc.objectsToReveal.push(_local10, _local11);
_local10._visible = (_local11._visible = false);
var _local8 = contentMc.attachMovie("clipLoader", "clipLoader", contentMc.getNextHighestDepth());
_local8._y = -54;
_local8.xOffset = contentMc.machine.xOffset;
_local8.targetX = 289;
_root.intro_mc.objectsToReveal.push(_local8);
_local8.stop();
playNow("machine.chain");
_local8.onEnterFrame = function () {
if (this._currentframe != this._totalframes) {
this.nextFrame();
} else {
stopNow("machine.chain");
if (_root.xmlSuccess) {
var _local4 = 0;
while (_local4 < _root.mainXml.firstChild.childNodes[0].childNodes.length) {
var _local7 = _root.mainXml.firstChild.childNodes[0].childNodes[_local4];
var _local3 = contentMc.createEmptyMovieClip("clipHolder" + _local4, contentMc.getNextHighestDepth());
_local3.num = _local4;
_local3.cName = _local7.attributes.name;
_local3.cType = _local7.attributes.type;
_local3.cFolder = _local7.attributes.folder;
if (parseInt(_local7.attributes.newone) == 1) {
_root.newClips.push(_local3);
_local3.cNew = parseInt(_local7.attributes.newone);
}
_local3.cItems = [];
var _local5 = 0;
while (_local5 < _root.mainXml.firstChild.childNodes[0].childNodes[_local4].childNodes.length) {
var _local6 = _root.mainXml.firstChild.childNodes[0].childNodes[_local4].childNodes[_local5];
_local3.cItems.push([_local6.attributes.name, _local6.attributes.file]);
_local5++;
}
_local3._visible = 0;
_local4++;
}
startContentLoading(contentMc.clipHolder0);
delete this.onEnterFrame;
}
}
};
var _local9 = contentMc.attachMovie("lArrowComplete", "lArrow", contentMc.getNextHighestDepth());
_local9._y = 26;
_local9.xOffset = contentMc.machine.xOffset;
_local9.targetX = 464;
_root.intro_mc.objectsToReveal.push(_local9);
_local9.stop();
};
makeMyBitmaps = function (mc) {
var _local3 = (mc.bmp0 = new flash.display.BitmapData(mc.img0._width, mc.img0._height, true, 0));
var _local4 = (mc.bmp1 = new flash.display.BitmapData(mc.img2._width, mc.img2._height, true, 0));
_local3.draw(mc.img0);
_local4.draw(mc.img2);
mc.bmptmp = new flash.display.BitmapData(mc.img1._width, mc.img1._height, false, 0);
mc.bmptmp.draw(mc.img1);
_local3.copyChannel(mc.bmptmp, _local3.rectangle, new flash.geom.Point(0, 0), 1, 8);
mc.bmptmp.dispose();
mc.bmptmp = new flash.display.BitmapData(mc.img3._width, mc.img3._height, false, 0);
mc.bmptmp.draw(mc.img3);
_local4.copyChannel(mc.bmptmp, _local4.rectangle, new flash.geom.Point(0, 0), 1, 8);
mc.bmptmp.dispose();
var _local2 = 0;
while (_local2 < 4) {
mc["img" + _local2].removeMovieClip();
_local2++;
}
mc.createEmptyMovieClip("img", mc.getNextHighestDepth());
mc.img.attachBitmap(_local3, 0, "auto", true);
mc.img._x = -int(mc.img._width / 2);
mc.img._y = -int(mc.img._height / 2);
if (mc.cNew) {
doMagic(mc);
}
};
getBottom = function () {
playNowD("bChain");
var _local9 = _root.sceneBorder.goMenu;
_local9.enabled = false;
_local9.onEnterFrame = function () {
if (this._currentframe != 1) {
this.prevFrame();
} else {
delete this.onEnterFrame;
}
};
if (!_root.bottomMc.described) {
describeBtmCntnt();
_root.bottomMc.described = true;
}
_root.onGroundPause = true;
contentMc.onRollOver = function () {
};
contentMc.useHandCursor = false;
var look = _root.contentMc.look;
look.upList = [];
look.upList.push([_root.contentMc, _root.intro_mc.front_ground]);
look.upList.push([_root.intro_mc.river, _root.intro_mc.middle_ground]);
look.upList.push([_root.intro_mc.back_ground]);
look.upList.push([_root.intro_mc.cloud_01, _root.intro_mc.cloud_05, _root.intro_mc.cloud_04, _root.intro_mc.cloud_06]);
look.upList.push([_root.intro_mc.cloud_02, _root.intro_mc.cloud_03]);
look.light._visible = false;
var _local10 = _root.bottomMc;
_local10._visible = true;
allMagicStuffOff();
var _local4 = 0;
while (_local4 < look.upList.length) {
var _local3 = 0;
while (_local3 < look.upList[_local4].length) {
var _local5 = look.upList[_local4][_local3];
_local5.realY = _local5._y;
_local5.cacheAsBitmap = true;
_local3++;
}
_local4++;
}
look.oldDieselSndVolume = _root.globalSound.soundLib.dslSnd.getVolume();
look.oldChirkSndVolume = chirkSnd.getVolume();
look.onEnterFrame = function () {
var _local7 = this.upList[0][0];
var _local10 = _local7._y;
var _local6 = 1.2 + (2 * Math.abs(Math.sin((((_root.groundDepth + _local10) + sth) / (_root.groundDepth + sth)) * Math.PI)));
var _local9 = _root.bottomMc;
if ((_local7._y - ((5 * _local6) * this.upList.length)) > ((-sth) - _root.groundDepth)) {
var _local4 = 0;
while (_local4 < this.upList.length) {
var _local3 = 0;
while (_local3 < this.upList[_local4].length) {
var _local5 = this.upList[_local4][_local3];
_local5._y = _local5._y - ((5 * _local6) * (this.upList.length - _local4));
_local3++;
}
_local4++;
}
} else {
_local7._y = (-sth) - _root.groundDepth;
var _local4 = 0;
while (_local4 < this.upList.length) {
var _local3 = 0;
while (_local3 < this.upList[_local4].length) {
var _local5 = this.upList[_local4][_local3];
_local5._visible = false;
_local3++;
}
_local4++;
}
unpackUnderGround();
stopNow("machine.chain");
delete this.onEnterFrame;
}
_local9._y = (_local7._y + sth) + _root.groundDepth;
var _local8 = _root.bottomMc._y / (sth + _root.groundDepth);
_root.globalSound.soundLib.dslSnd.setVolume(look.oldDieselSndVolume * _local8);
chirkSnd.setVolume(look.oldChirkSndVolume * _local8);
_root.btmSnd.setVolume(100 * (1 - _local8));
};
};
getTop = function () {
packUnderGround();
_root.onGroundXMDel = 30;
var look = _root.contentMc.look;
var _local5 = 0;
while (_local5 < look.upList.length) {
var _local3 = 0;
while (_local3 < look.upList[_local5].length) {
var _local4 = look.upList[_local5][_local3];
_local4._visible = true;
_local3++;
}
_local5++;
}
look.onEnterFrame = function () {
var _local9 = _root.bottomMc;
var _local7 = this.upList[0][0];
var _local10 = _local7._y;
var _local6 = 1.2 + (2 * Math.abs(Math.sin((((_root.groundDepth + _local10) + sth) / (_root.groundDepth + sth)) * Math.PI)));
if ((_local7._y + ((5 * _local6) * this.upList.length)) < 0) {
var _local5 = 0;
while (_local5 < this.upList.length) {
var _local3 = 0;
while (_local3 < this.upList[_local5].length) {
var _local4 = this.upList[_local5][_local3];
_local4._y = _local4._y + ((5 * _local6) * (this.upList.length - _local5));
_local3++;
}
_local5++;
}
} else {
var _local5 = 0;
while (_local5 < this.upList.length) {
var _local3 = 0;
while (_local3 < this.upList[_local5].length) {
var _local4 = this.upList[_local5][_local3];
_local4._y = _local4.realY;
_local4.cacheAsBitmap = false;
_local3++;
}
_local5++;
}
allMagicStuffOn();
_root.contentMc.look.btn.enabled = true;
_root.contentMc.look.welcome.enabled = true;
delete this.onEnterFrame;
_root.onGroundPause = false;
_local9._visible = false;
this.light._visible = true;
delete contentMc.onRollOver;
stopNowD("bChain");
var _local11 = _root.sceneBorder.goMenu;
_local11.onEnterFrame = function () {
if (this._currentframe != this._totalframes) {
this.nextFrame();
} else {
this.enabled = true;
delete this.onEnterFrame;
}
};
}
_local9._y = (_local7._y + sth) + _root.groundDepth;
var _local8 = _root.bottomMc._y / (sth + _root.groundDepth);
_root.globalSound.soundLib.dslSnd.setVolume(look.oldDieselSndVolume * _local8);
chirkSnd.setVolume(look.oldChirkSndVolume * _local8);
_root.btmSnd.setVolume(100 * (1 - _local8));
};
};
Frame 7
setupClipAsButton = function (clip) {
clip.onRollOver = function () {
};
clip.onRollOut = (clip.onDragOut = function () {
});
clip.onPress = function () {
if (this.cNew and this.magical) {
this.magical._visible = false;
this.img.cacheAsBitmap = false;
}
eventNow("get_clip", this);
arrowUp();
getMeWithYaLittleMouse(this);
var _local2 = contentMc.machineBuildController;
delete _local2.onEnterFrame;
if (contentMc.wagen.targetX > 500) {
contentMc.wagen.toMoveX = 1334;
} else {
contentMc.wagen.toMoveX = (-contentMc.wagen._width) - 350;
}
delete contentMc.wagen.cargo;
_local2.clip.onRelease(true);
_local2.clip.enabled = true;
delete _local2.clip;
};
clip.onRelease = (clip.onReleaseOutside = function (marker) {
if (!_root.smartEnough) {
killSmartPath();
}
this.marker = marker;
this.scriptHolder._visible = false;
if (!this.onBasket) {
_root.getMeBackToPosition(this);
arrowDown();
} else {
_root.contentMc.look.btn.enabled = false;
_root.contentMc.look.welcome.enabled = false;
_root.putMeInDaMachine(this);
}
});
};
arrowDown = function () {
var _local2 = contentMc.lArrow;
_local2.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
if (this._currentframe != 1) {
this.prevFrame();
} else {
this._visible = false;
delete this.onEnterFrame;
}
}
};
};
arrowUp = function () {
var _local2 = contentMc.lArrow;
_local2._visible = true;
_local2.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
if (this._currentframe != this._totalframes) {
this.nextFrame();
} else {
delete this.onEnterFrame;
}
}
};
};
putMeInDaMachine = function (clip, really) {
clip._xscale = (clip._yscale = 100);
clip.cacheAsBitmap = true;
clip.setMask(contentMc.clipMask);
clip.draget = false;
delete clip.onMouseMove;
delete clip.onEnterFrame;
clip.targetX = clip._x + ((_root.xMouseOffset * clip.xOffset) * _root.globalOffset);
clip.xOffset = contentMc.machine.xOffset;
clip.enabled = false;
clip.dCenterX = contentMc.machine.targetX + 108;
clip.dRadius = Math.abs(clip.dCenterX - clip.targetX);
clip.dCenterY = clip._y + clip.dRadius;
clip.dAng = -1.5707963267949;
clip.dInc = ((9.42477796076938 / clip.dRadius) * Math.abs(clip.dCenterX - clip.targetX)) / (clip.dCenterX - clip.targetX);
clip.dCenterX = clip.targetX;
clip.dAngV = Math.abs(clip.dInc * clip.dRadius);
clip.playHorn = false;
playNow("machine.receive");
contentMc.actualyInTheTube = clip;
clip.onEnterFrame = function () {
if (Math.abs(this.targetX - (contentMc.machine.targetX + 108)) > 1) {
this.dAng = this.dAng + this.dInc;
this.targetX = this.dCenterX + (this.dRadius * Math.cos(this.dAng));
this._y = this.dCenterY + (this.dRadius * Math.sin(this.dAng));
} else {
if (!this.playHorn) {
this.playHorn = true;
if (!random(3)) {
playNow("machine.horn");
}
}
if (this._y > 220) {
_root.smartEnough = true;
_root.contentMc.intro_mc.moon_mc._visible = false;
allMagicStuffOff();
_root.contentMc.cacheAsBitmap = true;
disableAllClips();
this.notFake = true;
this.playOrder = 0;
_root.playMyContent(this);
if (contentMc.actualyInTheTube == this) {
delete contentMc.actualyInTheTube;
}
delete this.onEnterFrame;
} else {
this._y = this._y + this.dAngV;
}
}
};
};
getMeBackToPosition = function (clip) {
clip.cacheAsBitmap = false;
clip.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
if (((Math.abs(this.realY - this._y) > 1) or (Math.abs(this.realXOffset - this.xOffset) > 1)) or (Math.abs(this.realXscale - this._yscale) > 2)) {
this._y = this._y + ((this.realY - this._y) / this.inc);
this.xOffset = this.xOffset + ((this.realXOffset - this.xOffset) / this.inc);
this.targetX = this.targetX + ((this.realTargetX - this.targetX) / this.inc);
if (Math.abs(this.realXscale - this._yscale) > 3) {
this._yscale = this._yscale + ((this.realXscale - this._yscale) / this.inc);
this._xscale = this._yscale;
} else {
this._xscale = (this._yscale = this.realXscale);
if ((!this.cNew) or (!this.magical)) {
((!this.cacheAsBitmap) ? ((this.cacheAsBitmap = true)) : 1);
} else {
((!this.magical._visible) ? ((this.magical._visible = true)) : 1);
((!this.img.cacheAsBitmap) ? ((this.img.cacheAsBitmap = true)) : 1);
}
}
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
} else {
this.enabled = true;
this._xscale = (this._yscale = this.realXscale);
if ((!this.cNew) or (!this.magical)) {
this.cacheAsBitmap = true;
} else {
this.magical._visible = true;
this.img.cacheAsBitmap = true;
}
this._y = this.realY;
this.xOffset = this.realXOffset;
this.swapDepths(this.nestDepth);
getObjectsToFront();
delete this.onEnterFrame;
}
}
};
clip.targetX = clip._x + ((_root.xMouseOffset * clip.xOffset) * _root.globalOffset);
delete clip.onMouseMove;
clip.draget = false;
if (!clip.marker) {
enableAllClips(clip);
if ((((!contentMc.machine.hitTest(clip._x, clip._y, true)) and (!contentMc.standart.hitTest(clip._x, clip._y, true))) and ((clip._y > 60) and (clip._y < 400))) and ((clip._x > 0) and (clip._x < 1004))) {
clip.realTargetX = clip._x + ((_root.xMouseOffset * clip.xOffset) * _root.globalOffset);
clip.realY = clip._y;
} else {
eventNow("drop_clip", clip);
}
} else {
eventNow("drop_clip", clip);
}
var _local4 = Math.sqrt(Math.pow(clip._x - clip.realTargetX, 2) + Math.pow(clip._y - clip.realY, 2));
((_local4 > 100) ? ((clip.inc = _local4 / 50)) : ((clip.inc = 5)));
clip.dec = 0.7;
delete clip.marker;
};
getMeWithYaLittleMouse = function (clip) {
clip.inc = 3;
clip.dec = 0.7;
clip.cacheAsBitmap = false;
clip.onEnterFrame = function () {
if ((this.getDepth() + 1) < contentMc.getNextHighestDepth()) {
this.swapDepths(contentMc.getNextHighestDepth());
}
if (Math.abs(100 - this._xscale) > 2) {
this._xscale = this._xscale + ((100 - this._xscale) / this.inc);
this._yscale = this._xscale;
} else {
if (!this.subscripted) {
this.subscripted = true;
makeSubscription(this.cName, this, this.secondarity);
}
if (!this.cacheAsBitmap) {
if (!_root.smartEnough) {
findSmartPath(this);
}
this._xscale = (this._yscale = 100);
this.scriptHolder._visible = true;
this.cacheAsBitmap = true;
}
}
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
};
clip.msx = _root._xmouse - clip._x;
clip.msy = _root._ymouse - clip._y;
clip._x = _root._xmouse - clip.msx;
clip._y = _root._ymouse - clip.msy;
clip.onBasket = false;
clip.onMouseMove = function () {
var _local3 = contentMc.clipHitTest;
this._x = _root._xmouse - this.msx;
this._y = _root._ymouse - this.msy;
if (_local3.hitTest(this._x, this._y, true)) {
if (!this.onBasket) {
this.scriptHolder._visible = false;
this.setMask(contentMc.clipMask);
_root.realyClearToBlowUp = false;
this.onBasket = true;
}
} else if (this.onBasket) {
this.scriptHolder._visible = true;
this.setMask(null);
_root.realyClearToBlowUp = true;
this.onBasket = false;
}
updateAfterEvent();
};
clip.draget = true;
disableAllClips(clip);
};
disableAllClips = function (exeption) {
var _local2 = 0;
while (_local2 < _root.mainXml.firstChild.childNodes[0].childNodes.length) {
var _local3 = contentMc["clipHolder" + _local2];
if (_local3 != exeption) {
_local3.enabled = false;
}
_local2++;
}
};
enableAllClips = function (exeption) {
var _local3 = 0;
while (_local3 < _root.mainXml.firstChild.childNodes[0].childNodes.length) {
var _local2 = contentMc["clipHolder" + _local3];
if (_local2 != exeption) {
_local2.enabled = true;
_local2.swapDepths(_local2.nestDepth);
}
_local3++;
}
};
getObjectsToFront = function () {
if (!contentMc.actualyInTheTube) {
objectsToFront = [contentMc.standart, contentMc.machine, contentMc.clipLoader, contentMc.look, contentMc.lArrow, contentMc.sofa, contentMc.cargoPlaceHolder, contentMc.wagen];
} else {
objectsToFront = [contentMc.standart, contentMc.machine, contentMc.clipLoader, contentMc.look, contentMc.lArrow, contentMc.actualyInTheTube, contentMc.sofa, contentMc.cargoPlaceHolder, contentMc.wagen];
}
var _local1 = 0;
while (_local1 < objectsToFront.length) {
objectsToFront[_local1].swapDepths(contentMc.getNextHighestDepth());
_local1++;
}
};
describeBtmCntnt = function () {
var _local4 = _root.bottomMc.cntnt;
_local4.heart_mc.gotoAndStop(1);
_local4.heart_mc.cable_connector_mc._visible = false;
_local4.heart_mc.hand_connector_mc._visible = false;
_local4.fingers_mc.hand_connector_mc._visible = false;
_root.btmXOffsetObjects = [_local4.awards_mc, _local4.stairs, _local4.curtain0_mc, _local4.curtain1_mc, _local4.rope0, _local4.rope1, _local4.heart_mc, _local4.roll_mc, _local4.tablo_mc, _local4.carusele_mc, _local4.chain_mc];
var _local6 = [30, 40, 15, 15, 20, 20, 10, 25, 50, 30, 25];
var _local5 = [false, false, true, true, true, true, true, true, false, false, false];
var _local3 = 0;
while (_local3 < _root.btmXOffsetObjects.length) {
var _local2 = _root.btmXOffsetObjects[_local3];
_local2.xOffset = _local6[_local3];
_local2.targetX = _local2._x;
_local2.targetY = _local2._y;
_local2.cacheAble = _local5[_local3];
_local3++;
}
_root.toDoList.push([mouseUnderCapture, undefined, true], [moveUnderGrounds, undefined, true], [cableCapturing, undefined, true], [handCapturing, undefined, true], [showPersonas, undefined, true]);
describeHeart();
describePersonas();
describeChain();
describeAwars();
mouseUnderCapture(true);
moveUnderGrounds(true);
handDescribing();
handCapturing(true);
cableCapturing(true);
initBottomSnd();
_local4.stairs._x = (_local4.stairs.targetX = _root.contentMc.look.targetX);
_local4.stairs.rndbtn.onRelease = function () {
getTop();
};
};
unpackUnderGround = function () {
underGroundPause = false;
var _local2 = 0;
while (_local2 < _root.btmXOffsetObjects.length) {
var _local3 = _root.btmXOffsetObjects[_local2];
_local3.cacheAsBitmap = _local3.cacheAble;
_local2++;
}
};
packUnderGround = function () {
underGroundPause = true;
_root.bottomMc.cntnt.carusele_mc.hrs_mc.prsn.flame._visible = false;
var _local2 = 0;
while (_local2 < _root.btmXOffsetObjects.length) {
var _local3 = _root.btmXOffsetObjects[_local2];
_local3.cacheAsBitmap = true;
_local2++;
}
};
_root.globalUnderOffset = 1;
_root.globalUndergroundAcceptedOffset = 1;
moveUnderGrounds = function (switcher) {
if ((((!globalPause) and (!underGroundPause)) and (!_root.bottomMc.cntnt.tablo_mc.pressed)) or switcher) {
_root.globalUnderOffset = _root.globalUnderOffset + ((_root.globalUndergroundAcceptedOffset - _root.globalUnderOffset) / 30);
var _local3 = 0;
while (_local3 < _root.btmXOffsetObjects.length) {
var _local2 = _root.btmXOffsetObjects[_local3];
_local2._x = _local2.targetX - ((_root.xUnderMouseOffset * _local2.xOffset) * _root.globalUnderOffset);
_local3++;
}
}
};
_root.xUnderMouseOffset = 0;
mouseUnderCapture = function (switcher) {
if (((!globalPause) and (!underGroundPause)) or switcher) {
var _local2;
if ((_xmouse >= 0) and (_xmouse < 1004)) {
_local2 = (_xmouse - (stw / 2)) / (stw / 2);
} else {
((_xmouse < 0) ? (_local2 = -1) : (_local2 = 1));
}
_root.xUnderMouseOffset = _root.xUnderMouseOffset + ((_local2 - _root.xUnderMouseOffset) / 5);
}
};
Frame 8
wagenGetMeOutFromThisPlace = function (clip) {
clip.notFake = false;
if (!_root.wagenAlwaysRun) {
_root.wagenAlwaysRun = true;
contentMc.wagen.velocity = (contentMc.wagen.tVelocity = 0);
_root.toDoList.push([_root.wagenAlwaysMove, true]);
_root.wagenPause = false;
}
var _local3 = contentMc.machineBuildController;
_local3.clip = clip;
contentMc.wagen.toMoveX = contentMc.machine.targetX + 166;
_local3.pauseCountDown = 16;
_local3.onEnterFrame = function () {
var clip = this.clip;
if (clip.getDepth() < (contentMc.getNextHighestDepth() - 1)) {
getObjectsToFront();
clip.swapDepths(contentMc.getNextHighestDepth());
}
if (Math.abs((contentMc.machine.targetX + 166) - contentMc.wagen.targetX) < 10) {
this.pauseCountDown--;
if (!this.pauseCountDown) {
openTheMouth();
clip.setMask(contentMc.fishMask);
clip.cacheAsBitmap = false;
clip._xscale = (clip._yscale = 60);
clip._visible = true;
clip.inc = 2;
clip.dec = 0.3;
this.onEnterFrame = function () {
var clip = this.clip;
getObjectsToFront();
clip.swapDepths(contentMc.cargoPlaceHolder);
clip.setMask(null);
if ((Math.abs(420 - clip._y) > 1) or (Math.abs((contentMc.wagen.targetX + 230) - clip.targetX) > 4)) {
clip.targetX = clip.targetX + (((contentMc.wagen.targetX + 230) - clip.targetX) / clip.inc);
clip.xOffset = clip.xOffset + ((contentMc.wagen.xOffset - clip.xOffset) / clip.inc);
clip._y = clip._y + ((420 - clip._y) / clip.inc);
clip._xscale = clip._xscale + ((100 - clip._xscale) / clip.inc);
clip._yscale = clip._xscale;
(((clip.inc * clip.dec) > 1) ? ((clip.inc = clip.inc * clip.dec)) : ((clip.inc = 1)));
} else {
contentMc.wagen.cargo = clip;
contentMc.wagen.toMoveX = clip.realTargetX - 230;
enableAllClips(clip);
this.onEnterFrame = function () {
getObjectsToFront();
this.clip.swapDepths(contentMc.cargoPlaceHolder);
if (Math.abs((this.clip.realTargetX - 230) - contentMc.wagen.targetX) < 10) {
if (contentMc.wagen.targetX > 500) {
contentMc.wagen.toMoveX = 1334;
} else {
contentMc.wagen.toMoveX = (-contentMc.wagen._width) - 350;
}
delete contentMc.wagen.cargo;
this.clip.onRelease(true);
this.clip.enabled = true;
delete this.clip;
delete this.onEnterFrame;
var gb = _root.sceneBorder.goMenu;
gb.onEnterFrame = function () {
if (this._currentframe < (this._totalframes - 1)) {
this.nextFrame();
} else {
gb.enabled = true;
delete this.onEnterFrame;
}
};
}
};
}
};
}
}
};
};
wagenAlwaysMove = function () {
if ((!globalPause) and (!onGroundPause)) {
var _local1 = 30;
contentMc.wagen.tVelocity = (contentMc.wagen.toMoveX - contentMc.wagen.targetX) / 3;
((Math.abs(contentMc.wagen.tVelocity) > _local1) ? ((contentMc.wagen.tVelocity = (_local1 * contentMc.wagen.tVelocity) / Math.abs(contentMc.wagen.tVelocity))) : 1);
var _local2;
if (Math.abs(contentMc.wagen.tVelocity) < Math.abs(contentMc.wagen.velocity)) {
_local2 = 3;
} else {
_local2 = 10;
}
contentMc.wagen.velocity = contentMc.wagen.velocity + ((contentMc.wagen.tVelocity - contentMc.wagen.velocity) / _local2);
wagenMove(contentMc.wagen.velocity);
}
};
backMyContent = function (clip) {
_root.contentMc.cacheAsBitmap = false;
allMagicStuffOn();
_root.intro_mc.cacheAsBitmap = false;
_root.contentMc.look.light._visible = true;
_root.intro_mc.moon_mc._visible = true;
_root.onGroundPause = false;
_root.contentMc.look.btn.enabled = true;
_root.contentMc.look.welcome.enabled = true;
var _local3 = _root.showStuff;
_local3.clip.condition = 1 - _local3.clip.condition;
_local3.clip.img.swapDepths(666);
_local3.clip.img.removeMovieClip();
_local3.clip.createEmptyMovieClip("img", -1);
_local3.clip.img.attachBitmap(_local3.clip["bmp" + _local3.clip.condition], 0, "auto", true);
_local3.clip.img._x = (-_local3.clip.img._width) / 2;
_local3.clip.img._y = (-_local3.clip.img._height) / 2;
_local3.clip.onBasket = false;
_local3.clip.setMask(null);
if (!_local3.clip.secondarity) {
_local3.clip.secondarity = true;
makeSubscription(_local3.clip.cName, _local3.clip, _local3.clip.secondarity);
}
if (_local3.clip.notFake) {
_local3.clip._visible = false;
_local3.clip._y = contentMc.machine._y + 258;
_local3.clip.targetX = contentMc.machine.targetX + 237;
wagenGetMeOutFromThisPlace(_local3.clip);
_root.realyClearToBlowUp = true;
_root.arrowDown();
} else {
enableAllClips();
var gb = _root.sceneBorder.goMenu;
gb.onEnterFrame = function () {
if (this._currentframe < (this._totalframes - 1)) {
this.nextFrame();
} else {
gb.enabled = true;
delete this.onEnterFrame;
}
};
}
_local3.removeMovieClip();
};
openTheMouth = function () {
contentMc.machine.mouthOpen._visible = true;
contentMc.machine.mouthClose._visible = false;
contentMc.machine.mouthOpen.countDown = 20;
playNow("machine.teleport_done");
contentMc.machine.mouthOpen.onEnterFrame = function () {
if (this.countDown) {
this.countDown--;
} else {
delete this.onEnterFrame;
this._visible = 0;
this._parent.mouthClose._visible = true;
}
};
};
prePlayMyContent = function () {
_root.toDoList.push([_root.machineFillin, true]);
};
stopPrePlayMyContent = function () {
var _local2 = 0;
while (_local2 < _root.toDoList.length) {
if (_root.toDoList[_local2][0] == _root.machineFillin) {
_root.toDoList.splice(_local2, 1);
_local2 = _root.toDoList.length;
}
_local2++;
}
};
machineFillin = function () {
if ((!globalPause) and (!onGroundPause)) {
contentMc.machine._x = contentMc.machine._x + (1 - (2 * random(2)));
}
};
describeHeart = function () {
var heart = _root.bottomMc.cntnt.heart_mc;
heart.onRelease = function () {
heart.cacheAsBitmap = false;
playNowD("heartBeatinSnd");
this.onEnterFrame = function () {
heartBeatin();
};
};
};
heartBeatin = function () {
if ((!globalPause) and (!underGroundPause)) {
var _local2 = _root.bottomMc.cntnt.heart_mc;
if (_local2._currentframe == _local2._totalframes) {
_local2.gotoAndStop(1);
_local2.cacheAsBitmap = true;
delete _local2.onEnterFrame;
} else {
_local2.nextFrame();
}
}
};
cableCapturing = function (switcher) {
if (((!globalPause) and (!underGroundPause)) or switcher) {
var _local4 = _root.bottomMc.cntnt.heart_mc.cable_connector_mc;
var _local3 = _root.bottomMc.cntnt.cable_mc;
var _local2 = {x:_local4._x, y:_local4._y - _root.bottomMc._y};
_root.bottomMc.cntnt.heart_mc.localToGlobal(_local2);
_local3._x = _local2.x;
_local3._y = _local2.y;
}
};
handCapturing = function (switcher) {
if (((!globalPause) and (!underGroundPause)) or switcher) {
var _local14 = _root.bottomMc.cntnt.heart_mc.hand_connector_mc;
var _local2 = _root.bottomMc.cntnt.hand_mc;
var _local9 = _root.bottomMc.cntnt.roll_mc;
var _local11 = _root.bottomMc.cntnt.fingers_mc;
var _local13 = {x:_local14._x, y:_local14._y - _root.bottomMc._y};
_root.bottomMc.cntnt.heart_mc.localToGlobal(_local13);
_local2._x = _local13.x;
_local2._y = _local13.y;
var _local10 = new flash.geom.Point(_local2._x, _local2._y);
var _local8 = new flash.geom.Point(_local9._x + 127, (_local9._y + _local9._height) - 17);
if (((((!_local2.sp.equals(_local10)) and (!_local2.ep.equals(_local8))) and (!_local2.tPoint.equals(new flash.geom.Point(_local13.x, _local13.y)))) or _local9.onMouseMove) or (_root.bottomMc.cntnt.heart_mc._currentframe != 1)) {
_local2.sp = _local10.clone();
_local2.ep = _local8.clone();
_local2.tPoint = new flash.geom.Point(_local13.x, _local13.y);
var _local5 = Math.atan2(_local8.y - _local10.y, _local8.x - _local10.x);
_local11._rotation = -50 + (65 * Math.sin(_local5));
_local11._x = _local9._x + 117;
_local11._y = (_local9._y + _local9._height) - 30;
_local13 = {x:_local11.hand_connector_mc._x, y:_local11.hand_connector_mc._y};
_local11.localToGlobal(_local13);
_local8 = new flash.geom.Point(_local13.x, _local13.y - _root.bottomMc._y);
var _local12 = _local8.subtract(_local10).length;
_local5 = Math.atan2(_local8.y - _local10.y, _local8.x - _local10.x);
if (_local2.chainLength > _local12) {
var _local7 = Math.pow(1 - (_local12 / _local2.chainLength), 0.65);
_local7 = ((1 - (_local12 / _local2.chainLength)) + Math.pow(1 - (_local12 / _local2.chainLength), 0.333333333333333)) / 2;
_local2.ang = (_local5 + (Math.PI * _local7)) + ((Math.PI / _local2.sectionNum) * _local7);
_local2._rotation = (_local2.ang / 180) * Math.PI;
var _local4 = 0;
while (_local4 < _local2.sectionNum) {
var _local3 = _local2["h" + _local4];
if (_local4) {
var _local6 = _local2["h" + (_local4 - 1)];
_local3.ang = _local6.ang - (((Math.PI*2) / _local2.sectionNum) * _local7);
_local3._x = _local6._x + (_local2.sectionLength * Math.cos(_local3.ang));
_local3._y = _local6._y + (_local2.sectionLength * Math.sin(_local3.ang));
} else {
_local3.ang = _local2.ang - (((Math.PI*2) / _local2.sectionNum) * _local7);
_local3._x = _local2.sectionLength * Math.cos(_local3.ang);
_local3._y = _local2.sectionLength * Math.sin(_local3.ang);
}
_local3._rotation = (_local3.ang / Math.PI) * 180;
_local4++;
}
} else {
var _local4 = 0;
while (_local4 < _local2.sectionNum) {
var _local3 = _local2["h" + _local4];
var _local6 = _local2["h" + (_local4 - 1)];
_local3._rotation = (_local5 / Math.PI) * 180;
if (_local4) {
_local3._x = _local6._x + (_local2.sectionLength * Math.cos(_local5));
_local3._y = _local6._y + (_local2.sectionLength * Math.sin(_local5));
} else {
_local3._x = _local2.sectionLength * Math.cos(_local5);
_local3._y = _local2.sectionLength * Math.sin(_local5);
}
_local4++;
}
}
}
}
};
handDescribing = function () {
var _local8 = _root.bottomMc.cntnt.roll_mc;
var _local7 = _root.bottomMc.cntnt.hand_mc;
var _local6 = "<p align = 'center'><font face='Georgia' size = '11' color = '#082436'><b>";
var _local4 = 0;
while (_local4 < mainXml.firstChild.childNodes[2].childNodes.length) {
var _local3 = mainXml.firstChild.childNodes[2].childNodes[_local4];
if (_local3.attributes.text != undefined) {
_local6 = _local6 + _local3.attributes.text;
} else {
_local6 = _local6 + (("<font size = '18' color = '#570906'>" + _local3.attributes.acctext.toUpperCase()) + "</font>");
}
((_local4 < (mainXml.firstChild.childNodes[2].childNodes.length - 1)) ? (_local6 = _local6 + "<br>") : 1);
_local4++;
}
_local6 = _local6 + "<b></font></p>";
var _local11 = _local8.createEmptyMovieClip("txtholder", _local8.getNextHighestDepth());
_local11._x = _local8.roll_paper._x;
_local11._y = _local8.roll_paper._y - 5;
var _local9 = _local11.createTextField("tf", 0, 5, 0, _local8.roll_paper._width - 10, 100);
_local9.selectable = false;
_local9.wordWrap = true;
_local9.multiline = true;
_local9.autoSize = true;
_local9.embedFonts = true;
_local9.html = true;
_local9.htmlText = _local6;
_local8.r_bottom._y = _local8.roll_paper._y + _local11._height;
_local8.roll_paper._height = _local11._height + 2;
_local8.sty = (_local8._y = (-_local8._height) + 148);
_local8.r_bottom.onPress = function () {
playNowD("rollIn");
this._parent.my = this._parent._ymouse;
this._parent.onMouseMove = function () {
var _local2 = _ymouse - this.my;
((_local2 < this.sty) ? (_local2 = this.sty) : 1);
((_local2 > 15) ? (_local2 = 15) : 1);
this._y = _local2;
updateAfterEvent();
};
};
_local8.r_bottom.onRelease = (_local8.r_bottom.onReleaseOutside = function () {
playNowD("rollOut");
delete this._parent.onMouseMove;
});
_local7.sectionNum = 4;
_local7.sectionLength = 75;
_local7.chainLength = _local7.sectionLength * _local7.sectionNum;
_local4 = 0;
while (_local4 < _local7.sectionNum) {
var _local5 = _local7["h" + _local4];
_local5.ang = 0;
_local5.pos = new flash.geom.Point();
_local4++;
}
};
Frame 9
_root.attachMovie("bubble", "bubbleSrc", -100, {_x:-2000, _y:-2000});
_root.attachMovie("bubble_blue", "bubbleSrcBlue", -101, {_x:-2000, _y:-2000});
_root.bubbleSrc._visible = 0;
_root.bubbleSrcBlue._visible = 0;
makeSubscription = function (nm, obj, secondarity) {
var _local4 = [];
var _local10 = 0;
var _local23 = 5.23598775598299;
var _local20 = _local23 + 0.2;
var _local25;
var _local11 = 13.5;
var _local7 = 61;
var _local36 = 20;
obj.scriptHolder.removeMovieClip();
var _local13 = obj.createEmptyMovieClip("scriptHolder", obj.getNextHighestDepth());
_local13.subBmp.dispose();
var _local18 = new flash.display.BitmapData(300, 300, true, 0);
var _local21 = _local18.clone();
var _local2 = _local13.createTextField("tf", _local13.getNextHighestDepth(), 0, 0, 30, 30);
_local2.html = true;
_local2.autoSize = true;
_local2.antiAliasType = "advanced";
_local2.thickness = 700;
_local2.embedFonts = true;
while (_local20 > _local23) {
_local11 = _local11 - 0.5;
_local4 = [];
_local10 = 0;
var _local3 = 0;
while (_local3 < nm.length) {
_local2.htmlText = ((("<font face = 'GaramondC' color = '#000000' size = '" + _local11) + "'>") + nm.charAt(_local3)) + "</font>";
_local4.push(_local2._width - 3);
_local10 = _local10 + (_local2._width - 3);
_local3++;
}
_local25 = _local2._height;
_local20 = _local10 / _local7;
}
_local7 = _local7 - ((_local36 - _local25) / 2);
var _local17 = _local10 / _local7;
var _local19 = 0;
var _local16 = _root.bubbleSrc;
_local16.rSide._rotation = 90 - ((((Math.PI/2) + (_local17 / 2)) / Math.PI) * 180);
_local16.lSide._rotation = _local16.rSide._rotation + ((_local17 / Math.PI) * 180);
_local16.rTail._x = 57 * Math.cos((Math.PI/2) - (_local17 / 2));
_local16.rTail._y = 57 * Math.sin((Math.PI/2) - (_local17 / 2));
_local16.rTail._rotation = _local16.rSide._rotation;
_local16.lTail._x = 57 * Math.cos((Math.PI/2) + (_local17 / 2));
_local16.lTail._y = 57 * Math.sin((Math.PI/2) + (_local17 / 2));
_local16.lTail._rotation = _local16.lSide._rotation;
var _local22 = _local16.emptyMask;
_local22.clear();
_local22.beginFill(0);
_local22.moveTo(0, 0);
var _local30 = _local17 + 0.15707963267949;
var _local26 = (Math.PI/2) + (_local30 / 2);
var _local35 = _local30;
var _local27 = _local35 / 10;
var _local3 = -1;
while (_local3 < 10) {
var _local12 = _local26 - ((_local3 + 1) * _local27);
var _local15 = 90 * Math.cos(_local12);
var _local14 = 90 * Math.sin(_local12);
_local22.lineTo(_local15, _local14);
_local3++;
}
var _local33 = _quality;
_quality = "HIGH";
_local18.draw(_local16, new flash.geom.Matrix(1, 0, 0, 1, 150, 150));
((!secondarity) ? ((colour = "#FCFCC7")) : ((colour = "#C7C785")));
_local3 = 0;
while (_local3 < nm.length) {
_local2.htmlText = ((((("<font face = 'GaramondC' color = '" + colour) + "' size = '") + _local11) + "'>") + nm.charAt(_local3)) + "</font>";
var _local6 = ((1.59697626557481 + (_local17 / 2)) - (_local19 / _local7)) - ((_local4[_local3] / _local7) / 2);
_local19 = _local19 + _local4[_local3];
var _local37 = new flash.geom.Matrix();
var _local9 = Math.cos(_local6 - (Math.PI/2));
var _local8 = Math.sin(_local6 - (Math.PI/2));
_local37.a = _local9;
_local37.b = _local8;
_local37.c = -_local8;
_local37.d = _local9;
_local37.tx = (150 + (_local7 * Math.cos(_local6))) - (((_local4[_local3] + 1.5) * _local9) / 2);
_local37.ty = (150 + (_local7 * Math.sin(_local6))) - (((_local4[_local3] + 1.5) * _local8) / 2);
_local21.draw(_local13, _local37, null, null, null, true);
_local3++;
}
_quality = _local33;
var _local34 = new flash.filters.GlowFilter(7012385, 2, 2, 2, 5, 2);
_local21.applyFilter(_local21, _local21.rectangle, new flash.geom.Point(0, 0), _local34);
_local18.draw(_local21);
var _local31;
((obj.cType == "video") ? (_local31 = "typeVideo") : (_local31 = "typePrint"));
_local13.attachMovie(_local31, "mType", _local13.getNextHighestDepth());
var _local37 = new flash.geom.Matrix(1, 0, 0, 1, (_local18.width / 2) - (_local13.mType._width / 2), (_local18.height / 2) + 65);
_local18.draw(_local13.mType, _local37);
_local13.mType.removeMovieClip();
if (obj.cNew == 1) {
var _local29 = flash.display.BitmapData.loadBitmap("newPNG.png");
_local37 = new flash.geom.Matrix(1, 0, 0, 1, (_local18.width / 2) - (_local29.width / 2), (_local18.height / 2) + 34);
_local18.draw(_local29, _local37);
_local29.dispose();
}
var _local24 = _local18.getColorBoundsRect(4278190080, 0, false);
var _local32 = (obj.heraldBmp = new flash.display.BitmapData(_local24.width, _local24.height, true, 0));
_local32.draw(_local18, new flash.geom.Matrix(1, 0, 0, 1, -_local24.x, -_local24.y), null, null);
_local13._x = (-_local24.width) / 2;
_local13._y = (-150 + _local13._y) + _local24.y;
_local2.removeTextField();
_local13.attachBitmap(_local32, _local13.getNextHighestDepth(), "auto", false);
_local18.dispose();
_local21.dispose();
_local13._visible = obj._parent != _root.contentMc;
};
showPersonas = function (switcher) {
if (((!globalPause) and (!underGroundPause)) or switcher) {
var _local2 = _root.bottomMc.cntnt.tablo_mc;
var _local3 = _local2.hand_mc;
if (!_local2.pressed) {
_local3._rotation = _local2.minHandAng + ((_local2.maxHandAng * _local2.currentTimeNum) / _local2.timesNum);
if (_local2.currentTimeNum < _local2.timesNum) {
((!_root.bottomMc.cntnt.tablo_mc.eye.ok) ? (_local2.currentTimeNum++) : 1);
} else {
_local2.currentTimeNum = 0;
((_local2.currentNum == _local2.maxNum) ? ((_local2.currentNum = 0)) : (_local2.currentNum++));
prepareNewPerson(_local2.currentNum);
_local3._rotation = _local2.minHandAng + (_local2.maxHandAng / 2);
}
} else {
var _local6 = new flash.geom.Point(_local2._x + _local3._x, _local2._y + _local3._y);
var _local7 = new flash.geom.Point(_xmouse, _ymouse);
var _local4 = Math.atan2(_local7.y - _local6.y, _local7.x - _local6.x);
if ((((_local4 / Math.PI) * 180) > _local2.minHandAng) and (((_local4 / Math.PI) * 180) < (_local2.minHandAng + _local2.maxHandAng))) {
_local3._rotation = _local3._rotation + ((((_local4 / Math.PI) * 180) - _local3._rotation) / _local2.dec);
} else if (((_local4 / Math.PI) * 180) <= _local2.minHandAng) {
_local3._rotation = _local3._rotation + ((_local2.minHandAng - _local3._rotation) / _local2.dec);
if (_local2.readyToSwitch) {
_local2.readyToSwitch = false;
_local2.currentTimeNum = 0;
((_local2.currentNum == _local2.maxNum) ? ((_local2.currentNum = 0)) : (_local2.currentNum++));
prepareNewPerson(_local2.currentNum);
}
} else {
_local3._rotation = _local3._rotation + (((_local2.minHandAng + _local2.maxHandAng) - _local3._rotation) / _local2.dec);
}
var _local5 = (int(_local3._rotation) - _local2.minHandAng) / _local2.maxHandAng;
if (_local2.currentTimeNum <= int(_local5 * _local2.timesNum)) {
_local2.currentTimeNum = int(_local5 * _local2.timesNum);
_local2.dec = 2;
} else {
_local2.dec = 1;
}
if (_local2.currentTimeNum == _local2.timesNum) {
_local2.readyToSwitch = true;
}
}
movePersona(_local2.currentTimeNum);
}
};
prepareNewPerson = function (num) {
printName(mainXml.firstChild.childNodes[1].childNodes[num].attributes.name, mainXml.firstChild.childNodes[1].childNodes[num].attributes.post);
makeNewPersona(num);
};
describePersonas = function () {
var tbl = _root.bottomMc.cntnt.tablo_mc;
var _local3 = tbl.eye;
_local3.ok = true;
_local3.stop();
_local3.onRelease = function (who) {
if (!who) {
playNowD("eyeBtn");
}
this.ok = !this.ok;
this.gotoAndStop(1 + (1 * this.ok));
};
_local3.onRelease(true);
var _local4 = tbl.hand_mc;
tbl.currentNum = random(mainXml.firstChild.childNodes[1].childNodes.length);
tbl.maxNum = mainXml.firstChild.childNodes[1].childNodes.length - 1;
tbl.timesNum = 118;
tbl.currentTimeNum = 0;
tbl.minHandAng = -75;
tbl.maxHandAng = 45;
tbl.dec = 15;
tbl.pressed = false;
_local4.onPress = function () {
tbl.pressed = true;
tbl.readyToSwitch = false;
tbl.emptySpin = false;
};
_local4.onRelease = (_local4.onReleaseOutside = function () {
tbl.pressed = false;
});
describeNameDeviceBmps();
showPersonas(true);
prepareNewPerson(tbl.currentNum);
};
Frame 10
setupConnections = function () {
_root.videoNC = new NetConnection();
_root.videoNC.connect(null);
_root.videoNS = new NetStream(_root.videoNC);
};
setupConnections();
describeContentStuff = function (clip, cw, ch) {
var _local4 = _root.showStuff;
var _local6;
var _local5;
if ((clip.cType != "video") and cw) {
_local6 = cw - 15;
_local5 = ch - 20;
} else {
_local6 = 305;
_local5 = 236;
}
var _local2 = 0;
while (_local2 < _local4.corners.length) {
var _local3 = _local4.corners[_local2];
_local3.zeroPoint = new flash.geom.Point(_local3.zeroX, _local3.zeroY);
_local3.fullPoint = new flash.geom.Point(0, 0);
_local3.fullPoint.x = 503 + ((_local6 / 2) * (1 - (2 * ((_local2 == 0) or (_local2 == 3)))));
_local3.fullPoint.y = 299 + ((_local5 / 2) * (1 - (2 * ((_local2 == 0) or (_local2 == 2)))));
_local2++;
}
describeBlackScreen();
};
playMyContent = function (clip) {
clip.wizard.removeMovieClip();
clip.magical.removeMovieClip();
_root.onGroundPause = true;
_root.contentMc.look.btn.enabled = false;
_root.contentMc.look.welcome.enabled = true;
_root.contentMc.look.light._visible = false;
var _local3 = _root.attachMovie("showStuff", "showStuff", _root.getNextHighestDepth());
_local3._x = 100;
doTeleport(clip);
describeExitButton();
((clip.cType == "video") ? (preDescribeNavigation()) : (preDescribePrintNavigation()));
_local3.blackScreen._alpha = 0;
_local3.veer.gotoAndStop(1);
_local3.veer.header.text = clip.cName.toUpperCase();
_local3.veer.header.embedFonts = true;
_local3.veer.header.autoSize = true;
_local3.clip = clip;
_local3.fingers = [_local3.blf, _local3.brf, _local3.tlf, _local3.trf];
_local3.fingercrosses = [_local3.trfc, _local3.blfc];
_local3.righthand = [_local3.rh, _local3.brf, _local3.trf];
_local3.lefthand = [_local3.lh, _local3.blf, _local3.tlf];
_local3.hands = [_local3.lh, _local3.rh];
_local3.handsArr = [_local3.lefthand, _local3.righthand];
_local3.corners = [_local3.lh, _local3.rh, _local3.trfc, _local3.blfc];
_local3.hoses = [_local3.those, _local3.bhose, _local3.rhose, _local3.lhose];
_local3.bros = [[_local3.trfc, "h"], [_local3.blfc, "h"], [_local3.rh, "v"], [_local3.lh, "v"]];
_local3.stuffThatIMove = [[_local3.veer], [_local3.navigation], [_local3.exitBtn], []];
fingersVisible(true);
var _local5 = 0;
while (_local5 < _local3.corners.length) {
var _local4 = _local3.corners[_local5];
_local4.zeroX = _local4._x;
_local4.zeroY = _local4._y;
_local4.scFactor = 0;
_local4.hose = _local3.hoses[_local5];
_local4.hoseXO = _local4._x - _local4.hose._x;
_local4.hoseYO = _local4._y - _local4.hose._y;
_local4.hoseParam = _local3.bros[_local5];
((_local4.hoseParam[1] == "h") ? ((_local4.hose._width = 30)) : ((_local4.hose._height = 30)));
_local4.moveStuff = [];
var _local6 = 0;
while (_local6 < _local3.stuffThatIMove[_local5].length) {
var _local7 = _local3.stuffThatIMove[_local5][_local6];
var _local11 = _local4._x - _local7._x;
var _local9 = _local4._y - _local7._y;
_local4.moveStuff.push([_local7, _local11, _local9]);
_local6++;
}
_local5++;
}
var _local12 = _local3.teleport;
_local12.tx0 = _local12._x;
_local12.ty0 = _local12._y - ((2 * Stage.height) / 3);
_local12.tx1 = _local12._x;
_local12.ty1 = _local12._y;
_local12._x = _local12.tx0;
_local12._y = _local12.ty0;
_local12.inc = 10;
_local12.dec = 0.6;
_local12.onEnterFrame = function () {
if (!_root.showPause) {
if ((Math.abs(this.tx1 - this._x) > 1) or (Math.abs(this.ty1 - this._y) > 1)) {
this._x = this._x + ((this.tx1 - this._x) / this.inc);
this._y = this._y + ((this.ty1 - this._y) / this.inc);
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
} else {
this._x = this.tx1;
this._y = this.ty1;
this.cnt = 0;
this.onEnterFrame = function () {
if (!_root.showPause) {
this._y = this.ty1 + (15 * Math.sin(this.cnt));
this.cnt = this.cnt + 0.0314159265358979;
}
};
}
}
};
var _local13 = _root.sceneBorder.goMenu;
_local13.enabled = false;
_local13.onEnterFrame = function () {
if (this._currentframe != 1) {
this.prevFrame();
} else {
delete this.onEnterFrame;
}
};
_local5 = 0;
while (_local5 < _local3.handsArr.length) {
var _local6 = 0;
while (_local6 < _local3.handsArr[_local5].length) {
var _local4 = _local3.handsArr[_local5][_local6];
if (_local4 == _local3.lh) {
_local3.exitBtn.ebX = _local4._x - _local3.exitBtn._x;
_local3.exitBtn.ebY = _local4._y - _local3.exitBtn._y;
_local3.veer.ebX = _local4._x - _local3.veer._x;
_local3.veer.ebY = _local4._y - _local3.veer._y;
}
if (_local4 == _local3.rh) {
_local3.navigation.ebX = _local4._x - _local3.navigation._x;
_local3.navigation.ebY = _local4._y - _local3.navigation._y;
}
_local4._x = _local4._x + (((2 * Stage.height) / 3) * Math.cos(-1.74532925199433 + (Math.PI * _local5)));
_local4._y = _local4._y + (((2 * Stage.height) / 3) * Math.sin(-1.74532925199433 + (Math.PI * _local5)));
if (_local4 == _local3.lh) {
_local3.exitBtn._x = _local4._x - _local3.exitBtn.ebX;
_local3.exitBtn._y = _local4._y - _local3.exitBtn.ebY;
_local3.veer._x = _local4._x - _local3.veer.ebX;
_local3.veer._y = _local4._y - _local3.veer.ebY;
}
if (_local4 == _local3.rh) {
_local3.navigation._x = _local4._x - _local3.navigation.ebX;
_local3.navigation._y = _local4._y - _local3.navigation.ebY;
}
_local6++;
}
var _local10 = _local3.hands[_local5];
_local10.fingers = _local3.handsArr[_local5];
_local10.inc = 8;
_local10.dec = 0.9;
_local10.onEnterFrame = function () {
if (!_root.showPause) {
if ((Math.abs(this.zeroX - this._x) > 1) or (Math.abs(this.zeroY - this._y) > 1)) {
this._x = this._x + ((this.zeroX - this._x) / this.inc);
this._y = this._y + ((this.zeroY - this._y) / this.inc);
} else {
this._x = this.zeroX;
this._y = this.zeroY;
fingersVisible(false);
this._parent.toStartCount--;
delete this.onEnterFrame;
}
if (this._name == "lh") {
this._parent.exitBtn._x = this._x - this._parent.exitBtn.ebX;
this._parent.exitBtn._y = this._y - this._parent.exitBtn.ebY;
this._parent.veer._x = this._x - this._parent.veer.ebX;
this._parent.veer._y = this._y - this._parent.veer.ebY;
}
if (this._name == "rh") {
this._parent.navigation._x = this._x - this._parent.navigation.ebX;
this._parent.navigation._y = this._y - this._parent.navigation.ebY;
}
var _local4 = 0;
while (_local4 < this.fingers.length) {
var _local5 = this.fingers[_local4];
_local5._x = this._x;
_local5._y = this._y;
_local4++;
}
if ((((this._name == "lh") and (Math.abs(this.zeroY - this._y) < 200)) and (!this._parent.veer.onEnterFrame)) and (this._parent.veer._currentframe == 1)) {
this._parent.veer.onEnterFrame = function () {
if (!_root.showPause) {
if (this._currentframe < (this._parent.clip.cItems.length + 1)) {
describeClipButtons(this._currentframe - 1);
this.nextFrame();
} else {
var _local3 = this._parent.clip.cItems.length;
while (_local3 < 6) {
this["mi" + _local3].swapDepths(666);
this["mi" + _local3].removeMovieClip();
_local3++;
}
if (this.doItByYourSelf) {
this["mi" + this._parent.clip.playOrder].onRollOver();
this["mi" + this._parent.clip.playOrder].onRelease();
}
delete this.onEnterFrame;
}
}
};
}
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
}
};
_local5++;
}
_local3.toStartCount = 2;
_local3.onEnterFrame = function () {
if (!_root.showPause) {
if (!this.toStartCount) {
fingersVisible(false);
delete this.onEnterFrame;
describeContentStuff(clip);
if (clip.cType == "video") {
_root.globalSoundDown();
describeSomeVideoStuff();
}
this.blackScreen.onEnterFrame = function () {
if (!_root.showPause) {
if (this._alpha < 100) {
this._alpha = this._alpha + 20;
} else {
this._alpha = 100;
delete this.onEnterFrame;
}
}
};
if (!this.veer.onEnterFrame) {
this.veer["mi" + this.clip.playOrder].onRollOver();
this.veer["mi" + this.clip.playOrder].onRelease();
} else {
this.veer.doItByYourSelf = true;
}
}
}
};
};
preDescribePrintNavigation = function () {
_root.showStuff.navigation.swapDepths(666);
_root.showStuff.navigation.removeMovieClip();
_root.showStuff.printNavigation._name = "navigation";
_root.showStuff.navigation.loaderMc.stop();
};
preDescribeNavigation = function () {
_root.showStuff.printNavigation.swapDepths(666);
_root.showStuff.printNavigation.removeMovieClip();
var _local2 = _root.showStuff.navigation;
_local2.playstop.gotoAndStop(1);
_local2.navcontrol.preloaderBack.gotoAndStop(1);
((_root.clipVolume == undefined) ? ((_root.clipVolume = 80)) : 1);
if (_root.clipVolume != 0) {
_local2.snd_on_off.gotoAndStop(1);
} else {
_local2.snd_on_off.gotoAndStop(2);
}
_local2.sndcntrl.gotoAndStop(int(_root.clipVolume) + 1);
};
handsSetup = function (scFactor, over) {
var _local7 = _root.showStuff;
_local7.toStartCount = 4;
var _local6 = 0;
while (_local6 < _local7.corners.length) {
(scFactor ? (fingersVisible(false, over)) : 1);
var _local4 = _local7.corners[_local6];
_local4.middlePoint = flash.geom.Point.interpolate(_local4.fullPoint, _local4.zeroPoint, scFactor);
_local4.scFactor = scFactor;
_local4.inc = 15;
_local4.dec = 0.6;
_local4.hose.cacheAsBitmap = false;
_local4.onEnterFrame = function () {
if (!_root.showPause) {
if ((Math.abs(this.middlePoint.x - this._x) > 1) or (Math.abs(this.middlePoint.y - this._y) > 1)) {
this._x = this._x + ((this.middlePoint.x - this._x) / this.inc);
this._y = this._y + ((this.middlePoint.y - this._y) / this.inc);
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
} else {
this._x = this.middlePoint.x;
this._y = this.middlePoint.y;
this._parent.toStartCount--;
(((!this._parent.toStartCount) and (!this.scFactor)) ? (fingersVisible(true, over)) : 1);
delete this.onEnterFrame;
this.hose.cacheAsBitmap = true;
}
this.hose._x = this._x - this.hoseXO;
this.hose._y = this._y - this.hoseYO;
if (this.hoseParam[1] == "h") {
this.hose._width = Math.abs(this.hose._x - this.hoseParam[0]._x) + 10;
} else {
this.hose._height = Math.abs(this.hose._y - this.hoseParam[0]._y) - 60;
}
var _local3 = 0;
while (_local3 < this.moveStuff.length) {
var _local4 = this.moveStuff[_local3][0];
_local4._x = this._x - this.moveStuff[_local3][1];
_local4._y = this._y - this.moveStuff[_local3][2];
_local3++;
}
if (this._name == "lh") {
moveBlackScreen();
}
}
};
_local6++;
}
};
describeBlackScreen = function () {
var _local2 = _root.showStuff.blackScreen;
_local2.zeroPoint = _root.showStuff.lh.zeroPoint.clone();
_local2.zeroPoint.offset(-5, -6);
_local2.fullPoint = _root.showStuff.lh.fullPoint.clone();
_local2.fullPoint.offset(-5, -6);
_local2.zeroWidth = (_root.showStuff.trfc.zeroPoint.x - _root.showStuff.lh.zeroPoint.x) + 15;
_local2.fullWidth = (_root.showStuff.trfc.fullPoint.x - _root.showStuff.lh.fullPoint.x) + 15;
_local2.zeroHeight = (_root.showStuff.blfc.zeroPoint.y - _root.showStuff.lh.zeroPoint.y) + 20;
_local2.fullHeight = (_root.showStuff.blfc.fullPoint.y - _root.showStuff.lh.fullPoint.y) + 20;
_local2.scFactor = 0;
_local2.fullDistance = flash.geom.Point.distance(_root.showStuff.lh.zeroPoint, _root.showStuff.lh.fullPoint);
};
moveBlackScreen = function () {
var _local2 = _root.showStuff.blackScreen;
var _local4 = flash.geom.Point.distance(_root.showStuff.lh.zeroPoint, new flash.geom.Point(_root.showStuff.lh._x, _root.showStuff.lh._y));
_local2.scFactor = _local4 / _local2.fullDistance;
var _local3 = flash.geom.Point.interpolate(_local2.fullPoint, _local2.zeroPoint, _local2.scFactor);
_local2._x = _local3.x;
_local2._y = _local3.y;
_local2.backMc._width = _local2.zeroWidth + ((_local2.fullWidth - _local2.zeroWidth) * _local2.scFactor);
_local2.backMc._height = _local2.zeroHeight + ((_local2.fullHeight - _local2.zeroHeight) * _local2.scFactor);
};
fingersVisible = function (visibility, over) {
var _local2 = 0;
while (_local2 < _root.showStuff.fingers.length) {
_root.showStuff.fingers[_local2]._visible = visibility;
_root.showStuff.fingercrosses[_local2]._visible = !visibility;
_local2++;
}
_local2 = 0;
while (_local2 < _root.showStuff.hoses.length) {
_root.showStuff.hoses[_local2]._visible = !visibility;
_local2++;
}
_root.showStuff.blackScreen._visible = !over;
};
describeNameDeviceBmps = function () {
var _local2 = _root.bottomMc.cntnt.tablo_mc;
_local2.base = _root.bottomMc.cntnt.loadBitmapFunc("tbl_base");
_local2.msk = _root.bottomMc.cntnt.loadBitmapFunc("tbl_msk");
_local2.shad = _root.bottomMc.cntnt.loadBitmapFunc("tbl_shad");
_local2.bmp = new flash.display.BitmapData(_local2.base.width, _local2.base.height, true, 0);
var _local4 = _local2.createEmptyMovieClip("bmpHolder_mc", _local2.getNextHighestDepth());
_local4._x = 64;
_local4._y = 72;
_local4.attachBitmap(_local2.bmp, 0);
_local4.cnum = 0;
_local2.nm0 = _local2.bmp.clone();
_local2.nm1 = _local2.bmp.clone();
var _local3 = _local2.createEmptyMovieClip("tfHolder_mc", _local2.getNextHighestDepth());
_local3._visible = false;
_local3.createTextField("tf", 0, 0, 0, 10, 10);
_local3.tf.html = (_local3.tf.autoSize = true);
_local3.tf.embedFonts = true;
_local2.bmp.draw(_local2.base);
_local2.bmp.draw(_local2.shad, new flash.geom.Matrix(), _local2.bmp.rectangle, "multiply");
_local2.bmp.copyChannel(_local2.msk, _local2.msk.rectangle, new flash.geom.Point(), 1, 8);
describeCarusele();
};
drawMyName = function (fntSize, radius, gap, nm, repeat) {
var _local2 = _root.bottomMc.cntnt.tablo_mc;
var _local26 = [];
var _local27 = false;
if (nm.length > 37) {
var _local24;
_local24 = nm.split(" ");
var _local25 = int(_local24.length / 2);
((_local24[_local25 - 1].length < 4) ? (_local25 = _local25 - 1) : 1);
_local26.push(_local24.slice(0, _local25).join(" "));
_local26.push(_local24.slice(_local25).join(" "));
nm = _local24.slice(0, _local25).join(" ");
gap = gap * 0.6;
fntSize = fntSize * 0.6;
_local27 = true;
}
var _local22 = _local2.bmpHolder_mc;
var _local4 = [];
var _local5 = 0;
var _local17 = 2.2165681500328;
var _local10 = _local17 + 0.2;
var _local12;
if (_local27) {
_local10 = _local17 + 0.2;
var _local21 = [];
var _local16 = 0;
while (_local16 < 2) {
_local10 = _local17 + 0.2;
var _local7 = fntSize;
_local7 = _local7 + 0.5;
var _local19 = radius - ((gap * _local16) * 0.8);
while (_local10 > _local17) {
_local7 = _local7 - 0.5;
_local4 = [];
_local5 = 0;
var _local8 = 0;
while (_local8 < nm.length) {
_local2.tfHolder_mc.tf.htmlText = ((("<font face = 'HeliosCondBlack' color = '#FFFFFF' size = '" + _local7) + "'>") + nm.charAt(_local8).toUpperCase()) + "</font>";
_local4.push(_local2.tfHolder_mc.tf._width);
_local5 = _local5 + _local2.tfHolder_mc.tf._width;
_local8++;
}
_local12 = _local2.tfHolder_mc.tf._height;
_local10 = _local5 / (_local19 - ((gap - _local12) / 2));
}
_local21.push(_local7);
_local16++;
}
((_local21[1] < _local21[0]) ? ((_local21[0] = _local21[1])) : 1);
fntSize = _local21[0];
}
fntSize = fntSize + 0.5;
_local10 = _local17 + 0.2;
while (_local10 > _local17) {
fntSize = fntSize - 0.5;
_local4 = [];
_local5 = 0;
var _local8 = 0;
while (_local8 < nm.length) {
_local2.tfHolder_mc.tf.htmlText = ((("<font face = 'HeliosCondBlack' color = '#FFFFFF' size = '" + fntSize) + "'>") + nm.charAt(_local8).toUpperCase()) + "</font>";
_local4.push((_local2.tfHolder_mc.tf._width - (20 / fntSize)) * 0.9);
_local5 = _local5 + ((_local2.tfHolder_mc.tf._width - (20 / fntSize)) * 0.9);
_local8++;
}
_local12 = _local2.tfHolder_mc.tf._height;
_local10 = _local5 / (radius - ((gap - _local12) / 2));
}
var _local29 = radius;
radius = radius - ((gap - _local12) / 2);
var _local23 = _local5 / radius;
var _local20 = 0;
var _local28 = _quality;
_quality = "HIGH";
var _local8 = 0;
while (_local8 < nm.length) {
_local2.tfHolder_mc.tf.htmlText = ((("<font face = 'HeliosCondBlack' color = '#FFFFFF' size = '" + fntSize) + "'>") + nm.charAt(_local8).toUpperCase()) + "</font>";
var _local13 = ((-1.5707963267949 - (_local23 / 2)) + (_local20 / radius)) + ((_local4[_local8] / radius) / 2);
_local20 = _local20 + _local4[_local8];
var _local9 = new flash.geom.Matrix();
var _local15 = Math.cos(_local13 + (Math.PI/2));
var _local14 = Math.sin(_local13 + (Math.PI/2));
_local9.a = _local15;
_local9.b = _local14;
_local9.c = -_local14;
_local9.d = _local15;
_local9.tx = (111 + (radius * Math.cos(_local13))) - ((_local4[_local8] * _local15) / 2);
_local9.ty = (123 + (radius * Math.sin(_local13))) - ((_local4[_local8] * _local14) / 2);
_local22.tbmp.draw(_local2.tfHolder_mc, _local9);
_local8++;
}
_quality = _local28;
if (_local27) {
drawMyName(fntSize, _local29 - (gap * 0.8), gap, _local26[1], true);
}
};
printName = function (nm, pst) {
var _local5 = _root.bottomMc.cntnt.tablo_mc;
var _local4 = _local5.bmpHolder_mc;
_local4.cnt = (_local4.maxcnt = 5);
_local4.cnum = 1 - _local4.cnum;
_local4.tbmp = _local5["nm" + _local4.cnum];
_local4.bbmp = _local5["nm" + (1 - _local4.cnum)];
_local4.tbmp.draw(_local5.base);
_local4.tbmp.copyChannel(_local5.msk, _local5.msk.rectangle, new flash.geom.Point(), 1, 8);
drawMyName(21, 120, 25, nm);
drawMyName(18, 86, 18, pst);
_local4.onEnterFrame = function () {
if (this.cnt) {
this.cnt--;
} else {
delete this.onEnterFrame;
}
var _local4 = _root.bottomMc.cntnt.tablo_mc;
_local4.bmp.draw(_local4.base);
var _local10 = -4.57276264022514;
var _local9 = -2.30383461263251;
var _local8 = _local9 + ((_local10 - _local9) * (1 - (this.cnt / this.maxcnt)));
var _local5 = -2.26892802759263 * (1 - (this.cnt / this.maxcnt));
var _local7 = Math.cos(_local5);
var _local6 = Math.sin(_local5);
var _local3 = new flash.geom.Matrix();
_local3.a = _local7;
_local3.b = _local6;
_local3.c = -_local6;
_local3.d = _local7;
_local3.tx = 111 + (165 * Math.cos(_local8));
_local3.ty = 123 + (165 * Math.sin(_local8));
_local4.bmp.draw(this.bbmp, _local3);
_local10 = -2.30383461263251;
_local9 = 0;
_local8 = _local9 + ((_local10 - _local9) * (1 - (this.cnt / this.maxcnt)));
_local5 = 2.26892802759263 * (this.cnt / this.maxcnt);
_local7 = Math.cos(_local5);
_local6 = Math.sin(_local5);
_local3.a = _local7;
_local3.b = _local6;
_local3.c = -_local6;
_local3.d = _local7;
_local3.tx = 111 + (165 * Math.cos(_local8));
_local3.ty = 123 + (165 * Math.sin(_local8));
_local4.bmp.draw(this.tbmp, _local3, null, null, null, false);
_local4.bmp.draw(_local4.shad, new flash.geom.Matrix(), null, "multiply");
_local4.bmp.copyChannel(_local4.msk, _local4.msk.rectangle, new flash.geom.Point(), 1, 8);
};
};
Frame 11
showVideoClip = function () {
_root.videoURL = (("content/" + _root.showStuff.clip.cFolder) + "/") + _root.showStuff.clip.cItems[_root.showStuff.released.num][1];
_root.videoNS.play(_root.videoURL);
_root.showStuff.blackScreen.videoStarted = true;
_root.showStuff.navigation.navcontrol.preloaderBack.gotoAndStop(1);
_root.setupNavControl();
_root.showStuff.navigation.playstop.gotoAndStop(1);
};
describeSomeVideoStuff = function () {
var _local3 = _root.showStuff.blackScreen;
_root.showStuff.blackScreen.videoFrame.attachVideo(_root.videoNS);
_root.videoNS.onMetaData = function (obj) {
this.totalTime = obj.duration;
};
_root.videoNS.onStatus = function (object) {
if (object.code == "NetStream.Play.Stop") {
this.seek(0);
pauseVideo();
}
};
var _local4 = _local3.createEmptyMovieClip("snd", _local3.getNextHighestDepth());
_local4.attachAudio(_root.videoNS);
_local3.audio = new Sound(_local4);
setupSoundControl();
_local3.backMc.onPress = (_root.showStuff.navigation.playstop.onRelease = function () {
if (!_root.showStuff.blackScreen.videoStarted) {
playVideo();
} else {
pauseVideo();
}
});
};
setupNavControl = function () {
var _local3 = _root.showStuff.navigation.navcontrol;
_local3.preloaderBack.gotoAndStop(1);
_local3.preloaderBack.onEnterFrame = function () {
if (!_root.showPause) {
var _local3 = _root.videoNS.bytesLoaded;
var _local4 = _root.videoNS.bytesTotal;
if ((_local3 == _local4) and (_local3 > 1000)) {
delete this.onEnterFrame;
this.gotoAndStop(101);
} else {
this.gotoAndStop(int((_local3 / _local4) * 100) + 1);
}
}
};
_local3.navBtn.onPress = function () {
if (_root.showStuff.blackScreen.videoStarted) {
_root.videoNS.pause();
}
this.onEnterFrame = function () {
if (!_root.showPause) {
var _local3 = this._ymouse / this._height;
((_local3 < 0.05) ? (_local3 = 0) : 1);
((_local3 > 0.98) ? (_local3 = 0.98) : 1);
_root.videoNS.seek(_root.videoNS.totalTime * _local3);
}
};
};
_local3.navBtn.onRelease = (_local3.navBtn.onReleaseOutside = function () {
if (_root.showStuff.blackScreen.videoStarted) {
_root.videoNS.pause();
}
delete this.onEnterFrame;
});
_local3.ncbtn.onEnterFrame = function () {
if (!_root.showPause) {
var _local3 = _root.videoNS.time / _root.videoNS.totalTime;
this._rotation = -82 * _local3;
}
};
_local3.seekF.onPress = function () {
_root.videoNS.seek(_root.videoNS.time + 1);
};
_local3.seekB.onPress = function () {
_root.videoNS.seek(_root.videoNS.time - 2);
};
};
setupSoundControl = function () {
var _local4 = _root.showStuff.navigation.sndcntrl;
_local4.snd = _root.showStuff.blackScreen.audio;
_local4.snd.setVolume(_root.clipVolume);
_local4.gotoAndStop(_root.clipVolume + 1);
_local4.onPress = function () {
this.onEnterFrame = function () {
if (!_root.showPause) {
var _local3 = (this._ymouse / this._height) * 100;
((_local3 < 0) ? (_local3 = 0) : 1);
((_local3 > 100) ? (_local3 = 100) : 1);
this._parent.snd_on_off.gotoAndStop(1 + (1 * (_local3 == 0)));
this.snd.setVolume(_local3);
_root.clipVolume = _local3;
this.gotoAndStop(int(_local3) + 1);
}
};
};
_local4.onRelease = (_local4.onReleaseOutside = function () {
delete this.onEnterFrame;
var _local3 = (this._ymouse / this._height) * 100;
((_local3 < 0) ? (_local3 = 0) : 1);
((_local3 > 100) ? (_local3 = 100) : 1);
this._parent.snd_on_off.gotoAndStop(1 + (1 * (_local3 == 0)));
_root.clipVolume = _local3;
this.snd.setVolume(_local3);
this.gotoAndStop(int(_local3) + 1);
});
var _local5 = _root.showStuff.navigation.snd_on_off;
_local5.onRelease = function () {
this.gotoAndStop(3 - this._currentframe);
this._parent.sndcntrl.snd.setVolume(100 - (100 * (this._currentframe - 1)));
_root.clipVolume = this._parent.sndcntrl.snd.getVolume();
};
};
playVideo = function () {
_root.showStuff.blackScreen.videoStarted = true;
_root.showStuff.navigation.playstop.gotoAndStop(1);
_root.videoNS.pause();
};
pauseVideo = function () {
_root.showStuff.blackScreen.videoStarted = false;
_root.showStuff.navigation.playstop.gotoAndStop(2);
_root.videoNS.pause();
};
collapseCurrentToShowJpg = function (btn) {
var _local6 = _root.showStuff.blackScreen.picHolder;
_local6._x = -3;
_local6._y = -2;
_local6.onEnterFrame = function () {
if (this.pic) {
((this._alpha > 5) ? ((this._alpha = this._alpha - 33)) : (this.pic.removeMovieClip()));
} else {
this._visible = false;
this._alpha = 0;
this.createEmptyMovieClip("pic", this.getNextHighestDepth());
_root.showStuff.navigation.loaderMc.gotoAndStop(1);
var _local8 = (("content/" + _root.showStuff.clip.cFolder) + "/") + _root.showStuff.clip.cItems[_root.showStuff.released.num][1];
loadMovie (_local8, this.pic);
_root.handsSetup(0);
this.rl = 0;
this.onEnterFrame = function () {
var _local7 = this.pic.getBytesLoaded();
var _local5 = this.pic.getBytesTotal();
var _local6 = (_local7 * 100) / _local5;
if (!isNaN(_local6)) {
this.rl = this.rl + ((_local6 - this.rl) / 5);
_root.showStuff.navigation.loaderMc.gotoAndStop(int(this.rl + 1));
}
if (((_local7 == _local5) and (_local5 > 10)) and (this.rl > 95)) {
_root.showStuff.navigation.loaderMc.gotoAndStop(101);
this.onEnterFrame = function () {
var _local4 = 0;
var _local3 = 0;
while (_local3 < _root.showStuff.corners.length) {
(_root.showStuff.corners[_local3].onEnterFrame ? (_local4++) : 1);
_local3++;
}
if (!_local4) {
describeContentStuff(_root.showStuff.clip, this._width, this._height);
_root.handsSetup(1);
this.onEnterFrame = function () {
var _local4 = 0;
var _local3 = 0;
while (_local3 < _root.showStuff.corners.length) {
(_root.showStuff.corners[_local3].onEnterFrame ? (_local4++) : 1);
_local3++;
}
if (!_local4) {
this._visible = true;
_local3 = 0;
while (_local3 < _root.showStuff.released.sum) {
if (_root.showStuff.veer["mi" + _local3] != _root.showStuff.released) {
_root.showStuff.veer["mi" + _local3].enabled = true;
}
_local3++;
}
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 33;
} else {
this._alpha = 100;
delete this.onEnterFrame;
}
};
_root.showStuff.veer.cacheAsBitmap = false;
}
};
}
};
}
};
}
};
};
collapseCurrentFrame = function () {
_root.handsSetup(0);
_root.showStuff.toStartCount = 10;
_root.showStuff.onEnterFrame = function () {
if (!_root.showPause) {
var _local4 = 0;
var _local3 = 0;
while (_local3 < this.corners.length) {
(this.corners[_local3].onEnterFrame ? (_local4++) : 1);
_local3++;
}
if (!_local4) {
if (!this.toStartCount) {
_root.handsSetup(1);
this.onEnterFrame = function () {
if (!_root.showPause) {
var _local4 = 0;
var _local3 = 0;
while (_local3 < this.corners.length) {
(this.corners[_local3].onEnterFrame ? (_local4++) : 1);
_local3++;
}
if (!_local4) {
_local3 = 0;
while (_local3 < this.released.sum) {
if (this.veer["mi" + _local3] != this.released) {
this.veer["mi" + _local3].enabled = true;
}
_local3++;
}
this.veer.cacheAsBitmap = false;
delete this.onEnterFrame;
showVideoClip();
}
}
};
} else {
this.toStartCount--;
}
}
}
};
};
describeClipButtons = function (num) {
var _local6 = _root.showStuff;
var clip = _local6.clip;
var _local4 = _local6.veer["mi" + num];
_local4.header.text = clip.cItems[num][0];
_local4.header.autoSize = true;
_local4.num = num;
_local4.sum = clip.cItems.length;
_local4.clip = clip;
_local4.onRollOver = function () {
var _local2 = new Color(this);
_local2.setRGB(16777215);
};
_local4.onRollOut = (_local4.onDragOut = function () {
var _local2 = new Color(this);
_local2.setRGB(0);
});
_local4.onRelease = function () {
var _local4 = _root.menuItems.mbody["mi" + this.clip.num]["msi" + this.num];
_local4.mitext = ("<u>" + _local4.mitext) + "</u>";
_local4.onRollOut();
var _local5 = new Color(this);
_local5.setRGB(14654515);
this._parent.cacheAsBitmap = true;
_root.videoNS.close();
_root.showStuff.blackScreen.videoFrame.clear();
_root.showStuff.released = this;
var _local3 = 0;
while (_local3 < this.sum) {
this._parent["mi" + _local3].enabled = false;
if (_local3 != this.num) {
this._parent["mi" + _local3].onRollOut();
}
_local3++;
}
if (_root.showStuff.clip.cType == "video") {
collapseCurrentFrame();
} else {
collapseCurrentToShowJpg(this);
}
};
};
getOffPlayContent = function () {
_root.onGroundXMDel = 30;
var _local7 = _root.showStuff;
_local7.veer.cacheAsBitmap = true;
_root.globalSoundUp();
if (_local7.clip.notFake) {
playNow("machine.clip_out");
}
var _local3 = 0;
while (_local3 < _local7.handsArr.length) {
var _local5 = 0;
while (_local5 < _local7.handsArr[_local3].length) {
var _local4 = _local7.handsArr[_local3][_local5];
_local4.tX = _local4._x + (((2 * Stage.height) / 3) * Math.cos(-1.74532925199433 - (Math.PI * _local3)));
_local4.tY = _local4._y + (((2 * Stage.height) / 3) * Math.sin(-1.74532925199433 - (Math.PI * _local3)));
_local5++;
}
var _local8 = _local7.hands[_local3];
_local8.fingers = _local7.handsArr[_local3];
_local8.inc = 12;
_local8.dec = 0.7;
_local8.onEnterFrame = function () {
if (!_root.showPause) {
if ((Math.abs(this.tX - this._x) > 1) or (Math.abs(this.tY - this._y) > 1)) {
this._x = this._x + ((this.tX - this._x) / this.inc);
this._y = this._y + ((this.tY - this._y) / this.inc);
} else {
delete this.onEnterFrame;
backMyContent();
}
if (this._name == "lh") {
this._parent.exitBtn._x = this._x - this._parent.exitBtn.ebX;
this._parent.exitBtn._y = this._y - this._parent.exitBtn.ebY;
this._parent.veer._x = this._x - this._parent.veer.ebX;
this._parent.veer._y = this._y - this._parent.veer.ebY;
}
if (this._name == "rh") {
this._parent.navigation._x = this._x - this._parent.navigation.ebX;
this._parent.navigation._y = this._y - this._parent.navigation.ebY;
}
var _local3 = 0;
while (_local3 < this.fingers.length) {
var _local4 = this.fingers[_local3];
_local4._x = this._x;
_local4._y = this._y;
_local3++;
}
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
}
};
_local3++;
}
};
describeExitButton = function () {
var _local4 = _root.showStuff.exitBtn;
_local4.exitBtnHL._alpha = 0;
_local4.exitBtnHL.onRollOver = function () {
this._alpha = 50;
this.onEnterFrame = function () {
if (!_root.showPause) {
this._alpha = 100;
delete this.onEnterFrame;
}
};
};
_local4.exitBtnHL.onRollOut = (_local4.exitBtnHL.onDragOut = function () {
this._alpha = 50;
this.onEnterFrame = function () {
if (!_root.showPause) {
this._alpha = 0;
delete this.onEnterFrame;
}
};
});
_local4.exitBtnHL.onRelease = function () {
var _local4 = _root.showStuff.teleport;
_root.showStuff.blackScreen.picHolder.pic.removeMovieClip();
_local4.inc = 6;
_local4.dec = 0.7;
_root.handsSetup(0, true);
_local4.onEnterFrame = function () {
if (!_root.showPause) {
if ((Math.abs(this.tx0 - this._x) > 1) or (Math.abs(this.ty0 - this._y) > 1)) {
this._x = this._x + ((this.tx0 - this._x) / this.inc);
this._y = this._y + ((this.ty0 - this._y) / this.inc);
} else {
this._x = this.tx0;
this._y = this.ty0;
this.swapDepths(666);
this.removeMovieClip();
}
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
}
};
_root.videoNS.close();
_root.showStuff.blackScreen.videoFrame.clear();
var _local3 = 0;
while (_local3 < _root.showStuff.veer.mi0.sum) {
_root.showStuff.veer["mi" + _local3].enabled = false;
_local3++;
}
_root.showStuff.onEnterFrame = function () {
if (!_root.showPause) {
if (!this.toStartCount) {
getOffPlayContent();
delete this.onEnterFrame;
}
}
};
};
};
movePersona = function (num) {
var _local2 = _root.bottomMc.cntnt.carusele_mc;
var _local3 = _local2.hrs_mc;
var _local7 = _root.bottomMc.cntnt.tablo_mc.timesNum;
var _local6 = _local3._rotation;
if ((_local2.num != num) or (Math.abs((_local2.num / _local7) - _local2.k) > 0.0005)) {
_local2.num = num;
var _local5 = num / _local7;
_local2.k = _local2.k + ((_local5 - _local2.k) / 4);
var _local4;
if (_local2.k < 0.5) {
_local4 = Math.sin(_local2.k * Math.PI) / 2;
} else {
_local4 = 1 - (Math.sin(_local2.k * Math.PI) / 2);
}
_local3._rotation = _local2.sa + ((_local2.ea - _local2.sa) * _local4);
if (_local5 < 0.5) {
_local4 = Math.sin(_local5 * Math.PI) / 2;
} else {
_local4 = 1 - (Math.sin(_local5 * Math.PI) / 2);
}
doChain((_local2.sa + ((_local2.ea - _local2.sa) * _local4)) - _local6);
if (!_local3.sex) {
moveGirlPersona(_local3._rotation - _local6);
} else {
moveBoyPersona(_local3._rotation - _local6);
}
} else {
(bChain.getVolume() ? (bChain.setVolume(0)) : 1);
}
};
moveBoyPersona = function (del) {
var _local10 = _root.bottomMc.cntnt.carusele_mc;
var _local2 = _local10.hrs_mc.prsn;
del = (del / 180) * Math.PI;
_local2.small_wheel._rotation = _local2.small_wheel._rotation + ((((del * _local10.rds) / 19.8) / Math.PI) * 180);
var _local20 = _local2.back_wheel.back_wheel_mask;
var _local22 = _local2.back_wheel.back_wheel_cap;
_local20._rotation = (_local22._rotation = _local22._rotation + ((((del * _local10.rds) / 61) / Math.PI) * 180));
var _local6 = _local2.pedali;
_local2.pedali_back._rotation = (_local6._rotation = _local6._rotation + ((((del * _local10.rds) / _local2.gear) / Math.PI) * 180));
_local2.wind_toy.rang = _local2.wind_toy.rang + ((((((del * _local10.rds) / 10) / Math.PI) * 180) - _local2.wind_toy.rang) / 5);
_local2.wind_toy._rotation = _local2.wind_toy._rotation - _local2.wind_toy.rang;
var _local21 = _local2.front_wing;
var _local19 = _local2.back_wing;
_local19._rotation = (_local21._rotation = -15 + (30 * Math.cos((_local6._rotation / 180) * Math.PI)));
var _local18 = _local2.front_leg_up;
var _local14 = _local2.front_leg_down;
var _local3 = new flash.geom.Point(_local18._x, _local18._y);
var _local5 = new flash.geom.Point(_local6._x + (27 * Math.cos((_local6._rotation / 180) * Math.PI)), _local6._y + (27 * Math.sin((_local6._rotation / 180) * Math.PI)));
var _local13 = 78.8;
var _local17 = 93.5;
var _local9 = flash.geom.Point.distance(_local5, _local3);
var _local7 = Math.atan2(_local5.y - _local3.y, _local5.x - _local3.x);
var _local8 = (((Math.pow(_local9, 2) - Math.pow(_local17, 2)) + Math.pow(_local13, 2)) / 2) / _local9;
var _local11 = Math.sqrt(Math.pow(_local13, 2) - Math.pow(_local8, 2));
var _local4 = new flash.geom.Point((_local3.x + (_local8 * Math.cos(_local7))) + (_local11 * Math.cos(_local7 - (Math.PI/2))), (_local3.y + (_local8 * Math.sin(_local7))) + (_local11 * Math.sin(_local7 - (Math.PI/2))));
var _local16 = Math.atan2(_local4.y - _local3.y, _local4.x - _local3.x);
var _local15 = Math.atan2(_local5.y - _local4.y, _local5.x - _local4.x);
_local18._rotation = (_local16 / Math.PI) * 180;
_local14._rotation = (_local15 / Math.PI) * 180;
_local14._x = _local4.x;
_local14._y = _local4.y;
_local18 = _local2.back_leg_up;
_local14 = _local2.back_leg_down;
_local5 = new flash.geom.Point(_local6._x - (27 * Math.cos((_local6._rotation / 180) * Math.PI)), _local6._y - (27 * Math.sin((_local6._rotation / 180) * Math.PI)));
_local9 = flash.geom.Point.distance(_local5, _local3);
_local7 = Math.atan2(_local5.y - _local3.y, _local5.x - _local3.x);
_local8 = (((Math.pow(_local9, 2) - Math.pow(_local17, 2)) + Math.pow(_local13, 2)) / 2) / _local9;
_local11 = Math.sqrt(Math.pow(_local13, 2) - Math.pow(_local8, 2));
_local4 = new flash.geom.Point((_local3.x + (_local8 * Math.cos(_local7))) + (_local11 * Math.cos(_local7 - (Math.PI/2))), (_local3.y + (_local8 * Math.sin(_local7))) + (_local11 * Math.sin(_local7 - (Math.PI/2))));
_local16 = Math.atan2(_local4.y - _local3.y, _local4.x - _local3.x);
_local15 = Math.atan2(_local5.y - _local4.y, _local5.x - _local4.x);
_local18._rotation = (_local16 / Math.PI) * 180;
_local14._rotation = (_local15 / Math.PI) * 180;
_local14._x = _local4.x;
_local14._y = _local4.y;
if ((!_local2.double) and (_local2.boy_body.boy_bodyBMP != undefined)) {
_local2.double = true;
_local2.boy_body2._visible = false;
_local2.boy_body2.attachBitmap(_local2.boy_body.boy_bodyBMP, _local2.boy_body2.getNextHighestDepth(), "auto", true);
}
if (Math.abs((del / Math.PI) * 180) < 0.1) {
_local2.boy_body._visible = false;
_local2.boy_body2._visible = true;
} else {
_local2.boy_body._visible = true;
_local2.boy_body2._visible = false;
}
};
moveGirlPersona = function (del) {
var _local9 = _root.bottomMc.cntnt.carusele_mc;
var _local2 = _local9.hrs_mc.prsn;
var _local15 = _local2.back_wheel.back_wheel_mask;
var _local21 = _local2.back_wheel.back_cap;
del = (del / 180) * Math.PI;
_local15._rotation = (_local21._rotation = _local21._rotation + ((((del * _local9.rds) / 50) / Math.PI) * 180));
_local2.small_wheel._rotation = _local2.small_wheel._rotation + ((((del * _local9.rds) / 19.8) / Math.PI) * 180);
var _local6 = _local2.pedali;
_local2.pedali_back._rotation = (_local6._rotation = _local6._rotation + ((((del * _local9.rds) / _local2.gear) / Math.PI) * 180));
_local2.hrs_front_leg._rotation = 45 * Math.cos((_local15._rotation / 360) * Math.PI);
_local2.hrs_back_leg._rotation = 45 - (45 * Math.cos((_local15._rotation / 360) * Math.PI));
var _local18 = _local2.flame;
if ((_local9.k > 0.5) and (!_local9._parent.tablo_mc.pressed)) {
_local18._visible = true;
_local18._alpha = 70 + (30 * Math.cos((Math.PI * getTimer()) / 30));
} else {
_local18._visible = false;
}
var _local20 = _local2.front_leg_up;
var _local14 = _local2.front_leg_down;
var _local3 = new flash.geom.Point(_local20._x, _local20._y);
var _local5 = new flash.geom.Point(_local6._x + (27 * Math.cos((_local6._rotation / 180) * Math.PI)), _local6._y + (27 * Math.sin((_local6._rotation / 180) * Math.PI)));
var _local12 = 93;
var _local19 = 96;
var _local10 = flash.geom.Point.distance(_local5, _local3);
var _local7 = Math.atan2(_local5.y - _local3.y, _local5.x - _local3.x);
var _local8 = (((Math.pow(_local10, 2) - Math.pow(_local19, 2)) + Math.pow(_local12, 2)) / 2) / _local10;
var _local11 = Math.sqrt(Math.pow(_local12, 2) - Math.pow(_local8, 2));
var _local4 = new flash.geom.Point((_local3.x + (_local8 * Math.cos(_local7))) + (_local11 * Math.cos(_local7 - (Math.PI/2))), (_local3.y + (_local8 * Math.sin(_local7))) + (_local11 * Math.sin(_local7 - (Math.PI/2))));
var _local17 = Math.atan2(_local4.y - _local3.y, _local4.x - _local3.x);
var _local16 = Math.atan2(_local5.y - _local4.y, _local5.x - _local4.x);
_local20._rotation = (_local17 / Math.PI) * 180;
_local14._rotation = (_local16 / Math.PI) * 180;
_local14._x = _local4.x;
_local14._y = _local4.y;
_local20 = _local2.back_leg_up;
_local14 = _local2.back_leg_down;
_local5 = new flash.geom.Point(_local6._x - (27 * Math.cos((_local6._rotation / 180) * Math.PI)), _local6._y - (27 * Math.sin((_local6._rotation / 180) * Math.PI)));
_local10 = flash.geom.Point.distance(_local5, _local3);
_local7 = Math.atan2(_local5.y - _local3.y, _local5.x - _local3.x);
_local8 = (((Math.pow(_local10, 2) - Math.pow(_local19, 2)) + Math.pow(_local12, 2)) / 2) / _local10;
_local11 = Math.sqrt(Math.pow(_local12, 2) - Math.pow(_local8, 2));
_local4 = new flash.geom.Point((_local3.x + (_local8 * Math.cos(_local7))) + (_local11 * Math.cos(_local7 - (Math.PI/2))), (_local3.y + (_local8 * Math.sin(_local7))) + (_local11 * Math.sin(_local7 - (Math.PI/2))));
_local17 = Math.atan2(_local4.y - _local3.y, _local4.x - _local3.x);
_local16 = Math.atan2(_local5.y - _local4.y, _local5.x - _local4.x);
_local20._rotation = (_local17 / Math.PI) * 180;
_local14._rotation = (_local16 / Math.PI) * 180;
_local14._x = _local4.x;
_local14._y = _local4.y;
if ((!_local2.double) and (_local2.girl_body.girl_bodyBMP != undefined)) {
_local2.double = true;
_local2.girl_body2._visible = false;
_local2.girl_body2.attachBitmap(_local2.girl_body.girl_bodyBMP, _local2.girl_body2.getNextHighestDepth(), "auto", true);
}
if (Math.abs((del / Math.PI) * 180) < 0.1) {
_local2.girl_body._visible = false;
_local2.girl_body2._visible = true;
} else {
_local2.girl_body._visible = true;
_local2.girl_body2._visible = false;
}
};
makeNewPersona = function (num) {
var _local3 = _root.bottomMc.cntnt.carusele_mc;
_local3.k = 0;
var _local2 = _local3.hrs_mc;
_root.faceLoader.removeListener(_local2.faceLoader);
_local2.prsn.removeMovieClip();
var _local5;
_local2.sex = parseInt(mainXml.firstChild.childNodes[1].childNodes[num].attributes.sex);
(_local2.sex ? (_local5 = "prsnboy") : (_local5 = "prsngirl"));
var _local4 = _local2.attachMovie(_local5, "prsn", _local3.getNextHighestDepth(), {_x:0, _y:-_local3.rds});
_local2._rotation = _local3.sa;
_local4.wind_toy.rang = 6;
_local4.gear = 15 + random(35);
_local4.double = false;
loadMyFace(_local2, mainXml.firstChild.childNodes[1].childNodes[num].attributes.photo);
playNowD("switchPersona");
};
Frame 12
doTeleport = function (clip) {
var _local7 = _root.showStuff.teleport;
var _local6 = new flash.geom.Point(99, 118);
var _local5 = 0;
while (_local5 < 2) {
var _local11 = clip["bmp" + Math.abs(clip.condition - _local5)];
var _local3 = _local6.x / _local11.width;
var _local4 = (_local6.y - 20) / _local11.height;
if ((_local3 < 1) or (_local4 < 1)) {
((_local3 > _local4) ? (_local3 = _local4) : (_local4 = _local3));
}
var _local12 = (_local7["mtrx" + _local5] = new flash.geom.Matrix(_local3, 0, 0, _local3, (_local6.x / 2) - ((_local3 * _local11.width) / 2), (_local6.y / 2) - ((_local3 * _local11.height) / 2)));
_local5++;
}
var _local9 = (_local7.bmp = new flash.display.BitmapData(_local6.x, _local6.y, true, 0));
_local7.tlp0.attachBitmap(_local9, tlp0.getNextHighestDepth(), "auto", true);
_local7.tlp1.attachBitmap(_local9, tlp1.getNextHighestDepth(), "auto", true);
_local7.mxprcnt = _local6.y;
_local7.prcnt = _local7.mxprcnt;
_local7.pinc = 1;
_local7.bkcnt = 20;
_local7.tlp0.onEnterFrame = function () {
if (!_root.showPause) {
if ((this._parent.prcnt == this._parent.mxprcnt) and (!this._parent.bkcnt)) {
if (this.effectPause == -10) {
var _local3 = _root.showStuff.teleport;
_local3.inc = 6;
_local3.dec = 0.6;
_local3.onEnterFrame = function () {
if (!_root.showPause) {
if ((Math.abs(this.tx0 - this._x) > 1) or (Math.abs(this.ty0 - this._y) > 1)) {
this._x = this._x + ((this.tx0 - this._x) / this.inc);
this._y = this._y + ((this.ty0 - this._y) / this.inc);
} else {
this._x = this.tx0;
this._y = this.ty0;
delete this.onEnterFrame;
this.swapDepths(666);
this.removeMovieClip();
}
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
}
};
delete this.onEnterFrame;
} else {
this.effectPause--;
if ((this.effectPause >= 0) and (this.effectPause < 10)) {
this.boom = 1.5 * this.effectPause;
this._xscale = (this._yscale = 100 + this.boom);
this._x = 13 - (((99 * this.boom) / 100) / 2);
this._y = 49 - (((118 * this.boom) / 100) / 2);
this._parent.tlp1._xscale = (this.tlp1._yscale = 100 + this.boom);
this._parent.tlp1_x = 20 - (((99 * this.boom) / 100) / 2);
this._parent.tlp1_y = 56 - (((118 * this.boom) / 100) / 2);
var _local5 = new Color(this);
this.myColorTransform.rb = (this.effectPause / 20) * 255;
this.myColorTransform.gb = (this.effectPause / 20) * 255;
this.myColorTransform.bb = (this.effectPause / 20) * 255;
_local5.setTransform(this.myColorTransform);
}
}
} else {
this.myColorTransform = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
this.effectPause = 20;
var _local4 = new flash.geom.Rectangle(0, this._parent.prcnt, 99, 2);
var _local6 = this._parent._parent.clip["bmp" + Math.abs(clip.condition - ((1 + this._parent.pinc) / 2))];
var _local7 = this._parent["mtrx" + ((1 + this._parent.pinc) / 2)];
this._parent.bmp.fillRect(_local4, 0);
this._parent.bmp.draw(_local6, _local7, null, "normal", _local4, true);
this._parent.laser._y = (this._y - 3) + this._parent.prcnt;
this._parent.blink._y = this._y + this._parent.prcnt;
if ((this._parent.prcnt + (this._parent.mxprcnt * (this._parent.pinc < 0))) == this._parent.mxprcnt) {
if (!this._parent.prcnt) {
if (!this._parent.bkcnt) {
this._parent.pinc = this._parent.pinc * -1;
} else {
this._parent.bkcnt--;
}
} else {
this._parent.pinc = this._parent.pinc * -1;
}
} else {
this._parent.prcnt = this._parent.prcnt + (this._parent.pinc * 2);
}
}
}
};
};
mergeMyFace = function (mc, src) {
var _local2;
var _local5;
var _local3;
var _local7;
if (mc.sex) {
_local2 = _root.bottomMc.cntnt.loadBitmapFunc("boymask");
_local5 = mc.prsn.boy_body.boy_bodyBMP;
_local3 = new flash.geom.Matrix(1, 0, 0, 1, 271, 57);
_local7 = new flash.geom.Rectangle(_local3.tx, _local3.ty, _local2.width, _local2.height);
} else {
_local2 = _root.bottomMc.cntnt.loadBitmapFunc("girlmask");
_local5 = mc.prsn.girl_body.girl_bodyBMP;
_local3 = new flash.geom.Matrix(1, 0, 0, 1, 141, 31);
_local7 = new flash.geom.Rectangle(_local3.tx, _local3.ty, _local2.width, _local2.height);
}
var _local4 = new flash.display.BitmapData(_local2.width, _local2.height, true, 0);
_local4.draw(src);
_local4.copyChannel(_local2, _local2.rectangle, new flash.geom.Point(), 1, 8);
_local5.draw(_local4, _local3, null, null, _local7);
mc.prsn.jpgh.removeMovieClip();
_local4.dispose();
_local2.dispose();
};
loadMyFace = function (mc, jpg) {
var _local3 = mc.prsn;
var _local2 = _local3.createEmptyMovieClip("jpgh", _local3.getNextHighestDepth());
_local2._visible = false;
var _local4 = _local2.createEmptyMovieClip("jpgc", _local2.getNextHighestDepth());
_root.faceLoader.loadClip("staff/" + jpg, _local4);
};
describeCarusele = function () {
var _local2 = _root.bottomMc.cntnt.carusele_mc;
_local2.cntr = new flash.geom.Point(364, 364);
_local2.rds = 364;
_local2.hrs_mc._x = _local2.cntr.x;
_local2.hrs_mc._y = _local2.cntr.y;
_local2.sa = -100;
_local2.ea = 40;
_local2.num = 0;
_local2.k = 0;
var _local3 = new Object();
_local3.onLoadInit = function (target_mc) {
mergeMyFace(target_mc._parent._parent._parent, target_mc);
};
_root.faceLoader = new MovieClipLoader();
_root.faceLoader.addListener(_local3);
};
doChain = function (d) {
var _local7 = _root.bottomMc.cntnt.chain_mc;
var _local10 = _local7.chn;
var _local5 = _local7.tile;
var _local6 = _local5.width - 1;
var _local11 = -0.0994837673636768;
_local7.arr.shift();
_local7.arr.push(d);
if (((!_local7.arr[1]) and _local7.arr[0]) and _local7.arr[2]) {
_local7.arr[1] = _local7.arr[0];
}
_local7.d = _local7.d + _local7.arr[0];
var _local12;
((_local7.arr[0] > 4) ? (_local12 = 4) : (_local12 = _local7.arr[0]));
bChain.setVolume((100 * _local12) / 4);
_local10.fillRect(_local10.rectangle, 0);
var _local3 = 0;
while (_local3 < 4) {
var _local2 = (_local3 * _local6) + (_local7.d * Math.cos(_local11));
((_local2 > (3 * _local6)) ? (_local2 = (_local2 % (3 * _local6)) - _local6) : 1);
var _local8 = (_local10.height - _local5.height) + (_local2 * Math.sin(_local11));
var _local4 = new flash.geom.Matrix(1, 0, 0, 1, _local2, _local8);
var _local9 = new flash.geom.Rectangle(_local4.tx, _local4.ty, _local5.width, _local5.height);
_local10.draw(_local5, _local4, null, "normal", _local9, true);
_local3++;
}
};
describeChain = function () {
var _local2 = _root.bottomMc.cntnt.chain_mc;
_local2.chn = new flash.display.BitmapData(420, 70, true, 0);
_local2.tile = _root.bottomMc.cntnt.loadBitmapFunc("chain.png");
_local2.attachBitmap(_local2.chn, _root.chnh.getNextHighestDepth());
_local2.d = 0;
_local2.arr = [0, 0, 0];
doChain(2);
};
Frame 13
menuGoIn = function () {
doBackBmp();
if (!_root.showStuff) {
onGroundPause = true;
} else {
showPause = true;
if (_root.showStuff.blackScreen.videoStarted) {
_root.videoNS.pause();
}
}
var _local3 = _root.menuItems;
_local3._visible = true;
_local3.swapDepths(_root.getNextHighestDepth());
_local3.swapDepths(_root.sceneBorder);
_local3.mbody.fheight = _local3.mbody._height;
_local3.mbody.menuHeight = 547;
_local3.mbody.yBalance = 0;
_local3.mbody.targY = 80;
_local3.mbody._y = 80;
_local3.mbody.inc = 5;
_local3.mbody.onEnterFrame = function () {
this.fheight = this.fheight + (((this._height + 15) - this.fheight) / 14);
if ((this._height + 15) > this.menuHeight) {
if ((_root._ymouse > 26) and (_root._ymouse < (26 + this.menuHeight))) {
this.yBalance = (_root._ymouse - 26) / this.menuHeight;
} else {
((_root._ymouse < 26) ? ((this.yBalance = 0)) : 1);
((_root._ymouse > (26 + this.menuHeight)) ? ((this.yBalance = 1)) : 1);
}
this.targY = 200 - (((this.fheight - this.menuHeight) + 320) * this.yBalance);
this._y = this._y + ((this.targY - this._y) / this.inc);
}
};
};
menuGoOut = function () {
_root.onGroundXMDel = 30;
if (!_root.showStuff) {
onGroundPause = false;
} else {
showPause = false;
if (_root.showStuff.blackScreen.videoStarted) {
_root.videoNS.pause();
}
}
var _local2 = 0;
while (_local2 < _root.menuItems.hider.length) {
_root.menuItems.hider[_local2]._visible = true;
_local2++;
}
_root.menuItems._visible = false;
_root.menuItems.backBmp.dispose();
delete _root.menuItems.mbody.onEnterFrame;
};
createAltMenu = function () {
var _local3 = _root.attachMovie("menuItems", "menuItems", _root.getNextHighestDepth());
_local3.hider = [_root.intro_mc, _root.contentMc];
_local3._visible = false;
_local3.bigButton.useHandCursor = false;
_local3.createEmptyMovieClip("picHolder", _local3.getNextHighestDepth());
_local3.attachMovie("mbody", "mbody", _local3.getNextHighestDepth());
_local3.mbody.setMask(_local3.mmask);
var _local4 = _root.sceneBorder.goMenu;
_local4.gotoAndStop(1);
_local4.cntrl.db.onRollOut = function () {
this._parent._parent.gotoAndStop(this._parent._parent._totalframes - 1);
};
_local4.cntrl.db.onPress = function () {
this._parent._parent.gotoAndStop(this._parent._parent._totalframes);
playNow("titles_in");
};
_local4.cntrl.db.onRelease = (_local4.cntrl.db.onReleaseOutside = function () {
if (_root.menuItems._visible) {
menuGoOut();
_root.globalSound.soundLib.chirk.gotoAndStop(2);
_root.globalSound.soundLib.night.gotoAndStop(3);
} else {
menuGoIn();
_root.globalSound.soundLib.chirk.gotoAndStop(3);
_root.globalSound.soundLib.night.gotoAndStop(2);
}
this.onRollOut();
playNow("titles_out");
});
};
oneMoreMenuItem = function (clip) {
var _local14 = _root.sceneBorder.goMenu;
if ((_local14._currentframe == 1) and (!clip.num)) {
_local14.onEnterFrame = function () {
if (this._currentframe < (this._totalframes - 1)) {
this.nextFrame();
} else {
this.gotoAndStop(this._currentframe - 1);
delete this.onEnterFrame;
}
};
}
var _local13 = _root.menuItems.mbody;
var _local15 = _root.menuItems.mbody.atLast._height + 30;
var _local5 = _local13.createEmptyMovieClip("mi" + clip.num, _local13.getNextHighestDepth());
var _local8 = 1 - (clip.num % 2);
if (_local8) {
_local5._y = ((_local13._height + 20) - _local15) + (10 * (!clip.num));
} else {
_local5._y = _local5._parent["mi" + (clip.num - 1)]._y;
}
var _local7 = 36;
var _local12 = (_local5.bmp = new flash.display.BitmapData(_local7, _local7, true, 0));
var _local6 = clip.bmp0.clone();
var _local10 = _local12.width / _local6.width;
var _local9 = _local12.width / _local6.height;
if ((_local10 < 1) or (_local9 < 1)) {
((_local10 > _local9) ? (_local10 = _local9) : (_local9 = _local10));
}
var _local16 = new flash.filters.BlurFilter(3, 3, 1);
_local6.applyFilter(_local6, _local6.rectangle, new flash.geom.Point(0, 0), _local16);
_local12.draw(_local6, new flash.geom.Matrix(_local10, 0, 0, _local9, (_local7 - (_local6.width * _local10)) / 2, (_local7 - (_local6.height * _local9)) / 2), null, null, new flash.geom.Rectangle((_local7 - (_local6.width * _local10)) / 2, (_local7 - (_local6.height * _local9)) / 2, _local7, _local7), true);
_local6.dispose();
_local5.createEmptyMovieClip("picHolder", _local5.getNextHighestDepth());
_local5.picHolder.attachBitmap(_local12, _local5.picHolder.getNextHighestDepth());
var _local11 = _local5.createTextField("header", _local5.getNextHighestDepth(), 0, _local7 + 5, 100, 100);
setupHtmlTF(_local11, clip.cName, 16, "F9F3BF");
if (_local8) {
_local11._x = ((stw / 2) - _local11._width) - 10;
_local5.picHolder._x = int((stw / 2) - _local7) - 10;
} else {
_local11._x = (stw / 2) + 10;
_local5.picHolder._x = int(stw / 2) + 10;
}
var _local4 = 0;
while (_local4 < clip.cItems.length) {
var _local3 = _local5.createEmptyMovieClip("msi" + _local4, _local5.getNextHighestDepth());
_local3.num = _local4;
_local3.clip = clip;
_local3.mitext = clip.cItems[_local4][0];
_local3.color0 = 16777215 /* 0xFFFFFF */;
_local3.color1 = 16380863 /* 0xF9F3BF */;
_local3.colorinc = 0;
_local3.createTextField("txt", _local5.getNextHighestDepth(), 0, _local5._height, 100, 100);
((!_local4) ? ((_local3._y = _local3._y + 1)) : 1);
_local3.onRollOver = function () {
this._parent._parent.locked = true;
setupHtmlTF(this.txt, ("<u>" + this.mitext) + "</u>", 12, this.color1.toString(16));
};
_local3.onRollOut = (_local3.onDragOut = function () {
this._parent._parent.locked = false;
setupHtmlTF(this.txt, this.mitext, 12, this.color0.toString(16));
});
_local3.onRelease = function () {
disableAllClips();
_root.globalSound.soundLib.chirk.gotoAndStop(2);
_root.globalSound.soundLib.night.gotoAndStop(3);
this.onRollOut();
_root.menuGoOut();
this.clip.notFake = false;
this.clip.playOrder = this.num;
_root.intro_mc.moon_mc._visible = false;
allMagicStuffOff();
_root.contentMc.cacheAsBitmap = true;
_root.intro_mc.cacheAsBitmap = true;
_root.playMyContent(this.clip);
};
_local3.onRollOut();
if (_local8) {
_local3._x = ((stw / 2) - _local3._width) - 10;
} else {
_local3._x = (stw / 2) + 10;
}
_local4++;
}
_root.menuItems.mbody.atLast._y = 0;
_root.menuItems.mbody.atLast._y = _root.menuItems.mbody._height + 30;
};
doBackBmp = function () {
var _local8 = _root.menuItems;
var _local3 = 0;
while (_local3 < _local8.hider.length) {
_local8.hider[_local3]._visible = false;
_local3++;
}
_local8.picHolder.pic.removeMovieClip();
_local8.picHolder.createEmptyMovieClip("pic", _local8.picHolder.getNextHighestDepth());
var _local7 = (_local8.backBmp = new flash.display.BitmapData(1004, 600, false, 863031));
_local8.picHolder.pic.attachBitmap(_local7, _local8.picHolder.pic.getNextHighestDepth());
_local8.attachMovie("nightSky", "nightSky", _local8.getNextHighestDepth());
_local7.draw(_local8.nightSky, new flash.geom.Matrix(stw / 2, 0, 0, 1, 0, 0));
_local8.nightSky.removeMovieClip();
var _local15 = _root.intro_mc.moon_mc;
var _local19 = new flash.geom.ColorTransform(1.5, 2.5, 3, 1, 0, 0, 0, 0);
var _local20 = new flash.geom.Rectangle(_local15._x - 1, _local15._y - 1, _local15._width + 2, (_local15._height + _root.globalDown) + 2);
var _local17 = new flash.geom.Matrix(1, 0, 0, 1, _local15._x + 1, (_local15._y + 1) + _root.globalDown);
_local7.draw(_local15, _local17, _local19, "add", _local20);
var _local16 = flash.display.BitmapData.loadBitmap("moon_glow");
var _local18 = _local16.rectangle.clone();
_local18.offset(((_local20.x - (_local16.width / 2)) + (_local15._width / 2)) + 2, ((_local20.y - (_local16.width / 2)) + (_local15._height / 2)) + 10);
_local17.tx = _local18.x;
_local17.ty = _local18.y;
_local19.alphaMultiplier = 0.5;
_local7.draw(_local16, _local17, _local19, "screen", _local18);
_local16.dispose();
var _local14 = [];
_local14.push(_root.intro_mc.cloud_01, _root.intro_mc.cloud_02, _root.intro_mc.cloud_05, _root.intro_mc.cloud_03, _root.intro_mc.cloud_06, _root.intro_mc.cloud_04);
_local14.push(_root.intro_mc.back_ground, _root.intro_mc.middle_ground, _root.intro_mc.river, _root.intro_mc.front_ground);
_local14.push(_root.contentMc);
allMagicStuffOff();
_local3 = 0;
while (_local3 < _local14.length) {
var _local2 = _local14[_local3];
var _local6 = 0;
if (_local3 < 10) {
_local6 = _root.globalDown;
}
var _local5 = new flash.geom.Matrix(1, 0, 0, 1, _local2._x, _local6 + _local2._y);
var _local4 = new flash.geom.Matrix(1, 0, 0, 1, _local2._x, (_local6 + _local2._y) + 2);
var _local13 = new flash.geom.ColorTransform(0.1, 0.1, 0.1, 1, 50, 80, 110, 0);
var _local12 = new flash.geom.ColorTransform(0.05, 0.05, 0.05, 1, 0, 0, 0, 0);
var _local11 = new flash.geom.ColorTransform(0.2, 0.2, 0.2, 1, 0, 0, 0, 0);
var _local10 = new flash.geom.Rectangle(0, _local5.ty - 80, 1004, 600 - (_local5.ty - 80));
var _local9 = new flash.geom.Rectangle(0, _local4.ty - 80, 1004, 600 - (_local4.ty - 80));
if (_root.intro_mc.river != _local2) {
_local7.draw(_local2, _local5, _local13, "normal", _local10);
} else {
_local7.draw(_local2, _local5, new flash.geom.ColorTransform(0.05, 0.08, 0.13, 1, 0, 0, 0, 0), "normal", _local10);
}
if (_root.intro_mc.river != _local2) {
if (_local3 < 9) {
_local7.draw(_local2, _local4, _local12, "overlay", _local9);
} else {
_local7.draw(_local2, _local4, _local11, "multiply", _local9);
}
}
_local3++;
}
};
setupHtmlTF = function (txtField, htmlTxt, sizeNum, colorTxt) {
txtField.selectable = false;
txtField.autoSize = true;
txtField.antiAliasType = "advanced";
txtField.thickness = 150;
txtField.html = true;
txtField.embedFonts = true;
var _local1 = "<font face='";
_local1 = _local1 + "GaramondC";
_local1 = _local1 + "' size='";
((sizeNum == undefined) ? (_local1 = _local1 + 12) : (_local1 = _local1 + sizeNum));
_local1 = _local1 + "' color='#";
((colorTxt == undefined) ? (_local1 = _local1 + "000000") : (_local1 = _local1 + colorTxt));
_local1 = _local1 + "'>";
txtField.htmlText = (_local1 + htmlTxt) + "</font>";
};
awardsFlow = function () {
if ((((!globalPause) and (!underGroundPause)) and (!_root.bottomMc.cntnt.awards_mc.catched)) or switcher) {
var _local4 = _root.bottomMc.cntnt.awards_mc;
if (!(_local4.counter % 130)) {
var _local3 = _local4.attachMovie("award" + (_local4.currentAward % 5), "a" + _local4.currentAward, _local4.getNextHighestDepth());
_local3.num = _local4.currentAward;
_local3.jpg.txth.txt.text = _local4.awards[_local4.currentAward].attributes.year;
_root.bottomMc.cntnt.makeMeLooksLikeBitmap(_local3, false);
_local3._y = sth - 100;
_local3._x = 150 + (40 * Math.sin((_local4.counter * Math.PI) / 200));
_local3.onRollOver = function () {
playNowD("medalSnd");
this._parent.catched = true;
};
_local3.onRollOut = (_local3.onReleaseOutside = function () {
this._parent.catched = false;
});
_local3.onRelease = function () {
showAward(this.num, this);
};
_local4.awardArr.push(_local3);
((_local4.currentAward > 0) ? (_local4.currentAward--) : ((_local4.currentAward = _local4.awards.length - 1)));
}
var _local6 = 0;
while (_local6 < _local4.awardArr.length) {
var _local3 = _local4.awardArr[_local6];
_local3._y = _local3._y - (7 - (3 * Math.sin(((_local3._y + (_local3._height / 2)) / sth) * Math.PI)));
_local3.wing0._rotation = 15 + (40 * Math.sin(62.8318530717959 * (_local3._y / sth)));
_local3.wing1._rotation = -15 - (40 * Math.sin(62.8318530717959 * (_local3._y / sth)));
if (_local3._y < (-_local3._height)) {
var _local5 = 0;
while (_local5 < _local4.awardArr.length) {
if (_local4.awardArr[_local5] == _local3) {
_local4.awardArr.splice(_local5, 1);
_local5 = _local4.awardArr.length;
_local6--;
}
_local6++;
}
_local3.removeMovieClip();
}
_local6++;
}
_local4.counter++;
}
};
describeAwars = function () {
var _local2 = _root.bottomMc.cntnt.awards_mc;
_local2.awards = mainXml.firstChild.childNodes[3].childNodes;
_local2.awardArr = [];
_local2.currentAward = _local2.awards.length - 1;
_local2.counter = 0;
_root.toDoList.push([awardsFlow, undefined, true]);
};
Frame 14
doSmartPath = function (sp, ep, pf) {
var _local11 = 40;
var _local13 = flash.geom.Point.distance(sp, ep);
var _local16 = Math.atan2(ep.y - sp.y, ep.x - sp.x);
var _local15 = flash.geom.Point.interpolate(sp, ep, 0.5);
var _local14;
((ep.x - sp.x) ? (_local14 = _local16 + (((Math.PI/2) * (ep.x - sp.x)) / Math.abs(ep.x - sp.x))) : (_local14 = _local16 + (Math.PI/2)));
var _local10 = new flash.geom.Point(_local15.x + ((_local13 / 2) * Math.cos(_local14)), _local15.y + ((_local13 / 2) * Math.sin(_local14)));
var _local8 = Math.sqrt(2 * Math.pow(_local13 / 2, 2));
var _local17 = (Math.PI/2) * _local8;
var _local7 = Math.round(_local17 / _local11);
if (pf.sCount < _local7) {
var _local1 = pf.sCount;
while (_local1 < _local7) {
if (_local1 > 0) {
var _local2 = pf.attachMovie("node", "nd" + _local1, pf.getNextHighestDepth());
}
_local1++;
}
} else {
var _local1 = _local7;
while (_local1 < pf.sCount) {
pf["nd" + _local1].removeMovieClip();
_local1++;
}
}
pf.sCount = _local7;
var _local12 = Math.atan2(ep.y - _local10.y, ep.x - _local10.x);
var _local1 = 1;
while (_local1 < _local7) {
var _local9 = new flash.geom.Point();
var _local5;
((ep.x - sp.x) ? (_local5 = _local12 - ((((_local11 / _local8) * _local1) * (ep.x - sp.x)) / Math.abs(ep.x - sp.x))) : (_local5 = _local12 - ((_local11 / _local8) * _local1)));
var _local2 = pf["nd" + _local1];
if (_local1 >= (_local7 - 1)) {
(_local2.gotoAndStop(2));// not popped
} else {
(_local2.gotoAndStop(1));// not popped
}
_local9.x = (_local2._x = _local10.x + (_local8 * Math.cos(_local5)));
_local9.y = (_local2._y = _local10.y + (_local8 * Math.sin(_local5)));
((ep.x - sp.x) ? ((_local2._rotation = ((_local5 + (((Math.PI/2) * (ep.x - sp.x)) / Math.abs(ep.x - sp.x))) / Math.PI) * 180)) : ((_local2._rotation = ((_local5 + (Math.PI/2)) / Math.PI) * 180)));
_local1++;
}
};
findSmartPath = function (obj) {
_root.createEmptyMovieClip("pathFinder", _root.getNextHighestDepth());
_root.pathFinder.sCount = 0;
_root.pathFinder.obj = obj;
_root.pathFinder.sp = new flash.geom.Point(contentMc.lArrow._x + (contentMc.lArrow.lat._width / 2), contentMc.lArrow._y + contentMc.lArrow.lat._height);
_root.pathFinder.ep = new flash.geom.Point(obj._x, obj._y);
doSmartPath(_root.pathFinder.sp, _root.pathFinder.ep, _root.pathFinder);
_root.pathFinder.onMouseMove = function () {
this.sp.x = contentMc.lArrow._x + (contentMc.lArrow.lat._width / 2);
this.sp.y = contentMc.lArrow._y + contentMc.lArrow.lat._height;
this.ep.x = this.obj._x;
this.ep.y = this.obj._y;
doSmartPath(this.sp, this.ep, this);
};
};
killSmartPath = function () {
_root.pathFinder.removeMovieClip();
};
makeAwardContent = function (num, switcher) {
(switcher ? (playNowD("switchAwardSnd")) : 1);
_root.bottomMc.darkness.tapeBmp.dispose();
_root.bottomMc.darkness.tapeHolder.removeMovieClip();
var _local12 = _root.bottomMc.cntnt.awards_mc.awards[num];
var _local32 = (_local12.attributes.event + " ") + _local12.attributes.year;
var _local9 = _root.bottomMc.cntnt.createEmptyMovieClip("tfh", _root.bottomMc.cntnt.getNextHighestDepth()).createTextField("tf", 0, 0, 0, 10, 10);
_local9.autoSize = (_local9.html = (_local9.embedFonts = true));
var _local26 = _root.bottomMc.cntnt.tfh;
var _local36 = _root.bottomMc.darkness.bmp;
var _local24 = (_root.bottomMc.darkness.stringBmp = new flash.display.BitmapData(600, 500, true, 0));
var _local30 = (_root.bottomMc.darkness.tapeBmp = _local24.clone());
var _local11 = _root.bottomMc.darkness.createEmptyMovieClip("tapeHolder", _root.bottomMc.darkness.getNextHighestDepth());
_local11.attachBitmap(_local30, _local11.getNextHighestDepth());
_local11._x = (stw / 2) - (_local11._width / 2);
_local11._y = -15;
var _local21 = new flash.geom.Point(_local30.width / 2, 0);
var _local5 = [];
if (_local32.length > 30) {
var _local28;
_local28 = _local32.split(" ");
var _local29 = int(_local28.length / 2);
((_local28[_local29 - 1].length < 4) ? (_local29 = _local29 - 1) : 1);
_local5.push(_local28.slice(0, _local29).join(" "));
_local5.push(_local28.slice(_local29).join(" "));
} else {
_local5.push(_local32);
}
var _local15 = 0;
var _local33 = _quality;
_quality = "HIGH";
var _local4 = 0;
while (_local4 < _local5.length) {
var _local16 = (14 + (10 / _local5.length)) - (2 * (_local5.length > 1));
var _local3 = (320 + (18 * _local4)) + (4 * (_local5.length < 2));
var _local8 = [];
var _local20 = 0;
var _local7 = 0;
while (_local7 < _local5[_local4].length) {
_local9.htmlText = ((("<font face='Georgia' color = '#FFFFFF' size = '" + _local16) + "'><b>") + _local5[_local4].charAt(_local7)) + "</b></font>";
_local8.push(_local9._width * 0.8);
_local20 = _local20 + (_local9._width * 0.8);
_local7++;
}
var _local18 = _local20 / _local3;
((_local18 > _local15) ? (_local15 = _local18) : 1);
var _local23 = (Math.PI/2) + (_local18 / 2);
var _local17 = 0;
_local7 = 0;
while (_local7 < _local5[_local4].length) {
_local9.htmlText = ((("<font face='Georgia' color = '#ffeab3' size = '" + _local16) + "'><b>") + _local5[_local4].charAt(_local7)) + "</b></font>";
var _local6 = _local23 - _local17;
_local17 = _local17 + (_local8[_local7] / _local3);
var _local13 = Math.sin((_local6 - (Math.PI/2)) - ((_local8[_local7] / _local3) / 2));
var _local14 = Math.cos((_local6 - (Math.PI/2)) - ((_local8[_local7] / _local3) / 2));
var _local35 = new flash.geom.Matrix(_local14, _local13, -_local13, _local14, _local21.x + (_local3 * Math.cos(_local6)), _local21.y + (_local3 * Math.sin(_local6)));
_local24.draw(_local26, _local35);
_local7++;
}
_local4++;
}
var _local34 = new flash.filters.GlowFilter(16771763, 0.4, 2, 2, 2, 3);
_local24.applyFilter(_local24, _local24.rectangle, new flash.geom.Point(0, 0), _local34);
var _local25 = _root.bottomMc.cntnt.attachMovie("award_tape", "at", _root.bottomMc.cntnt.getNextHighestDepth());
var _local3 = 380;
_local15 = _local15 + 0.0314159265358979;
_local25.msk.beginFill(16777215);
_local25.msk.moveTo(0, 0);
var _local7 = 0;
while (_local7 < 9) {
_local25.msk.lineTo(_local3 * Math.cos(((Math.PI/2) + (_local15 / 2)) - ((_local15 / 8) * _local7)), _local3 * Math.sin(((Math.PI/2) + (_local15 / 2)) - ((_local15 / 8) * _local7)));
_local7++;
}
_local25.msk.endFill();
_local25.ltape._rotation = -45 + (((_local15 / 2) * 180) / Math.PI);
_local25.rtape._rotation = 45 - (((_local15 / 2) * 180) / Math.PI);
var _local35 = new flash.geom.Matrix(1, 0, 0, 1, _local21.x, _local21.y);
_local30.draw(_local25, _local35);
_local25.removeMovieClip();
_local30.draw(_local24);
_local24.dispose();
_quality = _local33;
_root.bottomMc.cntnt.tfh.removeMovieClip();
_local7 = 0;
while (_local7 < _local12.childNodes.length) {
var _local10 = _local11.createEmptyMovieClip("mi" + _local7, _local11.getNextHighestDepth());
_local9 = _local10.createTextField("tf", 0, 0, 0, 10, 10);
_local9.selectable = false;
_local9.autoSize = (_local9.html = (_local9.embedFonts = true));
_local9.antiAliasType = "advanced";
_local9.thickness = 200;
_local9.htmlText = ("<font face='GaramondC' color = '#ffeab3' size = '12'>" + _local12.childNodes[_local7].attributes.text) + "</font>";
_local10._x = (_local11._width / 2) - (_local10._width / 2);
_local10._y = (((380 + (25 * _local7)) + ((10 * _local7) * (_local12.childNodes.length < 7))) - (1 * (_local12.childNodes.length >= 7))) + (20 * (_local12.childNodes.length < 4));
if (_local12.childNodes.length < 7) {
var _local22;
((_local7 != (_local12.childNodes.length - 1)) ? (_local22 = "bullit") : (_local22 = "bbullit"));
var _local19 = _local11.attachMovie(_local22, "b" + _local7, _local11.getNextHighestDepth());
_local19._x = int((_local11._width / 2) - (_local19._width / 2));
_local19._y = (_local10._y + _local10._height) + 5;
}
describeMeAsJumperToMovie(_local10, _local12.childNodes[_local7]);
_local7++;
}
_local11._visible = false;
_local11._alpha = 0;
_local11.onEnterFrame = function () {
this._visible = true;
this._alpha = this._alpha + 5;
if (this._alpha >= 100) {
this._alpha = 100;
delete this.onEnterFrame;
}
};
var _local31 = _local11.attachMovie("barrow", "ra", _local11.getNextHighestDepth());
_local31._y = 350;
_local31._x = (_local11._width / 2) + 160;
_local31.cnt = -1;
var _local27 = _local11.attachMovie("barrow", "rb", _local11.getNextHighestDepth());
_local27._y = 350;
_local27._x = (_local11._width / 2) - 160;
_local27._xscale = -100;
_local27.cnt = 1;
_local31.onRelease = (_local27.onRelease = function () {
this._parent.cnt = this.cnt;
this._parent.onEnterFrame = function () {
this._alpha = this._alpha - 30;
if (this._alpha <= 0) {
delete this.onEnterFrame;
if (this.cnt == -1) {
((_root.bottomMc.darkness.num > 0) ? (_root.bottomMc.darkness.num--) : ((_root.bottomMc.darkness.num = _root.bottomMc.cntnt.awards_mc.awards.length - 1)));
} else {
((_root.bottomMc.darkness.num < (_root.bottomMc.cntnt.awards_mc.awards.length - 1)) ? (_root.bottomMc.darkness.num++) : ((_root.bottomMc.darkness.num = 0)));
}
makeAwardContent(_root.bottomMc.darkness.num, true);
}
};
});
};
showAward = function (num, medal) {
bChain.setVolume(0);
playNowD("toAwardShowSnd");
playNowD("awardShowSnd");
_root.underGroundPause = true;
var _local4 = _root.bottomMc.cntnt;
_local4._visible = false;
var _local18 = _root.bottomMc.createEmptyMovieClip("darkness", _root.bottomMc.getNextHighestDepth());
var _local12 = (_local18.bmp = new flash.display.BitmapData(stw, sth, false, 0));
var _local9 = [];
_local9.push(_local4.back_mc);
_local9.push(_local4.heart_mc);
_local9.push(_local4.curtain0_mc);
_local9.push(_local4.curtain1_mc);
_local9.push(_local4.rope0);
_local9.push(_local4.rope1);
_local9.push(_local4.roll_mc);
_local9.push(_local4.cable_mc);
_local9.push(_local4.fingers_mc);
_local9.push(_local4.hand_mc);
_local9.push(_local4.carusele_mc);
_local9.push(_local4.tablo_mc);
_local9.push(_local4.stairs);
var _local8 = 0;
while (_local8 < _local9.length) {
var _local3 = _local9[_local8];
var _local6 = (_local3._rotation / 180) * Math.PI;
var _local24 = new flash.geom.Matrix(Math.cos(_local6), Math.sin(_local6), -Math.sin(_local6), Math.cos(_local6), _local3._x, _local3._y);
var _local15 = _local3.getBounds(_local4);
var _local10 = new flash.geom.Rectangle(_local15.xMin, _local15.yMin, _local15.xMax - _local15.xMin, _local15.yMax - _local15.yMin);
if (_local3 != _local4.heart_mc) {
var _local14 = new flash.geom.ColorTransform(0.1, 0.11, 0.112, 1, 0, 0, 0, 0);
_local12.draw(_local3, _local24, _local14, "normal", _local10);
} else {
var _local14 = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
_local12.draw(_local3, _local24, _local14, "normal", _local10);
}
if (_local3 == _local4.hand_mc) {
var _local11 = new flash.geom.Matrix(1, 0, 0, 1, _local4.heart_mc._x, _local4.heart_mc._y);
var _local5 = _root.bottomMc.cntnt.loadBitmapFunc("hear_glow");
var _local7 = new flash.geom.Matrix(1, 0, 0, 1, _local11.tx - 130, _local11.ty - 170);
var _local13 = new flash.geom.Rectangle(_local7.tx, _local7.ty, _local5.width, _local5.height);
_local12.draw(_local5, _local7, null, "screen", _local13);
_local5.dispose();
}
_local8++;
}
var _local22 = _local18.createEmptyMovieClip("backholder", _local18.getNextHighestDepth());
_local22.attachBitmap(_local12, _local22.getNextHighestDepth());
_local18.num = num;
makeAwardContent(num);
var backbtn = _local18.createEmptyMovieClip("backbutton", _local18.getNextHighestDepth());
var _local20 = (backbtn.medal = new flash.display.BitmapData(70, 70, true, 0));
backbtn.attachBitmap(backbtn.medal, backbtn.getNextHighestDepth());
var _local15 = medal.getBounds(medal);
var _local19 = _local20.width / (_local15.xMax - _local15.xMin);
var _local21 = _local20.height / (_local15.yMax - _local15.yMin);
var _local17 = new flash.display.BitmapData(_local15.xMax - _local15.xMin, _local15.yMax - _local15.yMin, true, 0);
_local17.draw(medal, new flash.geom.Matrix(1, 0, 0, 1, -_local15.xMin, -_local15.yMin));
var _local23 = new flash.filters.BlurFilter(2, 2, 1);
_local17.applyFilter(_local17, _local17.rectangle, new flash.geom.Point(0, 0), _local23);
((_local19 > _local21) ? (_local19 = _local21) : 1);
var _local25 = medal[medal._name + "BMP"];
var _local24 = new flash.geom.Matrix(_local19, 0, 0, _local19, 0, 0);
_local20.draw(_local17, _local24, null, null, null, true);
_local17.dispose();
backbtn._x = (backbtn.bktrgx = (medal._x + medal._parent._x) + _local15.xMin);
backbtn._y = (backbtn.bktrgy = (medal._y + medal._parent._y) + _local15.yMin);
backbtn._xscale = (backbtn._yscale = (backbtn.bktrgxscale = 100 / _local19));
backbtn.trgx = 50;
backbtn.trgy = 50;
backbtn.tof = 8;
backbtn.onEnterFrame = function () {
if ((Math.abs(this._x - this.trgx) > 1) or (Math.abs(this._y - this.trgy) > 1)) {
this._x = this._x + (((this.trgx - this._x) / 4) + this.tof);
this._y = this._y + ((this.trgy - this._y) / 4);
this._yscale = (this._xscale = this._xscale + ((100 - this._xscale) / 2));
this.tof = this.tof * 0.6;
} else {
delete this.onEnterFrame;
}
};
backbtn.onRelease = function () {
this.tof = 8;
this.inc = 50;
this.dec = 0.7;
playNowD("outAwardShowSnd");
this.onEnterFrame = function () {
if ((Math.abs(this._x - this.bktrgx) > 1) or (Math.abs(this._y - this.bktrgy) > 1)) {
this._x = this._x + (((this.bktrgx - this._x) / this.inc) + this.tof);
this._y = this._y + ((this.bktrgy - this._y) / this.inc);
this._yscale = (this._xscale = this._xscale + ((backbtn.bktrgxscale - this._xscale) / this.inc));
this.tof = this.tof * 0.6;
(((this.inc * this.dec) > 1) ? ((this.inc = this.inc * this.dec)) : ((this.inc = 1)));
} else {
delete this.onEnterFrame;
hideAward();
}
};
};
};
hideAward = function () {
stopNowD("awardShowSnd");
_root.bottomMc.darkness.bmp.dispose();
_root.bottomMc.darkness.tapeBmp.dispose();
_root.bottomMc.darkness.removeMovieClip();
_root.bottomMc.cntnt._visible = true;
_root.underGroundPause = false;
};
Frame 15
makeMagic = function (mc) {
var _local7;
var _local4;
var _local6 = mc["bmp" + mc.condition];
if (mc.magicCondition != mc.condition) {
mc.magicCondition = mc.condition;
mc.magical.removeMovieClip();
_local4 = mc.createEmptyMovieClip("magical", mc.getNextHighestDepth());
_local4.spikeBmp = flash.display.BitmapData.loadBitmap("spike.jpg");
_local7 = (_local4.destBmp = new flash.display.BitmapData(_local6.width + _local4.spikeBmp.width, _local6.height + _local4.spikeBmp.height, false, 0));
_local4.darkBmp = new flash.display.BitmapData(1, 1, false, 0);
_local4.attachBitmap(_local4.destBmp, _local4.getNextHighestDepth());
_local4._x = (-_local7.width) / 2;
_local4._y = (-_local7.height) / 2;
_local4.blendMode = "screen";
_local4._visible = false;
} else {
_local4 = mc.magical;
_local7 = _local4.destBmp;
}
if (_local4._visible) {
_local7.draw(_local4.darkBmp, new flash.geom.Matrix(_local7.width, 0, 0, _local7.height, 0, 0), new flash.geom.ColorTransform(1, 1, 1, 0.5, 0, 0, 0, 0));
var _local5 = 0;
while (_local5 < 2) {
var _local1 = 0.5 + (0.5 * Math.random());
var _local3 = random(_local6.width);
var _local2 = random(_local6.height);
if ((_local6.getPixel32(_local3, _local2) >> 24) & 255) {
_local7.draw(_local4.spikeBmp, new flash.geom.Matrix(_local1, 0, 0, _local1, _local3, _local2), new flash.geom.ColorTransform(0.8 + (0.2 * Math.random()), 0.8 + (0.2 * Math.random()), 1, 1, 0, 0, 0, 0), "screen");
}
_local5++;
}
}
};
doMagic = function (mc) {
mc.createEmptyMovieClip("wizard", mc.getNextHighestDepth());
mc.magicalCounter = 0;
mc.wizard.onEnterFrame = function () {
if ((!globalPause) and (!onGroundPause)) {
if (this._parent.bmp0 and (!(this._parent.magicalCounter % 5))) {
makeMagic(this._parent);
}
this._parent.magicalCounter++;
}
};
};
jumpToMovieFromABottom = function (movie, item) {
var _local3 = _root.createEmptyMovieClip("jumperToMovie", _root.getNextHighestDepth());
_local3.movie = movie;
_root.bottomMc.darkness.backbutton.onRelease();
_local3.num = item;
_local3.clip = _root.contentMc["clipHolder" + movie];
_local3.onEnterFrame = function () {
if (!_root.underGroundPause) {
getTop();
this.onEnterFrame = function () {
if (!_root.onGroundPause) {
disableAllClips();
_root.globalSound.soundLib.chirk.gotoAndStop(2);
_root.globalSound.soundLib.night.gotoAndStop(3);
this.clip.notFake = false;
this.clip.playOrder = this.num;
_root.intro_mc.moon_mc._visible = false;
_root.onGroundXMDel = 30;
allMagicStuffOff();
_root.contentMc.cacheAsBitmap = true;
_root.intro_mc.cacheAsBitmap = true;
_root.playMyContent(this.clip);
delete this.onEnterFrame;
}
};
}
};
};
describeMeAsJumperToMovie = function (mi, node) {
if ((node.attributes.movie != "") and (node.attributes.movie != undefined)) {
if (_root.contentMc["clipHolder" + parseInt(node.attributes.movie)].bmp0) {
mi.readyForWatchin = true;
mi.onRollOver = function () {
this.tf.htmlText = ("<u><font face='GaramondC' color = '#FFFFFF' size = '12'>" + node.attributes.text) + "</font></u>";
};
mi.onRollOut = (mi.onReleaseOutside = function () {
this.tf.htmlText = ("<u><font face='GaramondC' color = '#ffeab3' size = '12'>" + node.attributes.text) + "</font></u>";
});
mi.onRollOut();
mi.movie = parseInt(node.attributes.movie);
if ((node.attributes.item != "") and (node.attributes.item != undefined)) {
mi.item = parseInt(node.attributes.item);
} else {
mi.item = 0;
}
mi.onRelease = function () {
jumpToMovieFromABottom(this.movie, this.item);
};
}
}
};
Frame 17
deiscribeDiesel = function () {
var _local2 = (_root.globalSound.soundLib.dslSnd = new Sound(_root.globalSound.soundLib.wagen));
_local2.attachSound("diesel");
_local2.start(0, 10000);
_local2.setVolume(0);
_root.toDoList.push([checkWagenPos, true]);
};
checkWagenPos = function () {
if (_root.contentMc.wagen) {
var _local3 = _root.globalSound.soundLib.dslSnd;
var _local4 = _root.contentMc.wagen;
var _local2 = _local4._x + 176;
if ((_local2 > 100) and (_local2 < 904)) {
var _local5 = ((_local2 - 502) / 502) * 100;
_local3.setPan(_local5);
} else {
if (_local2 <= 100) {
_local3.setPan(-80);
if (_local2 > 0) {
_local3.setVolume(_local2);
} else {
_local3.setVolume(0);
}
}
if (_local2 > 904) {
_local3.setPan(80);
if (_local2 < 1004) {
_local3.setVolume(1004 - _local2);
} else {
_local3.setVolume(0);
}
}
}
}
};
eventNow = function (obj, who) {
var _local3 = _root.globalSound.soundLib.eventer[obj];
_local3.gotoAndStop(2);
_local3.gotoAndStop(1);
var _local4 = ((who._x - 502) / 502) * 100;
eventSound.setPan(_local4);
_root.globalSound.soundLib.eventer.who = who;
_root.globalSound.soundLib.eventer.onEnterFrame = function () {
var _local2 = ((this.who._x - 502) / 502) * 80;
eventSound.setPan(_local2);
};
};
describeSndSys = function (mc) {
mc.wayLength = mc._height - 55;
mc.sndCntrl._y = -(((100 - mainSnd.getVolume()) / 100) * mc.wayLength);
mc.sndCntrl.db.onPress = function () {
this._parent._parent.bar._visible = true;
startDrag (this._parent, false, 0, -this._parent._parent.wayLength, 0, 0);
this._parent.onEnterFrame = function () {
mainSnd.setVolume(100 - Math.abs((this._y / this._parent.wayLength) * 100));
btmSndReg.setVolume(100 - Math.abs((this._y / this._parent.wayLength) * 100));
};
};
mc.sndCntrl.db.onRelease = (mc.sndCntrl.db.onReleaseOutside = function () {
this._parent._parent.bar._visible = false;
stopDrag();
delete this._parent.onEnterFrame;
});
mc.mSndCntrl.db.onPress = function () {
this._parent._parent.bar._visible = true;
startDrag (this._parent, false, 24, -this._parent._parent.wayLength, 24, 0);
this._parent.onEnterFrame = function () {
mainThemeSnd.setVolume(100 - Math.abs((this._y / this._parent.wayLength) * 100));
};
};
mc.mSndCntrl.db.onRelease = (mc.mSndCntrl.db.onReleaseOutside = function () {
this._parent._parent.bar._visible = false;
stopDrag();
delete this._parent.onEnterFrame;
});
};
initSound = function () {
var _local4 = _root.globalSound;
var _local3 = _local4.soundLib;
globalSnd = new Sound(_local4);
mainSnd = new Sound(_local3);
mainSnd.setVolume(80);
mainThemeSnd = new Sound(_local3.mainTheme);
_local3.mainTheme.gotoAndStop(2);
_local3.chirk.gotoAndStop(2);
chirkSnd = new Sound(_local3.chirk);
var _local5 = _root.sceneBorder.sndSys;
_local5.onEnterFrame = function () {
if (this._parent._alpha > 98) {
if (this._currentframe < this._totalframes) {
this.nextFrame();
} else {
this.bar._visible = false;
describeSndSys(this);
delete this.onEnterFrame;
}
}
};
machineSound = new Sound(_local3.machine);
eventSound = new Sound(_local3.eventer);
_root.toDoList.push([checkMachinePan, true]);
deiscribeDiesel();
};
checkMachinePan = function () {
var _local2 = _root.contentMc.machine;
var _local3 = (((_local2._x + 112) - 502) / 502) * 100;
machineSound.setPan(_local3);
};
playNow = function (obj) {
var sndPath = eval ((targetPath(_root.globalSound.soundLib) + ".") + obj);
sndPath.gotoAndStop(2);
sndPath.gotoAndStop(1);
};
stopNow = function (obj) {
var sndPath = eval ((targetPath(_root.globalSound.soundLib) + ".") + obj);
sndPath.gotoAndStop(3);
sndPath.gotoAndStop(1);
};
globalSoundDown = function () {
var _local3 = _root.globalSound;
_root.sceneBorder.sndSys.sndCntrl.db.enabled = false;
_local3.onEnterFrame = function () {
if (globalSnd.getVolume() > 3) {
globalSnd.setVolume(globalSnd.getVolume() - 5);
} else {
globalSnd.setVolume(0);
stopNow("machine.receive");
delete this.onEnterFrame;
}
_root.sceneBorder.sndSys.sndCntrl._y = (((-(100 - mainSnd.getVolume())) / 100) * _root.sceneBorder.sndSys.wayLength) - ((_root.sceneBorder.sndSys._height * (100 - globalSnd.getVolume())) / 100);
};
};
globalSoundUp = function () {
var _local3 = _root.globalSound;
_local3.onEnterFrame = function () {
if (globalSnd.getVolume() < 100) {
globalSnd.setVolume(globalSnd.getVolume() + 5);
} else {
globalSnd.setVolume(100);
_root.sceneBorder.sndSys.sndCntrl.db.enabled = true;
delete this.onEnterFrame;
_root.sceneBorder.sndSys.sndCntrl._y = ((-(100 - mainSnd.getVolume())) / 100) * _root.sceneBorder.sndSys.wayLength;
}
_root.sceneBorder.sndSys.sndCntrl._y = (((-(100 - mainSnd.getVolume())) / 100) * _root.sceneBorder.sndSys.wayLength) - ((_root.sceneBorder.sndSys._height * (100 - globalSnd.getVolume())) / 100);
};
};
initBottomSnd = function () {
var _local2 = (_root.btmSnd = new Sound(_root.bottomMc));
_local2.setVolume(0);
var _local3 = (_root.btmSndReg = new Sound(_root.bottomMc.cntnt));
_local3.setVolume(mainSnd.getVolume());
bChain = new Sound(_root.bottomMc.cntnt.bChain);
};
playNowD = function (obj) {
var sndPath = eval ((targetPath(_root.bottomMc.cntnt) + ".") + obj);
sndPath.gotoAndStop(2);
sndPath.gotoAndStop(1);
};
stopNowD = function (obj) {
var sndPath = eval ((targetPath(_root.bottomMc.cntnt) + ".") + obj);
sndPath.gotoAndStop(3);
sndPath.gotoAndStop(1);
};
Frame 18
initAltStart = function () {
_root._visible = true;
back_bmp = new flash.display.BitmapData(stw, sth, false, 0);
createAndInitDirector();
_root.attachBitmap(back_bmp, _root.getNextHighestDepth());
var back_mc = _root.attachMovie("intro", "intro_mc", _root.getNextHighestDepth());
startWaterFlow();
back_mc.stop();
back_mc.moon_mc._y = sth;
back_mc.moon_mc.inc = 3;
back_mc.moon_mc.dec = 0.7;
back_mc.hand.stop();
back_mc.onEnterFrame = function () {
this.moon_mc._y = 81;
skyline = flash.display.BitmapData.loadBitmap("sky_line.gif");
sky_was_blue = new flash.display.BitmapData(stw, sth, false, 0);
_root.createEmptyMovieClip("glow_mc", _root.getNextHighestDepth());
with (_root.glow_mc) {
var radius = 660;
fillType = "radial";
colors = [9698046, 8774117, 7322815, 4024169, 0];
alphas = [100, 100, 100, 100, 100];
ratios = [0, 80, 112, 160, 255];
spreadMethod = "pad";
interpolationMethod = "RGB";
focalPointRatio = 0;
matrix = new flash.geom.Matrix();
matrix.createGradientBox(radius, radius, 0, 0, 0);
beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod, interpolationMethod, focalPointRatio);
moveTo(0, 0);
lineTo(0, radius);
lineTo(radius, radius);
lineTo(radius, 0);
lineTo(0, 0);
endFill();
}
sky_was_blue.draw(skyline, new flash.geom.Matrix(stw / 2, 0, 0, 1, 0, 0));
sky_was_blue.draw(_root.glow_mc, new flash.geom.Matrix(1, 0, 0, 1, (stw / 2) - (_root.glow_mc._width / 2), (sth / 2) - (_root.glow_mc._height / 2)), null, "screen");
_root.glow_mc.removeMovieClip();
back_bmp.draw(sky_was_blue, new flash.geom.Matrix(1, 0, 0, 1, 0, 0));
sky_was_blue.dispose();
this.gotoAndStop(2);
var i = 0;
while (i < 2) {
var water_mc = this.river.createEmptyMovieClip("waterTile" + i, this.river.getNextHighestDepth());
water_mc.attachBitmap(waterBmp, water_mc.getNextHighestDepth());
water_mc._x = ((200 + ((stw - 400) * i)) - (water_mc._width / 2)) + this.river._x;
i++;
}
this.objectsToReveal = [this.front_ground, this.river, this.middle_ground, this.back_ground];
this.objectsToReveal.push(this.cloud_06, this.cloud_03, this.cloud_02, this.cloud_04, this.cloud_05, this.cloud_01);
this.objectXOffsets = [300, 130, 70, 30];
this.objectXOffsets.push(25, 12, 15, 20, 20, 15);
var i = 0;
while (i < this.objectsToReveal.length) {
var obj = this.objectsToReveal[i];
obj.xOffset = this.objectXOffsets[i];
obj.targetX = obj._x;
obj.targetY = obj._y;
obj.gotoAndStop(obj._totalframes);
obj.cacheAsBitmap = true;
i++;
}
this.moon.gotoAndStop(this.moon._totalframes);
startMoonFlow();
adminPlaceMachine();
delete this.onEnterFrame;
};
};
adminPlaceMachine = function () {
contentMc = _root.createEmptyMovieClip("contentMc", _root.getNextHighestDepth());
bottomMc = _root.createEmptyMovieClip("bottomMc", _root.getNextHighestDepth());
contentMc.attachMovie("fish_mask", "fishMask", contentMc.getNextHighestDepth(), {_x:608, _y:319});
contentMc.fishMask._visible = 0;
var _local3 = contentMc.attachMovie("live_machine", "machine", contentMc.getNextHighestDepth(), {_x:393, _y:128});
((!machineBuildController) ? (contentMc.createEmptyMovieClip("machineBuildController", contentMc.getNextHighestDepth())) : 1);
_local3.xOffset = (contentMc.fishMask.xOffset = _root.intro_mc.front_ground.xOffset);
_local3.targetX = (_root.stw / 2) - 110;
contentMc.fishMask.targetX = _local3.targetX + 215;
_local3.wing_r._x = this.wing_r._x;
_local3.wing_r._y = this.wing_r._y;
_local3.wing_r._rotation = this.wing_r._rotation;
_local3.wing_l._x = this.wing_l._x;
_local3.wing_l._y = this.wing_l._y;
_local3.wing_l._rotation = this.wing_l._rotation;
_local3.mouthOpen._visible = false;
_root.intro_mc.objectsToReveal.push(_local3, contentMc.fishMask);
wakeUpMachine(contentMc.machine);
startWagen();
};
Frame 19
stop();
initStart();
Instance of Symbol 29 MovieClip "bar" in Symbol 36 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 60 MovieClip Frame 25
_root.toDoList.push([_root.moonFlow]);
Symbol 150 MovieClip [intro] Frame 127
stop();
Symbol 173 MovieClip Frame 14
stop();
Symbol 226 MovieClip Frame 7
stop();
Symbol 258 MovieClip [sleepin_machine] Frame 32
stop();
Symbol 274 MovieClip [smoke_cloud] Frame 21
stop();
Symbol 315 MovieClip [clipLoader] Frame 1
if (!_root.admin) {
} else {
(this.gotoAndPlay(20));// not popped
}
Symbol 315 MovieClip [clipLoader] Frame 20
_root.contentMc.machine.mouth._visible = !_root.contentMc.machine.mouth._visible;
this.loader_mouth.gotoAndStop(1);
this.loader_mouth.c = 0;
this.loader_mouth.onEnterFrame = function () {
if ((!_root.globalPause) and (!_root.onGroundPause)) {
if (!random(20)) {
if (!this.c) {
this.c = 5;
}
}
if (this.c) {
this.c--;
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
};
this.pumpin.onEnterFrame = function () {
if ((!_root.globalPause) and (!_root.onGroundPause)) {
this.play();
} else {
this.stop();
}
};
Instance of Symbol 317 MovieClip [clipMask] in Symbol 353 MovieClip [lArrowComplete] Frame 2
onClipEvent (enterFrame) {
if ((!_root.globalPause) and (!_root.onGroundPause)) {
this._parent.lat.play();
} else {
this._parent.lat.stop();
}
}
Symbol 353 MovieClip [lArrowComplete] Frame 6
stop();
Instance of Symbol 606 MovieClip in Symbol 608 MovieClip Frame 1
onClipEvent (load) {
this.onRelease = function () {
getURL ("http://parkstudio.ru", "_blank");
};
}