Frame 1
stop();
_global.ROOT = this;
fscommand ("fullscreen", true);
fscommand ("allowscale", false);
_quality = "MEDIUM";
STAGE_W = Stage.width;
STAGE_H = Stage.height;
var stageListener = new Object();
stageListener.onResize = function () {
STAGE_W = Stage.width;
STAGE_H = Stage.height;
};
Stage.scaleMode = "noScale";
Stage.addListener(stageListener);
loader = new Object();
loader.interval = function () {
if (ROOT._framesloaded > 2) {
gotoAndStop ("game");
clearInterval(this.id);
}
};
clearInterval(loader.id);
loader.id = setInterval(loader, "interval", 10);
Frame 3
function loadLevel(lv, ePoint) {
removeMovieClip(ROOT.__OnEnterFrameBeacon);
clearInterval(loadWait.id);
loadWait = new Object();
loadWait.interval = function () {
screen._visible = true;
clearInterval(loadWait.id);
};
loadWait.id = setInterval(loadWait, "interval", 1000);
fader.onEnterFrame = function () {
this.a = this.a - FADESPEED;
this._alpha = this.a;
if (this.a <= 0) {
delete this.onEnterFrame;
}
};
currentRail = undefined;
currentLevel = lv;
entryPoint = ePoint;
screen = ROOT.createEmptyMovieClip("screen", 10);
points = screen.createEmptyMovieClip("points", 10);
rolls = screen.createEmptyMovieClip("rolls", 40);
playMusic(currentLevel.music);
if (mask != undefined) {
mask = ROOT.createEmptyMovieClip("mask", 100);
mask.beginFill(0, 100);
mask.moveTo(0, 0);
mask.lineTo(STAGE_W, 0);
mask.lineTo(STAGE_W, STAGE_H);
mask.lineTo(0, STAGE_H);
mask.lineTo(0, 0);
mask.endFill();
mask.moveTo(0, 0);
screen.setMask(mask);
}
if (fader == undefined) {
fader = ROOT.createEmptyMovieClip("fader", 999);
fader.beginFill(0, 100);
fader.moveTo(-7798, -7798);
fader.lineTo(7798, -7798);
fader.lineTo(7798, 7798);
fader.lineTo(-7798, 7798);
fader.lineTo(-7798, -7798);
fader.endFill();
fader.moveTo(0, 0);
fader._alpha = 0;
}
screen._visible = false;
level = screen.attachMovie(lv.mc, "level", 30);
rolls.blendMode = lv.blend;
clearInterval(loading.id);
loading = new Object();
loading.interval = function () {
for (mc in level) {
if (level[mc].isRail && (level[mc]._name == entryPoint)) {
initLevel(lv);
clearInterval(loading.id);
}
}
};
loading.id = setInterval(loading, "interval", 100);
}
function initLevel(lv) {
trace("initializing level");
bg = ROOT.createEmptyMovieClip("bg", -10);
bg.beginFill(lv.bg, 100);
bg.moveTo(-7798, -7798);
bg.lineTo(7798, -7798);
bg.lineTo(7798, 7798);
bg.lineTo(-7798, 7798);
bg.lineTo(-7798, -7798);
bg.endFill();
bg.moveTo(0, 0);
pointsArray = new Array();
d = 0;
for (mc in level) {
if (level[mc].isRail) {
r = level[mc];
r._alpha = 0;
rect = rolls.createEmptyMovieClip(mc, r.getDepth());
hei = -0.2 * r._yscale;
rect.beginFill(lv.hl, lv.rollAlpha);
rect.moveTo(0, 0);
rect.lineTo(0, (-hei) / 2);
rect.lineTo(r._xscale, (-hei) / 2);
rect.lineTo(r._xscale, hei / 2);
rect.lineTo(0, hei / 2);
rect.lineTo(0, 0);
rect.endFill();
rect.moveTo(0, 0);
rect._rotation = r._rotation;
rect._x = r._x;
rect._y = r._y;
rect._visible = false;
pt = {x:r._x, y:r._y};
level.localToGlobal(pt);
thePoint = points.attachMovie("point", "pt_" + d, d, {_x:pt.x, _y:pt.y, _xscale:r._yscale, _yscale:r._yscale});
thePoint.beginning = true;
thePoint.rail = r;
thePoint._visible = false;
r.beginning = thePoint;
pointsArray.push(thePoint);
if (r._name == entryPoint) {
firstRail = r;
}
d++;
r = level[mc];
angle = (r._rotation * Math.PI) / 180;
len = r._xscale;
pt = {x:r._x + (len * Math.cos(angle)), y:r._y + (len * Math.sin(angle))};
level.localToGlobal(pt);
thePoint = points.attachMovie("point", "pt_" + d, d, {_x:pt.x, _y:pt.y, _xscale:r._yscale, _yscale:r._yscale});
thePoint.beginning = false;
thePoint.rail = r;
d++;
thePoint._visible = false;
pointsArray.push(thePoint);
r.end = thePoint;
}
}
if (firstRail == undefined) {
error("NO STARTING POINT");
}
firstRail.findLinks();
removeMovieClip(camera);
camera = screen.attachMovie("camera", "camera", 100);
camera._x = firstRail._x;
camera._y = firstRail._y;
camera._alpha = 0;
run();
}
function run() {
nextRail(firstRail);
com.darronschall.DynamicRegistration.initialize(screen);
clearInterval(flow.id);
flow = new Object();
flow.interval = function () {
screen.setRegistration(camera._x, camera._y);
DX = CURSOR_X - screen._x2;
DY = (STAGE_H / 2) - screen._y2;
screen._x2 = screen._x2 + (DX / 10);
screen._y2 = screen._y2 + (DY / 10);
DSCALE = ((ZOOM / currentRail._yscale) * 100) - screen._xscale2;
screen._xscale2 = screen._xscale2 + (DSCALE / SCALE_SPEED);
screen._yscale2 = screen._yscale2 + (DSCALE / SCALE_SPEED);
if (currentRail.noRotation != true) {
DR = (-currentRail._rotation) - screen._rotation2;
if (Math.abs(DR) > 180) {
DR = (-DR) + 180;
}
if (currentRail.slowRotation) {
screen._rotation2 = screen._rotation2 + ROTATION_SPEED_SLOW;
} else {
screen._rotation2 = screen._rotation2 + (DR / ROTATION_SPEED);
}
}
};
flow.id = setInterval(flow, "interval", 5);
}
function nextRail(r) {
startAction(r._name);
i = 0;
while (i < currentRail.children.length) {
delete currentRail.children[i].onRollOver;
i++;
}
rolls[currentRail._name]._visible = false;
currentRail = r;
if (r.speed == 0) {
sp = CAMERA_SPEED_0;
}
if (r.speed == 1) {
sp = CAMERA_SPEED_1;
}
if (r.speed == 2) {
sp = CAMERA_SPEED_2;
}
if (r.speed == 3) {
sp = CAMERA_SPEED_3;
}
if (r.speed == 4) {
sp = CAMERA_SPEED_4;
}
cameraTweeningX = new mx.transitions.Tween(camera, "_x", mx.transitions.easing.None.easeOut, camera._x, r.end._x, r._xscale / sp, false);
cameraTweeningY = new mx.transitions.Tween(camera, "_y", mx.transitions.easing.None.easeOut, camera._y, r.end._y, r._xscale / sp, false);
xTweenDone = (yTweenDone = false);
cameraTweeningX.onMotionFinished = function () {
xTweenDone = true;
if (yTweenDone) {
endRail();
}
};
cameraTweeningY.onMotionFinished = function () {
yTweenDone = true;
if (xTweenDone) {
endRail();
}
};
choices = new Array();
i = 0;
while (i < r.children.length) {
choices.push(r.children[i]);
if (r.children.length > 1) {
r.children[i].actionId = i;
r.children[i].onRollOver = function () {
selectRail(this);
};
}
i++;
}
if (choices.length == 0) {
trace("dead end");
}
}
function selectRail(obj) {
q = 0;
while (q < choices.length) {
id = choices[q]._name;
rolls[id]._visible = false;
q++;
}
id = obj._name;
rolls[id]._visible = true;
action = obj.actionId;
}
function endRail() {
endAction(currentRail._name);
if (((action < choices.length) && (action >= 0)) && (action != undefined)) {
nextRail(choices[action]);
} else {
nR = choices[random(choices.length)];
if (choices.length > 1) {
rolls[nR._name]._visible = true;
}
nextRail(nR);
}
action = undefined;
}
function error(txt) {
trace(txt);
}
function startAction(railId) {
switch (railId) {
case "hero" :
break;
case "fade" :
break;
case "click" :
var mouseListener = new Object();
mouseListener.onMouseUp = function () {
loadLevel(ergon, "hero");
Mouse.removeListener(mouseListener);
};
Mouse.addListener(mouseListener);
}
}
function endAction(railId) {
switch (railId) {
case "die_by_trap" :
fadeFrom(currentLevel.bg);
loadLevel(logos, "losing");
break;
case "death_by_monster" :
fadeFrom(currentLevel.bg);
loadLevel(logos, "losing");
break;
case "suicide" :
fadeFrom(currentLevel.bg);
loadLevel(logos, "losing");
break;
case "no_hero" :
fadeFrom(currentLevel.bg);
loadLevel(logos, "losing");
break;
case "forces" :
fadeFrom(currentLevel.bg);
loadLevel(logos, "paranoid");
break;
case "up" :
fadeFrom(currentLevel.bg);
loadLevel(logos, "paranoid");
break;
case "reaction" :
fadeFrom(currentLevel.bg);
loadLevel(logos, "cortex");
break;
case "disappear" :
fadeFrom(currentLevel.bg);
loadLevel(logos, "jump");
break;
case "chaos" :
endLevel();
break;
case "dyslexia" :
endLevel();
break;
case "love" :
endLevel();
break;
case "god" :
endLevel();
break;
case "die" :
ROOT.onEnterFrame = function () {
screen._xscale2 = random(100) * 6;
screen._yscale2 = random(100) * 6;
screen._rotation2 = screen._rotation2 + random(10);
crash = (ROOT["crash" + random(100000)] = new Object());
if (random(10) == 0) {
soundBox[currentMusic].sound.start(random(120), 1);
}
crash.interval = function () {
this.i = 0;
while (this.i < 999) {
ROOT["satan" + random(999999)] = "SATAN";
this.i++;
}
};
setInterval(crash, "interval", 6);
};
break;
case "parenthesis" :
}
}
function fadeFrom(col) {
fader.paintIt(col);
fader._alpha = 100;
fader.to = false;
fader.a = 100;
fader.onEnterFrame = function () {
this.a = this.a - FADESPEED;
this._alpha = this.a;
if (this.a <= 0) {
delete this.onEnterFrame;
}
};
}
function fadeTo(col) {
fader.paintIt(col);
fader._alpha = 0;
fader.a = 0;
fader.col = col;
fader.to = true;
fader.onEnterFrame = function () {
this.a = this.a + FADESPEED;
this._alpha = this.a;
if (this.a >= 100) {
delete this.onEnterFrame;
}
};
}
function changeMusic(sound_id) {
musicBox.sound = new Sound();
musicBox.sound.attachSound(sound_id);
musicBox.onEnterFrame = function () {
this.sound.setVolume(this.vol);
if (!this.active) {
this.sound.stop();
this.isPlaying = false;
}
if (this.active && (!this.isPlaying)) {
this.sound.start(0, 999999);
this.isPlaying = true;
}
};
return(obj);
}
function playMusic(sound_id) {
if (sound_id != currentMusic) {
if (currentMusic != "silence") {
soundBox[currentMusic].onEnterFrame = function () {
this.vol = this.vol - FADE_SPEED;
this.sound.setVolume(this.vol);
if (this.vol <= 0) {
this.sound.stop();
delete this.onEnterFrame;
}
};
}
currentMusic = sound_id;
if (currentMusic != "silence") {
id = soundBox.getNextHighestDepth();
obj = soundBox.createEmptyMovieClip(sound_id, id);
obj.sound = new Sound(obj);
obj.sound.attachSound(sound_id);
obj.vol = 0;
obj.sound.setVolume(obj.vol);
obj.sound.start(0, 99);
soundBox[currentMusic].onEnterFrame = function () {
this.vol = this.vol + FADE_SPEED;
this.sound.setVolume(this.vol);
if (this.vol >= MAX_VOL) {
delete this.onEnterFrame;
}
};
return(obj);
}
}
}
function endLevel() {
fadeTo(currentLevel.bg);
playMusic("silence");
clearInterval(wait.id);
wait = new Object();
wait.interval = function () {
loadLevel(main, "ergon");
clearInterval(wait.id);
};
wait.id = setInterval(wait, "interval", 2000);
}
stop();
_global.ROOT = this;
CAMERA_SPEED_0 = 0.16;
CAMERA_SPEED_1 = 0.5;
CAMERA_SPEED_2 = 0.7;
CAMERA_SPEED_3 = 1;
CAMERA_SPEED_4 = 10;
ZOOM = 200;
SCALE_SPEED = 30;
ROTATION_SPEED = 30;
ROTATION_SPEED_SLOW = -0.2;
CURSOR_X = STAGE_W / 2;
ROLL_ALPHA = 100;
FADE_SPEED = 1;
MAX_VOL = 100;
FADESPEED = 1;
main = {mc:"mainScreen", bg:"0x000000", blend:"multiply", hl:16711680, rollAlpha:100, music:"silence"};
ergon = {mc:"level1", bg:"0x000000", blend:"multiply", hl:16711680, rollAlpha:100, music:"missy08"};
logos = {mc:"level2", bg:"0xFFFFFF", blend:"screen", hl:16711680, rollAlpha:100, music:"missy05"};
soundBox = ROOT.createEmptyMovieClip("soundBox", 666);
MovieClip.prototype.findLinks = function () {
if (this.children == undefined) {
this.children = new Array();
this.mc = 0;
while (this.mc < pointsArray.length) {
if (((this.end.hitTest(pointsArray[this.mc]._x, pointsArray[this.mc]._y) && (this.end != pointsArray[this.mc])) && (!this.end.beginning)) && (pointsArray[this.mc].beginning)) {
this.children.push(pointsArray[this.mc].rail);
}
this.mc++;
}
this.i = 0;
while (this.i < this.children.length) {
this.children[this.i].findLinks();
this.i++;
}
}
};
MovieClip.prototype.paintIt = function (col) {
alpha = this._alpha;
var _local2 = new flash.geom.ColorTransform();
_local2.rgb = col;
var _local3 = new flash.geom.Transform(this);
_local3.colorTransform = _local2;
this._alpha = alpha;
};
MovieClip.prototype.unPaint = function () {
alpha = 100;
var _local2 = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 255, 0);
var _local3 = new flash.geom.Transform(this);
_local3.colorTransform = _local2;
this._alpha = alpha;
};
loadLevel(main, "ergon");
Frame 5
th.blendMode = "multiply";
Symbol 8 MovieClip Frame 1
isRail = true;
speed = 1;
Symbol 10 MovieClip Frame 1
isRail = true;
speed = 4;
noRotation = true;
Symbol 17 MovieClip Frame 1
isRail = true;
speed = 2;
slowRotation = true;
Symbol 19 MovieClip Frame 1
isRail = true;
speed = 2;
Symbol 21 MovieClip Frame 1
isRail = true;
speed = 2;
noRotation = true;
Symbol 23 MovieClip Frame 1
isRail = true;
speed = 3;
Symbol 25 MovieClip Frame 1
isRail = true;
speed = 0;
noRotation = true;
Symbol 208 MovieClip Frame 1
isRail = true;
speed = 0;
Symbol 382 MovieClip [__Packages.com.darronschall.DynamicRegistration] Frame 0
class com.darronschall.DynamicRegistration
{
var xreg, yreg, localToGlobal, _parent, _x, _y, _xscale, _yscale, _rotation, _xmouse, _ymouse;
function DynamicRegistration () {
}
static function initialize(target_mc) {
var p = _global.com.darronschall.DynamicRegistration.prototype;
target_mc.xreg = 0;
target_mc.yreg = 0;
target_mc.setRegistration = p.setRegistration;
target_mc.setPropRel = p.setPropRel;
with (target_mc) {
addProperty("_x2", p.get_x2, p.set_x2);
addProperty("_y2", p.get_y2, p.set_y2);
addProperty("_xscale2", p.get_xscale2, p.set_xscale2);
addProperty("_yscale2", p.get_yscale2, p.set_yscale2);
addProperty("_rotation2", p.get_rotation2, p.set_rotation2);
addProperty("_xmouse2", p.get_xmouse2, null);
addProperty("_ymouse2", p.get_ymouse2, null);
}
}
function setRegistration(x, y) {
xreg = x;
yreg = y;
}
function get_x2() {
var _local2 = {x:xreg, y:yreg};
localToGlobal(_local2);
_parent.globalToLocal(_local2);
return(_local2.x);
}
function set_x2(value) {
var _local2 = {x:xreg, y:yreg};
localToGlobal(_local2);
_parent.globalToLocal(_local2);
_x = _x + (value - _local2.x);
}
function get_y2() {
var _local2 = {x:xreg, y:yreg};
localToGlobal(_local2);
_parent.globalToLocal(_local2);
return(_local2.y);
}
function set_y2(value) {
var _local2 = {x:xreg, y:yreg};
localToGlobal(_local2);
_parent.globalToLocal(_local2);
_y = _y + (value - _local2.y);
}
function set_xscale2(value) {
setPropRel("_xscale", value);
}
function get_xscale2() {
return(_xscale);
}
function set_yscale2(value) {
setPropRel("_yscale", value);
}
function get_yscale2() {
return(_yscale);
}
function set_rotation2(value) {
setPropRel("_rotation", value);
}
function get_rotation2() {
return(_rotation);
}
function get_xmouse2() {
return(_xmouse - xreg);
}
function get_ymouse2() {
return(_ymouse - yreg);
}
function setPropRel(property, amount) {
var _local3 = {x:xreg, y:yreg};
localToGlobal(_local3);
_parent.globalToLocal(_local3);
this[property] = amount;
var _local2 = {x:xreg, y:yreg};
localToGlobal(_local2);
_parent.globalToLocal(_local2);
_x = _x - (_local2.x - _local3.x);
_y = _y - (_local2.y - _local3.y);
}
}
Symbol 383 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 384 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 385 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 386 MovieClip [__Packages.com.jR.Drawing.Base] Frame 0
class com.jR.Drawing.Base
{
var _mc, broadcastMessage, dispatchEvent;
function Base (Void) {
AsBroadcaster.initialize(this);
mx.events.EventDispatcher.initialize(this);
}
function get mc() {
return(_mc);
}
function get x() {
return(_mc._x);
}
function get y() {
return(_mc._y);
}
function get visible() {
return(_mc._visible);
}
function get autoClear() {
return(_autoClear);
}
function get rotation() {
return(_rotation);
}
function get skewX() {
return(rad2deg(_skewX));
}
function get skewY() {
return(rad2deg(_skewY));
}
function get lineSize() {
return(_lineSize);
}
function get lineRgb() {
return(((_lineRgb === null) ? 0 : (_lineRgb)));
}
function get lineAlpha() {
return(((_lineAlpha === null) ? 100 : (_lineAlpha)));
}
function get fillRgb() {
return(((_fillRgb === null) ? 0 : (_fillRgb)));
}
function get fillAlpha() {
return(((_fillAlpha === null) ? 100 : (_fillAlpha)));
}
function get gradientX() {
return(_gradientX);
}
function get gradientY() {
return(_gradientY);
}
function get gradientWidth() {
return(_gradientWidth);
}
function get gradientHeight() {
return(_gradientHeight);
}
function get gradientRotation() {
return(_gradientRotation);
}
function get gradientType() {
return(((_gradientType === null) ? "linear" : (_gradientType)));
}
function get gradientColors() {
return(_gradientColors);
}
function get gradientAlphas() {
if ((_gradientAlphas === null) || (_gradientAlphas.length < _gradientColors.length)) {
throwError("Fill Alphas array length is different that Fill Colors array length.\nModifying values to match!");
var _local2 = ((_gradientAlphas === null) ? (new Array()) : (_gradientAlphas.concat()));
while (_local2.length < _gradientColors.length) {
_local2.push(100);
}
return(_local2);
}
return(_gradientAlphas);
}
function get gradientRatios() {
if ((_gradientRatios === null) || (_gradientRatios.length < _gradientColors.length)) {
throwError("Fill Ratios array length is different that Fill Colors array length.\nModifying values to match!");
var _local3;
var _local4;
var _local5;
if (_gradientRatios === null) {
_local3 = new Array();
_local4 = 0;
_local5 = 255 / (_gradientColors.length - 1);
} else {
_local3 = _gradientRatios.concat();
_local5 = (255 - _gradientRatios[_gradientRatios.length - 1]) / (_gradientColors.length - _gradientRatios.length);
_local4 = _gradientRatios[_gradientRatios.length - 1] + _local5;
}
var _local2 = _local3.length;
while (_local2 < _gradientColors.length) {
_local3.push(com.jR.Utils.roundTo(_local4, 2));
_local4 = _local4 + _local5;
_local2++;
}
return(_local3);
}
return(_gradientRatios);
}
function get gradientMatrix_x() {
return(_gradientMatrix_x);
}
function get gradientMatrix_y() {
return(_gradientMatrix_y);
}
function get gradientMatrix_w() {
return(_gradientMatrix_w);
}
function get gradientMatrix_h() {
return(_gradientMatrix_h);
}
function get gradientMatrix_r() {
return(_gradientMatrix_r);
}
function get gradientMatrix() {
var _local5 = ((gradientMatrix_x === null) ? (gradientX) : (gradientMatrix_x));
var _local4 = ((gradientMatrix_y === null) ? (gradientY) : (gradientMatrix_y));
var _local6 = ((gradientMatrix_w === null) ? (gradientWidth) : (gradientMatrix_w));
var _local7 = ((gradientMatrix_h === null) ? (gradientHeight) : (gradientMatrix_h));
var _local3 = ((gradientMatrix_r === null) ? (_gradientRotation) : (_gradientMatrix_r));
if ((_local3 != 0) && (_gradientType == "radial")) {
var _local2 = new com.jR.Drawing.TransformMatrix();
_local2.scale(_local6, _local7);
_local2.rotate(_local3);
_local2.translate(_local5, _local4);
return(_local2);
}
return({matrixType:"box", x:_local5, y:_local4, w:_local6, h:_local7, r:deg2rad(_local3)});
}
function get traceErrors() {
return(_traceErrors);
}
function set x(value) {
_mc._x = value;
//return(x);
}
function set y(value) {
_mc._y = value;
//return(y);
}
function set visible(value) {
_mc._visible = value;
//return(visible);
}
function set autoClear(value) {
_autoClear = value;
//return(autoClear);
}
function set rotation(value) {
_rotation = value;
//return(rotation);
}
function set skewX(value) {
_skewX = (((value > -90) && (value < 90)) ? (deg2rad(value)) : 0);
//return(skewX);
}
function set skewY(value) {
_skewY = (((value > -90) && (value < 90)) ? (deg2rad(value)) : 0);
//return(skewY);
}
function set lineSize(value) {
_lineSize = ((!(value === null)) ? (value) : null);
//return(lineSize);
}
function set lineRgb(value) {
_lineRgb = value;
//return(lineRgb);
}
function set lineAlpha(value) {
_lineAlpha = value;
//return(lineAlpha);
}
function set fillRgb(value) {
_fillRgb = value;
//return(fillRgb);
}
function set fillAlpha(value) {
_fillAlpha = value;
//return(fillAlpha);
}
function set gradientType(value) {
_gradientType = (((value == "radial") || (value == "linear")) ? (value) : null);
//return(gradientType);
}
function set gradientColors(value) {
_gradientColors = (((value instanceof Array) == false) ? null : (value));
//return(gradientColors);
}
function set gradientAlphas(value) {
_gradientAlphas = (((value instanceof Array) == false) ? null : (value));
//return(gradientAlphas);
}
function set gradientRatios(value) {
_gradientRatios = (((value instanceof Array) == false) ? null : (value));
//return(gradientRatios);
}
function set gradientMatrix(value) {
for (var _local3 in value) {
if (!(this["_gradientMatrix_" + _local3] === undefined)) {
this["gradientMatrix_" + _local3] = value[_local3];
}
}
//return(gradientMatrix);
}
function set gradientMatrix_x(value) {
_gradientMatrix_x = value;
//return(gradientMatrix_x);
}
function set gradientMatrix_y(value) {
_gradientMatrix_y = value;
//return(gradientMatrix_y);
}
function set gradientMatrix_w(value) {
_gradientMatrix_w = value;
//return(gradientMatrix_w);
}
function set gradientMatrix_h(value) {
_gradientMatrix_h = value;
//return(gradientMatrix_h);
}
function set gradientMatrix_r(value) {
_gradientMatrix_r = value;
//return(gradientMatrix_r);
}
function set traceErrors(value) {
_traceErrors = value;
//return(traceErrors);
}
function lineStyle(__lineSize, __lineRgb, __lineAlpha) {
lineSize = (((isNaN(__lineSize) == true) ? null : (__lineSize)));
lineRgb = (((isNaN(__lineRgb) == true) ? null : (__lineRgb)));
lineAlpha = (((isNaN(__lineAlpha) == true) ? null : (__lineAlpha)));
}
function applyLineStyle(forceOutline) {
if (!(_lineSize === null)) {
_mc.lineStyle(lineSize, lineRgb, lineAlpha);
} else if (forceOutline == true) {
_mc.lineStyle(1, 0, 100);
} else {
resetLineStyle();
}
}
function resetLineStyle(Void) {
_mc.lineStyle(undefined, undefined, undefined);
}
function beginFill(Void) {
_mc.beginFill(fillRgb, fillAlpha);
}
function endFill(Void) {
_mc.endFill();
}
function beginGradientFill(Void) {
if ((gradientColors === null) || (gradientColors.length == 0)) {
throwError("No colors for gradient fill!");
return(undefined);
}
_mc.beginGradientFill(gradientType, gradientColors, gradientAlphas, gradientRatios, gradientMatrix);
}
function clear(Void) {
_mc.clear();
}
function reset(Void) {
_autoClear = true;
_rotation = 0;
_skewX = 0;
_skewY = 0;
_lineSize = null;
_lineRgb = null;
_lineAlpha = null;
_fillRgb = null;
_fillAlpha = null;
_gradientType = null;
_gradientColors = null;
_gradientAlphas = null;
_gradientRatios = null;
_gradientMatrix_x = null;
_gradientMatrix_y = null;
_gradientMatrix_w = null;
_gradientMatrix_h = null;
_gradientMatrix_r = null;
_gradientX = null;
_gradientY = null;
_gradientWidth = null;
_gradientHeight = null;
_gradientRotation = null;
}
function deg2rad(angle) {
return(angle * (Math.PI/180));
}
function rad2deg(angle) {
return(angle * 57.2957795130823);
}
function getAnchorHeight(angle, radius) {
var _local2 = radius * (Math.sin(deg2rad(90 - (angle / 2))) / 1);
return(com.jR.Utils.roundTo((radius * 2) - _local2, 3));
}
function getSectorPoints(startAngle, endAngle, radius) {
startAngle = (startAngle + 360) % 360;
endAngle = (endAngle + 360) % 360;
var _local3 = new Array();
_local3.push(startAngle);
var _local8 = angleDelta(startAngle, endAngle);
var _local2 = 1;
while (_local2 < Math.floor(_local8 / minSectorSize)) {
_local3.push(((startAngle + (minSectorSize * _local2)) + 360) % 360);
_local2++;
}
_local3.push(endAngle);
var _local5 = new Array();
_local5.push(rotatePoint(radius, 0, startAngle));
var _local10;
var _local4;
_local2 = 1;
while (_local2 < _local3.length) {
_local4 = angleDelta(_local3[_local2 - 1], _local3[_local2]);
_local5.push(rotatePoint(getAnchorHeight(_local4, radius), 0, _local3[_local2 - 1] + (_local4 / 2)));
_local5.push(rotatePoint(radius, 0, _local3[_local2]));
_local2++;
}
return(_local5);
}
function rotatePoint(__x, __y, __angle) {
var _local2 = Math.sqrt(Math.pow(__x, 2) + Math.pow(__y, 2));
var _local3 = Math.atan2(__y, __x) + deg2rad(__angle);
return({x:com.jR.Utils.roundTo(_local2 * Math.cos(_local3), 3), y:com.jR.Utils.roundTo(_local2 * Math.sin(_local3), 3)});
}
function angleDelta(angle1, angle2) {
angle1 = angle1 % 360;
angle2 = angle2 % 360;
if (angle1 == angle2) {
return(360);
}
if (angle1 > angle2) {
return((360 - angle1) + angle2);
}
return(angle2 - angle1);
}
function initMouseEvents(pointer) {
_mc.useHandCursor = Boolean(pointer);
_mc.onDragOut = com.jR.Utils.delegate(this, onMouseEvent, "onDragOutDraw");
_mc.onDragOver = com.jR.Utils.delegate(this, onMouseEvent, "onDragOverDraw");
_mc.onPress = com.jR.Utils.delegate(this, onMouseEvent, "onPressDraw");
_mc.onRelease = com.jR.Utils.delegate(this, onMouseEvent, "onReleaseDraw");
_mc.onReleaseOutside = com.jR.Utils.delegate(this, onMouseEvent, "onReleaseOutsideDraw");
_mc.onRollOut = com.jR.Utils.delegate(this, onMouseEvent, "onRollOutDraw");
_mc.onRollOver = com.jR.Utils.delegate(this, onMouseEvent, "onRollOverDraw");
}
function onMouseEvent(event) {
broadcastMessage(event, this);
dispatchEvent({type:event, target:this});
}
function throwError(error, isNotice) {
error = (((isNotice == true) ? "Notice" : "Error") + ": ") + error;
if (_traceErrors == true) {
trace(error);
}
broadcastMessage("onDrawingError", error, this);
dispatchEvent({type:"onDrawingError", target:this});
}
var _x = null;
var _y = null;
var _visible = null;
var _autoClear = true;
var _rotation = 0;
var _skewX = 0;
var _skewY = 0;
var _lineSize = null;
var _lineRgb = null;
var _lineAlpha = null;
var _fillRgb = null;
var _fillAlpha = null;
var _gradientType = null;
var _gradientColors = null;
var _gradientAlphas = null;
var _gradientRatios = null;
var _gradientMatrix_x = null;
var _gradientMatrix_y = null;
var _gradientMatrix_w = null;
var _gradientMatrix_h = null;
var _gradientMatrix_r = null;
var _gradientX = null;
var _gradientY = null;
var _gradientWidth = null;
var _gradientHeight = null;
var _gradientRotation = null;
var minSectorSize = 45;
var _traceErrors = false;
}
Symbol 387 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 388 MovieClip [__Packages.com.jR.Utils] Frame 0
class com.jR.Utils
{
function Utils () {
}
static function trim(input, charlist) {
var _local3;
if (((!(charlist === undefined)) && ((charlist instanceof Array) == true)) && (charlist.length > 0)) {
_local3 = charlist;
} else {
_local3 = trimmableChars;
}
var _local2;
var _local4 = true;
while (_local4 == true) {
_local4 = false;
_local2 = 0;
while (_local2 < _local3.length) {
if (input.charAt(0) == _local3[_local2]) {
input = input.substr(1);
if (input.length > 0) {
_local4 = true;
}
break;
}
_local2++;
}
}
_local4 = true;
while (_local4 == true) {
_local4 = false;
_local2 = 0;
while (_local2 < _local3.length) {
if (input.charAt(input.length - 1) == _local3[_local2]) {
input = input.substr(0, input.length - 1);
if (input.length > 0) {
_local4 = true;
}
break;
}
_local2++;
}
}
return(input);
}
static function multiplyString(input, times) {
var _local2 = new String();
var _local1 = 0;
while (_local1 < times) {
_local2 = _local2 + input;
_local1++;
}
return(_local2);
}
static function riseFirstChar(input) {
return(input.substr(0, 1).toUpperCase() + input.substr(1));
}
static function printR(input, doTrace) {
var _local1 = printLoop(input, 0);
if (!(doTrace === false)) {
trace(_local1);
}
return(_local1);
}
static function printLoop(input, level) {
var _local5 = newline;
if (_local5 === undefined) {
_local5 = newline;
}
var _local10 = riseFirstChar(typeof(input));
if (!(_local10 === "Object")) {
return((_local10 + " : ") + input);
}
var _local4 = input instanceof Array;
var _local2 = new Array();
for (var _local9 in input) {
var _local3 = riseFirstChar(typeof(input[_local9]));
if (_local3 == "Object") {
_local2.push((("\t" + ((_local4 == false) ? (_local9) : (("[" + _local9) + "]"))) + " => ") + printLoop(input[_local9], level + 1));
continue;
}
_local2.push((((("\t" + ((_local4 == false) ? (_local9) : (("[" + _local9) + "]"))) + ":") + riseFirstChar(typeof(input[_local9]))) + " => ") + input[_local9]);
}
if (_local4 == true) {
_local2.reverse();
}
_local2.unshift(_local10 + " {");
var _local7 = multiplyString("\t", level);
var _local6 = _local2.shift() + _local5;
while (_local2.length > 0) {
_local6 = _local6 + ((_local7 + _local2.shift()) + _local5);
}
_local6 = _local6 + (_local7 + "}");
return(_local6);
}
static function delegate(targetScope, callFunc) {
var _local3 = new Array();
if (arguments.length > 2) {
_local3 = arguments.slice(2);
}
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments.concat(arguments.callee.args)));
};
_local2.target = targetScope;
_local2.func = callFunc;
_local2.args = _local3;
return(_local2);
}
static function roundTo(input, digits) {
return(Math.round(input * Math.pow(10, digits)) / Math.pow(10, digits));
}
static function clone(object, cloneProperties) {
var _local3 = (((object instanceof Array) == true) ? (new Array()) : (new Object()));
if ((object instanceof Array) == true) {
_local3 = object.concat();
}
if (!(cloneProperties === false)) {
var _local2 = new Array();
for (var _local5 in object) {
if (!(_local3[_local5] === undefined)) {
continue;
}
_local2.push(_local5);
}
var _local1 = _local2.length - 1;
while (_local1 >= 0) {
_local3[_local2[_local1]] = object[_local2[_local1]];
_local1--;
}
}
return(_local3);
}
static function createTextFormat(params) {
var _local2 = new TextFormat();
for (var _local3 in params) {
_local2[_local3] = params[_local3];
}
return(_local2);
}
static function str_pad(input, pad_length, pad_string, pad_right) {
if ((typeof(pad_string) != "string") || (pad_string.length == 0)) {
pad_string = " ";
}
while (input.length < pad_length) {
input = ((pad_right == true) ? (input + pad_string) : (pad_string + input));
}
if (input.length > pad_length) {
if (pad_right == true) {
input = input.substr(0, pad_length);
} else {
input = input.substr(input.length - pad_length, pad_length);
}
}
return(input);
}
static var trimmableChars = [" ", "\t", newline, "\r", String.fromCharCode(0)];
}
Symbol 389 MovieClip [__Packages.com.jR.Drawing.TransformMatrix] Frame 0
class com.jR.Drawing.TransformMatrix
{
var a, b, d, e, g, h;
function TransformMatrix (_a, _b, _d, _e, _g, _h) {
if (arguments.length > 0) {
a = _a;
b = _b;
d = _d;
e = _e;
g = _g;
h = _h;
_empty = false;
}
}
function concat(matrix) {
if (_empty == true) {
a = matrix.a;
d = matrix.d;
g = matrix.g;
b = matrix.b;
e = matrix.e;
h = matrix.h;
c = matrix.c;
f = matrix.f;
i = matrix.i;
} else {
var _local3 = new com.jR.Drawing.TransformMatrix();
_local3.a = ((a * matrix.a) + (b * matrix.d)) + (c * matrix.g);
_local3.b = ((a * matrix.b) + (b * matrix.e)) + (c * matrix.h);
_local3.c = ((a * matrix.c) + (b * matrix.f)) + (c * matrix.i);
_local3.d = ((d * matrix.a) + (e * matrix.d)) + (f * matrix.g);
_local3.e = ((d * matrix.b) + (e * matrix.e)) + (f * matrix.h);
_local3.f = ((d * matrix.c) + (e * matrix.f)) + (f * matrix.i);
_local3.g = ((g * matrix.a) + (h * matrix.d)) + (i * matrix.g);
_local3.h = ((g * matrix.b) + (h * matrix.e)) + (i * matrix.h);
_local3.i = ((g * matrix.c) + (h * matrix.f)) + (i * matrix.i);
a = _local3.a;
d = _local3.d;
g = _local3.g;
b = _local3.b;
e = _local3.e;
h = _local3.h;
c = _local3.c;
f = _local3.f;
i = _local3.i;
}
_empty = false;
}
function scale(sx, sy) {
var _local2 = new com.jR.Drawing.TransformMatrix(sx, 0, 0, sy, 0, 0);
return(concat(_local2));
}
function translate(tx, ty) {
var _local2 = new com.jR.Drawing.TransformMatrix(1, 0, 0, 1, tx, ty);
return(concat(_local2));
}
function rotate(r) {
var _local2 = (r / 180) * Math.PI;
var _local4 = Math.cos(_local2);
var _local3 = Math.sin(_local2);
var _local5 = new com.jR.Drawing.TransformMatrix(_local4, _local3, -_local3, _local4, 0, 0);
return(concat(_local5));
}
var c = 0;
var f = 0;
var i = 1;
var _empty = true;
}
Symbol 390 MovieClip [__Packages.com.jR.Drawing.Polygon] Frame 0
class com.jR.Drawing.Polygon extends com.jR.Drawing.Base
{
var throwError, _mc, clear, bounds, _autoClear, applyLineStyle, beginFill, endFill, _skewX, _skewY, _rotation, _gradientType, _gradientX, _gradientY, _gradientRotation, _gradientWidth, _gradientHeight, beginGradientFill, useLineTo, rad2deg, angleDelta, getSectorPoints, deg2rad, rotatePoint;
function Polygon (host, level) {
super();
if (host == undefined) {
throwError("No host provided for Poligon object", false);
}
if (level === undefined) {
level = host.getNextHighestDepth();
}
_mc = host.createEmptyMovieClip("polygon_" + level, level);
_points = new Array();
}
function get drawX() {
return(_drawX);
}
function get drawY() {
return(_drawY);
}
function get roundCorners() {
return(_roundCorners);
}
function get passAnchors() {
return(_passAnchors);
}
function get join() {
return(_join);
}
function get showLine() {
return(_showLine);
}
function get points() {
return(_points);
}
function get drawPoints() {
return(_drawPoints);
}
function get radius() {
var _local2 = 0;
while (_local2 < _points.length) {
if (_points[_local2].r != _points[0].r) {
return(null);
}
_local2++;
}
return(_points[0].r);
}
function set drawX(value) {
_drawX = value;
//return(drawX);
}
function set drawY(value) {
_drawY = value;
//return(drawY);
}
function set roundCorners(value) {
_roundCorners = value;
//return(roundCorners);
}
function set passAnchors(value) {
_passAnchors = value;
//return(passAnchors);
}
function set join(value) {
_join = value;
//return(join);
}
function set showLine(value) {
_showLine = value;
//return(showLine);
}
function set points(value) {
_points = value;
//return(points);
}
function set radius(value) {
_radius = value;
var _local2 = 0;
while (_local2 < _points.length) {
_points[_local2].r = _radius;
_local2++;
}
//return(radius);
}
function addPoint(x, y, r) {
_points.push({x:x, y:y, r:((isNaN(r) == true) ? 0 : (r))});
}
function removePoint(index) {
if ((index < 0) || (index >= _points.length)) {
return(undefined);
}
_points.splice(index, 1);
}
function modifyPoint(index, propertys) {
if ((index < 0) || (index >= _points.length)) {
return(undefined);
}
for (var _local4 in propertys) {
_points[index][_local4] = propertys[_local4];
}
}
function clearPoints(Void) {
_points = new Array();
}
function reset(Void) {
super.reset();
clear();
_drawX = 0;
_drawY = 0;
_roundCorners = true;
_join = true;
_showLine = true;
_points = new Array();
}
function calcBounds(Void) {
bounds = new Object();
var xMin = _drawPoints[0].x;
var xMax = _drawPoints[0].x;
var yMin = _drawPoints[0].y;
var yMax = _drawPoints[0].y;
var _local3 = function (point) {
if (point.x < xMin) {
xMin = point.x;
}
if (point.x > xMax) {
xMax = point.x;
}
if (point.y < yMin) {
yMin = point.y;
}
if (point.y > yMax) {
yMax = point.y;
}
};
var _local2 = 1;
while (_local2 < _drawPoints.length) {
if ((_drawPoints[_local2] instanceof Array) == true) {
_local3(_drawPoints[_local2][0]);
_local3(_drawPoints[_local2][1]);
} else {
_local3(_drawPoints[_local2]);
}
_local2++;
}
bounds = {xMin:xMin, xMax:xMax, yMin:yMin, yMax:yMax};
}
function dealArguments(__inputObject) {
if (_autoClear == true) {
clear();
}
for (var _local3 in __inputObject) {
if ((!(this["_" + _local3] === undefined)) && (!(this[_local3] === undefined))) {
this[_local3] = __inputObject[_local3];
}
}
}
function drawOutline(__props) {
dealArguments(__props);
calculatePoints();
applyLineStyle(true);
draw();
}
function drawSolid(__props) {
dealArguments(__props);
calculatePoints();
applyLineStyle();
beginFill();
draw();
endFill();
}
function drawGradient(__props) {
dealArguments(__props);
calculatePoints();
if (((_skewX != 0) || (_skewY != 0)) || (_rotation != 0)) {
calcBounds();
}
if ((_rotation != 0) && (_gradientType == "radial")) {
_gradientX = (_drawX + bounds.xMin) + ((bounds.xMax - bounds.xMin) / 2);
_gradientY = (_drawY + bounds.yMin) + ((bounds.yMax - bounds.yMin) / 2);
} else {
_gradientX = _drawX + bounds.xMin;
_gradientY = _drawY + bounds.yMin;
}
_gradientRotation = _rotation;
_gradientWidth = bounds.xMax - bounds.xMin;
_gradientHeight = bounds.yMax - bounds.yMin;
applyLineStyle();
beginGradientFill();
draw();
endFill();
}
function calculatePoints(Void) {
_drawPoints = new Array();
useLineTo = true;
var _local2 = 0;
while (_local2 < _points.length) {
if ((isNaN(_points[_local2].r) == false) && (_points[_local2].r != 0)) {
useLineTo = false;
((_roundCorners == true) ? (addRPoint(_local2)) : (addCPoint(_local2)));
} else {
_drawPoints.push(_points[_local2]);
}
_local2++;
}
calcBounds();
skewXBaby();
skewYBaby();
rotatePoints();
}
function addCPoint(_index, _newX, _newY) {
var _local2 = _points[_index];
if ((!(_newX === undefined)) && (!(_newY === undefined))) {
_local2 = com.jR.Utils.clone(_local2);
_local2.x = _newX;
_local2.y = _newY;
}
var _local10 = _points[((_index == 0) ? (_points.length - 1) : (_index - 1))];
var _local5 = _points[((_index == (_points.length - 1)) ? 0 : (_index + 1))];
var _local13 = Math.sqrt(Math.pow(_local2.x - _local5.x, 2) + Math.pow(_local2.y - _local5.y, 2));
var _local4 = _local2.r;
var _local9 = Math.atan2(_local10.y - _local2.y, _local10.x - _local2.x);
var _local8 = Math.atan2(_local5.y - _local2.y, _local5.x - _local2.x);
var _local3 = {x:_local2.x + (_local4 * Math.cos(_local9)), y:_local2.y + (_local4 * Math.sin(_local9))};
var _local7 = {x:_local2.x + (_local4 * Math.cos(_local8)), y:_local2.y + (_local4 * Math.sin(_local8))};
if ((_newX === undefined) && (_passAnchors == true)) {
addCPoint(_index, _local2.x - (((_local3.x + ((_local7.x - _local3.x) / 2)) - _local2.x) * 0.5), _local2.y - (((_local3.y + ((_local7.y - _local3.y) / 2)) - _local2.y) * 0.5));
return(undefined);
}
_drawPoints.push(_local3);
_drawPoints.push([_local2, _local7]);
}
function addRPoint(_index) {
var _local13 = false;
var _local4 = _points[_index];
var _local14 = _points[((_index == 0) ? (_points.length - 1) : (_index - 1))];
var _local12 = _points[((_index == (_points.length - 1)) ? 0 : (_index + 1))];
var _local7 = rad2deg(Math.atan2(_local14.y - _local4.y, _local14.x - _local4.x));
var _local6 = rad2deg(Math.atan2(_local12.y - _local4.y, _local12.x - _local4.x));
var _local15 = _local4.r;
var _local11;
var _local8;
if (angleDelta(_local7, _local6) >= 180) {
_local11 = angleDelta(_local6, _local7);
_local8 = _local7 + (angleDelta(_local7, _local6) / 2);
} else {
_local11 = angleDelta(_local7, _local6);
_local8 = _local6 + (angleDelta(_local6, _local7) / 2);
_local13 = true;
}
var _local10 = 180 - _local11;
var _local2 = getSectorPoints(_local8 - (_local10 / 2), _local8 + (_local10 / 2), _local15);
if (_local13 == true) {
_local2.reverse();
}
var _local16 = _local15 / Math.cos(deg2rad(_local10 / 2));
var _local5 = rotatePoint(_local16, 0, (_local8 + 180) % 360);
var _local3 = 0;
while (_local3 < _local2.length) {
_local2[_local3].x = _local2[_local3].x + (_local4.x + _local5.x);
_local2[_local3].y = _local2[_local3].y + (_local4.y + _local5.y);
_local3++;
}
_drawPoints.push(_local2.shift());
_local3 = 0;
while (_local3 < _local2.length) {
_drawPoints.push([_local2[_local3], _local2[_local3 + 1]]);
_local3 = _local3 + 2;
}
}
function skewXBaby(Void) {
if (_skewX == 0) {
return(undefined);
}
var _local4 = Math.tan(_skewX);
var _local3 = bounds.yMax;
var _local2 = 0;
while (_local2 < _drawPoints.length) {
if ((_drawPoints[_local2] instanceof Array) == true) {
_drawPoints[_local2][0].x = _drawPoints[_local2][0].x + ((_local3 - _drawPoints[_local2][0].y) * _local4);
_drawPoints[_local2][1].x = _drawPoints[_local2][1].x + ((_local3 - _drawPoints[_local2][1].y) * _local4);
} else {
_drawPoints[_local2].x = _drawPoints[_local2].x + ((_local3 - _drawPoints[_local2].y) * _local4);
}
_local2++;
}
}
function skewYBaby(Void) {
if (_skewY == 0) {
return(undefined);
}
var _local4 = Math.tan(_skewY);
var _local3 = bounds.xMin;
var _local2 = 0;
while (_local2 < _drawPoints.length) {
if ((_drawPoints[_local2] instanceof Array) == true) {
_drawPoints[_local2][0].y = _drawPoints[_local2][0].y + ((_drawPoints[_local2][0].x - _local3) * _local4);
_drawPoints[_local2][1].y = _drawPoints[_local2][1].y + ((_drawPoints[_local2][1].x - _local3) * _local4);
} else {
_drawPoints[_local2].y = _drawPoints[_local2].y + ((_drawPoints[_local2].x - _local3) * _local4);
}
_local2++;
}
}
function rotatePoints(Void) {
if (_rotation == 0) {
return(undefined);
}
var _local2 = 0;
while (_local2 < _drawPoints.length) {
if ((_drawPoints[_local2] instanceof Array) == true) {
_drawPoints[_local2][0] = rotatePoint(_drawPoints[_local2][0].x, _drawPoints[_local2][0].y, _rotation);
_drawPoints[_local2][1] = rotatePoint(_drawPoints[_local2][1].x, _drawPoints[_local2][1].y, _rotation);
} else {
_drawPoints[_local2] = rotatePoint(_drawPoints[_local2].x, _drawPoints[_local2].y, _rotation);
}
_local2++;
}
}
function draw(Void) {
var _local3 = _drawPoints[0];
_local3.x = _local3.x + _drawX;
_local3.y = _local3.y + _drawY;
_mc.moveTo(_local3.x, _local3.y);
var _local2 = 1;
while (_local2 < _drawPoints.length) {
if ((_drawPoints[_local2] instanceof Array) == true) {
_mc.curveTo(_drawX + _drawPoints[_local2][0].x, _drawY + _drawPoints[_local2][0].y, _drawX + _drawPoints[_local2][1].x, _drawY + _drawPoints[_local2][1].y);
} else if (useLineTo == true) {
_mc.lineTo(_drawX + _drawPoints[_local2].x, _drawY + _drawPoints[_local2].y);
} else {
_mc.curveTo(_drawX + _drawPoints[_local2].x, _drawY + _drawPoints[_local2].y, _drawX + _drawPoints[_local2].x, _drawY + _drawPoints[_local2].y);
}
_local2++;
}
if (_join == true) {
if (useLineTo == true) {
_mc.lineTo(_local3.x, _local3.y);
}
_mc.curveTo(_local3.x, _local3.y, _local3.x, _local3.y);
}
}
var _drawX = 0;
var _drawY = 0;
var _roundCorners = true;
var _passAnchors = false;
var _join = true;
var _showLine = true;
var _points = null;
var _drawPoints = null;
var _radius = null;
}
Symbol 391 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 375 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 1
stop();