1. /**
  2.  * Smokescreen v0.1.2 - Chris Smoak <chris.smoak@gmail.com>
  3.  * A Flash player written in JavaScript.
  4.  *
  5.  * Copyright 2010, RevShock
  6.  *
  7.  * Date: 2010-05-27
  8.  */
  9. var Smokescreen = function (url, element, width, height, name, params) {
  10.     goog = {};
  11.     goog.global = this;
  12.     goog.provide = function (a) {
  13.         a = a.split(".");
  14.         var b = goog.global;
  15.         for (var c in a) {
  16.             var d = a[c];
  17.             d in b || (b[d] = {});
  18.             b = b[d]
  19.         }
  20.     };
  21.     goog.require = function () {};
  22.     var fljs = {},
  23.         BrowserDetect = {
  24.             init: function () {
  25.                 this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
  26.                 this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version";
  27.                 this.OS = this.searchString(this.dataOS) || "an unknown OS"
  28.             },
  29.             searchString: function (a) {
  30.                 for (var b = 0; b < a.length; b++) {
  31.                     var c = a[b].string,
  32.                         d = a[b].prop;
  33.                     this.versionSearchString = a[b].versionSearch || a[b].identity;
  34.                     if (c) {
  35.                         if (c.indexOf(a[b].subString) != -1) return a[b].identity
  36.                     } else if (d) return a[b].identity
  37.                 }
  38.             },
  39.             searchVersion: function (a) {
  40.                 var b = a.indexOf(this.versionSearchString);
  41.                 if (b != -1) return parseFloat(a.substring(b + this.versionSearchString.length + 1))
  42.             },
  43.             dataBrowser: [{
  44.                 string: navigator.userAgent,
  45.                 subString: "Chrome",
  46.                 identity: "Chrome"},{
  47.                 string: navigator.vendor,
  48.                 subString: "Apple",
  49.                 identity: "Safari",
  50.                 versionSearch: "Version"},{
  51.                 prop: window.opera,
  52.                 identity: "Opera"},{
  53.                 string: navigator.userAgent,
  54.                 subString: "Firefox",
  55.                 identity: "Firefox"},{
  56.                 string: navigator.userAgent,
  57.                 subString: "MSIE",
  58.                 identity: "Explorer",
  59.                 versionSearch: "MSIE"}],
  60.             dataOS: [{
  61.                 string: navigator.platform,
  62.                 subString: "Win",
  63.                 identity: "Windows"},{
  64.                 string: navigator.userAgent,
  65.                 subString: "iPad",
  66.                 identity: "iPad"},{
  67.                 string: navigator.userAgent,
  68.                 subString: "iPhone",
  69.                 identity: "iPhone"},{
  70.                 string: navigator.platform,
  71.                 subString: "Mac",
  72.                 identity: "Mac"}]
  73.         };
  74.     BrowserDetect.init();
  75.     fljs.agent = BrowserDetect;
  76.     fljs.addConstants = function (a, b) {
  77.         for (var c in b) a[c] = b[c]
  78.     };
  79.     fljs.addMethods = function (a, b) {
  80.         for (var c in b) a.prototype[c] = b[c]
  81.     };
  82.     fljs.addStaticMethods = function (a, b) {
  83.         for (var c in b) a[c] = b[c]
  84.     };
  85.     fljs.addEvents = function (a, b) {
  86.         for (var c in b) {
  87.             var d = b[c],
  88.                 e = d[0],
  89.                 f = d[2];
  90.             a.prototype["__add" + e] = d[1];
  91.             a.prototype["__remove" + e] = f
  92.         }
  93.     };
  94.     fljs.now = function () {
  95.         return +new Date
  96.     };
  97.     fljs.inherits = function (a, b) {
  98.         function c() {}
  99.         c.prototype = b.prototype;
  100.         a.superClass_ = b.prototype;
  101.         a.prototype = new c;
  102.         a.prototype.constructor = a
  103.     };
  104.     fljs.base = function (a, b) {
  105.         var c = arguments.callee.caller;
  106.         if (c.superClass_) return c.superClass_.constructor.apply(a, Array.prototype.slice.call(arguments, 1));
  107.         for (var d = Array.prototype.slice.call(arguments, 2), e = false, f = a.constructor; f; f = f.superClass_ && f.superClass_.constructor) if (f.prototype[b] === c) e = true;
  108.         else if (e) return f.prototype[b].apply(a, d);
  109.         if (a[b] === c) return a.constructor.prototype[b].apply(a, d);
  110.         else throw Error("invalid base call");
  111.     };
  112.     fljs.bind = function (a, b) {
  113.         var c = b || this;
  114.         if (arguments.length > 2) {
  115.             var d = Array.prototype.slice.call(arguments, 2);
  116.             return function () {
  117.                 var e = Array.prototype.slice.call(arguments);
  118.                 Array.prototype.unshift.apply(e, d);
  119.                 return a.apply(c, e)
  120.             }
  121.         } else return function () {
  122.             return a.apply(c, arguments)
  123.         }
  124.     };
  125.     fljs.DummyConsole = function () {};
  126.     fljs.addMethods(fljs.DummyConsole, {
  127.         info: function () {}
  128.     });
  129.     fljs.DummyConsole._instance = new fljs.DummyConsole;
  130.     fljs.console = function () {
  131.         return fljs.debug ? console : fljs.DummyConsole._instance
  132.     };
  133.     fljs.ext = {};
  134.     var flash = {};
  135.     flash.display = {};
  136.     flash.display.BlendMode = function () {};
  137.     fljs.addConstants(flash.display.BlendMode, {
  138.         ADD: "add",
  139.         ALPHA: "alpha",
  140.         DARKEN: "darken",
  141.         DIFFERENCE: "difference",
  142.         ERASE: "erase",
  143.         HARDLIGHT: "hardlight",
  144.         INVERT: "invert",
  145.         LAYER: "layer",
  146.         LIGHTEN: "lighten",
  147.         MULTIPLY: "multiply",
  148.         NORMAL: "normal",
  149.         OVERLAY: "overlay",
  150.         SCREEN: "screen",
  151.         SUBTRACT: "subtract"
  152.     });
  153.     flash.events = {};
  154.     flash.events.Event = function (a, b, c) {
  155.         this.type = a;
  156.         this.bubbles = b;
  157.         this.cancelable = c
  158.     };
  159.     fljs.addConstants(flash.events.Event, {
  160.         ACTIVATE: "activate",
  161.         ADDED: "added",
  162.         ADDED_TO_STAGE: "addedToStage",
  163.         CANCEL: "cancel",
  164.         CHANGE: "change",
  165.         CLOSE: "close",
  166.         COMPLETE: "complete",
  167.         CONNECT: "connect",
  168.         DEACTIVATE: "deactivate",
  169.         DISPLAYING: "displaying",
  170.         ENTER_FRAME: "enterFrame",
  171.         FULLSCREEN: "fullscreen",
  172.         ID3: "id3",
  173.         INIT: "init",
  174.         MOUSE_LEAVE: "mouseLeave",
  175.         OPEN: "open",
  176.         REMOVED: "removed",
  177.         REMOVED_FROM_STAGE: "removedFromStage",
  178.         RENDER: "render",
  179.         RESIZE: "resize",
  180.         SCROLL: "scroll",
  181.         SELECT: "select",
  182.         SOUND_COMPLETE: "soundComplete",
  183.         TAB_CHILDREN_CHANGE: "tabChildrenChange",
  184.         TAB_ENABLED_CHANGE: "tabEnabledChange",
  185.         TAB_INDEX_CHANGE: "tabIndexChange",
  186.         UNLOAD: "unload"
  187.     });
  188.     fljs.addMethods(flash.events.Event, {
  189.         clone: function () {},
  190.         formatToString: function (a) {
  191.             return "[" + a + this.buildPropertiesString_(arguments) + "]"
  192.         },
  193.         buildPropertiesString_: function (a) {
  194.             for (var b = [], c = 0; c < a.length; c++) c > 0 && b.push(a[c] + "=" + this[a[c]]);
  195.             return b.join(" ")
  196.         },
  197.         isDefaultPrevented: function () {
  198.             return this.returnValue_
  199.         },
  200.         stopImmediatePropagation: function () {
  201.             this.stopPropagation()
  202.         },
  203.         toString: function () {
  204.             return this.formatToString("Event", "type", "bubbles", "cancelable")
  205.         }
  206.     });
  207.     flash.events.MouseEvent = function (a, b, c, d, e, f, g, j, h, m, k, l, n, p) {
  208.         flash.events.Event.call(this, a, b, c);
  209.         this.localX = d;
  210.         this.localY = e;
  211.         this.relatedObject = f;
  212.         this.ctrlKey = g;
  213.         this.altKey = j;
  214.         this.shiftKey = h;
  215.         this.buttonDown = m;
  216.         this.delta = k;
  217.         this.commandKey = l;
  218.         this.controlKey = n;
  219.         this.clickCount = p
  220.     };
  221.     fljs.inherits(flash.events.MouseEvent, flash.events.Event);
  222.     fljs.addConstants(flash.events.MouseEvent, {
  223.         CLICK: "click",
  224.         DOUBLE_CLICK: "doubleClick",
  225.         MOUSE_DOWN: "mouseDown",
  226.         MOUSE_MOVE: "mouseMove",
  227.         MOUSE_OUT: "mouseOut",
  228.         MOUSE_OVER: "mouseOver",
  229.         MOUSE_UP: "mouseUp",
  230.         MOUSE_WHEEL: "mouseWheel",
  231.         ROLL_OUT: "rollOut",
  232.         ROLL_OVER: "rollOver"
  233.     });
  234.     flash.events.FullScreenEvent = function () {};
  235.     fljs.addConstants(flash.events.FullScreenEvent, {
  236.         FULL_SCREEN: "fullScreen"
  237.     });
  238.     flash.events.KeyboardEvent = function (a, b, c, d, e, f, g, j, h) {
  239.         flash.events.Event(a, b, c);
  240.         this.charCode = d;
  241.         this.keyCode = e;
  242.         this.keyLocation = f;
  243.         this.ctrlKey = g;
  244.         this.altKey = j;
  245.         this.shiftKey = h
  246.     };
  247.     fljs.inherits(flash.events.KeyboardEvent, flash.events.Event);
  248.     fljs.addConstants(flash.events.KeyboardEvent, {
  249.         KEY_DOWN: "keyDown",
  250.         KEY_UP: "keyUp"
  251.     });
  252.     flash.events.FocusEvent = function () {};
  253.     fljs.addConstants(flash.events.FocusEvent, {
  254.         KEY_FOCUS_CHANGE: "keyFocusChange",
  255.         MOUSE_FOCUS_CHANGE: "mouseFocusChange"
  256.     });
  257.     flash.events.IEventDispatcher = function () {};
  258.     fljs.addMethods(flash.events.IEventDispatcher, {
  259.         addEventListener: function () {},
  260.         dispatchEvent: function () {},
  261.         hasEventListener: function () {},
  262.         removeEventListener: function () {},
  263.         willTrigger: function () {}
  264.     });
  265.     flash.events.EventDispatcher = function () {
  266.         this._listenerCount = {};
  267.         this._listeners = {}
  268.     };
  269.     fljs.addMethods(flash.events.EventDispatcher, {
  270.         addEventListener: function (a, b, c, d, e) {
  271.             a in this._listeners || (this._listeners[a] = []);
  272.             this._listeners[a].push([b, c, d, e]);
  273.             if (!this._listenerCount[a]) {
  274.                 this["__add" + a] && this["__add" + a]();
  275.                 this._listenerCount[a] = 0
  276.             }
  277.             this._listenerCount[a] += 1
  278.         },
  279.         dispatchEvent: function (a) {
  280.             var b = this._listeners[a.type];
  281.             for (var c in b) b[c][0](a)
  282.         },
  283.         hasEventListener: function (a) {
  284.             return this._listeners[a] && this._listeners[a].length > 0
  285.         },
  286.         removeEventListener: function (a, b, c) {
  287.             var d = this._listeners[a];
  288.             for (var e in d) d[e][0] == b && d[e][1] == c && d.splice(e, 1);
  289.             this._listenerCount[a] -= 1;
  290.             if (!this._listenerCount[a]) {
  291.                 this["__remove" + a] && this["__remove" + a]();
  292.                 this._listenerCount[a] = 0
  293.             }
  294.         },
  295.         willTrigger: function (a) {
  296.             return this.hasEventListener(a)
  297.         }
  298.     });
  299.     flash.geom = {};
  300.     flash.geom.ColorTransform = function (a, b, c, d, e, f, g, j) {
  301.         if (typeof a == "undefined") a = 1;
  302.         if (typeof b == "undefined") b = 1;
  303.         if (typeof c == "undefined") c = 1;
  304.         if (typeof d == "undefined") d = 1;
  305.         if (typeof e == "undefined") e = 0;
  306.         if (typeof f == "undefined") f = 0;
  307.         if (typeof g == "undefined") g = 0;
  308.         if (typeof j == "undefined") j = 0;
  309.         this.alphaMultiplier = d;
  310.         this.alphaOffset = j;
  311.         this.blueMultiplier = c;
  312.         this.blueOffset = g;
  313.         this.greenMultiplier = b;
  314.         this.greenOffset = f;
  315.         this.redMultiplier = a;
  316.         this.redOffset = e;
  317.         this.__default = this.alphaMultiplier == 1 && this.blueMultiplier == 1 && this.greenMultiplier == 1 && this.redMultiplier == 1 && this.alphaOffset == 0 && this.blueOffset == 0 && this.greenOffset == 0 && this.redOffset == 0;
  318.         fljs.console("cxform")
  319.     };
  320.     fljs.addMethods(flash.geom.ColorTransform, {
  321.         concat: function (a) {
  322.             return new flash.geom.ColorTransform(this.redMultiplier * a.redMultiplier, this.greenMultiplier * a.greenMultiplier, this.blueMultiplier * a.blueMultiplier, this.alphaMultiplier * a.alphaMultiplier, Math.min(255, this.redOffset + a.redOffset), Math.min(255, this.greenOffset + a.greenOffset), Math.min(255, this.blueOffset + a.blueOffset), Math.min(255, this.alphaOffset + a.alphaOffset))
  323.         },
  324.         toString: function () {},
  325.         __toSvgString: function () {
  326.             return [this.redMultiplier, 0, 0, 0, this.redOffset, 0, this.greenMultiplier, 0, 0, this.greenOffset, 0, 0, this.blueMultiplier, 0, this.blueOffset, 0, 0, 0, this.alphaMultiplier, this.alphaOffset].toString()
  327.         }
  328.     });
  329.     flash.geom.ColorTransform.identity = new flash.geom.ColorTransform;
  330.     flash.geom.Matrix = function (a, b, c, d, e, f) {
  331.         if (typeof a == "undefined") a = 1;
  332.         if (typeof b == "undefined") b = 0;
  333.         if (typeof c == "undefined") c = 0;
  334.         if (typeof d == "undefined") d = 1;
  335.         if (typeof e == "undefined") e = 0;
  336.         if (typeof f == "undefined") f = 0;
  337.         this.a = a;
  338.         this.b = b;
  339.         this.c = c;
  340.         this.d = d;
  341.         this.tx = e;
  342.         this.ty = f;
  343.         this.__default = this.a == 1 && this.b == 0 && this.c == 0 && this.d == 1 && this.tx == 0 && this.ty == 0
  344.     };
  345.     fljs.addMethods(flash.geom.Matrix, {
  346.         clone: function () {
  347.             return new flash.geom.Matrix(this.a, this.b, this.c, this.d, this.tx, this.ty)
  348.         },
  349.         concat: function (a) {
  350.             var b = this.a * a.b + this.b * a.d,
  351.                 c = this.c * a.a + this.d * a.c,
  352.                 d = this.c * a.b + this.d * a.d,
  353.                 e = this.tx * a.a + this.ty * a.c + a.tx,
  354.                 f = this.tx * a.b + this.ty * a.d + a.ty;
  355.             this.a = this.a * a.a + this.b * a.c;
  356.             this.b = b;
  357.             this.c = c;
  358.             this.d = d;
  359.             this.tx = e;
  360.             this.ty = f
  361.         },
  362.         createBox: function () {},
  363.         createGradientBox: function () {},
  364.         deltaTransformPoint: function () {},
  365.         identity: function () {},
  366.         invert: function () {},
  367.         rotate: function () {},
  368.         scale: function (a, b) {
  369.             this.a *= a;
  370.             this.d *= b;
  371.             this.tx *= a;
  372.             this.ty *= b
  373.         },
  374.         toString: function () {},
  375.         transformPoint: function () {},
  376.         translate: function () {},
  377.         __toSvgString: function () {
  378.             return "matrix(" + [this.a, this.b, this.c, this.d, this.tx, this.ty] + ")"
  379.         }
  380.     });
  381.     flash.geom.Transform = function (a) {
  382.         this._target = a;
  383.         this._colorTransform = new flash.geom.ColorTransform;
  384.         this._matrix = new flash.geom.Matrix
  385.     };
  386.     fljs.addMethods(flash.geom.Transform, {
  387.         setTarget: function (a) {
  388.             this._target = a
  389.         },
  390.         getColorTransform: function () {
  391.             return this._colorTransform
  392.         },
  393.         setColorTransform: function (a) {
  394.             this._colorTransform = a;
  395.             this._target.__setColorTransform(a)
  396.         },
  397.         getConcatenatedColorTransform: function () {
  398.             for (var a = this._colorTransform, b = this._target, c = fljs.Player.getInstance(); b && b != c;) {
  399.                 var d = b.getTransform().getColorTransform();
  400.                 if (!d.__default) {
  401.                     a = d;
  402.                     break
  403.                 }
  404.                 b = b.getParent()
  405.             }
  406.             return a
  407.         },
  408.         getMatrix: function () {
  409.             return this._matrix
  410.         },
  411.         setMatrix: function (a) {
  412.             this._matrix =
  413.             a;
  414.             this._target.__setMatrix(a)
  415.         },
  416.         notify: function () {
  417.             this._target.__setMatrix(this._matrix);
  418.             this._target.__setColorTransform(this._colorTransform)
  419.         }
  420.     });
  421.     flash.display.DisplayObject = function () {
  422.         flash.events.EventDispatcher.call(this);
  423.         this._alpha = 1;
  424.         this.blendMode_ = flash.display.BlendMode.NORMAL;
  425.         this._transform = new flash.geom.Transform(this);
  426.         this.enterFrameListener = fljs.bind(this.onEnterFrame_, this);
  427.         fljs.Player.getInstance().dispatcher.addEventListener(flash.events.Event.ENTER_FRAME, this.enterFrameListener);
  428.         this.__simpleColorTransform = true;
  429.         this.__asContext = null;
  430.         (this._clipElement = new fljs.dom.Element).create(fljs.dom.Namespace.Svg, "g");
  431.         this.id = "clip" + flash.display.DisplayObject.id++;
  432.         this._mouseEventHandler = fljs.bind(this.dispatchMouseEvent, this)
  433.     };
  434.     fljs.inherits(flash.display.DisplayObject, flash.events.EventDispatcher);
  435.     fljs.addMethods(flash.display.DisplayObject, {
  436.         getBounds: function (a) {
  437.             var b = this.element_.getElement().getBBox();
  438.             if (a == this) return new flash.geom.Rectangle(b.x, b.y, b.width, b.height);
  439.             else {
  440.                 var c = new flash.geom.Point(b.x, b.y);
  441.                 c = a.globalToLocal(this.localToGlobal(c));
  442.                 b = new flash.geom.Point(b.x + b.width, b.y + b.height);
  443.                 b = a.globalToLocal(this.localToGlobal(b));
  444.                 return new flash.geom.Rectangle(c.x, c.y, b.x - c.x, b.y - c.y)
  445.             }
  446.         },
  447.         getRect: function () {},
  448.         globalToLocal: function (a) {
  449.             var b = this._svgCtm();
  450.             a = this._SvgApplyMatrixToPoint(a, b);
  451.             return new flash.geom.Point(a.x, a.y)
  452.         },
  453.         hitTestObject: function (a) {
  454.             a = a.getBounds(this);
  455.             var b = this.getBounds(this);
  456.             return a.x + a.width <= b.x && a.x >= b.x + b.width && a.y + a.height <= b.y && a.y >= b.y + b.height
  457.         },
  458.         hitTestPoint: function (a, b) {
  459.             a = new flash.geom.Point(a, b);
  460.             a = this.globalToLocal(a);
  461.             b = this.getBounds(this);
  462.             return a.x >= b.x && a.x <= b.x + b.width && a.y > b.y && a.y <= b.y + b.height
  463.         },
  464.         _svgApplyMatrixToPoint: function (a, b) {
  465.             var c = fljs.Player.getInstance().element.getElement().createSVGPoint();
  466.             c.x = a.x;
  467.             c.y = a.y;
  468.             return c = c.matrixTransform(b)
  469.         },
  470.         _svgCtm: function () {
  471.             var a = this.element_.getElement(),
  472.                 b;
  473.             try {
  474.                 b = a.parentNode.getScreenCTM()
  475.             } catch (c) {
  476.                 b = getScreenCTM(a.parentNode)
  477.             }
  478.             return b
  479.         },
  480.         localToGlobal: function (a) {
  481.             var b = this._svgCtm();
  482.             a = this._SvgApplyMatrixToPoint(a, b.inverse());
  483.             return new flash.geom.Point(a.x, a.y)
  484.         },
  485.         onEnterFrame_: function () {},
  486.         __setColorTransform: function (a) {
  487.             this.element_.getElement().setAttributeNS(null, "opacity", a.alphaMultiplier);
  488.             this.element_.getElement().setAttributeNS(null, "stroke-opacity", a.alphaMultiplier);
  489.             this.element_.getElement().setAttributeNS(null, "fill-opacity", a.alphaMultiplier);
  490.             this.__simpleColorTransform = true
  491.         },
  492.         setColorTransform: function () {},
  493.         __setHitTarget: function (a) {
  494.             this.setVisible(false);
  495.             this.element_.getElement().setAttributeNS(null, "pointer-events", "all");
  496.             this._hitTargetFor = a;
  497.             this.addEventListeners()
  498.         },
  499.         makeClipPath: function () {
  500.             this.getClipPath()
  501.         },
  502.         getClipPath: function () {
  503.             this._clipPath || this.buildClipPath();
  504.             return this._clipPath
  505.         },
  506.         buildClipPath: function () {
  507.             var a = new fljs.dom.Element;
  508.             a.create(fljs.dom.Namespace.Svg, "clipPath");
  509.             var b = "clip" + flash.display.DisplayObject.id++;
  510.             a.sets([["id", b], [null, "clipPathUnits", "userSpaceOnUse"]]);
  511.             a.update();
  512.             this.__clipElement = a;
  513.             a = this._clipPath = new fljs.dom.Element;
  514.             a.create(fljs.dom.Namespace.Svg, "g");
  515.             a.set(null, "clip-path", "url(#" + b + ")");
  516.             a.update();
  517.             this._clipElement.element.parentNode.replaceChild(a.element, this._clipElement.element);
  518.             this._clipElement = a;
  519.             this.buildClipParts(this);
  520.             fljs.Player.getInstance().defs.append(this.__clipElement)
  521.         },
  522.         buildClipParts: function (a) {
  523.             if (!this._parentClipPaths) this._parentClipPaths = {};
  524.             this._parentClipPaths[a.id] = a
  525.         },
  526.         __setMatrix: function (a) {
  527.             this.element_.getElement().setAttributeNS(null, "transform", a.__toSvgString());
  528.             if (this._parentClipPaths) for (var b in this._parentClipPaths) {
  529.                 a = this._parentClipPaths[b];
  530.                 this.updateClipParts && this.updateClipParts(a)
  531.             }
  532.         },
  533.         addEventListeners: function () {
  534.             var a = this._buttonEventHandler = fljs.bind(this._hitTargetFor.updateButtonState, this._hitTargetFor),
  535.                 b = flash.events.MouseEvent;
  536.             this.addEventListener(b.CLICK, a, true);
  537.             this.addEventListener(b.MOUSE_OVER, a, true);
  538.             this.addEventListener(b.MOUSE_OUT, a, true);
  539.             this.addEventListener(b.MOUSE_DOWN, a, true);
  540.             this.addEventListener(b.MOUSE_UP, a, true)
  541.         },
  542.         removeFromStage: function () {
  543.             fljs.Player.getInstance().dispatcher.removeEventListener(flash.events.Event.ENTER_FRAME, this.enterFrameListener)
  544.         },
  545.         updateClipDepth: function (a) {
  546.             if (this.__clipDepth) {
  547.                 if (a != this.__clipDepth) if (a < this.__clipDepth) {;
  548.                 } else if (a > this.__clipDepth) {}
  549.             } else {
  550.                 this.makeClipPath();
  551.                 this.__clipDepth = a;
  552.                 var b = this._parent;
  553.                 b.element_.getElement();
  554.                 var c = b.clipPathForDepth(this._depth);
  555.                 c && c.getClipPath();
  556.                 var d = document.createDocumentFragment();
  557.                 for (var e in b.displayList_) {
  558.                     var f = b.displayList_[e].displayObject;
  559.                     if (e > this._depth && e <= a && f._mask == c) {
  560.                         d.appendChild(f._clipElement.element);
  561.                         f._mask = this
  562.                     }
  563.                 }
  564.                 this.getClipPath().element.appendChild(d)
  565.             }
  566.         },
  567.         getName: function () {
  568.             return this._name
  569.         },
  570.         setName: function (a) {
  571.             this._parent && this._parent.setChildName(this, a);
  572.             this._name = a
  573.         },
  574.         getStage: function () {
  575.             return this._parent && this._parent.getStage ? this._parent.getStage() : null
  576.         },
  577.         getTransform: function () {
  578.             return this._transform
  579.         },
  580.         setTransform: function (a) {
  581.             this._transform = a;
  582.             this._transform.setTarget(this);
  583.             this._transform.notify()
  584.         },
  585.         getMatrix: function () {
  586.             return this._transform._matrix
  587.         },
  588.         setMatrix: function (a) {
  589.             this._transform.setMatrix(a)
  590.         },
  591.         getVisible: function () {
  592.             return this._visible
  593.         },
  594.         setVisible: function (a) {
  595.             a = (this._visible = !! a) ? "visible" : "hidden";
  596.             this.element_.getElement().setAttributeNS(null, "visibility", a)
  597.         },
  598.         getParent: function () {
  599.             return this._parent
  600.         },
  601.         setParent: function (a) {
  602.             if (this._parent != a) this._parent = a
  603.         },
  604.         getAs2Object: function () {
  605.             if (!this._as2Object) this._as2Object = new fljs.swf.act.MovieClip(this);
  606.             return this._as2Object
  607.         },
  608.         dispatchMouseEvent: function (a) {
  609.             var b = {};
  610.             b.click = flash.events.MouseEvent.CLICK;
  611.             b.touchend = flash.events.MouseEvent.CLICK;
  612.             b.mouseover = flash.events.MouseEvent.MOUSE_OVER;
  613.             b.mouseout = flash.events.MouseEvent.MOUSE_OUT;
  614.             b.mousedown = flash.events.MouseEvent.MOUSE_DOWN;
  615.             b.mouseup = flash.events.MouseEvent.MOUSE_UP;
  616.             b.touchstart = flash.events.MouseEvent.MOUSE_DOWN;
  617.             b.touchend = flash.events.MouseEvent.MOUSE_UP;
  618.             this.dispatchEvent(new flash.events.MouseEvent(b[a.type]))
  619.         },
  620.         getWidth: function () {
  621.             return this.element_.element.getBBox().width
  622.         },
  623.         setWidth: function (a) {
  624.             var b = this.getWidth(),
  625.                 c = this.getMatrix(),
  626.                 d = new flash.geom.Matrix;
  627.             d.scale(a / b, 1);
  628.             d.concat(c);
  629.             d.tx = c.tx;
  630.             d.ty = c.ty;
  631.             this.setMatrix(d)
  632.         },
  633.         getHeight: function () {
  634.             return this.element_.element.getBBox().height
  635.         }
  636.     });
  637.     fljs.addEvents(flash.display.DisplayObject, [[flash.events.MouseEvent.MOUSE_OVER, function () {
  638.         this.element_.element.addEventListener("mouseover", this._mouseEventHandler, false)},function () {
  639.         this.element_.element.removeEventListener("mouseover", this._mouseEventHandler)}], [flash.events.MouseEvent.MOUSE_OUT, function () {
  640.         this.element_.element.addEventListener("mouseout", this._mouseEventHandler, false)},function () {
  641.         this.element_.element.removeEventListener("mouseout", this._mouseEventHandler)}], [flash.events.MouseEvent.MOUSE_DOWN,
  642.         function () {
  643.         this.element_.element.addEventListener("mousedown", this._mouseEventHandler, false)},function () {
  644.         this.element_.element.removeEventListener("mousedown", this._mouseEventHandler)}], [flash.events.MouseEvent.MOUSE_UP, function () {
  645.         this.element_.element.addEventListener("mouseup", this._mouseEventHandler, false)},function () {
  646.         this.element_.element.removeEventListener("mouseup", this._mouseEventHandler)}]]);
  647.     flash.display.DisplayObject.id = 1;
  648.     flash.display.InteractiveObject = function () {
  649.         flash.display.DisplayObject.call(this)
  650.     };
  651.     fljs.inherits(flash.display.InteractiveObject, flash.display.DisplayObject);
  652.     flash.display.DisplayObjectContainer = function () {
  653.         flash.display.InteractiveObject.call(this);
  654.         this.element_ = this._clipElement;
  655.         this.graphics_ = new flash.display.Graphics(this);
  656.         this.displayList_ = [];
  657.         this.__childNames = {}
  658.     };
  659.     fljs.inherits(flash.display.DisplayObjectContainer, flash.display.InteractiveObject);
  660.     fljs.addMethods(flash.display.DisplayObjectContainer, {
  661.         addChild: function (a) {
  662.             var b = 0;
  663.             for (var c in this.displayList_) b = Math.max(c, b);
  664.             return this.addChildAt(a, b + 1)
  665.         },
  666.         addChildAt: function (a, b) {
  667.             a._depth = b;
  668.             a.setParent(this);
  669.             var c = this.element_.getElement(),
  670.                 d = this.clipPathForDepth(b);
  671.             if (d) c = d.getClipPath().element;
  672.             var e = this.displayList_[b],
  673.                 f;
  674.             if (e) f = e.displayObject;
  675.             if (e && !f.__clipDepth) {
  676.                 c.replaceChild(a._clipElement.element, f._clipElement.element);
  677.                 f.removeFromStage()
  678.             } else {
  679.                 e && this.removeChildAt(b);
  680.                 if ((e = this.dispObjAfterIndex(b)) && d) if (e._mask != d) e = null;
  681.                 e ? c.insertBefore(a._clipElement.element, e._clipElement.element) : c.appendChild(a._clipElement.element)
  682.             }
  683.             this.displayList_[b] = {
  684.                 displayObject: a
  685.             };
  686.             a.__name && this.setChildName(a, null, a.__name);
  687.             if (this._parentClipPaths) for (var g in this._parentClipPaths) a.buildClipParts(this._parentClipPaths[g]);
  688.             if (d) a._mask = d;
  689.             return a
  690.         },
  691.         dispObjAfterIndex: function (a) {
  692.             var b, c = null;
  693.             for (var d in this.displayList_) if (d > a) {
  694.                 b = c ? Math.min(b, d) : d;
  695.                 c = this.displayList_[b].displayObject
  696.             }
  697.             return c
  698.         },
  699.         areInaccessibleObjectsUnderPoint: function () {
  700.             return false
  701.         },
  702.         contains: function () {},
  703.         getChildAt: function (a) {
  704.             return (a = this.displayList_[a]) ? a.displayObject : null
  705.         },
  706.         getChildByName: function (a) {
  707.             return this.childrenByName_[a]
  708.         },
  709.         removeChildAt: function (a) {
  710.             var b = this.displayList_[a];
  711.             if (b) {
  712.                 b = b.displayObject;
  713.                 var c;
  714.                 c = (c = this.clipPathForDepth(a)) ? c.getClipPath().element : this.element_.getElement();
  715.                 var d = b._clipElement.element;
  716.                 if (b.__clipDepth) {
  717.                     b.getClipPath();
  718.                     var e = document.createDocumentFragment();
  719.                     for (var f in this.displayList_) {
  720.                         var g = this.displayList_[f].displayObject;
  721.                         if (g._mask == b) {
  722.                             g._mask = null;
  723.                             e.appendChild(g._clipElement.element)
  724.                         }
  725.                     }
  726.                     c.replaceChild(e, d)
  727.                 } else c.removeChild(d);
  728.                 b.setParent(null);
  729.                 b.removeFromStage();
  730.                 b._name && delete this.__childNames[b._name];
  731.                 delete this.displayList_[a];
  732.                 return b
  733.             } else fljs.console("doc").info("removeChildAt:" + a + " failed")
  734.         },
  735.         removeChildren: function () {
  736.             for (var a in this.displayList_) this.removeChildAt(a)
  737.         },
  738.         setChildIndex: function () {},
  739.         swapChildren: function () {},
  740.         swapChildrenAt: function () {},
  741.         setChildName: function (a, b) {
  742.             a._name && delete this.__childNames[a._name];
  743.             this.__childNames[b] = a
  744.         },
  745.         buildClipParts: function (a) {
  746.             fljs.base(this, "buildClipParts", a);
  747.             this.graphics_.buildClipParts(a);
  748.             for (var b in this.displayList_) {
  749.                 var c = this.displayList_[b].displayObject;
  750.                 c.buildClipParts && c.buildClipParts(a)
  751.             }
  752.         },
  753.         updateClipParts: function (a) {
  754.             this.graphics_.updateClipParts(a);
  755.             for (var b in this.displayList_) {
  756.                 var c = this.displayList_[b].displayObject;
  757.                 c.updateClipParts && c.updateClipParts(a)
  758.             }
  759.         },
  760.         updateColorTransform: function () {
  761.             for (var a in this.displayList_) {
  762.                 var b = this.displayList_[a].displayObject;
  763.                 b.updateColorTransform && b.updateColorTransform()
  764.             }
  765.         },
  766.         __setColorTransform: function (a) {
  767.             fljs.base(this, "__setColorTransform", a);
  768.             this.updateColorTransform()
  769.         },
  770.         clipPathForDepth: function (a) {
  771.             var b = -1;
  772.             for (var c in this.displayList_) {
  773.                 var d = this.displayList_[c].displayObject;
  774.                 if (d.__clipDepth) if (a > c && a <= d.__clipDepth) b = Math.max(c, b)
  775.             }
  776.             return b > -1 ? this.displayList_[b].displayObject : null
  777.         }
  778.     });
  779.     flash.display.Stage = function () {
  780.         flash.display.DisplayObjectContainer.call(this);
  781.         var a = fljs.Player.getInstance(),
  782.             b = a.header.FrameSize.Xmax - a.header.FrameSize.Xmin,
  783.             c = a.header.FrameSize.Ymax - a.header.FrameSize.Ymin;
  784.         this._clipElement.sets([[null, "width", b], [null, "height", c]]);
  785.         this._clipElement.update();
  786.         this.align_ = flash.display.StageAlign.TOP_LEFT;
  787.         this.displayState_ = flash.display.StageDisplayState.NORMAL;
  788.         this.frameRate_ = 30;
  789.         a = fljs.Player.getInstance();
  790.         b = a.header.FrameSize.Xmax - a.header.FrameSize.Xmin;
  791.         c =
  792.         a.header.FrameSize.Ymax - a.header.FrameSize.Ymin;
  793.         a = this._bg = new fljs.dom.Element;
  794.         a.create(fljs.dom.Namespace.Svg, "rect");
  795.         a.sets([[null, "x", 0], [null, "y", 0], [null, "width", b], [null, "height", c], [null, "stroke", "none"], [null, "fill", this.colorToSvgString(0)]]);
  796.         a.update();
  797.         (b = this._clipElement.element.firstChild) ? this._clipElement.getElement().insertBefore(a.element, b) : this._clipElement.getElement().appendChild(a.element)
  798.     };
  799.     fljs.inherits(flash.display.Stage, flash.display.DisplayObjectContainer);
  800.     fljs.addMethods(flash.display.Stage, {
  801.         initialize: function () {
  802.             this.setBackgroundColor_(0)
  803.         },
  804.         invalidate: function () {},
  805.         isFocusInaccessible: function () {},
  806.         runFrameLoop_: function () {},
  807.         onEnterFrame_: function () {
  808.             for (var a in this.children_) this.children_.onEnterFrame()
  809.         },
  810.         colorToSvgString: function (a) {
  811.             return "rgb(" + [a >> 16 & 255, a >> 8 & 255, a & 255] + ")"
  812.         },
  813.         setBackgroundColor_: function (a) {
  814.             this._bg.set(null, "fill", this.colorToSvgString(a));
  815.             this._bg.update()
  816.         },
  817.         onMouseMove: function (a) {
  818.             this._mouseX = a.clientX;
  819.             this._mouseY = a.clientY
  820.         },
  821.         getStage: function () {
  822.             return this
  823.         },
  824.         getFrameRate: function () {
  825.             return this.frameRate_
  826.         },
  827.         setFrameRate: function (a) {
  828.             this.frameRate_ = a = Math.max(Math.min(a, 1E3), 0.01)
  829.         }
  830.     });
  831.     flash.display.GradientType = function () {};
  832.     fljs.addConstants(flash.display.GradientType, {
  833.         LINEAR: "linear",
  834.         RADIAL: "radial"
  835.     });
  836.     flash.display.SpreadMethod = function () {};
  837.     fljs.addConstants(flash.display.SpreadMethod, {
  838.         PAD: "pad",
  839.         REFLECT: "reflect",
  840.         REPEAT: "repeat"
  841.     });
  842.     flash.display.InterpolationMethod = function () {};
  843.     fljs.addConstants(flash.display.InterpolationMethod, {
  844.         LINEAR_RGB: "linearRGB",
  845.         RGB: "rgb"
  846.     });
  847.     flash.display.Graphics = function (a) {
  848.         this.__target = a;
  849.         this.setDisplayObject(a);
  850.         this._parentClipPaths = {};
  851.         this._clipParts = {};
  852.         this._parts = []
  853.     };
  854.     fljs.addMethods(flash.display.Graphics, {
  855.         clear: function () {
  856.             for (var a in this._parts) this.parentEl.removeChild(this._parts[a]);
  857.             this._parts = [];
  858.             this._clipParts = {};
  859.             this._parentClipPaths = {}
  860.         },
  861.         opacityWithXform: function (a) {
  862.             var b = this.displayObject_.getTransform().getConcatenatedColorTransform();
  863.             return b.__default ? a : Math.max(0, Math.min(255, Math.round(a * 255 * b.alphaMultiplier + b.alphaOffset))) / 255
  864.         },
  865.         setDisplayObject: function (a) {
  866.             this.displayObject_ = a;
  867.             this.parentEl = this.displayObject_.element_.element
  868.         },
  869.         __colorToSvgString: function (a) {
  870.             var b =
  871.             a >> 16 & 255,
  872.                 c = a >> 8 & 255;
  873.             a = a & 255;
  874.             if (!this.displayObject_.getTransform().getConcatenatedColorTransform().__default) {
  875.                 var d = this.displayObject_.getTransform().getConcatenatedColorTransform();
  876.                 b = Math.max(0, Math.min(255, Math.round(b * d.redMultiplier + d.redOffset)));
  877.                 c = Math.max(0, Math.min(255, Math.round(c * d.greenMultiplier + d.greenOffset)));
  878.                 a = Math.max(0, Math.min(255, Math.round(a * d.blueMultiplier + d.blueOffset)))
  879.             }
  880.             return "rgb(" + [b, c, a] + ")"
  881.         },
  882.         clipTransforms: function (a) {
  883.             for (var b = [], c = this.displayObject_;;) {
  884.                 var d = c.getMatrix().__toSvgString();
  885.                 b.push(d);
  886.                 if (c == a) break;
  887.                 c = c.getParent()
  888.             }
  889.             return b
  890.         },
  891.         buildClipParts: function (a) {
  892.             this._parentClipPaths[a.id] = a;
  893.             var b = this.clipTransforms(a).join(" ");
  894.             if (this.tag) {
  895.                 var c = this.tag.def.paths;
  896.                 for (var d in c) {
  897.                     var e = c[d],
  898.                         f;
  899.                     f = fljs.agent.browser == "Safari" ? e.clone() : e.use();
  900.                     f.set(null, "transform", b);
  901.                     f.update();
  902.                     this.addClipPart(a, e, f)
  903.                 }
  904.             }
  905.         },
  906.         addClipPart: function (a, b, c) {
  907.             this._clipParts[a.id] || (this._clipParts[a.id] = {});
  908.             this._clipParts[a.id][b.id] = c;
  909.             a.__clipElement.append(c)
  910.         },
  911.         updateClipParts: function (a) {
  912.             var b = this.clipTransforms(a);
  913.             for (a = a;;) {
  914.                 if (this._parentClipPaths[a.id]) {
  915.                     var c = b.join(" "),
  916.                         d = this._clipParts[a.id];
  917.                     for (var e in d) {
  918.                         var f = d[e];
  919.                         f.set(null, "transform", c);
  920.                         f.update()
  921.                     }
  922.                 }
  923.                 if (!a || !a.getTransform) break;
  924.                 c = a.getMatrix().__toSvgString();
  925.                 b.push(c);
  926.                 a = a.getParent()
  927.             }
  928.         },
  929.         useTag: function (a, b, c) {
  930.             var d = this.displayObject_.getTransform().getConcatenatedColorTransform();
  931.             d.__default || (b = d);
  932.             this.tag = a;
  933.             this.cloning = c;
  934.             this.use = a.def.use(b, null, this.cloning);
  935.             this.parentEl.appendChild(this.use.element)
  936.         },
  937.         setColorTransform: function (a) {
  938.             if (this.use) {
  939.                 var b =
  940.                 this.use.element;
  941.                 this.use = this.tag.def.use(a, null, this.cloning);
  942.                 this.parentEl.replaceChild(this.use.element, b)
  943.             }
  944.         }
  945.     });
  946.     flash.display.Graphics.patternId = 1;
  947.     flash.display.Graphics.pathId = 1;
  948.     flash.display.IBitmapDrawable = function () {};
  949.     flash.display.StageAlign = function () {};
  950.     fljs.addConstants(flash.display.StageAlign, {
  951.         TOP: "top",
  952.         BOTTOM: "bottom",
  953.         LEFT: "left",
  954.         RIGHT: "right",
  955.         TOP_LEFT: "topLeft",
  956.         TOP_RIGHT: "topRight",
  957.         BOTTOM_LEFT: "bottomLeft",
  958.         BOTTOM_RIGHT: "bottomRight"
  959.     });
  960.     flash.display.StageDisplayState = function () {};
  961.     fljs.addConstants(flash.display.StageDisplayState, {
  962.         FULL_SCREEN: "fullScreen",
  963.         NORMAL: "normal"
  964.     });
  965.     fljs.swf = {};
  966.     fljs.swf.tag = {};
  967.     fljs.swf.tag.End = function () {};
  968.     fljs.addMethods(fljs.swf.tag.End, {
  969.         read: function () {},
  970.         evaluate: function () {}
  971.     });
  972.     fljs.swf.tag.ShowFrame = function () {};
  973.     fljs.addMethods(fljs.swf.tag.ShowFrame, {
  974.         read: function () {},
  975.         evaluate: function () {}
  976.     });
  977.     flash.display.Shape = function () {
  978.         flash.display.DisplayObject.call(this);
  979.         this.element_ = this._clipElement;
  980.         this.graphics_ = new flash.display.Graphics(this)
  981.     };
  982.     fljs.inherits(flash.display.Shape, flash.display.DisplayObject);
  983.     fljs.addMethods(flash.display.Shape, {
  984.         buildClipParts: function (a) {
  985.             fljs.base(this, "buildClipParts", a);
  986.             this.graphics_.buildClipParts(a)
  987.         },
  988.         updateClipParts: function (a) {
  989.             this.graphics_.updateClipParts(a)
  990.         },
  991.         useTag: function (a, b, c) {
  992.             this.tag = a;
  993.             this.graphics_.useTag(a, b, c);
  994.             if (b) {
  995.                 this.setColorTransform(b);
  996.                 this.element_.getElement().setAttributeNS(null, "opacity", b.alphaMultiplier)
  997.             }
  998.         },
  999.         updateColorTransform: function () {
  1000.             this.graphics_.setColorTransform(this.getTransform().getConcatenatedColorTransform())
  1001.         },
  1002.         __setColorTransform: function (a) {
  1003.             fljs.base(this, "__setColorTransform", a);
  1004.             this.graphics_.setColorTransform(a)
  1005.         }
  1006.     });
  1007.     fljs.swf.tag.PlaceObject = function () {};
  1008.     fljs.addMethods(fljs.swf.tag.PlaceObject, {
  1009.         read: function (a, b) {
  1010.             var c = a.stream.byteIndex;
  1011.             this.CharacterId = a.readUI16();
  1012.             this.Depth = a.readUI16();
  1013.             this.Matrix = a.readMATRIX();
  1014.             a.stream.align();
  1015.             if (a.stream.byteIndex != c + b.TagLength) {
  1016.                 fljs.console("parse").info("reading cxform");
  1017.                 this.ColorTransform = a.readCXFORM()
  1018.             }
  1019.             a.stream.align()
  1020.         },
  1021.         buildMatrix_: function () {
  1022.             return new flash.geom.Matrix(this.Matrix.ScaleX, this.Matrix.RotateSkew0, this.Matrix.RotateSkew1, this.Matrix.ScaleY, this.Matrix.TranslateX, this.Matrix.TranslateY)
  1023.         },
  1024.         buildColorTransform_: function () {
  1025.             var a = this.ColorTransform;
  1026.             return new flash.geom.ColorTransform(a.RedMultTerm, a.GreenMultTerm, a.BlueMultTerm, a.AlphaMultTerm, a.RedAddTerm, a.GreenAddTerm, a.BlueAddTerm, a.AlphaAddTerm)
  1027.         },
  1028.         evaluate: function (a, b, c, d) {
  1029.             b = fljs.console("eval");
  1030.             c = a.dictionary[this.CharacterId];
  1031.             var e;
  1032.             if (c instanceof fljs.swf.tag.DefineShape || c instanceof fljs.swf.tag.DefineShape2) {
  1033.                 e = new flash.display.Shape;
  1034.                 e.getTransform().setMatrix(this.buildMatrix_());
  1035.                 this.ColorTransform && e.getTransform().setColorTransform(this.buildColorTransform_());
  1036.                 e.useTag(c)
  1037.             } else if (c instanceof fljs.swf.tag.DefineBitsJPEG2) {
  1038.                 e = c.buildBitmap(fljs.Player.getInstance());
  1039.                 e.getTransform().setMatrix(this.buildMatrix_())
  1040.             } else if (c instanceof fljs.swf.tag.DefineButton2) {
  1041.                 e = c.build(a);
  1042.                 e.getTransform().setMatrix(this.buildMatrix_())
  1043.             }
  1044.             e ? d.addChildAt(e, this.Depth) : b.info("not recognized: " + [this.CharacterId, this.Name])
  1045.         }
  1046.     });
  1047.     fljs.swf.tag.RemoveObject = function () {};
  1048.     fljs.addMethods(fljs.swf.tag.RemoveObject, {
  1049.         read: function (a) {
  1050.             this.CharacterId = a.readUI16();
  1051.             this.Depth = a.readUI16()
  1052.         },
  1053.         evaluate: function (a, b, c, d) {
  1054.             d.removeChildAt(this.Depth)
  1055.         }
  1056.     });
  1057.     fljs.swf.tag.PlaceObject2 = function () {};
  1058.     fljs.addMethods(fljs.swf.tag.PlaceObject2, {
  1059.         read: function (a) {
  1060.             this.startByteIndex = a.stream.byteIndex;
  1061.             fljs.console("parse");
  1062.             this.PlaceFlagHasClipActions = a.readUB(1);
  1063.             this.PlaceFlagHasClipDepth = a.readUB(1);
  1064.             this.PlaceFlagHasName = a.readUB(1);
  1065.             this.PlaceFlagHasRatio = a.readUB(1);
  1066.             this.PlaceFlagHasColorTransform = a.readUB(1);
  1067.             this.PlaceFlagHasMatrix = a.readUB(1);
  1068.             this.PlaceFlagHasCharacter = a.readUB(1);
  1069.             this.PlaceFlagMove = a.readUB(1);
  1070.             this.Depth = a.readUI16();
  1071.             if (this.PlaceFlagHasCharacter) this.CharacterId = a.readUI16();
  1072.             if (this.PlaceFlagHasMatrix) this.Matrix = a.readMATRIX();
  1073.             if (this.PlaceFlagHasColorTransform) this.ColorTransform = a.readCXFORMWITHALPHA();
  1074.             if (this.PlaceFlagHasRatio) this.Ratio = a.readUI16();
  1075.             if (this.PlaceFlagHasName) this.Name = a.readSTRING();
  1076.             if (this.PlaceFlagHasClipDepth) this.ClipDepth = a.readUI16();
  1077.             if (this.PlaceFlagHasClipActions) this.ClipActions = a.readCLIPACTIONS()
  1078.         },
  1079.         buildMatrix_: function () {
  1080.             return new flash.geom.Matrix(this.Matrix.ScaleX, this.Matrix.RotateSkew0, this.Matrix.RotateSkew1, this.Matrix.ScaleY, this.Matrix.TranslateX, this.Matrix.TranslateY)
  1081.         },
  1082.         buildColorTransform_: function () {
  1083.             var a = this.ColorTransform;
  1084.             return new flash.geom.ColorTransform(a.RedMultTerm, a.GreenMultTerm, a.BlueMultTerm, a.AlphaMultTerm, a.RedAddTerm, a.GreenAddTerm, a.BlueAddTerm, a.AlphaAddTerm)
  1085.         },
  1086.         evaluate: function (a, b, c, d) {
  1087.             var e;
  1088.             c = fljs.console("place");
  1089.             if (this.PlaceFlagMove && this.PlaceFlagHasCharacter) e = d.getChildAt(this.Depth);
  1090.             var f;
  1091.             if (this.ColorTransform) f = this.buildColorTransform_();
  1092.             if (this.PlaceFlagHasCharacter) {
  1093.                 b = a.dictionary[this.CharacterId];
  1094.                 var g;
  1095.                 if (b instanceof fljs.swf.tag.DefineShape || b instanceof fljs.swf.tag.DefineEditText || b instanceof fljs.swf.tag.DefineText || b instanceof fljs.swf.tag.DefineSprite || b instanceof fljs.swf.tag.DefineButton2) g = b.build(a, f);
  1096.                 if (g) {
  1097.                     this.Matrix && g.getTransform().setMatrix(this.buildMatrix_());
  1098.                     d.addChildAt(g, this.Depth);
  1099.                     if (e) this.Matrix || g.getTransform().setMatrix(e.getTransform().getMatrix());
  1100.                     if (g.__clipActions == null) g.__clipActions = {};
  1101.                     if (this.ClipActions) {
  1102.                         f = fljs.swf.ClipEventFlags;
  1103.                         d = this.ClipActions.ClipActionRecords;
  1104.                         for (var j in d) {
  1105.                             e = d[j];
  1106.                             for (var h in fljs.swf.ClipEventFlags) if (e.EventFlags & f[h]) {
  1107.                                 g.__clipActions[h] || (g.__clipActions[h] = []);
  1108.                                 g.__clipActions[h].push(e)
  1109.                             }
  1110.                         }
  1111.                     }
  1112.                     if (b instanceof fljs.swf.tag.DefineSprite || b instanceof fljs.swf.tag.DefineButton2) g.onCreate()
  1113.                 } else {
  1114.                     c.info("not recognized: " + [this.CharacterId, this.Name]);
  1115.                     e && d.removeChildAt(this.Depth)
  1116.                 }
  1117.             } else if (this.PlaceFlagMove) {
  1118.                 g = d.getChildAt(this.Depth);
  1119.                 if (!g) return;
  1120.                 h = false;
  1121.                 if (this.Matrix) {
  1122.                     g.getTransform().setMatrix(this.buildMatrix_());
  1123.                     h = true
  1124.                 }
  1125.                 if (f) {
  1126.                     g.getTransform().setColorTransform(f);
  1127.                     h = true
  1128.                 }
  1129.                 if (h && a.renderTextAsGlyphs) if (g.text_ || g._text) if (g.getParent()) {
  1130.                     j = 0;
  1131.                     h = g._clipElement.element;
  1132.                     h = b = h.parentNode;
  1133.                     b = h.parentNode;
  1134.                     d = h.nextSibling;
  1135.                     b.removeChild(h);
  1136.                     f && g.getTransform().setColorTransform(f);
  1137.                     this.Matrix && g.getTransform().setMatrix(this.buildMatrix_());
  1138.                     d ? b.insertBefore(h, d) : b.appendChild(h)
  1139.                 }
  1140.             }
  1141.             if (g) {
  1142.                 this.PlaceFlagHasClipDepth && g.updateClipDepth(this.ClipDepth);
  1143.                 this.Name && g.setName(this.Name);
  1144.                 if (g && this.PlaceFlagHasCharacter) {
  1145.                     if (g.__clipActions.ClipEventInitialize) {
  1146.                         f = [];
  1147.                         for (j in g.__clipActions.ClipEventInitialize) f.push.apply(f, g.__clipActions.ClipEventInitialize[j].Actions);
  1148.                         a.doActions(g, f)
  1149.                     }
  1150.                     if (g.__clipActions.ClipEventLoad) {
  1151.                         f = [];
  1152.                         for (j in g.__clipActions.ClipEventLoad) f.push.apply(f, g.__clipActions.ClipEventLoad[j].Actions);
  1153.                         a.doActions(g, f)
  1154.                     }
  1155.                     if (g.__clipActions.ClipEventEnterFrame) {
  1156.                         f = [];
  1157.                         for (j in g.__clipActions.ClipEventEnterFrame) f.push.apply(f, g.__clipActions.ClipEventEnterFrame[j].Actions);
  1158.                         a.dispatcher.addEventListener(flash.events.Event.ENTER_FRAME, fljs.bind(a.doActions, a, g, f))
  1159.                     }
  1160.                 }
  1161.             }
  1162.         }
  1163.     });
  1164.     fljs.swf.build = {};
  1165.     fljs.swf.build.SvgUtils = function () {};
  1166.     fljs.addMethods(fljs.swf.build.SvgUtils, {
  1167.         toSvgColorString: function (a) {
  1168.             return "rgb(" + [a.Red, a.Green, a.Blue] + ")"
  1169.         },
  1170.         toSvgOpacity: function (a) {
  1171.             return a.Alpha == null ? 1 : a.Alpha / 255
  1172.         },
  1173.         toSvgMatrixString: function (a) {
  1174.             return (new flash.geom.Matrix(a.ScaleX, a.RotateSkew0, a.RotateSkew1, a.ScaleY, a.TranslateX, a.TranslateY)).__toSvgString()
  1175.         },
  1176.         toMatrix: function (a) {
  1177.             return new flash.geom.Matrix(a.ScaleX, a.RotateSkew0, a.RotateSkew1, a.ScaleY, a.TranslateX, a.TranslateY)
  1178.         }
  1179.     });
  1180.     fljs.swf.def = {};
  1181.     fljs.swf.def.BitmapDef = function () {
  1182.         (this.element = new fljs.dom.Element).create(fljs.dom.Namespace.Svg, "image")
  1183.     };
  1184.     fljs.addMethods(fljs.swf.def.BitmapDef, {
  1185.         setCharaId: function (a) {
  1186.             this.id = "bitmap-" + a;
  1187.             this.ref = "#" + this.id;
  1188.             this.element.set("id", this.id)
  1189.         },
  1190.         define: function () {
  1191.             this.element.update();
  1192.             this._define(this.element.element)
  1193.         },
  1194.         use: function () {
  1195.             var a = new fljs.dom.Element;
  1196.             a.create(fljs.dom.Namespace.Svg, "use");
  1197.             a.sets([[fljs.dom.Namespace.Xlink, "xlink:href", this.ref]]);
  1198.             a.update();
  1199.             return a
  1200.         },
  1201.         _define: function (a) {
  1202.             fljs.Player.getInstance().defs.element.appendChild(a)
  1203.         }
  1204.     });
  1205.     fljs.swf.def.BitmapFillDef = function () {
  1206.         var a = this.element = new fljs.dom.Element;
  1207.         a.create(fljs.dom.Namespace.Svg, "pattern");
  1208.         this.type = "Bitmap";
  1209.         this.id = "pattern-" + fljs.swf.def.BitmapFillDef.patternId++;
  1210.         this.ref = "#" + this.id;
  1211.         a.set("id", this.id)
  1212.     };
  1213.     fljs.addMethods(fljs.swf.def.BitmapFillDef, {
  1214.         setBitmapId: function (a) {
  1215.             a = fljs.Player.getInstance().dictionary[a];
  1216.             if (!a) return false;
  1217.             this.bitmap = a;
  1218.             this.element.append(a.def.use());
  1219.             return true
  1220.         },
  1221.         define: function () {
  1222.             this.element.update();
  1223.             this._define(this.element.element)
  1224.         },
  1225.         use: function () {
  1226.             var a = new fljs.dom.Element;
  1227.             a.create(fljs.dom.Namespace.Svg, "use");
  1228.             a.sets([[fljs.dom.Namespace.Xlink, "xlink:href", this.ref]]);
  1229.             a.update();
  1230.             return a
  1231.         },
  1232.         _define: function (a) {
  1233.             fljs.Player.getInstance().defs.element.appendChild(a)
  1234.         }
  1235.     });
  1236.     fljs.swf.def.BitmapFillDef.patternId = 1;
  1237.     fljs.swf.def.GradientFillDef = function () {
  1238.         this.element = new fljs.dom.Element;
  1239.         this.stops = [];
  1240.         this.type = "Gradient"
  1241.     };
  1242.     fljs.addMethods(fljs.swf.def.GradientFillDef, {
  1243.         create: function (a) {
  1244.             var b = this.element;
  1245.             b.create(fljs.dom.Namespace.Svg, a);
  1246.             this.id = "gradient-" + fljs.swf.def.GradientFillDef.gradientId++;
  1247.             this.ref = "#" + this.id;
  1248.             b.set("id", this.id)
  1249.         },
  1250.         addStop: function (a) {
  1251.             this.stops.push(a);
  1252.             this.element.append(a.element)
  1253.         },
  1254.         define: function () {
  1255.             this.element.update();
  1256.             this._define(this.element.element)
  1257.         },
  1258.         use: function (a) {
  1259.             var b = this.element.clone(false);
  1260.             b.id = "gradient-" + fljs.swf.def.GradientFillDef.gradientId++;
  1261.             b.ref = "#" + b.id;
  1262.             b.set("id", b.id);
  1263.             for (var c in this.stops) b.append(this.stops[c].use(a));
  1264.             b.update();
  1265.             this._define(b.element);
  1266.             return b
  1267.         },
  1268.         _define: function (a) {
  1269.             fljs.Player.getInstance().defs.element.appendChild(a)
  1270.         }
  1271.     });
  1272.     fljs.swf.def.GradientFillDef.gradientId = 1;
  1273.     fljs.swf.def.GradientFillStopDef = function () {
  1274.         (this.element = new fljs.dom.Element).create(fljs.dom.Namespace.Svg, "stop")
  1275.     };
  1276.     fljs.addMethods(fljs.swf.def.GradientFillStopDef, {
  1277.         create: function (a) {
  1278.             var b = this.element;
  1279.             b.create(fljs.dom.Namespace.Svg, a);
  1280.             b.set("id", this.id)
  1281.         },
  1282.         setColor: function (a, b) {
  1283.             this.rgba = a;
  1284.             this.element.sets([[null, "stop-color", this._colorToSvgColor(a, b)], [null, "stop-opacity", this._colorToSvgOpacity(a)]])
  1285.         },
  1286.         define: function () {
  1287.             this.element.update();
  1288.             this._define(this.element.element)
  1289.         },
  1290.         use: function (a) {
  1291.             var b = this.element.clone(false);
  1292.             a = [[null, "stop-color", this._colorToSvgColor(this.rgba, a)]];
  1293.             b.sets(a);
  1294.             b.update();
  1295.             return b
  1296.         },
  1297.         _define: function (a) {
  1298.             fljs.Player.getInstance().defs.element.appendChild(a)
  1299.         },
  1300.         _colorToSvgColor: function (a, b) {
  1301.             var c = a >> 24 & 255,
  1302.                 d = a >> 16 & 255;
  1303.             a = a >> 8 & 255;
  1304.             if (b) {
  1305.                 c = Math.max(0, Math.min(255, Math.round(c * b.redMultiplier + b.redOffset)));
  1306.                 d = Math.max(0, Math.min(255, Math.round(d * b.greenMultiplier + b.greenOffset)));
  1307.                 a = Math.max(0, Math.min(255, Math.round(a * b.blueMultiplier + b.blueOffset)))
  1308.             }
  1309.             return "rgb(" + [c, d, a] + ")"
  1310.         },
  1311.         _colorToSvgOpacity: function (a, b) {
  1312.             a = (a & 255) / 255;
  1313.             if (b) a = Math.max(0, Math.min(1, Math.round(a * b.alphaMultiplier + b.alphaOffset)));
  1314.             return a
  1315.         }
  1316.     });
  1317.     fljs.swf.def.GradientFillStopDef.gradientStopId = 1;
  1318.     fljs.swf.def.PathDef = function () {
  1319.         var a = this.element = new fljs.dom.Element;
  1320.         a.create(fljs.dom.Namespace.Svg, "path");
  1321.         this.id = "path" + fljs.swf.def.PathDef.pathId++;
  1322.         this.ref = "#" + this.id;
  1323.         a.set("id", this.id);
  1324.         a.update()
  1325.     };
  1326.     fljs.addMethods(fljs.swf.def.PathDef, {
  1327.         setStroke: function (a) {
  1328.             (this.stroke = a) ? this.element.sets([[null, "stroke-width", a.thickness], [null, "stroke", this._colorToSvgColor(a.color)], [null, "stroke-opacity", this._colorToSvgOpacity(a.color)]]) : this.element.set(null, "stroke", "none")
  1329.         },
  1330.         setFill: function (a) {
  1331.             if (this.fill = a) switch (a.type) {
  1332.             case "Solid":
  1333.                 this._setSolidFill(a);
  1334.                 break;
  1335.             case "Bitmap":
  1336.                 this._setBitmapFill(a);
  1337.                 break;
  1338.             case "Gradient":
  1339.                 this._setGradientFill(a);
  1340.                 break
  1341.             } else this.element.set(null, "fill", "none")
  1342.         },
  1343.         _setSolidFill: function () {},
  1344.         _setBitmapFill: function (a) {
  1345.             this.element.sets([[null, "fill", "url(" + a.ref + ")"], [null, "fill-opacity", 1]])
  1346.         },
  1347.         _setGradientFill: function () {},
  1348.         define: function () {
  1349.             this.element.update();
  1350.             this._define(this.element.element)
  1351.         },
  1352.         use: function (a, b) {
  1353.             var c = new fljs.dom.Element;
  1354.             c.create(fljs.dom.Namespace.Svg, "use");
  1355.             document.getElementById(this.id);
  1356.             var d = [[fljs.dom.Namespace.Xlink, "xlink:href", this.ref]],
  1357.                 e = this.stroke;
  1358.             e && c.sets([[null, "stroke-width", e.thickness], [null, "stroke", this._colorToSvgColor(e.color, a)], [null, "stroke-opacity",
  1359.                 this._colorToSvgOpacity(e.color)]]);
  1360.             if (e = this.fill) switch (e.type) {
  1361.             case "Solid":
  1362.                 c.set(null, "fill", this._colorToSvgColor(e.color, a));
  1363.                 c.set(null, "fill-opacity", this._colorToSvgOpacity(e.color));
  1364.                 break;
  1365.             case "Bitmap":
  1366.                 break;
  1367.             case "Gradient":
  1368.                 c.sets([[null, "fill", "url(" + e.use(a).ref + ")"], [null, "fill-opacity", 1]]);
  1369.                 break
  1370.             }
  1371.             c.sets(d);
  1372.             b && b.append(c);
  1373.             c.update();
  1374.             return c
  1375.         },
  1376.         clone: function () {
  1377.             var a = this.element.clone(true);
  1378.             a.set("id", null);
  1379.             return a
  1380.         },
  1381.         _colorToSvgColor: function (a, b) {
  1382.             var c = a >> 24 & 255,
  1383.                 d = a >> 16 & 255;
  1384.             a = a >> 8 & 255;
  1385.             if (b) {
  1386.                 c = Math.max(0, Math.min(255, Math.round(c * b.redMultiplier + b.redOffset)));
  1387.                 d = Math.max(0, Math.min(255, Math.round(d * b.greenMultiplier + b.greenOffset)));
  1388.                 a = Math.max(0, Math.min(255, Math.round(a * b.blueMultiplier + b.blueOffset)))
  1389.             }
  1390.             return "rgb(" + [c, d, a] + ")"
  1391.         },
  1392.         _colorToSvgOpacity: function (a, b) {
  1393.             a = (a & 255) / 255;
  1394.             if (b) a = Math.max(0, Math.min(1, Math.round(a * b.alphaMultiplier + b.alphaOffset)));
  1395.             return a
  1396.         },
  1397.         _define: function (a) {
  1398.             fljs.Player.getInstance().defs.element.appendChild(a)
  1399.         }
  1400.     });
  1401.     fljs.swf.def.PathDef.pathId = 1;
  1402.     fljs.swf.def.ShapeDef = function () {
  1403.         (this.element = new fljs.dom.Element).create(fljs.dom.Namespace.Svg, "g");
  1404.         this.parts = [];
  1405.         this.paths = [];
  1406.         this.images = [];
  1407.         this.cxforms = {};
  1408.         this.cxformCount = 0
  1409.     };
  1410.     fljs.addMethods(fljs.swf.def.ShapeDef, {
  1411.         setCharaId: function (a) {
  1412.             this.id = "chara-" + a;
  1413.             this.ref = "#" + this.id;
  1414.             this.element.set("id", this.id)
  1415.         },
  1416.         addPath: function (a) {
  1417.             this.paths.push(a);
  1418.             this.parts.push(a);
  1419.             this.element.append(a.element)
  1420.         },
  1421.         addImage: function (a) {
  1422.             this.images.push(a);
  1423.             this.parts.push(a);
  1424.             this.element.append(a.element)
  1425.         },
  1426.         define: function () {
  1427.             this.element.update();
  1428.             fljs.Player.getInstance();
  1429.             this._define(this.element.element)
  1430.         },
  1431.         use: function (a, b, c) {
  1432.             if (c) {
  1433.                 a = this.element.clone(true);
  1434.                 b && b.append(a);
  1435.                 return a
  1436.             }
  1437.             if (!a) a = flash.geom.ColorTransform.identity;
  1438.             c = a.__toSvgString();
  1439.             a = c in this.cxforms ? this.cxforms[c] : (this.cxforms[c] = this.useDef(a));
  1440.             c = new fljs.dom.Element;
  1441.             c.create(fljs.dom.Namespace.Svg, "use");
  1442.             document.getElementById(a.id);
  1443.             b && b.append(c);
  1444.             c.element.setAttributeNS(fljs.dom.Namespace.Xlink, "xlink:href", a.ref);
  1445.             return c
  1446.         },
  1447.         useDef: function (a) {
  1448.             var b = new fljs.dom.Element;
  1449.             b.create(fljs.dom.Namespace.Svg, "g");
  1450.             var c = [this.id, this.cxformCount++].join("-");
  1451.             b.sets([["id", c]]);
  1452.             b.update();
  1453.             this._define(b.element);
  1454.             var d = this.parts;
  1455.             for (var e in d) d[e].use(a, b);
  1456.             return {
  1457.                 element: b,
  1458.                 id: c,
  1459.                 ref: "#" + c
  1460.             }
  1461.         },
  1462.         _define: function (a) {
  1463.             fljs.Player.getInstance().defs.element.appendChild(a)
  1464.         }
  1465.     });
  1466.     fljs.swf.def.ImageDef = function () {
  1467.         var a = this.element = new fljs.dom.Element;
  1468.         a.create(fljs.dom.Namespace.Svg, "g");
  1469.         this.id = "image-def-" + fljs.swf.def.ImageDef.id++;
  1470.         this.ref = "#" + this.id;
  1471.         a.set("id", this.id)
  1472.     };
  1473.     fljs.addMethods(fljs.swf.def.ImageDef, {
  1474.         setBitmapId: function (a) {
  1475.             a = fljs.Player.getInstance().dictionary[a];
  1476.             if (!a) return false;
  1477.             this.bitmap = a;
  1478.             this._use = a.def.use();
  1479.             this.element.append(this._use);
  1480.             return true
  1481.         },
  1482.         define: function () {
  1483.             this.element.update();
  1484.             this._define(this.element.element)
  1485.         },
  1486.         use: function (a, b) {
  1487.             a = new fljs.dom.Element;
  1488.             a.create(fljs.dom.Namespace.Svg, "use");
  1489.             a.sets([[fljs.dom.Namespace.Xlink, "xlink:href", this.ref]]);
  1490.             a.update();
  1491.             b && b.append(a);
  1492.             return a
  1493.         },
  1494.         _define: function (a) {
  1495.             fljs.Player.getInstance().defs.element.appendChild(a)
  1496.         }
  1497.     });
  1498.     fljs.swf.def.ImageDef.id = 1;
  1499.     fljs.swf.BigEndianStringStream = function (a) {
  1500.         this.buffer = a;
  1501.         this.bitIndex = this.byteIndex = this._byte = 0;
  1502.         this.byteIndexForBits = -1;
  1503.         this.logger = fljs.console("parse")
  1504.     };
  1505.     fljs.addMethods(fljs.swf.BigEndianStringStream, {
  1506.         length: function () {
  1507.             return this.buffer.length
  1508.         },
  1509.         hasMore: function () {
  1510.             return this.byteIndex < this.buffer.length
  1511.         },
  1512.         skipBytes: function (a) {
  1513.             this.byteIndex += a
  1514.         },
  1515.         readBytes: function (a) {
  1516.             for (var b = [], c = 0; c < a; c++) b.push(this.buffer.charCodeAt(this.byteIndex++) & 255);
  1517.             return b
  1518.         },
  1519.         align: function () {
  1520.             this.bitIndex = 8
  1521.         },
  1522.         nextUByte: function () {
  1523.             return this.buffer.charCodeAt(this.byteIndex++) & 255
  1524.         },
  1525.         nextSByte: function () {
  1526.             var a = this.buffer.charCodeAt(this.byteIndex++) & 255;
  1527.             if (a >= 128) a -= 256;
  1528.             return a
  1529.         },
  1530.         nextUShort: function () {
  1531.             var a = ((this.buffer.charCodeAt(this.byteIndex++) & 255) << 8) + (this.buffer.charCodeAt(this.byteIndex++) & 255);
  1532.             if (a < 0) a += 65536;
  1533.             return a
  1534.         }
  1535.     });
  1536.     fljs.swf.ClipEventFlags = {
  1537.         ClipEventKeyUp: -2147483648,
  1538.         ClipEventKeyDown: 1073741824,
  1539.         ClipEventMouseUp: 536870912,
  1540.         ClipEventMouseDown: 268435456,
  1541.         ClipEventMouseMove: 134217728,
  1542.         ClipEventUnload: 67108864,
  1543.         ClipEventEnterFrame: 33554432,
  1544.         ClipEventLoad: 16777216,
  1545.         ClipEventDragOver: 8388608,
  1546.         ClipEventRollOut: 4194304,
  1547.         ClipEventRollOver: 2097152,
  1548.         ClipEventReleaseOutside: 1048576,
  1549.         ClipEventRelease: 524288,
  1550.         ClipEventPress: 262144,
  1551.         ClipEventInitialize: 131072,
  1552.         ClipEventData: 65536,
  1553.         ClipEventConstruct: 1024,
  1554.         ClipEventKeyPress: 512,
  1555.         ClipEventDragOut: 256
  1556.     };
  1557.     fljs.swf.FillStyleTypes = {
  1558.         SolidFill: 0,
  1559.         LinearGradientFill: 16,
  1560.         RadialGradientFill: 18,
  1561.         FocalRadialGradientFill: 19,
  1562.         RepeatingBitmapFill: 64,
  1563.         ClippedBitmapFill: 65,
  1564.         NonSmoothedRepeatingBitmapFill: 66,
  1565.         NonSmoothedClippedBitmapFill: 67
  1566.     };
  1567.     fljs.swf.SpreadMethods = {
  1568.         Pad: 0,
  1569.         Reflect: 1,
  1570.         Repeat: 2
  1571.     };
  1572.     fljs.swf.InterpolationMethods = {
  1573.         Rgb: 0,
  1574.         LinearRgb: 1
  1575.     };
  1576.     fljs.swf.build.ShapeBuilder = function (a) {
  1577.         this.context = a;
  1578.         this.utils = new fljs.swf.build.SvgUtils
  1579.     };
  1580.     fljs.addMethods(fljs.swf.build.ShapeBuilder, {
  1581.         build: function (a) {
  1582.             var b = this.parseSwfPaths(a),
  1583.                 c = [];
  1584.             for (var d in b) c.push([this.buildPaths(b[d][0]), this.buildPaths(b[d][1])]);
  1585.             return this.buildDefinition(a, c)
  1586.         },
  1587.         parseSwfPaths: function (a) {
  1588.             var b = 0,
  1589.                 c = 0,
  1590.                 d = 0,
  1591.                 e = 0,
  1592.                 f = 0,
  1593.                 g = 0,
  1594.                 j = a.Shapes.ShapeRecords,
  1595.                 h = this.stateNewStyles(a.Shapes.FillStyles),
  1596.                 m = this.stateNewStyles(a.Shapes.LineStyles),
  1597.                 k = [],
  1598.                 l = 0,
  1599.                 n = 0,
  1600.                 p = 0,
  1601.                 u = 1,
  1602.                 o = {
  1603.                     x1: 0,
  1604.                     y1: 0
  1605.                 },
  1606.                 q = [],
  1607.                 s = this;
  1608.             a = function () {
  1609.                 o.parts = q;
  1610.                 o.flipped = false;
  1611.                 o.x2 = q[q.length - 1].x2;
  1612.                 o.y2 = q[q.length - 1].y2;
  1613.                 o.key1 =
  1614.                 s.pointKey(o.x1, o.y1);
  1615.                 o.key2 = s.pointKey(o.x2, o.y2);
  1616.                 o.key = u += 1;
  1617.                 l && h[l].edges.push(o);
  1618.                 if (n) h[n].edges.push({
  1619.                     parts: q,
  1620.                     flipped: true,
  1621.                     x1: o.x2,
  1622.                     y1: o.y2,
  1623.                     x2: o.x1,
  1624.                     y2: o.y1,
  1625.                     key1: o.key2,
  1626.                     key2: o.key1,
  1627.                     key: u += 1
  1628.                 });
  1629.                 p && m[p].edges.push(o);
  1630.                 o = {
  1631.                     x1: o.x2,
  1632.                     y1: o.y2
  1633.                 };
  1634.                 q = []
  1635.             };
  1636.             var r = function () {
  1637.                 k.push([h, m])
  1638.             },
  1639.                 t = function (w) {
  1640.                     return Math.round(w * 100) / 100
  1641.                 };
  1642.             for (var v in j) {
  1643.                 g = j[v];
  1644.                 switch (g.type) {
  1645.                 case "STRAIGHT":
  1646.                     f = b + g.DeltaX;
  1647.                     g = c + g.DeltaY;
  1648.                     q.push({
  1649.                         x1: t(b),
  1650.                         y1: t(c),
  1651.                         x2: t(f),
  1652.                         y2: t(g)
  1653.                     });
  1654.                     b = f;
  1655.                     c = g;
  1656.                     break;
  1657.                 case "CURVED":
  1658.                     d = b + g.ControlDeltaX;
  1659.                     e = c + g.ControlDeltaY;
  1660.                     f = d + g.AnchorDeltaX;
  1661.                     g = e + g.AnchorDeltaY;
  1662.                     q.push({
  1663.                         x1: t(b),
  1664.                         y1: t(c),
  1665.                         cx: t(d),
  1666.                         cy: t(e),
  1667.                         x2: t(f),
  1668.                         y2: t(g)
  1669.                     });
  1670.                     b = f;
  1671.                     c = g;
  1672.                     break;
  1673.                 case "NONEDGE":
  1674.                     q.length && a();
  1675.                     if (g.StateNewStyles) {
  1676.                         r();
  1677.                         h = this.stateNewStyles(g.FillStyles);
  1678.                         m = this.stateNewStyles(g.LineStyles)
  1679.                     }
  1680.                     if (g.StateLineStyle) p = g.LineStyle;
  1681.                     if (g.StateFillStyle0) l = g.FillStyle0;
  1682.                     if (g.StateFillStyle1) n = g.FillStyle1;
  1683.                     if (g.StateMoveTo) {
  1684.                         b = g.MoveDeltaX;
  1685.                         c = g.MoveDeltaY;
  1686.                         o.x1 = b;
  1687.                         o.y1 = c
  1688.                     }
  1689.                     break
  1690.                 }
  1691.             }
  1692.             q.length && a();
  1693.             r();
  1694.             return k
  1695.         },
  1696.         stateNewStyles: function (a) {
  1697.             var b = [{
  1698.                 edges: [],
  1699.                 style: null}];
  1700.             for (var c in a) b.push({
  1701.                 edges: [],
  1702.                 style: a[c]
  1703.             });
  1704.             return b
  1705.         },
  1706.         buildPaths: function (a) {
  1707.             var b = [],
  1708.                 c, d, e, f, g, j, h, m, k, l;
  1709.             for (e = 0; e < a.length; e++) {
  1710.                 d = a[e].edges;
  1711.                 if (d.length != 0) {
  1712.                     j = {};
  1713.                     edgeIndexCount = {};
  1714.                     m = [];
  1715.                     for (f = h = 0; f < d.length; f++) {
  1716.                         c = d[f];
  1717.                         if (c.key1 == c.key2) {
  1718.                             c.picked = true;
  1719.                             h += 1;
  1720.                             m.push([c])
  1721.                         } else {
  1722.                             c.picked = false;
  1723.                             j[c.key1] || (j[c.key1] = []);
  1724.                             j[c.key1].push(c)
  1725.                         }
  1726.                     }
  1727.                     for (f = 0; f < d.length; f++) {
  1728.                         if (h == d.length) break;
  1729.                         c = d[f];
  1730.                         if (!c.picked) {
  1731.                             k = [c];
  1732.                             c.picked = true;
  1733.                             h += 1;
  1734.                             l = j[c.key1];
  1735.                             for (g = 0; g < l.length; g++) if (l[g] == c) {
  1736.                                 l.splice(g, 1);
  1737.                                 break
  1738.                             }
  1739.                             g = c.key1;
  1740.                             for (c = c.key2; c != g;) {
  1741.                                 l = j[c];
  1742.                                 if (typeof l == "undefined") break;
  1743.                                 if (l.length == 0) break;
  1744.                                 c = l.shift();
  1745.                                 k.push(c);
  1746.                                 c.picked = true;
  1747.                                 h += 1;
  1748.                                 c = c.key2
  1749.                             }
  1750.                             m.push(k)
  1751.                         }
  1752.                     }
  1753.                     m.length && b.push({
  1754.                         path: m,
  1755.                         style: a[e].style
  1756.                     })
  1757.                 }
  1758.             }
  1759.             return b
  1760.         },
  1761.         pointKey: function (a, b) {
  1762.             return [a, b].join(",")
  1763.         },
  1764.         buildDefinition: function (a, b) {
  1765.             var c = new fljs.swf.def.ShapeDef;
  1766.             c.setCharaId(a.ShapeId);
  1767.             for (var d in b) {
  1768.                 a = b[d][0];
  1769.                 for (var e in a) {
  1770.                     var f = a[e];
  1771.                     if (this.isImagePath(f)) {
  1772.                         var g = new fljs.swf.def.ImageDef;
  1773.                         this.buildImageDef(g, f);
  1774.                         c.addImage(g)
  1775.                     } else {
  1776.                         f.style.def = this.buildFillDef(f.style);
  1777.                         f = this.buildPathDefinition(f.path, f.style, null);
  1778.                         c.addPath(f)
  1779.                     }
  1780.                 }
  1781.                 a = b[d][1];
  1782.                 for (e in a) {
  1783.                     f = a[e];
  1784.                     f = this.buildPathDefinition(f.path, null, f.style);
  1785.                     c.addPath(f)
  1786.                 }
  1787.             }
  1788.             c.define();
  1789.             return c
  1790.         },
  1791.         sameStyle: function (a, b) {
  1792.             if (!a || !b) return false;
  1793.             if (a.def && b.def && a.def.fill && b.def.fill) if (a.def.fill.type == "Solid" && b.def.fill.type == "Solid") {
  1794.                 if (a.def.fill.color != b.def.fill.color) return false
  1795.             } else return false;
  1796.             else if (a.def && b.def && (a.def.fill || b.def.fill)) return false;
  1797.             var c, d;
  1798.             c = a.HasFillFlag && a.FillType.Color ? a.FillType.Color : a.Color;
  1799.             if (b.HasFillFlag && b.FillType.Color) bcolor = b.FillType.Color;
  1800.             else d = b.Color;
  1801.             if (c && d) {
  1802.                 if (this.rgbaToColor(c) != this.rgbaToColor(d)) return false;
  1803.                 if (a.Width != b.Width) return false
  1804.             } else if (c || d) return false;
  1805.             return true
  1806.         },
  1807.         buildPathDefinition: function (a, b, c) {
  1808.             var d = new fljs.swf.def.PathDef;
  1809.             this.setPathLineStyle(d, c);
  1810.             this.setPathFillStyle(d, b);
  1811.             d.element.set(null, "d", this.pathToString(a));
  1812.             d.define();
  1813.             return d
  1814.         },
  1815.         isImagePath: function (a) {
  1816.             if (a.path.length != 1 || a.path[0].length != 1 || a.path[0][0].parts.length != 4 || !a.style) return false;
  1817.             var b = a.style.FillStyleType,
  1818.                 c = fljs.swf.FillStyleTypes;
  1819.             if (!(b == c.RepeatingBitmapFill || b == c.ClippedBitmapFill || b == c.NonSmoothedRepeatingBitmapFill || b == c.NonSmoothedClippedBitmapFill)) return false;
  1820.             if (!fljs.Player.getInstance().dictionary[a.style.BitmapId]) return false;
  1821.             a = a.path[0][0].parts;
  1822.             for (b = 0; b < a.length; b++) {
  1823.                 if (typeof a[b].cx != "undefined") return false;
  1824.                 if (b < a.length - 1) {
  1825.                     var d = a[b],
  1826.                         e = a[b + 1],
  1827.                         f, g, j;
  1828.                     if (d.flipped) {
  1829.                         f = d.x2;
  1830.                         c = d.y2;
  1831.                         g = d.x1;
  1832.                         d = d.y1
  1833.                     } else {
  1834.                         f = d.x1;
  1835.                         c = d.y1;
  1836.                         g = d.x2;
  1837.                         d = d.y2
  1838.                     }
  1839.                     if (e.flipped) {
  1840.                         j = e.x1;
  1841.                         e = e.y1
  1842.                     } else {
  1843.                         j = e.x2;
  1844.                         e = e.y2
  1845.                     }
  1846.                     f = (f - g) * (j - g);
  1847.                     c = (c - d) * (e - d);
  1848.                     g = f + c;
  1849.                     if (Math.abs(g) > 0.01) {
  1850.                         if (!f || !c) return false;
  1851.                         if (Math.abs(g / f) > 0.01 || Math.abs(g / c) > 0.01) return false
  1852.                     }
  1853.                 }
  1854.             }
  1855.             return true
  1856.         },
  1857.         buildImageDef: function (a, b) {
  1858.             a.setBitmapId(b.style.BitmapId);
  1859.             for (var c = [], d = 0, e = 0, f = b.path[0][0].parts, g = 0; g < f.length; g++) {
  1860.                 var j = f[g],
  1861.                     h = Math.abs(j.x2 - j.x1);
  1862.                 j = Math.abs(j.y2 - j.y1);
  1863.                 if (h > d) d = h;
  1864.                 if (j > e) e = j
  1865.             }
  1866.             a._use.set(null, "x", 0);
  1867.             a._use.set(null, "y", 0);
  1868.             a._use.set(null, "width", d);
  1869.             a._use.set(null, "height", e);
  1870.             if (b = b.style.BitmapMatrix) {
  1871.                 b = this.utils.toMatrix(b);
  1872.                 b.a /= 20;
  1873.                 b.b /= 20;
  1874.                 b.c /= 20;
  1875.                 b.d /= 20;
  1876.                 c.push("translate(" + [b.tx, b.ty] + ")");
  1877.                 b.tx = 0;
  1878.                 b.ty = 0;
  1879.                 c.push(b.__toSvgString())
  1880.             }
  1881.             a._use.set(null, "transform", c.toString());
  1882.             a._use.update();
  1883.             a.element.update();
  1884.             a.define()
  1885.         },
  1886.         appendPathToDef: function (a, b) {
  1887.             a = a.element.element;
  1888.             b = a.getAttributeNS(null, "d") + " " + this.pathToString(b);
  1889.             a.setAttributeNS(null, "d", b)
  1890.         },
  1891.         pathToString: function (a) {
  1892.             var b, c, d = [];
  1893.             for (var e in a) {
  1894.                 var f = a[e];
  1895.                 d.push("M", f[0].x1, f[0].y1);
  1896.                 for (var g in f) {
  1897.                     b = f[g];
  1898.                     if (b.flipped) for (var j = b.parts.length - 1; j >= 0; j--) {
  1899.                         c = b.parts[j];
  1900.                         typeof c.cx == "undefined" ? d.push("L", c.x1, c.y1) : d.push("Q", c.cx, c.cy, c.x1, c.y1)
  1901.                     } else for (j in b.parts) {
  1902.                         c = b.parts[j];
  1903.                         typeof c.cx == "undefined" ? d.push("L", c.x2, c.y2) : d.push("Q", c.cx, c.cy, c.x2, c.y2)
  1904.                     }
  1905.                 }
  1906.             }
  1907.             return d.join(" ")
  1908.         },
  1909.         setPathLineStyle: function (a, b) {
  1910.             if (b) {
  1911.                 var c = {};
  1912.                 c = b.HasFillFlag ? b.FillType.Color ? {
  1913.                     thickness: Math.max(b.Width, 1),
  1914.                     color: this.rgbaToColor(b.FillType.Color)
  1915.                 } : {
  1916.                     thickness: 1,
  1917.                     color: 0
  1918.                 } : {
  1919.                     thickness: Math.max(b.Width, 1),
  1920.                     color: this.rgbaToColor(b.Color)
  1921.                 };
  1922.                 a.setStroke(c)
  1923.             } else a.setStroke(null)
  1924.         },
  1925.         setPathFillStyle: function (a, b) {
  1926.             if (b) if (b.FillStyleType == fljs.swf.FillStyleTypes.SolidFill) this.setPathSolidFillStyle(a, b);
  1927.             else b.def && a.setFill(b.def);
  1928.             else a.setFill(null)
  1929.         },
  1930.         setPathSolidFillStyle: function (a, b) {
  1931.             a.setFill({
  1932.                 type: "Solid",
  1933.                 color: this.rgbaToColor(b.Color)
  1934.             })
  1935.         },
  1936.         buildFillDef: function (a) {
  1937.             if (!a) return null;
  1938.             var b = a.FillStyleType,
  1939.                 c = fljs.swf.FillStyleTypes;
  1940.             return b == c.LinearGradientFill || b == c.RadialGradientFill || b == c.FocalRadialGradientFill ? this.buildGradientFillDef(a) : b == c.RepeatingBitmapFill || b == c.ClippedBitmapFill || b == c.NonSmoothedRepeatingBitmapFill || b == c.NonSmoothedClippedBitmapFill ? this.buildBitmapFillDef(a) : null
  1941.         },
  1942.         buildGradientFillDef: function (a) {
  1943.             var b = new fljs.swf.def.GradientFillDef,
  1944.                 c = [];
  1945.             if (a.FillStyleType == fljs.swf.FillStyleTypes.LinearGradientFill) {
  1946.                 b.create("linearGradient");
  1947.                 c.push([null, "x1", -819.2], [null, "x2", 819.2])
  1948.             } else {
  1949.                 b.create("radialGradient");
  1950.                 c.push([null, "cx", 0], [null, "cy", 0], [null, "r", 819.2])
  1951.             }
  1952.             c.push([null, "gradientUnits", "userSpaceOnUse"]);
  1953.             c.push([null, "gradientTransform", this.utils.toSvgMatrixString(a.GradientMatrix)]);
  1954.             var d, e = fljs.swf.SpreadMethods;
  1955.             switch (a.Gradient.SpreadMode) {
  1956.             case e.Pad:
  1957.                 d = "pad";
  1958.                 break;
  1959.             case e.Reflect:
  1960.                 d = "reflect";
  1961.                 break;
  1962.             case e.Repeat:
  1963.                 d = "repeat";
  1964.                 break
  1965.             }
  1966.             c.push([null, "spreadMethod", d]);
  1967.             var f;
  1968.             d = fljs.swf.InterpolationMethods;
  1969.             switch (a.Gradient.InterpolationMode) {
  1970.             case d.LinearRgb:
  1971.                 f = "linearRGB";
  1972.                 break;
  1973.             case d.Rgb:
  1974.                 f = "rgb";
  1975.                 break
  1976.             }
  1977.             c.push([null, "color-interpolation", f]);
  1978.             a = a.Gradient.GradientRecords;
  1979.             for (var g in a) {
  1980.                 f = a[g];
  1981.                 d = new fljs.swf.def.GradientFillStopDef;
  1982.                 d.setColor(this.rgbaToColor(f.Color));
  1983.                 e = [];
  1984.                 e.push([null, "offset",
  1985.                     f.Ratio / 255]);
  1986.                 d.element.sets(e);
  1987.                 d.element.update();
  1988.                 b.addStop(d)
  1989.             }
  1990.             b.element.sets(c);
  1991.             b.define();
  1992.             return b
  1993.         },
  1994.         buildBitmapFillDef: function (a) {
  1995.             var b = new fljs.swf.def.BitmapFillDef;
  1996.             if (!b.setBitmapId(a.BitmapId)) {
  1997.                 b.define();
  1998.                 return b
  1999.             }
  2000.             var c = [];
  2001.             c.push([null, "patternUnits", "userSpaceOnUse"], [null, "x", 0], [null, "y", 0], [null, "width", b.bitmap.Width], [null, "height", b.bitmap.Height]);
  2002.             var d = [];
  2003.             if (a = a.BitmapMatrix) {
  2004.                 a = this.utils.toMatrix(a);
  2005.                 a.a /= 20;
  2006.                 a.b /= 20;
  2007.                 a.c /= 20;
  2008.                 a.d /= 20;
  2009.                 d.push("translate(" + [a.tx, a.ty] + ")");
  2010.                 a.tx = 0;
  2011.                 a.ty =
  2012.                 0;
  2013.                 d.push(a.__toSvgString())
  2014.             }
  2015.             c.push([null, "patternTransform", d.toString()]);
  2016.             b.element.sets(c);
  2017.             b.define();
  2018.             return b
  2019.         },
  2020.         rgbaToColor: function (a) {
  2021.             var b = (a.Red << 24) + (a.Green << 16) + (a.Blue << 8);
  2022.             b |= typeof a.Alpha != "undefined" ? a.Alpha : 255;
  2023.             return b
  2024.         }
  2025.     });
  2026.     fljs.swf.tag.DefineShape = function () {};
  2027.     fljs.addMethods(fljs.swf.tag.DefineShape, {
  2028.         read: function (a) {
  2029.             a.beginContext(fljs.swf.tag.DefineShape);
  2030.             this.defId = this.ShapeId = a.readUI16();
  2031.             this.ShapeBounds = a.readRECT();
  2032.             a.stream.align();
  2033.             this.Shapes = a.readSHAPEWITHSTYLE();
  2034.             a.endContext()
  2035.         },
  2036.         waitForBitmaps: function () {
  2037.             var a = fljs.Player.getInstance();
  2038.             this.bitmapIds = this.findBitmaps(this);
  2039.             this.waiting = 0;
  2040.             var b = fljs.Player.getInstance().mainTimeline.resources,
  2041.                 c = [];
  2042.             for (var d in this.bitmapIds) if (b.waiting(d)) {
  2043.                 this.waiting += 1;
  2044.                 b.listen(d, fljs.bind(this.onLoad, this, a))
  2045.             } else c.push(d);
  2046.             for (var e in c) delete this.bitmapIds[c[e]]
  2047.         },
  2048.         onLoad: function (a, b) {
  2049.             if (this.bitmapIds[b]) {
  2050.                 delete this.bitmapIds[b];
  2051.                 this.waiting -= 1
  2052.             }
  2053.             this.waiting == 0 && this.evaluate(a)
  2054.         },
  2055.         evaluate: function (a) {
  2056.             this.bitmapIds || this.waitForBitmaps();
  2057.             if (!(this.waiting > 0)) {
  2058.                 this.def = (new fljs.swf.build.ShapeBuilder).build(this);
  2059.                 a.addDefinition(this, this.ShapeId)
  2060.             }
  2061.         },
  2062.         findBitmaps: function (a) {
  2063.             var b = {};
  2064.             this.findBitmapsForStyles(b, a.Shapes.FillStyles);
  2065.             a = a.Shapes.ShapeRecords;
  2066.             for (var c in a) {
  2067.                 var d = a[c];
  2068.                 d.type == "NONEDGE" && d.StateNewStyles && this.findBitmapsForStyles(b, d.FillStyles)
  2069.             }
  2070.             return b
  2071.         },
  2072.         findBitmapsForStyles: function (a, b) {
  2073.             var c = fljs.swf.FillStyleTypes;
  2074.             for (var d in b) {
  2075.                 var e = b[d],
  2076.                     f = e.FillStyleType;
  2077.                 if (f == c.RepeatingBitmapFill || f == c.ClippedBitmapFill || f == c.NonSmoothedRepeatingBitmapFill || f == c.NonSmoothedClippedBitmapFill) a[e.BitmapId] = true
  2078.             }
  2079.         },
  2080.         build: function (a, b, c) {
  2081.             a = new flash.display.Shape;
  2082.             a.useTag(this, b, c);
  2083.             return a
  2084.         }
  2085.     });
  2086.     fljs.dom = {};
  2087.     fljs.dom.Namespace = {
  2088.         Svg: "http://www.w3.org/2000/svg",
  2089.         Xlink: "http://www.w3.org/1999/xlink"
  2090.     };
  2091.     fljs.dom.Element = function (a) {
  2092.         this.element = a;
  2093.         this.changes = []
  2094.     };
  2095.     fljs.addMethods(fljs.dom.Element, {
  2096.         create: function (a, b) {
  2097.             if (arguments.length == 1) {
  2098.                 b = a;
  2099.                 this.element = document.createElement(b)
  2100.             } else this.element = document.createElementNS(a, b);
  2101.             this.changes = []
  2102.         },
  2103.         set: function (a, b, c) {
  2104.             if (arguments.length == 2) {
  2105.                 c = b;
  2106.                 b = a;
  2107.                 this.changes.push([b, c])
  2108.             } else this.changes.push([a, b, c])
  2109.         },
  2110.         sets: function (a) {
  2111.             this.changes.push.apply(this.changes, a)
  2112.         },
  2113.         update: function () {
  2114.             var a = this.element,
  2115.                 b = this.changes;
  2116.             for (var c in b) {
  2117.                 var d = b[c];
  2118.                 d.length == 2 ? a.setAttribute(d[0], d[1]) : a.setAttributeNS(d[0], d[1], d[2])
  2119.             }
  2120.             this.changes = []
  2121.         },
  2122.         append: function (a) {
  2123.             this.element.appendChild(a.element)
  2124.         },
  2125.         appendText: function (a) {
  2126.             this.element.appendChild(document.createTextNode(a))
  2127.         },
  2128.         clone: function (a) {
  2129.             var b = new fljs.dom.Element;
  2130.             b.element = this.element.cloneNode(a);
  2131.             b.changes = [];
  2132.             return b
  2133.         },
  2134.         remove: function (a) {
  2135.             this.element.removeChild(a.element)
  2136.         },
  2137.         getElement: function () {
  2138.             return this.element
  2139.         }
  2140.     });
  2141.     fljs.swf.build.FontBuilder = function (a, b) {
  2142.         this.tag = a;
  2143.         this.player = b
  2144.     };
  2145.     fljs.addMethods(fljs.swf.build.FontBuilder, {
  2146.         buildDef: function () {
  2147.             var a = this.buildGlyphPaths();
  2148.             return this.player.renderTextAsGlyphs ? this.buildFontDef(a) : this.buildShapeDef(a)
  2149.         },
  2150.         buildFontDef: function (a) {
  2151.             var b = this.tag,
  2152.                 c = this.player.element.getElement().ownerDocument,
  2153.                 d = c.createElementNS("http://www.w3.org/2000/svg", "font"),
  2154.                 e = c.createElementNS("http://www.w3.org/2000/svg", "font-face");
  2155.             e.setAttributeNS(null, "font-family", "font-" + b.FontId);
  2156.             e.setAttributeNS(null, "units-per-em", 51.2);
  2157.             d.appendChild(e);
  2158.             for (var f in a) {
  2159.                 e =
  2160.                 c.createElementNS("http://www.w3.org/2000/svg", "glyph");
  2161.                 e.setAttributeNS(null, "unicode", String.fromCharCode(b.CodeTable[f]));
  2162.                 b.FontAdvanceTable && e.setAttributeNS(null, "horiz-adv-x", b.FontAdvanceTable[f] / 20);
  2163.                 e.setAttributeNS(null, "d", a[f]);
  2164.                 d.appendChild(e)
  2165.             }
  2166.             return [{
  2167.                 element: d
  2168.             }]
  2169.         },
  2170.         buildShapeDef: function (a) {
  2171.             var b = this.tag,
  2172.                 c = [];
  2173.             for (var d in a) {
  2174.                 var e = new fljs.dom.Element;
  2175.                 e.create(fljs.dom.Namespace.Svg, "path");
  2176.                 var f = ["font", b.FontId, b.FontFlagsBold, b.FontFlagsItalic, b.CodeTable[d]].join("-");
  2177.                 if (document.getElementById(f)) rar.rar = rar;
  2178.                 e.sets([["id", f], ["d", a[d]]]);
  2179.                 e.update();
  2180.                 c.push(e)
  2181.             }
  2182.             return c
  2183.         },
  2184.         buildGlyphPaths: function () {
  2185.             for (var a = [], b = this.tag.GlyphShapeTable, c = 0, d = b.length; c < d; c++) {
  2186.                 var e = this.buildPath(this.buildGlyph(b[c]));
  2187.                 a.push(e)
  2188.             }
  2189.             return a
  2190.         },
  2191.         buildGlyph: function (a) {
  2192.             var b = 0,
  2193.                 c = 0,
  2194.                 d = 0,
  2195.                 e = 0,
  2196.                 f = 0,
  2197.                 g = 0;
  2198.             a = a.ShapeRecords;
  2199.             var j = [],
  2200.                 h = [],
  2201.                 m = 1;
  2202.             if (this.tag instanceof fljs.swf.tag.DefineFont3) m = 20;
  2203.             var k = function (n) {
  2204.                 return Math.round(n * 100) / 100 / m
  2205.             };
  2206.             for (var l in a) {
  2207.                 g = a[l];
  2208.                 switch (g.type) {
  2209.                 case "STRAIGHT":
  2210.                     f = b + g.DeltaX;
  2211.                     g = c + g.DeltaY;
  2212.                     h.push({
  2213.                         x1: k(b),
  2214.                         y1: k(c),
  2215.                         x2: k(f),
  2216.                         y2: k(g)
  2217.                     });
  2218.                     b = f;
  2219.                     c = g;
  2220.                     break;
  2221.                 case "CURVED":
  2222.                     d = b + g.ControlDeltaX;
  2223.                     e = c + g.ControlDeltaY;
  2224.                     f = d + g.AnchorDeltaX;
  2225.                     g = e + g.AnchorDeltaY;
  2226.                     h.push({
  2227.                         x1: k(b),
  2228.                         y1: k(c),
  2229.                         cx: k(d),
  2230.                         cy: k(e),
  2231.                         x2: k(f),
  2232.                         y2: k(g)
  2233.                     });
  2234.                     b = f;
  2235.                     c = g;
  2236.                     break;
  2237.                 case "NONEDGE":
  2238.                     if (g.StateMoveTo) {
  2239.                         h.length && j.push(h);
  2240.                         b = g.MoveDeltaX;
  2241.                         c = g.MoveDeltaY;
  2242.                         h = []
  2243.                     }
  2244.                     break
  2245.                 }
  2246.             }
  2247.             h.length && j.push(h);
  2248.             return j
  2249.         },
  2250.         buildPath: function (a) {
  2251.             var b = [],
  2252.                 c = this.player.renderTextAsGlyphs ? -1 : 1,
  2253.                 d;
  2254.             for (var e in a) {
  2255.                 var f = a[e];
  2256.                 b.push("M", f[0].x1, f[0].y1 * c);
  2257.                 for (var g in f) {
  2258.                     d = f[g];
  2259.                     typeof d.cx == "undefined" ? b.push("L", d.x2, d.y2 * c) : b.push("Q", d.cx, d.cy * c, d.x2, d.y2 * c)
  2260.                 }
  2261.             }
  2262.             b.length == 0 && b.push("M", 0, 0);
  2263.             return b.join(" ")
  2264.         }
  2265.     });
  2266.     fljs.swf.build.FontBuilder.id = 1;
  2267.     fljs.swf.tag.DefineFont = function () {};
  2268.     fljs.addMethods(fljs.swf.tag.DefineFont, {
  2269.         read: function (a) {
  2270.             this.FontId = a.readUI16();
  2271.             this.OffsetTable = [a.readUI16()];
  2272.             var b = this.OffsetTable[0] / 2;
  2273.             this.NumGlyphs = b;
  2274.             for (var c = 1; c < b; c++) this.OffsetTable.push(a.readUI16());
  2275.             this.GlyphShapeTable = [];
  2276.             for (c = 0; c < b; c++) this.GlyphShapeTable.push(a.readSHAPE())
  2277.         },
  2278.         evaluate: function (a) {
  2279.             this.CodeTable = [];
  2280.             for (var b in this.GlyphShapeTable) this.CodeTable.push(b);
  2281.             this.FontName = "font-no-info-" + this.FontId;
  2282.             this.FontFlagsItalic = this.FontFlagsBold = false;
  2283.             a.fontsWithoutInfo[this.FontId] =
  2284.             this;
  2285.             b = (new fljs.swf.build.FontBuilder(this, a)).buildDef();
  2286.             a.defineFont2(this.FontId, this.GlyphShapeTable, b, this.FontName, this.FontFlagsBold, this.FontFlagsItalic, this.CodeTable)
  2287.         }
  2288.     });
  2289.     fljs.swf.tag.SetBackgroundColor = function () {};
  2290.     fljs.addMethods(fljs.swf.tag.SetBackgroundColor, {
  2291.         read: function (a) {
  2292.             this.BackgroundColor = a.readRGB()
  2293.         },
  2294.         evaluate: function (a) {
  2295.             a.stage.setBackgroundColor_((this.BackgroundColor.Red << 16) + (this.BackgroundColor.Green << 8) + this.BackgroundColor.Blue)
  2296.         }
  2297.     });
  2298.     fljs.swf.tag.DoAbc = function () {};
  2299.     fljs.addMethods(fljs.swf.tag.DoAbc, {
  2300.         read: function (a, b) {
  2301.             var c = a.stream.byteIndex;
  2302.             this.Flags = a.readUI32();
  2303.             this.Name = a.readString();
  2304.             b = b.TagLength - (a.stream.byteIndex - c);
  2305.             c = [];
  2306.             for (var d = 0; d < b; d++) c.push(String.fromCharCode(a.readUB()));
  2307.             this.AbcData = c.join("")
  2308.         },
  2309.         evaluate: function () {}
  2310.     });
  2311.     fljs.swf.tag.SoundStreamBlock = function () {};
  2312.     fljs.addMethods(fljs.swf.tag.SoundStreamBlock, {
  2313.         read: function (a, b) {
  2314.             this.SampleCount = a.readUI16();
  2315.             this.Mp3SoundData = a.readMp3SoundData(b.TagLength - 2)
  2316.         },
  2317.         evaluate: function (a, b, c, d) {
  2318.             if (d == a.mainTimeline) if (b = d.audioStream) {
  2319.                 b.shouldBuffer() && b.buffer();
  2320.                 c = a.mainTimeline.currentFrameIndex_;
  2321.                 if (!b.playing && b.frameShouldPlay(c)) {
  2322.                     b.playFrame(c);
  2323.                     a.sync.start(c)
  2324.                 }
  2325.             }
  2326.         },
  2327.         duration: function () {
  2328.             var a = 0;
  2329.             for (var b in this.Mp3SoundData.Mp3Frames) {
  2330.                 var c = this.Mp3SoundData.Mp3Frames[b],
  2331.                     d;
  2332.                 d = c.MpegVersion == 3 ? 1152 : 576;
  2333.                 var e = {
  2334.                     0: 11025,
  2335.                     1: 12E3,
  2336.                     2: 8E3
  2337.                 }[c.SamplingRate];
  2338.                 e *= {
  2339.                     0: 1,
  2340.                     2: 2,
  2341.                     3: 4
  2342.                 }[c.MpegVersion];
  2343.                 a += 1E3 * d / e / (c.ChannelMode == 3 ? 1 : 2)
  2344.             }
  2345.             return a
  2346.         }
  2347.     });
  2348.     fljs.swf.SwfStreamingSoundReader = function (a, b) {
  2349.         this.stream = new fljs.swf.SwfStream(new fljs.swf.StringStream(a));
  2350.         this.container = b;
  2351.         b.soundStream = this;
  2352.         this.tagMap = {
  2353.             19: fljs.swf.tag.SoundStreamBlock
  2354.         };
  2355.         this.currentTimeOffset = this.currentPlayer = 0;
  2356.         this.data = [];
  2357.         this.dataDurations = [];
  2358.         this.container.needAudio();
  2359.         for (a = 0; a < 2; a++) {
  2360.             b = this.container.audio[a];
  2361.             b.currentTimeOffset = 0;
  2362.             b.addEventListener("load", fljs.bind(this.onLoadSrc, this, a), true)
  2363.         }
  2364.         this.lastBufferAt = null;
  2365.         this.swfFrames = {};
  2366.         this.duration = this.swfFrameNum =
  2367.         0;
  2368.         this.playing = false;
  2369.         this.nextTime = null;
  2370.         this.waitingForLoad = false;
  2371.         this.dataOffset = 0;
  2372.         this.player = fljs.Player.getInstance()
  2373.     };
  2374.     fljs.addMethods(fljs.swf.SwfStreamingSoundReader, {
  2375.         controlFrame: function () {},
  2376.         timeDiff: function (a) {
  2377.             var b = this.container.audio[this.currentPlayer];
  2378.             return 1E3 * (b.currentTime + b.currentTimeOffset) - this.swfFrames[a]
  2379.         },
  2380.         currentTime: function () {
  2381.             var a = this.container.audio[this.currentPlayer];
  2382.             return 1E3 * (a.currentTime + a.currentTimeOffset)
  2383.         },
  2384.         play: function (a) {
  2385.             a = this.swfFrames[a];
  2386.             if (a == null) a = 0;
  2387.             a /= 1E3;
  2388.             this.nextTime = a;
  2389.             this.playing = true;
  2390.             if (!this.waitingForLoad) {
  2391.                 var b = this.container.audio[this.currentPlayer];
  2392.                 b.currentTime =
  2393.                 a - b.currentTimeOffset;
  2394.                 b.fljsPlaying = true;
  2395.                 this.player.playing && b.play()
  2396.             }
  2397.         },
  2398.         stop: function () {
  2399.             this.playing = false;
  2400.             var a = this.container.audio[this.currentPlayer];
  2401.             a.fljsPlaying = false;
  2402.             a.pause()
  2403.         },
  2404.         silence: function () {
  2405.             return ""
  2406.         },
  2407.         onLoadSrc: function (a) {
  2408.             var b = this.container.audio[a],
  2409.                 c = this.container.audio[1 - a];
  2410.             b.fljsWaiting = false;
  2411.             if (this.nextTime != null) {
  2412.                 b.currentTime = this.nextTime - b.currentTimeOffset;
  2413.                 this.nextTime = null
  2414.             } else b.currentTime = c.currentTime + c.currentTimeOffset - b.currentTimeOffset;
  2415.             if (this.playing) {
  2416.                 b.fljsPlaying =
  2417.                 true;
  2418.                 this.player.playing && b.play()
  2419.             }
  2420.             c.fljsPlaying = false;
  2421.             c.pause();
  2422.             this.currentPlayer = a;
  2423.             this.waitingForLoad = false
  2424.         },
  2425.         processBlock: function (a, b) {
  2426.             a = new fljs.swf.StringStream(this.stream.stream.buffer);
  2427.             a.byteIndex = b.Mp3SoundData.byteIndex;
  2428.             a = a.readBytes(b.Mp3SoundData.byteCount).join("");
  2429.             this.data.push(String(a));
  2430.             if (b.SampleCount) {
  2431.                 a = b.duration();
  2432.                 b = a * (b.Mp3SoundData.SeekSamples / b.SampleCount);
  2433.                 this.swfFrames[this.swfFrameNum] = this.duration + b;
  2434.                 this.sync && this.sync.setFrameTime(this.swfFrameNum, this.duration + b);
  2435.                 this.duration += a
  2436.             } else a = 0;
  2437.             this.dataDurations.push(a / 1E3);
  2438.             this.blocks += 1;
  2439.             return this.blocks < fljs.swf.SwfStreamingSoundReader.bufferBlocks
  2440.         },
  2441.         buffer: function () {
  2442.             this.blocks = 0;
  2443.             this.readTags(fljs.bind(this.processBlock, this), this.stream.stream.byteIndex);
  2444.             for (var a = this.container.audio[this.currentPlayer], b = this.container.audio[1 - this.currentPlayer]; this.currentTimeOffset + this.dataDurations[this.dataOffset] < a.currentTime + a.currentTimeOffset;) {
  2445.                 this.currentTimeOffset += this.dataDurations[this.dataOffset];
  2446.                 this.dataOffset += 1
  2447.             }
  2448.             a = "data:audio/mpeg;base64," + btoa(this.data.slice(this.dataOffset).join(""));
  2449.             b.currentTimeOffset = this.currentTimeOffset;
  2450.             b.setAttribute("src", a);
  2451.             this.waitingForLoad = true;
  2452.             b.fljsWaiting = true;
  2453.             b.load();
  2454.             this.lastBufferAt = fljs.now()
  2455.         },
  2456.         readTags: function (a, b) {
  2457.             var c = fljs.console("soundstream");
  2458.             if (b) this.stream.stream.seek(b);
  2459.             else this.stream.header = this.stream.readSwfHeader();
  2460.             for (var d, e; this.stream.hasMore();) {
  2461.                 d = this.stream.readRecordHeader();
  2462.                 e = this.tagMap[d.TagType];
  2463.                 b = this.stream.stream.byteIndex;
  2464.                 if (e) {
  2465.                     e = new e;
  2466.                     e.read(this.stream, d, this, a, fljs.Player.getInstance().stage);
  2467.                     if (!a(d, e)) return
  2468.                 } else {
  2469.                     this.stream.skipBytes(d.TagLength);
  2470.                     if (d.TagType == 1) this.swfFrameNum += 1
  2471.                 }
  2472.                 if (this.stream.stream.byteIndex != b + d.TagLength) {
  2473.                     c.info("expected " + (b + d.TagLength) + " but got " + this.stream.stream.byteIndex);
  2474.                     return
  2475.                 }
  2476.             }
  2477.         }
  2478.     });
  2479.     fljs.swf.SwfStreamingSoundReader.rebufferDuration = 9E4;
  2480.     fljs.swf.SwfStreamingSoundReader.bufferBlocks = 4500;
  2481.     fljs.swf.tag.SoundStreamHead = function () {};
  2482.     fljs.addMethods(fljs.swf.tag.SoundStreamHead, {
  2483.         read: function (a) {
  2484.             a.readUB(4);
  2485.             this.PlaybackSoundRate = a.readUB(2);
  2486.             this.PlaybackSoundSize = a.readUB(1);
  2487.             this.PlaybackSoundType = a.readUB(1);
  2488.             this.StreamSoundCompression = a.readUB(4);
  2489.             this.StreamSoundRate = a.readUB(2);
  2490.             this.StreamSoundSize = a.readUB(1);
  2491.             this.StreamSoundType = a.readUB(1);
  2492.             this.StreamSoundSampleCount = a.readUI16();
  2493.             if (this.StreamSoundCompression == 2) this.LatencySeek = a.readSI16()
  2494.         },
  2495.         evaluate: function (a, b, c, d) {
  2496.             if (!this.processed) {
  2497.                 d.soundStreamHead = this;
  2498.                 if (d == a.mainTimeline) {
  2499.                     d.audioStream = fljs.agent.browser == "Firefox" ? new fljs.player.ExtAudioStream(a, d, "audio/" + a.name + "-" + (d.def ? d.def.defId : "main") + ".wav") : new fljs.player.SwfAudioStream(a, d);
  2500.                     a.sync = new fljs.player.AudioSync(a.header.FrameRate);
  2501.                     a.sync.setAudio(d.audioStream);
  2502.                     d.audioStream.buffer()
  2503.                 }
  2504.                 this.processed = true
  2505.             }
  2506.         }
  2507.     });
  2508.     fljs.swf.tag.DefineFont2 = function () {};
  2509.     fljs.addMethods(fljs.swf.tag.DefineFont2, {
  2510.         read: function (a) {
  2511.             var b;
  2512.             this.FontId = a.readUI16();
  2513.             this.FontFlagsHasLayout = a.readUB(1);
  2514.             this.FontFlagsShiftJIS = a.readUB(1);
  2515.             this.FontFlagsSmallText = a.readUB(1);
  2516.             this.FontFlagsANSI = a.readUB(1);
  2517.             this.FontFlagsWideOffsets = a.readUB(1);
  2518.             this.FontFlagsWideCodes = a.readUB(1);
  2519.             a.FontFlagsWideCodes = this.FontFlagsWideCodes;
  2520.             this.FontFlagsItalic = a.readUB(1);
  2521.             this.FontFlagsBold = a.readUB(1);
  2522.             this.LanguageCode = a.readLangCode();
  2523.             this.FontNameLen = a.readUI8();
  2524.             var c = [];
  2525.             for (b = 0; b < this.FontNameLen; b++) c.push(String.fromCharCode(a.readUI8()));
  2526.             this.FontName = c.join("");
  2527.             this.NumGlyphs = a.readUI16();
  2528.             this.OffsetTable = [];
  2529.             if (this.FontFlagsWideOffsets) {
  2530.                 for (b = 0; b < this.NumGlyphs; b++) this.OffsetTable.push(a.readUI32());
  2531.                 this.CodeTableOffset = a.readUI32()
  2532.             } else {
  2533.                 for (b = 0; b < this.NumGlyphs; b++) this.OffsetTable.push(a.readUI16());
  2534.                 this.CodeTableOffset = a.readUI16()
  2535.             }
  2536.             this.GlyphShapeTable = [];
  2537.             for (b = 0; b < this.NumGlyphs; b++) this.GlyphShapeTable.push(a.readShape());
  2538.             this.CodeTable = [];
  2539.             if (this.FontFlagsWideCodes) for (b = 0; b < this.NumGlyphs; b++) this.CodeTable.push(a.readUI16());
  2540.             else for (b = 0; b < this.NumGlyphs; b++) this.CodeTable.push(a.readUI8());
  2541.             if (this.FontFlagsHasLayout) {
  2542.                 this.FontAscent = a.readSI16();
  2543.                 this.FontDescent = a.readSI16();
  2544.                 this.FontLeading = a.readSI16();
  2545.                 this.FontAdvanceTable = [];
  2546.                 for (b = 0; b < this.NumGlyphs; b++) this.FontAdvanceTable.push(a.readSI16());
  2547.                 this.FontBoundsTable = [];
  2548.                 for (b = 0; b < this.NumGlyphs; b++) {
  2549.                     this.FontBoundsTable.push(a.readRECT());
  2550.                     a.stream.align()
  2551.                 }
  2552.                 this.KerningCount = a.readUI16();
  2553.                 this.FontKerningTable = [];
  2554.                 for (b = 0; b < this.KerningCount; b++) this.FontKerningTable.push(a.readKerningRecord())
  2555.             }
  2556.         },
  2557.         evaluate: function (a) {
  2558.             var b = (new fljs.swf.build.FontBuilder(this, a)).buildDef();
  2559.             a.defineFont2(this.FontId, this.GlyphShapeTable.length, b, this.FontName, this.FontFlagsBold, this.FontFlagsItalic, this.CodeTable, this)
  2560.         }
  2561.     });
  2562.     flash.text = {};
  2563.     flash.text.TextFormatAlign = function () {};
  2564.     fljs.addConstants(flash.text.TextFormatAlign, {
  2565.         CENTER: "center",
  2566.         JUSTIFY: "justify",
  2567.         LEFT: "left",
  2568.         RIGHT: "right"
  2569.     });
  2570.     flash.text.TextFormat = function (a, b, c, d, e, f, g, j, h, m, k, l, n, p) {
  2571.         if (typeof a == "undefined") a = null;
  2572.         this.font = a;
  2573.         if (typeof b == "undefined") b = null;
  2574.         this.size = b;
  2575.         if (typeof c == "undefined") c = null;
  2576.         this.color = c;
  2577.         if (typeof d == "undefined") d = null;
  2578.         this.bold = d;
  2579.         if (typeof e == "undefined") e = null;
  2580.         this.italic = e;
  2581.         if (typeof f == "undefined") f = null;
  2582.         this.underline = f;
  2583.         if (typeof g == "undefined") g = null;
  2584.         this.url = g;
  2585.         if (typeof j == "undefined") j = null;
  2586.         this.target = j;
  2587.         if (typeof h == "undefined") h = flash.text.TextFormatAlign.LEFT;
  2588.         this.align = h;
  2589.         if (typeof m == "undefined") m = null;
  2590.         this.leftMargin = m;
  2591.         if (typeof k == "undefined") k = null;
  2592.         this.rightMargin = k;
  2593.         if (typeof l == "undefined") l = null;
  2594.         this.indent = l;
  2595.         if (typeof n == "undefined") n = null;
  2596.         this.leading = n;
  2597.         if (typeof p == "undefined") p = 1;
  2598.         this.alpha = p
  2599.     };
  2600.     flash.text.TextField = function () {
  2601.         flash.display.InteractiveObject.call(this);
  2602.         var a = this.element_ = new fljs.dom.Element;
  2603.         a.create(fljs.dom.Namespace.Svg, "g");
  2604.         this._clipElement.element.appendChild(this.element_.getElement());
  2605.         this.font_ = {
  2606.             family: "times",
  2607.             size: 12
  2608.         };
  2609.         this.fill_ = {
  2610.             color: 0
  2611.         };
  2612.         this.textFormat_ = new flash.text.TextFormat(this.font_.family, this.font_.size, this.fill_.color, false, false, false, null, null, flash.text.TextFormatAlign.LEFT, 0, 0, 0, 0);
  2613.         if (fljs.Player.getInstance().renderTextAsGlyphs) {
  2614.             a = Math.round(this.font_.size * 0.85);
  2615.             var b = Math.round(0 - this.font_.size / 2 + a);
  2616.             a = this._text = this.text_ = new fljs.dom.Element;
  2617.             a.create(fljs.dom.Namespace.Svg, "text");
  2618.             a.sets([[null, "fill", this.__colorToSvgString(this.font_.color)], [null, "font-family", this.font_.family], [null, "font-size", this.font_.size], [null, "font-family", this.font_.family], [null, "x", 0], [null, "y", b]]);
  2619.             a.update();
  2620.             this.element_.append(a)
  2621.         } else {
  2622.             a = this._text = new fljs.dom.Element;
  2623.             a.create(fljs.dom.Namespace.Svg, "g");
  2624.             a.update();
  2625.             this.element_.append(a)
  2626.         }
  2627.         this._textContent = ""
  2628.     };
  2629.     fljs.inherits(flash.text.TextField, flash.display.InteractiveObject);
  2630.     fljs.addMethods(flash.text.TextField, {
  2631.         setTextMatrix: function (a) {
  2632.             this._textMatrix = a;
  2633.             this._text.set(null, 'transform', a.__toSvgString());
  2634.             this._text.update()
  2635.         },
  2636.         __setSpans: function (a) {
  2637.             var b = [];
  2638.             this.spans = [];
  2639.             if (fljs.Player.getInstance().renderTextAsGlyphs) {
  2640.                 var c = this.text_.getElement().ownerDocument;
  2641.                 for (var d in a) {
  2642.                     var e = a[d],
  2643.                         f = c.createElementNS("http://www.w3.org/2000/svg", "tspan"),
  2644.                         g = e.format.indent,
  2645.                         j = [g];
  2646.                     for (var h in e.advances) {
  2647.                         g += e.advances[h];
  2648.                         j.push(g)
  2649.                     }
  2650.                     f.appendChild(c.createTextNode(e.text));
  2651.                     f.setAttributeNS(null, "x", j.join(" "));
  2652.                     f.setAttributeNS(null, "y", e.format.leading);
  2653.                     f.setAttributeNS(null, "font-size", e.format.size);
  2654.                     f.setAttributeNS(null, "fill", this.__colorToSvgString(e.format.color));
  2655.                     f.setAttributeNS(null, "fill-opacity", this.textOpacityWithXform(e.format.alpha));
  2656.                     this.text_.getElement().appendChild(f);
  2657.                     this.spans.push({
  2658.                         def: e,
  2659.                         element: f
  2660.                     });
  2661.                     b.push(e.text)
  2662.                 }
  2663.             } else {
  2664.                 fljs.Player.getInstance();
  2665.                 c = this._text;
  2666.                 for (d in a) {
  2667.                     e = a[d];
  2668.                     f = e.format;
  2669.                     j = e.advances;
  2670.                     var m = new fljs.dom.Element;
  2671.                     m.create(fljs.dom.Namespace.Svg, "g");
  2672.                     m.sets([["transform", ["translate(", f.indent, ",", f.leading, ")"].join("")], ["fill", this.__colorToSvgString(f.color)],
  2673.                         ["fill-opacity", this.opacityWithXform(f.alpha)]]);
  2674.                     m.update();
  2675.                     h = g = 0;
  2676.                     for (var k = e.text.length; h < k; h++) {
  2677.                         var l = new fljs.dom.Element;
  2678.                         l.create(fljs.dom.Namespace.Svg, "use");
  2679.                         var n = ["font", f.fontid, f.bold, f.italic, e.text.charCodeAt(h)].join("-");
  2680.                         l.sets([[fljs.dom.Namespace.Xlink, "xlink:href", "#" + n], ["transform", ["translate(", g, ")scale(", f.size * 20 / 1024, ")"].join("")]]);
  2681.                         l.update();
  2682.                         m.append(l);
  2683.                         g += j[h]
  2684.                     }
  2685.                     c.append(m);
  2686.                     this.spans.push({
  2687.                         def: e,
  2688.                         element: m
  2689.                     });
  2690.                     b.push(e.text)
  2691.                 }
  2692.             }
  2693.             this._textContent = b.join("")
  2694.         },
  2695.         __colorToSvgString: function (a) {
  2696.             var b =
  2697.             a >> 16 & 255,
  2698.                 c = a >> 8 & 255;
  2699.             a = a & 255;
  2700.             var d = this.getTransform().getConcatenatedColorTransform();
  2701.             if (!d.__default) {
  2702.                 b = Math.max(0, Math.min(255, Math.round(b * d.redMultiplier + d.redOffset)));
  2703.                 c = Math.max(0, Math.min(255, Math.round(c * d.greenMultiplier + d.greenOffset)));
  2704.                 a = Math.max(0, Math.min(255, Math.round(a * d.blueMultiplier + d.blueOffset)))
  2705.             }
  2706.             return "rgb(" + [b, c, a] + ")"
  2707.         },
  2708.         opacityWithXform: function (a) {
  2709.             return a
  2710.         },
  2711.         textOpacityWithXform: function (a) {
  2712.             var b = this.getTransform().getConcatenatedColorTransform();
  2713.             return b.__default ? a : Math.max(0, Math.min(255, Math.round(a * 255 * b.alphaMultiplier + b.alphaOffset))) / 255
  2714.         },
  2715.         __setColorTransform: function (a) {
  2716.             if (fljs.Player.getInstance().renderTextAsGlyphs) for (var b in this.spans) {
  2717.                 var c = this.spans[b];
  2718.                 a = c.def;
  2719.                 c = c.element;
  2720.                 c.setAttributeNS(null, "color", this.__colorToSvgString(a.format.color));
  2721.                 c.setAttributeNS(null, "fill-opacity", this.textOpacityWithXform(a.format.alpha))
  2722.             } else {
  2723.                 fljs.base(this, "__setColorTransform", a);
  2724.                 for (b in this.spans) {
  2725.                     c = this.spans[b];
  2726.                     a = c.def;
  2727.                     c = c.element;
  2728.                     c.sets([[null, "color", this.__colorToSvgString(a.format.color)]]);
  2729.                     c.update()
  2730.                 }
  2731.             }
  2732.         },
  2733.         setHeight: function (a) {
  2734.             this.height_ = a
  2735.         },
  2736.         setWidth: function (a) {
  2737.             this.width_ = a
  2738.         },
  2739.         getDefaultTextFormat: function () {
  2740.             return this.textFormat_
  2741.         },
  2742.         setDefaultTextFormat: function (a) {
  2743.             if (fljs.Player.getInstance().renderTextAsGlyphs) {
  2744.                 var b = this.textFormat_;
  2745.                 this.textFormat_ = a;
  2746.                 if (b.align != this.textFormat_.align) switch (this.textFormat_.align) {
  2747.                 case flash.text.TextFormatAlign.LEFT:
  2748.                     this.text_.getElement().setAttribute("x", this.x);
  2749.                     this.text_.getElement().setAttribute("text-anchor", "start");
  2750.                     break;
  2751.                 case flash.text.TextFormatAlign.CENTER:
  2752.                     this.text_.getElement().setAttribute("x", this.x + this.width / 2);
  2753.                     this.text_.getElement().setAttribute("text-anchor", "middle");
  2754.                     break;
  2755.                 case flash.text.TextFormatAlign.LEFT:
  2756.                     this.text_.getElement().setAttribute("x", this.x + this.width);
  2757.                     this.text_.getElement().setAttribute("text-anchor", "end");
  2758.                     break;
  2759.                 default:
  2760.                 }
  2761.                 if (b.font != this.textFormat_.font) {
  2762.                     a = fljs.Player.getInstance().lookupFontByStyle(this.textFormat_.font, this.textFormat_.bold, this.textFormat_.italic);
  2763.                     this.text_.getElement().setAttributeNS(null, "font-family", a)
  2764.                 }
  2765.                 if (b.bold != this.textFormat_.bold) {
  2766.                     a =
  2767.                     this.textFormat_.bold ? "bold" : "";
  2768.                     this.text_.getElement().setAttribute("font-weight", a)
  2769.                 }
  2770.                 if (b.italic != this.textFormat_.italic) {
  2771.                     a = this.textFormat_.italic ? "italic" : "";
  2772.                     this.text_.getElement().setAttribute("font-style", a)
  2773.                 }
  2774.                 if (b.color != this.textFormat_.color) {
  2775.                     this.fill_ = {
  2776.                         color: this.textFormat_.color
  2777.                     };
  2778.                     this.text_.set(null, "fill", this.__colorToSvgString(this.fill_.color))
  2779.                 }
  2780.                 if (b.size != this.textFormat_.size) {
  2781.                     this.font_ = {
  2782.                         size: this.textFormat_.size,
  2783.                         family: this.textFormat_.font
  2784.                     };
  2785.                     this.text_.getElement().setAttribute("font-size", this.textFormat_.size)
  2786.                 }
  2787.                 b.alpha != this.textFormat_.alpha && this.text_.getElement().setAttribute("opacity", this.textFormat_.alpha)
  2788.             }
  2789.         }
  2790.     });
  2791.     fljs.swf.tag.DefineEditText = function () {};
  2792.     fljs.addMethods(fljs.swf.tag.DefineEditText, {
  2793.         read: function (a) {
  2794.             this.CharacterId = a.readUI16();
  2795.             this.Bounds = a.readRECT();
  2796.             a.stream.align();
  2797.             this.HasText = a.readUB(1);
  2798.             this.WordWrap = a.readUB(1);
  2799.             this.Multiline = a.readUB(1);
  2800.             this.Password = a.readUB(1);
  2801.             this.ReadOnly = a.readUB(1);
  2802.             this.HasTextColor = a.readUB(1);
  2803.             this.HasMaxLength = a.readUB(1);
  2804.             this.HasFont = a.readUB(1);
  2805.             this.HasFontClass = a.readUB(1);
  2806.             this.AutoSize = a.readUB(1);
  2807.             this.HasLayout = a.readUB(1);
  2808.             this.NoSelect = a.readUB(1);
  2809.             this.Border = a.readUB(1);
  2810.             this.WasStatic = a.readUB(1);
  2811.             this.HTML = a.readUB(1);
  2812.             this.UseOutlines = a.readUB(1);
  2813.             if (this.HasFont) this.FontId = a.readUI16();
  2814.             if (this.HasFontClass) this.FontClass = a.readString();
  2815.             if (this.HasFont) this.FontHeight = a.readUI16() / a.twipsPerPixel;
  2816.             if (this.HasTextColor) this.TextColor = a.readRGBA();
  2817.             if (this.HasMaxLength) this.MaxLength = a.readUI16();
  2818.             if (this.HasLayout) {
  2819.                 this.Align = a.readUI8();
  2820.                 this.LeftMargin = a.readUI16();
  2821.                 this.RightMargin = a.readUI16();
  2822.                 this.Indent = a.readUI16();
  2823.                 this.Leading = a.readUI16()
  2824.             }
  2825.             this.VariableName = a.readString();
  2826.             if (this.HasText) this.InitialText = a.readString()
  2827.         },
  2828.         evaluate: function (a) {
  2829.             a.addDefinition(this, this.CharacterId)
  2830.         },
  2831.         _build: function (a) {
  2832.             a = a.element.getElement().ownerDocument;
  2833.             var b = a.createElement("text");
  2834.             b.setAttribute("font-family", "font-" + String(this.FontId));
  2835.             b.setAttribute("font-size", this.FontHeight);
  2836.             var c = this.TextColor,
  2837.                 d = 0;
  2838.             d += c.Red << 16;
  2839.             d += c.Green << 8;
  2840.             d += c.Blue;
  2841.             b.setAttribute("fill", d);
  2842.             var e, f;
  2843.             if (this.Align) {
  2844.                 if (this.Align == 1) {
  2845.                     e = this.Bounds.Xmax;
  2846.                     f = "end"
  2847.                 }
  2848.             } else {
  2849.                 e = this.Bounds.Xmin;
  2850.                 f = "start"
  2851.             }
  2852.             b.setAttribute("x", e);
  2853.             b.setAttribute("text-anchor", f);
  2854.             b.setAttribute("y", this.Bounds.Ymax);
  2855.             b.appendChild(a.createTextNode(this.InitialText ? this.InitialText : ""));
  2856.             return b
  2857.         },
  2858.         build: function (a, b) {
  2859.             return this._buildTextField(a, b)
  2860.         },
  2861.         _buildTextField: function (a, b) {
  2862.             var c = new flash.text.TextField;
  2863.             b && c.getTransform().setColorTransform(b);
  2864.             c.text = this.InitialText;
  2865.             c.x = this.Bounds.Xmin;
  2866.             c.y = this.Bounds.Ymin;
  2867.             c.setWidth(this.Bounds.Xmax - this.Bounds.Xmin);
  2868.             c.setHeight(this.Bounds.Ymax - this.Bounds.Ymin);
  2869.             b = new flash.text.TextFormat;
  2870.             switch (this.Align) {
  2871.             case 0:
  2872.                 b.align = flash.text.TextFormatAlign.LEFT;
  2873.                 break;
  2874.             case 1:
  2875.                 b.align = flash.text.TextFormatAlign.RIGHT;
  2876.                 break;
  2877.             case 2:
  2878.                 b.align = flash.text.TextFormatAlign.CENTER;
  2879.                 break;
  2880.             case 3:
  2881.                 b.align = flash.text.TextFormatAlign.JUSTIFY;
  2882.                 break
  2883.             }
  2884.             if (a = a.fonts2[this.FontId]) {
  2885.                 b.bold = a.bold;
  2886.                 b.italic = a.italic;
  2887.                 b.font = a.name
  2888.             }
  2889.             a = this.TextColor;
  2890.             var d = 0;
  2891.             d += a.Red << 16;
  2892.             d += a.Green << 8;
  2893.             d += a.Blue;
  2894.             b.color = d;
  2895.             b.leading = this.Leading;
  2896.             b.leftMargin = this.LeftMargin;
  2897.             b.rightMargin = this.RightMargin;
  2898.             b.indent = this.Indent;
  2899.             b.size = this.FontHeight;
  2900.             c.setDefaultTextFormat(b);
  2901.             return c
  2902.         }
  2903.     });
  2904.     fljs.swf.tag.RemoveObject2 = function () {};
  2905.     fljs.addMethods(fljs.swf.tag.RemoveObject2, {
  2906.         read: function (a) {
  2907.             this.Depth = a.readUI16()
  2908.         },
  2909.         evaluate: function (a, b, c, d) {
  2910.             d.removeChildAt(this.Depth)
  2911.         }
  2912.     });
  2913.     fljs.swf.build.JpegBuilder = function () {};
  2914.     fljs.addMethods(fljs.swf.build.JpegBuilder, {
  2915.         parseJpeg: function (a, b, c, d) {
  2916.             b = String(b.readBytes(c).join(""));
  2917.             var e = new fljs.swf.BigEndianStringStream(b),
  2918.                 f, g, j = fljs.Player.getInstance(),
  2919.                 h;
  2920.             if (e.nextUShort() == 65497) {
  2921.                 h = d && j.jpegTables ? 6 : 4;
  2922.                 e.nextUShort();
  2923.                 e.nextUShort()
  2924.             } else h = d && j.jpegTables ? 2 : 0;
  2925.             for (var m = 0; e.byteIndex < c;) {
  2926.                 f = e.nextUShort();
  2927.                 g = e.nextUShort();
  2928.                 if (f == 65472) {
  2929.                     e.nextUByte();
  2930.                     a.Height = e.nextUShort();
  2931.                     a.Width = e.nextUShort();
  2932.                     break
  2933.                 }
  2934.                 if (f == 65497) m = e.byteIndex - 6;
  2935.                 else e.skipBytes(g - 2)
  2936.             }
  2937.             if (m) b = b.substr(0, m) + b.substr(m + 6);
  2938.             if (h) b = b.substr(h);
  2939.             a.DataUri = "data:image/jpeg;base64," + btoa((d && j.jpegTables ? j.jpegTables : "") + b)
  2940.         },
  2941.         parseJpegTables: function (a, b, c) {
  2942.             b = String(b.readBytes(c).join(""));
  2943.             var d = new fljs.swf.BigEndianStringStream(b),
  2944.                 e = 0;
  2945.             if (d.nextUShort() == 65497) {
  2946.                 e = 4;
  2947.                 d.nextUShort();
  2948.                 d.nextUShort()
  2949.             }
  2950.             a.JpegTables = b.substr(e, c - e - 2)
  2951.         }
  2952.     });
  2953.     fljs.swf.tag.DefineBitsJPEG2 = function () {};
  2954.     fljs.addMethods(fljs.swf.tag.DefineBitsJPEG2, {
  2955.         read: function (a, b) {
  2956.             this.CharacterId = a.readUI16();
  2957.             b = b.TagLength - 2;
  2958.             (new fljs.swf.build.JpegBuilder).parseJpeg(this, a, b, true)
  2959.         },
  2960.         evaluate: function (a) {
  2961.             this.defId = "image" + this.CharacterId;
  2962.             a.addDefinition(this, this.CharacterId);
  2963.             a = new fljs.swf.def.BitmapDef;
  2964.             a.setCharaId(this.defId);
  2965.             a.element.sets([[fljs.dom.Namespace.Xlink, "xlink:href", this.DataUri], [null, "x", 0], [null, "y", 0], [null, "width", this.Width], [null, "height", this.Height]]);
  2966.             a.define();
  2967.             this.def = a
  2968.         }
  2969.     });
  2970.     flash.display.Sprite = function () {
  2971.         flash.display.DisplayObjectContainer.call(this)
  2972.     };
  2973.     fljs.inherits(flash.display.Sprite, flash.display.DisplayObjectContainer);
  2974.     fljs.addMethods(flash.display.Sprite, {
  2975.         startDrag: function () {},
  2976.         stopDrag: function () {},
  2977.         getGraphics: function () {
  2978.             return this.graphics_
  2979.         }
  2980.     });
  2981.     flash.display.Scene = function () {};
  2982.     flash.ui = {};
  2983.     flash.ui.Keyboard = function () {};
  2984.     fljs.addStaticMethods(flash.ui.Keyboard, {
  2985.         isAccessible: function () {}
  2986.     });
  2987.     fljs.addConstants(flash.ui.Keyboard, {
  2988.         BACKSPACE: 8,
  2989.         CAPS_LOCK: 20,
  2990.         CONTROL: 17,
  2991.         DELETE: 46,
  2992.         DOWN: 40,
  2993.         END: 35,
  2994.         ENTER: 13,
  2995.         ESCAPE: 27,
  2996.         F1: 112,
  2997.         F10: 121,
  2998.         F11: 122,
  2999.         F12: 123,
  3000.         F13: 124,
  3001.         F14: 125,
  3002.         F15: 126,
  3003.         F2: 113,
  3004.         F3: 114,
  3005.         F4: 115,
  3006.         F5: 116,
  3007.         F6: 117,
  3008.         F7: 118,
  3009.         F8: 119,
  3010.         F9: 120,
  3011.         HOME: 36,
  3012.         INSERT: 45,
  3013.         LEFT: 37,
  3014.         NUMPAD_0: 96,
  3015.         NUMPAD_1: 97,
  3016.         NUMPAD_2: 98,
  3017.         NUMPAD_3: 99,
  3018.         NUMPAD_4: 100,
  3019.         NUMPAD_5: 101,
  3020.         NUMPAD_6: 102,
  3021.         NUMPAD_7: 103,
  3022.         NUMPAD_8: 104,
  3023.         NUMPAD_9: 105,
  3024.         NUMPAD_ADD: 107,
  3025.         NUMPAD_DECIMAL: 110,
  3026.         NUMPAD_DIVIDE: 111,
  3027.         NUMPAD_ENTER: 108,
  3028.         NUMPAD_MULTIPLY: 106,
  3029.         NUMPAD_SUBTRACT: 109,
  3030.         PAGE_DOWN: 34,
  3031.         PAGE_UP: 33,
  3032.         RIGHT: 39,
  3033.         SHIFT: 16,
  3034.         SPACE: 32,
  3035.         TAB: 9,
  3036.         UP: 38
  3037.     });
  3038.     fljs.swf.AudioStreamReader = function (a, b) {
  3039.         this.player = a;
  3040.         this.delegate = b;
  3041.         this.reader = new fljs.swf.TagReader(a.parser.reader.stream.stream.buffer);
  3042.         this.reader.readSwfHeader()
  3043.     };
  3044.     fljs.addMethods(fljs.swf.AudioStreamReader, {
  3045.         hasMore: function () {
  3046.             return this.reader.stream.hasMore()
  3047.         },
  3048.         read: function (a) {
  3049.             for (var b = 0, c = this.delegate, d = this.reader, e = [0]; d.stream.hasMore();) {
  3050.                 var f = d.readTagHeader();
  3051.                 switch (f.tagClass()) {
  3052.                 case fljs.swf.tag.SoundStreamBlock:
  3053.                     f = d.readTag(f);
  3054.                     c.onSoundStreamBlockTag(f, null, e[0]);
  3055.                     b++;
  3056.                     if (b == a) return;
  3057.                     break;
  3058.                 case fljs.swf.tag.ShowFrame:
  3059.                     f = d.readTag(f);
  3060.                     c.onShowFrameTag(f, null, e[0]);
  3061.                     e[0] += 1;
  3062.                     break;
  3063.                 default:
  3064.                     d.skipTag(f);
  3065.                     c.onUnknownTag && c.onUnknownTag(f, null, e[0]);
  3066.                     break
  3067.                 }
  3068.             }
  3069.         }
  3070.     });
  3071.     fljs.player = {};
  3072.     fljs.player.ResourceManager = function () {
  3073.         this.frames = {};
  3074.         this.res = {};
  3075.         this.streams = {};
  3076.         this.listeners = {}
  3077.     };
  3078.     fljs.addMethods(fljs.player.ResourceManager, {
  3079.         addToFrame: function (a, b) {
  3080.             this.frames[b] || (this.frames[b] = {});
  3081.             this.frames[b][a] = true;
  3082.             this.res[a] = b
  3083.         },
  3084.         remove: function (a) {
  3085.             if (this.listeners[a]) for (var b in this.listeners[a]) this.listeners[a][b](a);
  3086.             b = this.res[a];
  3087.             delete this.listeners[a];
  3088.             delete this.frames[b][a];
  3089.             delete this.res[a]
  3090.         },
  3091.         addStream: function (a) {
  3092.             this.streams[a.id] = a
  3093.         },
  3094.         frameReady: function (a) {
  3095.             for (var b = 0; b <= a; b++) {
  3096.                 var c = this.frames[a];
  3097.                 if (c) for (var d in c) return false
  3098.             }
  3099.             for (b in this.streams) if (!this.streams[b].frameReady(a)) return false;
  3100.             return true
  3101.         },
  3102.         listen: function (a, b) {
  3103.             var c = this.listeners[a];
  3104.             c || (c = this.listeners[a] = []);
  3105.             c.push(b)
  3106.         },
  3107.         waiting: function (a) {
  3108.             return a in this.res
  3109.         },
  3110.         newId: function () {
  3111.             return fljs.player.ResourceManager.id++
  3112.         }
  3113.     });
  3114.     fljs.player.ResourceManager.id = 1;
  3115.     fljs.player.ExtAudioStream = function (a, b, c) {
  3116.         this.id = b.resources.newId();
  3117.         b.resources.addStream(this);
  3118.         b = this.audio = a.allocAudio();
  3119.         b.addEventListener("canplaythrough", fljs.bind(this.onAudioLoad, this), true);
  3120.         b.setAttribute("src", c);
  3121.         b.load();
  3122.         this.frames = {};
  3123.         this.playing = false;
  3124.         this.audioStreamReader = new fljs.swf.AudioStreamReader(a, this);
  3125.         this.duration = 0;
  3126.         this.maxFrame = -1
  3127.     };
  3128.     fljs.addMethods(fljs.player.ExtAudioStream, {
  3129.         pingLoad: function () {},
  3130.         frameReady: function (a) {
  3131.             if (this.maxFrame < a) return false;
  3132.             if (typeof this.frames[a] != "undefined") return true;
  3133.             else {
  3134.                 for (a = a; a > 0 && typeof this.frames[a] == "undefined";) a--;
  3135.                 return a == 0 ? true : this.frameReady(a)
  3136.             }
  3137.         },
  3138.         frameShouldPlay: function (a) {
  3139.             for (a = a; a > 0;) {
  3140.                 if (a in this.frames) return !!this.frames[a];
  3141.                 a--
  3142.             }
  3143.             return false
  3144.         },
  3145.         setFrameDuration: function (a, b) {
  3146.             this.frames[a] = b
  3147.         },
  3148.         onAudioLoad: function () {
  3149.             fljs.console("audio").info("onAudioLoad: " + this.audio.readyState + ", " + this.audio.duration);
  3150.             if (!this.started && this.playing) {
  3151.                 this.audio.currentTime = this.frames[this.frame];
  3152.                 this.audio.play()
  3153.             }
  3154.             this.started = true
  3155.         },
  3156.         playFrame: function (a) {
  3157.             fljs.console("audio").info("playFrame:" + this.audio.readyState);
  3158.             if (this.audio.readyState >= 2) {
  3159.                 this.frame = a;
  3160.                 this.audio.currentTime = this.frames[a];
  3161.                 this.audio.play();
  3162.                 this.started = true
  3163.             }
  3164.             this.playing = true
  3165.         },
  3166.         pause: function () {
  3167.             this.audio.pause();
  3168.             this.playing = false
  3169.         },
  3170.         controlsFrame: function () {},
  3171.         currentTime: function () {
  3172.             return this.audio.currentTime * 1E3
  3173.         },
  3174.         setSync: function (a) {
  3175.             this.sync = a
  3176.         },
  3177.         shouldBuffer: function () {
  3178.             var a = fljs.now() - this.lastBufferAt;
  3179.             return !this.lastBufferAt || a > fljs.swf.SwfStreamingSoundReader.rebufferDuration
  3180.         },
  3181.         buffer: function () {
  3182.             var a = this.audioStreamReader;
  3183.             a.hasMore() && a.read(fljs.swf.SwfStreamingSoundReader.bufferBlocks);
  3184.             this.lastBufferAt = fljs.now()
  3185.         },
  3186.         onSoundStreamBlockTag: function (a, b, c) {
  3187.             this.maxFrame = c;
  3188.             b = a.duration();
  3189.             a = this.duration + b * (a.Mp3SoundData.SeekSamples / a.SampleCount);
  3190.             this.frames[c] = a / 1E3;
  3191.             this.duration += b;
  3192.             this.sync.setFrameTime(c, a)
  3193.         },
  3194.         onShowFrameTag: function () {}
  3195.     });
  3196.     fljs.player.SwfAudioStream = function (a, b) {
  3197.         this.id = b.resources.newId();
  3198.         b.resources.addStream(this);
  3199.         this.player = a;
  3200.         this.target = b;
  3201.         this.soundStream = new fljs.swf.SwfStreamingSoundReader(a.parser.reader.stream.stream.buffer, b);
  3202.         this.playing = false
  3203.     };
  3204.     fljs.addMethods(fljs.player.SwfAudioStream, {
  3205.         pingLoad: function () {},
  3206.         frameReady: function (a) {
  3207.             if (typeof this.soundStream.swfFrames[a] != "undefined") return this.soundStream.duration >= this.soundStream.swfFrames[a];
  3208.             else {
  3209.                 for (a = a; a > 0 && typeof this.soundStream.swfFrames[a] == "undefined";) a--;
  3210.                 return a == 0 ? true : this.frameReady(a)
  3211.             }
  3212.         },
  3213.         frameShouldPlay: function (a) {
  3214.             for (a = a; a > 0;) {
  3215.                 if (a in this.soundStream.swfFrames) return true;
  3216.                 a--
  3217.             }
  3218.             return false
  3219.         },
  3220.         setFrameDuration: function () {},
  3221.         playFrame: function (a) {
  3222.             this.soundStream.play(a);
  3223.             this.playing = true
  3224.         },
  3225.         pause: function () {
  3226.             this.soundStream.stop();
  3227.             this.playing = false
  3228.         },
  3229.         controlsFrame: function (a) {
  3230.             return this.soundStream.controlFrame(a)
  3231.         },
  3232.         timeDiff: function (a) {
  3233.             return this.soundStream.timeDiff(a)
  3234.         },
  3235.         currentTime: function () {
  3236.             return this.soundStream.currentTime()
  3237.         },
  3238.         setSync: function (a) {
  3239.             this.soundStream.sync = a
  3240.         },
  3241.         shouldBuffer: function () {
  3242.             var a = fljs.now() - this.soundStream.lastBufferAt;
  3243.             return !this.soundStream.lastBufferAt || a > fljs.swf.SwfStreamingSoundReader.rebufferDuration
  3244.         },
  3245.         buffer: function () {
  3246.             this.soundStream.buffer()
  3247.         }
  3248.     });
  3249.     flash.display.MovieClip = function () {
  3250.         flash.display.Sprite.call(this);
  3251.         var a = new flash.display.Scene;
  3252.         a.labels = [];
  3253.         a.name = "Scene 1";
  3254.         a.numFrames = 1;
  3255.         this.frameData_ = [{
  3256.             scripts: [],
  3257.             parts: [],
  3258.             tags: [],
  3259.             label: "",
  3260.             repeat: false}];
  3261.         this.labels_ = {};
  3262.         this.sceneIndices_ = {};
  3263.         this.currentSceneIndex_ = 0;
  3264.         this.scenes_ = [a];
  3265.         this.currentFrameIndex_ = 0;
  3266.         this.currentLabel_ = null;
  3267.         this._enabled = false;
  3268.         this.totalFrames_ = this.framesLoaded_ = 1;
  3269.         this.next_ = null;
  3270.         this.playing_ = true;
  3271.         this.audio = [];
  3272.         fljs.Player.getInstance();
  3273.         this.id = flash.display.MovieClip.id++;
  3274.         this.element_.getElement().setAttribute("id", "mc" + this.id);
  3275.         this.__buttonStateDown = this.__buttonStateOver = this.firstFrame = false;
  3276.         this.resources = new fljs.player.ResourceManager
  3277.     };
  3278.     fljs.inherits(flash.display.MovieClip, flash.display.Sprite);
  3279.     fljs.addMethods(flash.display.MovieClip, {
  3280.         gotoAndPlay: function (a, b) {
  3281.             this.gotoAnd_(a, b, true)
  3282.         },
  3283.         gotoAndStop: function (a, b) {
  3284.             this.gotoAnd_(a, b, false)
  3285.         },
  3286.         gotoAnd_: function (a, b, c) {
  3287.             var d, e;
  3288.             if (typeof a.valueOf() == "string") if (d = this.labels_[a]) {
  3289.                 d = d.frame - 1;
  3290.                 e = 0
  3291.             } else return;
  3292.             else if (!b) {
  3293.                 d = a - 1;
  3294.                 if (d == -1) d = 0;
  3295.                 a = this.globalFrameIndexToLocal_(d);
  3296.                 d = a[0];
  3297.                 e = a[1]
  3298.             }
  3299.             this.next_ = {
  3300.                 frameIndex: d,
  3301.                 sceneIndex: e,
  3302.                 play: c
  3303.             };
  3304.             this.next_.clear = d != this.currentFrameIndex_ + 1
  3305.         },
  3306.         globalFrameIndexToLocal_: function (a) {
  3307.             for (var b = 0; a >= this.scenes_[b].numFrames;) {
  3308.                 a -= this.scenes_[b].numFrames;
  3309.                 b += 1
  3310.             }
  3311.             return [a, b]
  3312.         },
  3313.         nextFrame: function () {
  3314.             var a = this.currentFrameIndex_ + 1,
  3315.                 b = this.currentSceneIndex_;
  3316.             if (a == this.scenes_[this.currentSceneIndex_].numFrames) if (this.totalFrames_ > 1) {
  3317.                 a = 0;
  3318.                 b += 1;
  3319.                 if (b == this.scenes_.length) b = 0
  3320.             } else {
  3321.                 this.next_ = null;
  3322.                 return
  3323.             }
  3324.             this.next_ = {
  3325.                 frameIndex: a,
  3326.                 sceneIndex: b,
  3327.                 play: this.next_ ? this.next_.play : this.playing_
  3328.             }
  3329.         },
  3330.         nextScene: function () {
  3331.             var a = this.currentSceneIndex_ + 1;
  3332.             if (a == this.scenes_.length) a = 0;
  3333.             this.next_ = {
  3334.                 frameIndex: 0,
  3335.                 sceneIndex: a,
  3336.                 play: true
  3337.             }
  3338.         },
  3339.         play: function () {
  3340.             this.next_ =
  3341.             this.next_ ? {
  3342.                 frameIndex: this.next_.frameIndex,
  3343.                 sceneIndex: this.next_.sceneIndex,
  3344.                 play: true,
  3345.                 clear: this.next_.clear
  3346.             } : {
  3347.                 frameIndex: this.currentFrameIndex_,
  3348.                 sceneIndex: this.currentSceneIndex_,
  3349.                 play: true
  3350.             }
  3351.         },
  3352.         prevFrame: function () {
  3353.             var a = this.currentFrameIndex_ - 1,
  3354.                 b = this.currentSceneIndex_;
  3355.             if (a == -1) {
  3356.                 b -= 1;
  3357.                 if (b == -1) b = this.scenes_.length - 1;
  3358.                 a = this.scenes_[b].numFrames - 1
  3359.             }
  3360.             this.next_ = {
  3361.                 frameIndex: a,
  3362.                 sceneIndex: b,
  3363.                 play: this.next_ ? this.next_.play : this.playing_
  3364.             }
  3365.         },
  3366.         prevScene: function () {
  3367.             var a = this.currentSceneIndex_ - 1;
  3368.             if (a == -1) a = this.scenes_.length - 1;
  3369.             frameIndex = this.scenes_[a].numFrames - 1;
  3370.             this.next_ = {
  3371.                 frameIndex: frameIndex,
  3372.                 sceneIndex: a,
  3373.                 play: true
  3374.             }
  3375.         },
  3376.         stop: function () {
  3377.             var a;
  3378.             if (this.next_) a = this.next_.clear;
  3379.             this.next_ = {
  3380.                 frameIndex: this.currentFrameIndex_,
  3381.                 sceneIndex: this.currentSceneIndex_,
  3382.                 play: false,
  3383.                 stop: true,
  3384.                 clear: a
  3385.             }
  3386.         },
  3387.         clear: function () {
  3388.             for (var a in this.displayList_) this.removeChildAt(a)
  3389.         },
  3390.         onNewFrame: function () {
  3391.             if (this.getStage()) if (this.frameReady(this.currentFrameIndex_)) {
  3392.                 this.pendingFrame = false;
  3393.                 var a = this.frameData_[this.currentFrameIndex_];
  3394.                 if (a.label) this.currentLabel_ = a.label;
  3395.                 for (var b = 0; b < a.tags.length; b++) {
  3396.                     var c = a.tags[b];
  3397.                     c[0] && c[0].evaluate(fljs.Player.getInstance(), null, null, this)
  3398.                 }
  3399.                 if (a.parts) for (b in a.parts) this.addChildAt(a.parts[b], b)
  3400.             } else this.pendingFrame = true
  3401.         },
  3402.         onEnterFrame: function () {
  3403.             var a = false;
  3404.             if (a = this.pendingFrame ? true : this.pickNextFrame()) {
  3405.                 this.onNewFrame();
  3406.                 if (this.pendingFrame) return
  3407.             }(a = this._as2Object) && a._onEnterFrame && fljs.Player.getInstance().interpreter.callback(a, a._onEnterFrame)
  3408.         },
  3409.         onCreate: function () {
  3410.             this.next_ = {
  3411.                 frameIndex: 0,
  3412.                 sceneIndex: 0,
  3413.                 play: !this._enabled && this.totalFrames_ > 1
  3414.             };
  3415.             this.setCurrentFrame();
  3416.             this.onNewFrame()
  3417.         },
  3418.         setCurrentFrame: function () {
  3419.             this.updateSoundStream();
  3420.             this.currentFrameIndex_ = this.next_.frameIndex;
  3421.             this.currentSceneIndex_ = this.next_.sceneIndex;
  3422.             this.playing_ = this.next_.play;
  3423.             this.next_ = null
  3424.         },
  3425.         pickNextFrame: function () {
  3426.             if (this.playing_) if (!this.next_) {
  3427.                 var a = this.currentFrameIndex_ + 1,
  3428.                     b = this.currentSceneIndex_;
  3429.                 if (a == this.scenes_[this.currentSceneIndex_].numFrames) if (a == this.totalFrames_) if (this.totalFrames_ > 1) {
  3430.                     this.clear();
  3431.                     this.next_ = {
  3432.                         frameIndex: 0,
  3433.                         sceneIndex: 0,
  3434.                         play: true
  3435.                     }
  3436.                 } else {
  3437.                     this.playing_ = false;
  3438.                     this.next_ = null
  3439.                 } else this.next_ = {
  3440.                     frameIndex: a,
  3441.                     sceneIndex: b + 1,
  3442.                     play: true
  3443.                 };
  3444.                 else this.next_ = {
  3445.                     frameIndex: a,
  3446.                     sceneIndex: b,
  3447.                     play: this.playing_
  3448.                 }
  3449.             }
  3450.             if (this.next_) if (this._enabled) this.next_.play = false;
  3451.             a = this.next_ && !this.next_.stop && this.next_.frameIndex != this.currentFrameIndex_;
  3452.             if (this.next_) {
  3453.                 a && this.next_.clear && this.removeChildren();
  3454.                 this.setCurrentFrame();
  3455.                 this.next_ = null
  3456.             }
  3457.             return a
  3458.         },
  3459.         onEnterFrame_: function (a) {
  3460.             fljs.console("mc").info("mc#" + this.id + " frame#" + this.currentFrameIndex_);
  3461.             this.onEnterFrame(a)
  3462.         },
  3463.         updateSoundStream: function () {
  3464.             if (this.audioStream) if (this.next_) if (this.next_.play != this.playing_) if (this.next_.playing) this.audioStream.frameShouldPlay(this.next_.frameIndex) && this.audioStream.playFrame(this.next_.frameIndex);
  3465.             else this.audioStream.pause();
  3466.             else this.next_.play && this.next_.frameIndex != this.currentFrameIndex_ + 1 && this.audioStream.frameShouldPlay(this.next_.frameIndex) && this.audioStream.playFrame(this.next_.frameIndex);
  3467.             else this.audioStream.pause()
  3468.         },
  3469.         addFrameScript: function () {
  3470.             for (var a, b, c = 0; c < arguments.length; c += 2) {
  3471.                 a = arguments[c];
  3472.                 b = this.globalFrameIndexToLocal_(a);
  3473.                 a = b[0];
  3474.                 b = b[1];
  3475.                 this.scenes_[b].frameData_[a].scripts.push(arguments[c + 1])
  3476.             }
  3477.         },
  3478.         updateButtonState: function (a) {
  3479.             if (this._enabled) {
  3480.                 var b = flash.events.MouseEvent,
  3481.                     c = flash.events.KeyboardEvent,
  3482.                     d, e;
  3483.                 switch (a.type) {
  3484.                 case b.CLICK:
  3485.                     e = d = true;
  3486.                     break;
  3487.                 case b.MOUSE_OVER:
  3488.                     d = true;
  3489.                     e = this.__buttonStateDown;
  3490.                     break;
  3491.                 case b.MOUSE_OUT:
  3492.                     d = false;
  3493.                     e = this.__buttonStateDown;
  3494.                     break;
  3495.                 case b.MOUSE_DOWN:
  3496.                     d = this.__buttonStateOver;
  3497.                     e = true;
  3498.                     break;
  3499.                 case b.MOUSE_UP:
  3500.                     d = this.__buttonStateOver;
  3501.                     e = false;
  3502.                     break;
  3503.                 case c.KEY_DOWN:
  3504.                     d = this.__buttonStateOver;
  3505.                     e = true;
  3506.                     break;
  3507.                 case c.KEY_UP:
  3508.                     d = this.__buttonStateOver;
  3509.                     e = false;
  3510.                     break
  3511.                 }
  3512.                 var f;
  3513.                 if (this.__buttonStateOver != d) f = d ? e ? this.__buttonStateDown ? "CondOutDownToOverDown" : "CondIdleToOverDown" : "CondIdleToOverUp" : e ? "CondOverDownToOutDown" : "CondOverUpToIdle";
  3514.                 else if (this.__buttonStateDown != e) if (e) {
  3515.                     if (d) f = "CondOverUpToOverDown"
  3516.                 } else f = d ? "CondOverDownToOverUp" : "CondOutDownToIdle";
  3517.                 a = d ? e ? "down" : "over" : "up";
  3518.                 this.__buttonStateOver =
  3519.                 d;
  3520.                 this.__buttonStateDown = e;
  3521.                 this.gotoAndStop("_" + a);
  3522.                 if (f) for (var g in this.__buttonActions) {
  3523.                     d = this.__buttonActions[g];
  3524.                     d[f] && fljs.Player.getInstance().doActions(this, d.Actions)
  3525.                 }
  3526.             }
  3527.         },
  3528.         needAudio: function () {
  3529.             for (var a = fljs.Player.getInstance(), b = 0; b < 2; b++) this.audio[b] = a.allocAudio()
  3530.         },
  3531.         frameReady: function (a) {
  3532.             return this.frameData_[a] && this.frameData_[a].loaded && this.resources.frameReady(a)
  3533.         },
  3534.         getEnabled: function () {
  3535.             return this._enabled
  3536.         },
  3537.         setEnabled: function (a) {
  3538.             this._enabled = !! a
  3539.         }
  3540.     });
  3541.     flash.display.MovieClip.id = 1;
  3542.     fljs.swf.tag.DefineSprite = function () {};
  3543.     fljs.addMethods(fljs.swf.tag.DefineSprite, {
  3544.         read: function (a) {
  3545.             this.defId = this.SpriteId = a.readUI16();
  3546.             this.FrameCount = a.readUI16();
  3547.             this.frameData_ = [{
  3548.                 tags: []}];
  3549.             this.labels_ = {};
  3550.             this.framesLoaded_ = 0;
  3551.             this.totalFrames_ = this.FrameCount
  3552.         },
  3553.         evaluate: function (a) {
  3554.             a.addDefinition(this, this.SpriteId)
  3555.         },
  3556.         build: function (a, b) {
  3557.             a = new flash.display.MovieClip;
  3558.             a.def = this;
  3559.             b && a.getTransform().setColorTransform(b);
  3560.             b = new flash.display.Scene;
  3561.             b.labels = [];
  3562.             b.name = "Scene 1";
  3563.             b.numFrames = this.FrameCount;
  3564.             a.frameData_ = [];
  3565.             for (var c = 0; c < this.FrameCount; c++) {
  3566.                 var d = {
  3567.                     scripts: [],
  3568.                     parts: [],
  3569.                     tags: [],
  3570.                     label: ""
  3571.                 };
  3572.                 d.tags = this.frameData_[c].tags;
  3573.                 d.loaded = this.frameData_[c].loaded;
  3574.                 a.frameData_.push(d)
  3575.             }
  3576.             a.labels_ = this.labels_;
  3577.             a.sceneIndices_ = {};
  3578.             a.currentSceneIndex_ = 0;
  3579.             a.scenes_ = [b];
  3580.             a.currentFrameIndex_ = 0;
  3581.             a.currentLabel_ = null;
  3582.             a._enabled = false;
  3583.             a.framesLoaded_ = this.FrameCount;
  3584.             a.totalFrames_ = this.FrameCount;
  3585.             a.next_ = null;
  3586.             a.playing_ = true;
  3587.             return a
  3588.         }
  3589.     });
  3590.     fljs.swf.tag.DefineSound = function () {};
  3591.     fljs.addMethods(fljs.swf.tag.DefineSound, {
  3592.         read: function (a, b) {
  3593.             this.SoundId = a.readUI16();
  3594.             this.SoundFormat = a.readUB(4);
  3595.             this.SoundRate = a.readUB(2);
  3596.             this.SoundSize = a.readUB(1);
  3597.             this.SoundType = a.readUB(1);
  3598.             this.SoundSampleCount = a.readUI32();
  3599.             this.Mp3SoundData = this.SoundData = a.readMp3SoundData(b.TagLength - 2 - 1 - 4)
  3600.         },
  3601.         evaluate: function (a) {
  3602.             a.sounds[this.SoundId] = this
  3603.         }
  3604.     });
  3605.     fljs.swf.tag.StartSound = function () {};
  3606.     fljs.addMethods(fljs.swf.tag.StartSound, {
  3607.         read: function (a) {
  3608.             this.SoundId = a.readUI16();
  3609.             this.SoundInfo = a.readSoundInfo()
  3610.         },
  3611.         evaluate: function (a, b) {
  3612.             var c = a.sounds[this.SoundId];
  3613.             if (!c.player) {
  3614.                 c.player = a.allocAudio();
  3615.                 b = new fljs.swf.StringStream(a.reader.stream.stream.buffer);
  3616.                 b.byteIndex = c.Mp3SoundData.byteIndex;
  3617.                 b = b.readBytes(c.Mp3SoundData.byteCount).join("");
  3618.                 b = "data:audio/mpeg;base64," + btoa(b);
  3619.                 c.player.setAttribute("src", b)
  3620.             }
  3621.             var d = c.player;
  3622.             if (this.SoundInfo.SyncStop) {
  3623.                 d.fljsPlaying = false;
  3624.                 d.pause()
  3625.             } else if (this.SoundInfo.SyncNoMultiple) {
  3626.                 d.fljsPlaying =
  3627.                 true;
  3628.                 a.playing && d.play()
  3629.             } else {
  3630.                 d.addEventListener("load", function () {
  3631.                     d.currentTime = 0;
  3632.                     d.fljsPlaying = true;
  3633.                     a.playing && d.play()
  3634.                 }, true);
  3635.                 d.load()
  3636.             }
  3637.         }
  3638.     });
  3639.     fljs.swf.tag.DefineShape2 = function () {};
  3640.     fljs.inherits(fljs.swf.tag.DefineShape2, fljs.swf.tag.DefineShape);
  3641.     fljs.addMethods(fljs.swf.tag.DefineShape2, {
  3642.         read: function (a, b) {
  3643.             a.beginContext(fljs.swf.tag.DefineShape2);
  3644.             a.endByteIndex = a.stream.byteIndex + b.TagLength;
  3645.             this.ShapeId = a.readUI16();
  3646.             this.ShapeBounds = a.readRECT();
  3647.             a.stream.align();
  3648.             this.Shapes = a.readSHAPEWITHSTYLE();
  3649.             a.endContext()
  3650.         }
  3651.     });
  3652.     fljs.swf.tag.SoundStreamHead2 = function () {};
  3653.     fljs.inherits(fljs.swf.tag.SoundStreamHead2, fljs.swf.tag.SoundStreamHead);
  3654.     fljs.swf.tag.DefineFontInfo = function () {};
  3655.     fljs.addMethods(fljs.swf.tag.DefineFontInfo, {
  3656.         read: function (a) {
  3657.             this.FontId = a.readUI16();
  3658.             this.FontNameLen = a.readUI8();
  3659.             var b = [];
  3660.             for (i = 0; i < this.FontNameLen; i++) b.push(String.fromCharCode(a.readUI8()));
  3661.             this.FontName = b.join("");
  3662.             a.readUB(2);
  3663.             this.FontFlagsSmallText = a.readUB(1);
  3664.             this.FontFlagsShiftJis = a.readUB(1);
  3665.             this.FontFlagsAnsi = a.readUB(1);
  3666.             this.FontFlagsItalic = a.readUB(1);
  3667.             this.FontFlagsBold = a.readUB(1);
  3668.             this.FontFlagsWideCodes = a.readUB(1);
  3669.             b = fljs.Player.getInstance().fontsWithoutInfo[this.FontId];
  3670.             this.CodeTable = [];
  3671.             if (this.FontFlagsWideCodes) for (i = 0; i < b.NumGlyphs; i++) this.CodeTable.push(a.readUI16());
  3672.             else for (i = 0; i < this.NumGlyphs; i++) this.CodeTable.push(a.readUI8());
  3673.             this.GlyphShapeTable = b.GlyphShapeTable
  3674.         },
  3675.         evaluate: function (a) {
  3676.             var b = (new fljs.swf.build.FontBuilder(this, a)).buildDef();
  3677.             a.defineFont2(this.FontId, this.GlyphShapeTable.length, b, this.FontName, this.FontFlagsBold, this.FontFlagsItalic, this.CodeTable)
  3678.         }
  3679.     });
  3680.     fljs.swf.tag.DefineText = function () {};
  3681.     fljs.addMethods(fljs.swf.tag.DefineText, {
  3682.         read: function (a) {
  3683.             this.CharacterId = a.readUI16();
  3684.             this.TextBounds = a.readRECT();
  3685.             a.stream.align();
  3686.             this.TextMatrix = a.readMATRIX();
  3687.             this.GlyphBits = a.readUI8();
  3688.             this.AdvanceBits = a.readUI8();
  3689.             a.GlyphBits = this.GlyphBits;
  3690.             a.AdvanceBits = this.AdvanceBits;
  3691.             a.context = fljs.swf.tag.DefineText;
  3692.             this.TextRecords = a.readTEXTRECORDS();
  3693.             a.context = null
  3694.         },
  3695.         buildMatrix_: function () {
  3696.             return new flash.geom.Matrix(this.TextMatrix.ScaleX, this.TextMatrix.RotateSkew0, this.TextMatrix.RotateSkew1, this.TextMatrix.ScaleY, this.TextMatrix.TranslateX, this.TextMatrix.TranslateY)
  3697.         },
  3698.         evaluate: function (a) {
  3699.             a.addDefinition(this, this.CharacterId)
  3700.         },
  3701.         build: function (a, b) {
  3702.             return this._buildTextField(a, b)
  3703.         },
  3704.         _buildTextField: function (a, b) {
  3705.             if (!this.TextRecords || !this.TextRecords.length) return null;
  3706.             this.FontId = this.TextRecords[0].FontId;
  3707.             this.Bounds = this.TextBounds;
  3708.             var c = a.fonts2[this.FontId];
  3709.             a = [];
  3710.             var d;
  3711.             fljs.console("definetext");
  3712.             var e, f, g = 0,
  3713.                 j;
  3714.             for (var h in this.TextRecords) {
  3715.                 var m = this.TextRecords[h];
  3716.                 d = new flash.text.TextFormat;
  3717.                 if (c) {
  3718.                     d.bold = c.bold;
  3719.                     d.italic = c.italic;
  3720.                     d.font = c.name;
  3721.                     d.fontid = this.FontId
  3722.                 }
  3723.                 if (m.TextColor) {
  3724.                     var k = m.TextColor;
  3725.                     e = 0;
  3726.                     e += k.Red << 16;
  3727.                     e += k.Green << 8;
  3728.                     e += k.Blue;
  3729.                     if (typeof m.TextColor.Alpha != "undefined") d.alpha = m.TextColor.Alpha / 255
  3730.                 }
  3731.                 d.color = e;
  3732.                 if (m.YOffset != null) {
  3733.                     f = m.YOffset;
  3734.                     g = 0
  3735.                 };
  3736.                 d.leading = f;
  3737.                 if (m.XOffset != null) g = m.XOffset;
  3738.                 d.indent = g;
  3739.                 if (m.TextHeight != null) j = m.TextHeight;
  3740.                 d.size = j;
  3741.                 m = m.GlyphEntries;
  3742.                 k = [];
  3743.                 var l = [];
  3744.                 if (m) for (var n in m) {
  3745.                     var p = m[n];
  3746.                     c ? k.push(String.fromCharCode(c.codeTable[p.GlyphIndex])) : k.push(String.fromCharCode(p.GlyphIndex));
  3747.                     l.push(p.GlyphAdvance);
  3748.                     g += p.GlyphAdvance
  3749.                 }
  3750.                 a.push({
  3751.                     text: k.join(""),
  3752.                     advances: l,
  3753.                     format: d
  3754.                 })
  3755.             }
  3756.             this.Indent = this.RightMargin = this.LeftMargin = this.Leading = this.Align = 0;
  3757.             this.FontHeight = this.TextRecords[0].TextHeight;
  3758.             this.TextColor = this.TextRecords[0].TextColor;
  3759.             e = new flash.text.TextField;
  3760.             e.setTextMatrix(this.buildMatrix_());
  3761.             b && e.getTransform().setColorTransform(b);
  3762.             e.x = this.Bounds.Xmin;
  3763.             e.y = this.Bounds.Ymin;
  3764.             e.setWidth(this.Bounds.Xmax - this.Bounds.Xmin);
  3765.             e.setHeight(this.Bounds.Ymax - this.Bounds.Ymin);
  3766.             e.setDefaultTextFormat(d);
  3767.             e.__setSpans(a);
  3768.             return e
  3769.         }
  3770.     });
  3771.     fljs.swf.tag.DefineFontInfo2 = function () {};
  3772.     fljs.addMethods(fljs.swf.tag.DefineFontInfo2, {
  3773.         read: function (a, b) {
  3774.             var c = a.stream.byteIndex;
  3775.             this.FontId = a.readUI16();
  3776.             this.FontNameLen = a.readUI8();
  3777.             var d = [];
  3778.             for (i = 0; i < this.FontNameLen; i++) d.push(String.fromCharCode(a.readUI8()));
  3779.             this.FontName = d.join("");
  3780.             a.readUB(2);
  3781.             this.FontFlagsSmallText = a.readUB(1);
  3782.             this.FontFlagsShiftJis = a.readUB(1);
  3783.             this.FontFlagsAnsi = a.readUB(1);
  3784.             this.FontFlagsItalic = a.readUB(1);
  3785.             this.FontFlagsBold = a.readUB(1);
  3786.             this.FontFlagsWideCodes = a.readUB(1);
  3787.             this.LanguageCode = a.readLangCode();
  3788.             b =
  3789.             b.TagLength - (a.stream.byteIndex - c);
  3790.             this.CodeTable = [];
  3791.             if (this.FontFlagsWideCodes) {
  3792.                 b = b / 2;
  3793.                 for (i = 0; i < b; i++) this.CodeTable.push(a.readUI16())
  3794.             } else {
  3795.                 b = b;
  3796.                 for (i = 0; i < b; i++) this.CodeTable.push(a.readUI8())
  3797.             }
  3798.         },
  3799.         evaluate: function (a) {
  3800.             this.GlyphShapeTable = a.fontsWithoutInfo[this.FontId].GlyphShapeTable;
  3801.             var b = (new fljs.swf.build.FontBuilder(this, a)).buildDef();
  3802.             a.defineFont2(this.FontId, this.GlyphShapeTable.length, b, this.FontName, this.FontFlagsBold, this.FontFlagsItalic, this.CodeTable)
  3803.         }
  3804.     });
  3805.     fljs.swf.tag.DefineShape3 = function () {};
  3806.     fljs.inherits(fljs.swf.tag.DefineShape3, fljs.swf.tag.DefineShape);
  3807.     fljs.addMethods(fljs.swf.tag.DefineShape3, {
  3808.         read: function (a) {
  3809.             a.beginContext(fljs.swf.tag.DefineShape3);
  3810.             this.ShapeId = a.readUI16();
  3811.             this.ShapeBounds = a.readRECT();
  3812.             a.stream.align();
  3813.             this.Shapes = a.readSHAPEWITHSTYLE();
  3814.             a.endContext()
  3815.         }
  3816.     });
  3817.     fljs.swf.tag.DoAction = function () {};
  3818.     fljs.addMethods(fljs.swf.tag.DoAction, {
  3819.         read: function (a, b) {
  3820.             this.Actions = a.readActionRecords(b.TagLength)
  3821.         },
  3822.         evaluate: function (a, b, c, d) {
  3823.             a.doActions(d, this.Actions)
  3824.         }
  3825.     });
  3826.     fljs.swf.tag.Protect = function () {};
  3827.     fljs.addMethods(fljs.swf.tag.Protect, {
  3828.         read: function (a, b) {
  3829.             a.skipBytes(b.TagLength)
  3830.         },
  3831.         evaluate: function () {}
  3832.     });
  3833.     flash.display.FrameLabel = function () {};
  3834.     fljs.swf.tag.DefineButton2 = function () {};
  3835.     fljs.addMethods(fljs.swf.tag.DefineButton2, {
  3836.         read: function (a, b) {
  3837.             var c = a.stream.byteIndex;
  3838.             a.context = fljs.swf.tag.DefineButton2;
  3839.             this.ButtonId = a.readUI16();
  3840.             a.readUB(7);
  3841.             this.TrackAsMenu = a.readUB(1);
  3842.             this.ActionOffset = a.readUI16();
  3843.             this.Characters = a.readButtonRecords();
  3844.             this.Actions = this.ActionOffset ? a.readButtonCondActions(b.TagLength - (a.stream.byteIndex - c)) : [];
  3845.             a.context = null
  3846.         },
  3847.         evaluate: function (a) {
  3848.             a.addDefinition(this, this.ButtonId)
  3849.         },
  3850.         build: function (a, b) {
  3851.             if (b && b.__default) b = null;
  3852.             var c = new flash.display.MovieClip;
  3853.             c.def = this;
  3854.             c.setEnabled(true);
  3855.             c.trackAsMenu = this.TrackAsMenu;
  3856.             c.__buttonActions = this.Actions;
  3857.             var d = [["ButtonStateUp", "up"], ["ButtonStateDown", "down"], ["ButtonStateOver", "over"], ["ButtonStateHitTest", "hitTest"]],
  3858.                 e = new flash.display.Scene;
  3859.             e.labels = [];
  3860.             e.name = "Scene 1";
  3861.             e.numFrames = 3;
  3862.             c.frameData_ = [];
  3863.             c.labels_ = {};
  3864.             var f, g = 0;
  3865.             for (var j in d) {
  3866.                 var h = d[j][0],
  3867.                     m = d[j][1];
  3868.                 f = null;
  3869.                 for (var k in this.Characters) {
  3870.                     var l = this.Characters[k];
  3871.                     if (l[h]) {
  3872.                         f || (f = new flash.display.Sprite);
  3873.                         var n = this.buildStateDisplayObject(a, l, false);
  3874.                         n && f.addChildAt(n, l.PlaceDepth)
  3875.                     }
  3876.                 }
  3877.                 for (k in this.Characters) {
  3878.                     l = this.Characters[k];
  3879.                     if (l.ButtonStateHitTest) {
  3880.                         f || (f = new flash.display.Sprite);
  3881.                         if (n = this.buildStateDisplayObject(a, l, true)) {
  3882.                             n.__setHitTarget(c);
  3883.                             f.addChild(n)
  3884.                         }
  3885.                     }
  3886.                 }
  3887.                 if (m != "hitTest") {
  3888.                     h = new flash.display.FrameLabel;
  3889.                     h.name = "_" + m;
  3890.                     h.frame = g + 1;
  3891.                     m = {
  3892.                         scripts: [],
  3893.                         parts: [],
  3894.                         tags: [],
  3895.                         label: h.name,
  3896.                         loaded: true
  3897.                     };
  3898.                     f && m.parts.push(f);
  3899.                     c.frameData_.push(m);
  3900.                     c.labels_[h.name] = h
  3901.                 }
  3902.                 g += 1
  3903.             }
  3904.             c.sceneIndices_ = {};
  3905.             c.currentSceneIndex_ = 0;
  3906.             c.scenes_ = [e];
  3907.             c.currentFrameIndex_ = 0;
  3908.             c.currentLabel_ =
  3909.             c.frameData_[c.currentFrameIndex_].label;
  3910.             c._enabled = true;
  3911.             c.framesLoaded_ = 3;
  3912.             c.totalFrames_ = 3;
  3913.             c.next_ = null;
  3914.             c.playing_ = false;
  3915.             c.gotoAndStop(1);
  3916.             b && c.getTransform().setColorTransform(b);
  3917.             return c
  3918.         },
  3919.         buildStateDisplayObject: function (a, b, c) {
  3920.             var d = this.buildColorTransform(b.ColorTransform),
  3921.                 e = this.buildMatrix(b.PlaceMatrix);
  3922.             c = (fljs.agent.OS == "iPad" || fljs.agent.OS == "iPhone") && c;
  3923.             b = a.dictionary[b.CharacterId];
  3924.             var f;
  3925.             if (b instanceof fljs.swf.tag.DefineShape || b instanceof fljs.swf.tag.DefineEditText || b instanceof fljs.swf.tag.DefineText || b instanceof fljs.swf.tag.DefineSprite) f = b.build(a, d, c);
  3926.             if (f) {
  3927.                 f.setMatrix(e);
  3928.                 f.__clipActions = {};
  3929.                 b instanceof fljs.swf.tag.DefineSprite && f.onCreate()
  3930.             }
  3931.             return f
  3932.         },
  3933.         buildMatrix: function (a) {
  3934.             return new flash.geom.Matrix(a.ScaleX, a.RotateSkew0, a.RotateSkew1, a.ScaleY, a.TranslateX, a.TranslateY)
  3935.         },
  3936.         buildColorTransform: function (a) {
  3937.             a = new flash.geom.ColorTransform(a.RedMultTerm, a.GreenMultTerm, a.BlueMultTerm, a.AlphaMultTerm, a.RedAddTerm, a.GreenAddTerm, a.BlueAddTerm, a.AlphaAddTerm);
  3938.             return a.__default ? null : a
  3939.         }
  3940.     });
  3941.     fljs.swf.tag.DefineText2 = function () {};
  3942.     fljs.inherits(fljs.swf.tag.DefineText2, fljs.swf.tag.DefineText);
  3943.     fljs.addMethods(fljs.swf.tag.DefineText2, {
  3944.         read: function (a) {
  3945.             this.CharacterId = a.readUI16();
  3946.             this.TextBounds = a.readRECT();
  3947.             a.stream.align();
  3948.             this.TextMatrix = a.readMATRIX();
  3949.             this.GlyphBits = a.readUI8();
  3950.             this.AdvanceBits = a.readUI8();
  3951.             a.GlyphBits = this.GlyphBits;
  3952.             a.AdvanceBits = this.AdvanceBits;
  3953.             a.context = fljs.swf.tag.DefineText2;
  3954.             this.TextRecords = a.readTEXTRECORDS();
  3955.             a.context = null
  3956.         }
  3957.     });
  3958.     fljs.swf.tag.JpegTables = function () {};
  3959.     fljs.addMethods(fljs.swf.tag.JpegTables, {
  3960.         read: function (a, b) {
  3961.             if (b.TagLength != 0) {
  3962.                 a = a.readBytes(b.TagLength).join("");
  3963.                 var c = new fljs.swf.BigEndianStringStream(a);
  3964.                 fljs.console("jpeg").info("" + b.TagType);
  3965.                 b = 0;
  3966.                 if (c.nextUShort() == 65497) {
  3967.                     b = 4;
  3968.                     c.nextUShort();
  3969.                     c.nextUShort()
  3970.                 }
  3971.                 this.JPEGData = a.substr(b, a.length - b - 2)
  3972.             }
  3973.         },
  3974.         evaluate: function (a) {
  3975.             a.jpegTables = this.JPEGData
  3976.         }
  3977.     });
  3978.     fljs.swf.tag.DefineBits = function () {};
  3979.     fljs.inherits(fljs.swf.tag.DefineBits, fljs.swf.tag.DefineBitsJPEG2);
  3980.     fljs.addMethods(fljs.swf.tag.DefineBits, {
  3981.         read: function (a, b) {
  3982.             this.CharacterId = a.readUI16();
  3983.             b = b.TagLength - 2;
  3984.             (new fljs.swf.build.JpegBuilder).parseJpeg(this, a, b, true)
  3985.         }
  3986.     });
  3987.     fljs.swf.tag.FrameLabel = function () {};
  3988.     fljs.addMethods(fljs.swf.tag.FrameLabel, {
  3989.         read: function (a) {
  3990.             this.Name = a.readString()
  3991.         },
  3992.         evaluate: function (a, b, c, d) {
  3993.             if (d == a.stage) d = a.mainTimeline;
  3994.             d.frameData_[d.framesLoaded_].label = this.Name;
  3995.             a = d.labels_[this.Name] = new flash.display.FrameLabel;
  3996.             a.frame = d.framesLoaded_ + 1;
  3997.             a.name = this.Name
  3998.         }
  3999.     });
  4000.     fljs.zip_inflate = {};
  4001.     var zip_WSIZE = 32768,
  4002.         zip_STORED_BLOCK = 0,
  4003.         zip_STATIC_TREES = 1,
  4004.         zip_DYN_TREES = 2,
  4005.         zip_lbits = 9,
  4006.         zip_dbits = 6,
  4007.         zip_INBUFSIZ = 32768,
  4008.         zip_INBUF_EXTRA = 64,
  4009.         zip_slide, zip_wp, zip_fixed_tl = null,
  4010.         zip_fixed_td, zip_fixed_bl, fixed_bd, zip_bit_buf, zip_bit_len, zip_method, zip_eof, zip_copy_leng, zip_copy_dist, zip_tl, zip_td, zip_bl, zip_bd, zip_inflate_data, zip_inflate_pos, zip_MASK_BITS = new Array(0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535),
  4011.         zip_cplens = new Array(3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0),
  4012.         zip_cplext = new Array(0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99),
  4013.         zip_cpdist = new Array(1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577),
  4014.         zip_cpdext = new Array(0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13),
  4015.         zip_border = new Array(16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15);
  4016.  
  4017.     function zip_HuftList() {
  4018.         this.list = this.next = null
  4019.     }
  4020.  
  4021.     function zip_HuftNode() {
  4022.         this.n = this.b = this.e = 0;
  4023.         this.t = null
  4024.     }
  4025.  
  4026.     function zip_HuftBuild(a, b, c, d, e, f) {
  4027.         this.BMAX = 16;
  4028.         this.N_MAX = 288;
  4029.         this.status = 0;
  4030.         this.root = null;
  4031.         this.m = 0;
  4032.         var g = new Array(this.BMAX + 1),
  4033.             j, h, m, k, l, n, p, u = new Array(this.BMAX + 1),
  4034.             o, q, s, r = new zip_HuftNode,
  4035.             t = new Array(this.BMAX);
  4036.         k = new Array(this.N_MAX);
  4037.         var v, w = new Array(this.BMAX + 1),
  4038.             y, x, z;
  4039.         z = this.root = null;
  4040.         for (l = 0; l < g.length; l++) g[l] = 0;
  4041.         for (l = 0; l < u.length; l++) u[l] = 0;
  4042.         for (l = 0; l < t.length; l++) t[l] = null;
  4043.         for (l = 0; l < k.length; l++) k[l] = 0;
  4044.         for (l = 0; l < w.length; l++) w[l] = 0;
  4045.         j = b > 256 ? a[256] : this.BMAX;
  4046.         o = a;
  4047.         q = 0;
  4048.         l = b;
  4049.         do {
  4050.             g[o[q]]++;
  4051.             q++
  4052.         } while (--l > 0);
  4053.         if (g[0] == b) {
  4054.             this.root = null;
  4055.             this.status = this.m = 0
  4056.         } else {
  4057.             for (n = 1; n <= this.BMAX; n++) if (g[n] != 0) break;
  4058.             p = n;
  4059.             if (f < n) f = n;
  4060.             for (l = this.BMAX; l != 0; l--) if (g[l] != 0) break;
  4061.             m = l;
  4062.             if (f > l) f = l;
  4063.             for (y = 1 << n; n < l; n++, y <<= 1) if ((y -= g[n]) < 0) {
  4064.                 this.status = 2;
  4065.                 this.m = f;
  4066.                 return
  4067.             }
  4068.             if ((y -= g[l]) < 0) {
  4069.                 this.status = 2;
  4070.                 this.m = f
  4071.             } else {
  4072.                 g[l] += y;
  4073.                 w[1] = n = 0;
  4074.                 o = g;
  4075.                 q = 1;
  4076.                 for (s = 2; --l > 0;) w[s++] = n += o[q++];
  4077.                 o = a;
  4078.                 l = q = 0;
  4079.                 do
  4080.                 if ((n = o[q++]) != 0) k[w[n]++] = l;
  4081.                 while (++l < b);
  4082.                 b = w[m];
  4083.                 w[0] = l = 0;
  4084.                 o = k;
  4085.                 q = 0;
  4086.                 k = -1;
  4087.                 v = u[0] = 0;
  4088.                 s = null;
  4089.                 for (x = 0; p <= m; p++) for (a = g[p]; a-- > 0;) {
  4090.                     for (; p > v + u[1 + k];) {
  4091.                         v += u[1 + k];
  4092.                         k++;
  4093.                         x = (x = m - v) > f ? f : x;
  4094.                         if ((h = 1 << (n = p - v)) > a + 1) {
  4095.                             h -= a + 1;
  4096.                             for (s = p; ++n < x;) {
  4097.                                 if ((h <<= 1) <= g[++s]) break;
  4098.                                 h -= g[s]
  4099.                             }
  4100.                         }
  4101.                         if (v + n > j && v < j) n = j - v;
  4102.                         x = 1 << n;
  4103.                         u[1 + k] = n;
  4104.                         s = new Array(x);
  4105.                         for (h = 0; h < x; h++) s[h] = new zip_HuftNode;
  4106.                         z = z == null ? (this.root = new zip_HuftList) : (z.next = new zip_HuftList);
  4107.                         z.next = null;
  4108.                         z.list = s;
  4109.                         t[k] = s;
  4110.                         if (k > 0) {
  4111.                             w[k] = l;
  4112.                             r.b = u[k];
  4113.                             r.e = 16 + n;
  4114.                             r.t = s;
  4115.                             n = (l & (1 << v) - 1) >> v - u[k];
  4116.                             t[k - 1][n].e = r.e;
  4117.                             t[k - 1][n].b = r.b;
  4118.                             t[k - 1][n].n = r.n;
  4119.                             t[k - 1][n].t = r.t
  4120.                         }
  4121.                     }
  4122.                     r.b = p - v;
  4123.                     if (q >= b) r.e = 99;
  4124.                     else if (o[q] < c) {
  4125.                         r.e = o[q] < 256 ? 16 : 15;
  4126.                         r.n = o[q++]
  4127.                     } else {
  4128.                         r.e = e[o[q] - c];
  4129.                         r.n =
  4130.                         d[o[q++] - c]
  4131.                     }
  4132.                     h = 1 << p - v;
  4133.                     for (n = l >> v; n < x; n += h) {
  4134.                         s[n].e = r.e;
  4135.                         s[n].b = r.b;
  4136.                         s[n].n = r.n;
  4137.                         s[n].t = r.t
  4138.                     }
  4139.                     for (n = 1 << p - 1;
  4140.                     (l & n) != 0; n >>= 1) l ^= n;
  4141.                     for (l ^= n;
  4142.                     (l & (1 << v) - 1) != w[k];) {
  4143.                         v -= u[k];
  4144.                         k--
  4145.                     }
  4146.                 }
  4147.                 this.m = u[1];
  4148.                 this.status = y != 0 && m != 1 ? 1 : 0
  4149.             }
  4150.         }
  4151.     }
  4152.     function zip_GET_BYTE() {
  4153.         if (zip_inflate_data.length == zip_inflate_pos) return -1;
  4154.         return zip_inflate_data.charCodeAt(zip_inflate_pos++) & 255
  4155.     }
  4156.     function zip_NEEDBITS(a) {
  4157.         for (; zip_bit_len < a;) {
  4158.             zip_bit_buf |= zip_GET_BYTE() << zip_bit_len;
  4159.             zip_bit_len += 8
  4160.         }
  4161.     }
  4162.  
  4163.     function zip_GETBITS(a) {
  4164.         return zip_bit_buf & zip_MASK_BITS[a]
  4165.     }
  4166.     function zip_DUMPBITS(a) {
  4167.         zip_bit_buf >>= a;
  4168.         zip_bit_len -= a
  4169.     }
  4170.  
  4171.     function zip_inflate_codes(a, b, c) {
  4172.         var d, e, f;
  4173.         if (c == 0) return 0;
  4174.         for (f = 0;;) {
  4175.             zip_NEEDBITS(zip_bl);
  4176.             e = zip_tl.list[zip_GETBITS(zip_bl)];
  4177.             for (d = e.e; d > 16;) {
  4178.                 if (d == 99) return -1;
  4179.                 zip_DUMPBITS(e.b);
  4180.                 d -= 16;
  4181.                 zip_NEEDBITS(d);
  4182.                 e = e.t[zip_GETBITS(d)];
  4183.                 d = e.e
  4184.             }
  4185.             zip_DUMPBITS(e.b);
  4186.             if (d == 16) {
  4187.                 zip_wp &= zip_WSIZE - 1;
  4188.                 a[b + f++] = zip_slide[zip_wp++] = e.n
  4189.             } else {
  4190.                 if (d == 15) break;
  4191.                 zip_NEEDBITS(d);
  4192.                 zip_copy_leng = e.n + zip_GETBITS(d);
  4193.                 zip_DUMPBITS(d);
  4194.                 zip_NEEDBITS(zip_bd);
  4195.                 e = zip_td.list[zip_GETBITS(zip_bd)];
  4196.                 for (d = e.e; d > 16;) {
  4197.                     if (d == 99) return -1;
  4198.                     zip_DUMPBITS(e.b);
  4199.                     d -= 16;
  4200.                     zip_NEEDBITS(d);
  4201.                     e = e.t[zip_GETBITS(d)];
  4202.                     d = e.e
  4203.                 }
  4204.                 zip_DUMPBITS(e.b);
  4205.                 zip_NEEDBITS(d);
  4206.                 zip_copy_dist = zip_wp - e.n - zip_GETBITS(d);
  4207.                 for (zip_DUMPBITS(d); zip_copy_leng > 0 && f < c;) {
  4208.                     zip_copy_leng--;
  4209.                     zip_copy_dist &= zip_WSIZE - 1;
  4210.                     zip_wp &= zip_WSIZE - 1;
  4211.                     a[b + f++] = zip_slide[zip_wp++] = zip_slide[zip_copy_dist++]
  4212.                 }
  4213.             }
  4214.             if (f == c) return c
  4215.         }
  4216.         zip_method = -1;
  4217.         return f
  4218.     }
  4219.  
  4220.     function zip_inflate_stored(a, b, c) {
  4221.         var d;
  4222.         d = zip_bit_len & 7;
  4223.         zip_DUMPBITS(d);
  4224.         zip_NEEDBITS(16);
  4225.         d = zip_GETBITS(16);
  4226.         zip_DUMPBITS(16);
  4227.         zip_NEEDBITS(16);
  4228.         if (d != (~zip_bit_buf & 65535)) return -1;
  4229.         zip_DUMPBITS(16);
  4230.         zip_copy_leng = d;
  4231.         for (d = 0; zip_copy_leng > 0 && d < c;) {
  4232.             zip_copy_leng--;
  4233.             zip_wp &= zip_WSIZE - 1;
  4234.             zip_NEEDBITS(8);
  4235.             a[b + d++] = zip_slide[zip_wp++] = zip_GETBITS(8);
  4236.             zip_DUMPBITS(8)
  4237.         }
  4238.         if (zip_copy_leng == 0) zip_method = -1;
  4239.         return d
  4240.     }
  4241.  
  4242.     function zip_inflate_fixed(a, b, c) {
  4243.         if (zip_fixed_tl == null) {
  4244.             var d, e = new Array(288);
  4245.             for (d = 0; d < 144; d++) e[d] = 8;
  4246.             for (; d < 256; d++) e[d] = 9;
  4247.             for (; d < 280; d++) e[d] = 7;
  4248.             for (; d < 288; d++) e[d] = 8;
  4249.             zip_fixed_bl = 7;
  4250.             d = new zip_HuftBuild(e, 288, 257, zip_cplens, zip_cplext, zip_fixed_bl);
  4251.             if (d.status != 0) {
  4252.                 alert("HufBuild error: " + d.status);
  4253.                 return -1
  4254.             }
  4255.             zip_fixed_tl = d.root;
  4256.             zip_fixed_bl = d.m;
  4257.             for (d = 0; d < 30; d++) e[d] = 5;
  4258.             zip_fixed_bd = 5;
  4259.             d = new zip_HuftBuild(e, 30, 0, zip_cpdist, zip_cpdext, zip_fixed_bd);
  4260.             if (d.status > 1) {
  4261.                 zip_fixed_tl = null;
  4262.                 alert("HufBuild error: " + d.status);
  4263.                 return -1
  4264.             }
  4265.             zip_fixed_td = d.root;
  4266.             zip_fixed_bd = d.m
  4267.         }
  4268.         zip_tl = zip_fixed_tl;
  4269.         zip_td = zip_fixed_td;
  4270.         zip_bl = zip_fixed_bl;
  4271.         zip_bd = zip_fixed_bd;
  4272.         return zip_inflate_codes(a, b, c)
  4273.     }
  4274.  
  4275.     function zip_inflate_dynamic(a, b, c) {
  4276.         var d, e, f, g, j, h, m, k = new Array(316);
  4277.         for (d = 0; d < k.length; d++) k[d] = 0;
  4278.         zip_NEEDBITS(5);
  4279.         h = 257 + zip_GETBITS(5);
  4280.         zip_DUMPBITS(5);
  4281.         zip_NEEDBITS(5);
  4282.         m = 1 + zip_GETBITS(5);
  4283.         zip_DUMPBITS(5);
  4284.         zip_NEEDBITS(4);
  4285.         d = 4 + zip_GETBITS(4);
  4286.         zip_DUMPBITS(4);
  4287.         if (h > 286 || m > 30) return -1;
  4288.         for (e = 0; e < d; e++) {
  4289.             zip_NEEDBITS(3);
  4290.             k[zip_border[e]] = zip_GETBITS(3);
  4291.             zip_DUMPBITS(3)
  4292.         }
  4293.         for (; e < 19; e++) k[zip_border[e]] = 0;
  4294.         zip_bl = 7;
  4295.         e = new zip_HuftBuild(k, 19, 19, null, null, zip_bl);
  4296.         if (e.status != 0) return -1;
  4297.         zip_tl = e.root;
  4298.         zip_bl = e.m;
  4299.         g = h + m;
  4300.         for (d = f = 0; d < g;) {
  4301.             zip_NEEDBITS(zip_bl);
  4302.             j = zip_tl.list[zip_GETBITS(zip_bl)];
  4303.             e = j.b;
  4304.             zip_DUMPBITS(e);
  4305.             e = j.n;
  4306.             if (e < 16) k[d++] = f = e;
  4307.             else if (e == 16) {
  4308.                 zip_NEEDBITS(2);
  4309.                 e = 3 + zip_GETBITS(2);
  4310.                 zip_DUMPBITS(2);
  4311.                 if (d + e > g) return -1;
  4312.                 for (; e-- > 0;) k[d++] = f
  4313.             } else {
  4314.                 if (e == 17) {
  4315.                     zip_NEEDBITS(3);
  4316.                     e = 3 + zip_GETBITS(3);
  4317.                     zip_DUMPBITS(3)
  4318.                 } else {
  4319.                     zip_NEEDBITS(7);
  4320.                     e = 11 + zip_GETBITS(7);
  4321.                     zip_DUMPBITS(7)
  4322.                 }
  4323.                 if (d + e > g) return -1;
  4324.                 for (; e-- > 0;) k[d++] = 0;
  4325.                 f = 0
  4326.             }
  4327.         }
  4328.         zip_bl = zip_lbits;
  4329.         e = new zip_HuftBuild(k, h, 257, zip_cplens, zip_cplext, zip_bl);
  4330.         if (zip_bl == 0) e.status = 1;
  4331.         if (e.status != 0) return -1;
  4332.         zip_tl = e.root;
  4333.         zip_bl = e.m;
  4334.         for (d = 0; d < m; d++) k[d] = k[d + h];
  4335.         zip_bd = zip_dbits;
  4336.         e = new zip_HuftBuild(k, m, 0, zip_cpdist, zip_cpdext, zip_bd);
  4337.         zip_td = e.root;
  4338.         zip_bd = e.m;
  4339.         if (zip_bd == 0 && h > 257) return -1;
  4340.         if (e.status != 0) return -1;
  4341.         return zip_inflate_codes(a, b, c)
  4342.     }
  4343.     function zip_inflate_start() {
  4344.         if (zip_slide == null) zip_slide = new Array(2 * zip_WSIZE);
  4345.         zip_bit_len = zip_bit_buf = zip_wp = 0;
  4346.         zip_method = -1;
  4347.         zip_eof = false;
  4348.         zip_copy_leng = zip_copy_dist = 0;
  4349.         zip_tl = null
  4350.     }
  4351.  
  4352.     function zip_inflate_internal(a, b, c) {
  4353.         var d, e;
  4354.         for (d = 0; d < c;) {
  4355.             if (zip_eof && zip_method == -1) return d;
  4356.             if (zip_copy_leng > 0) {
  4357.                 if (zip_method != zip_STORED_BLOCK) for (; zip_copy_leng > 0 && d < c;) {
  4358.                     zip_copy_leng--;
  4359.                     zip_copy_dist &= zip_WSIZE - 1;
  4360.                     zip_wp &= zip_WSIZE - 1;
  4361.                     a[b + d++] = zip_slide[zip_wp++] = zip_slide[zip_copy_dist++]
  4362.                 } else {
  4363.                     for (; zip_copy_leng > 0 && d < c;) {
  4364.                         zip_copy_leng--;
  4365.                         zip_wp &= zip_WSIZE - 1;
  4366.                         zip_NEEDBITS(8);
  4367.                         a[b + d++] = zip_slide[zip_wp++] = zip_GETBITS(8);
  4368.                         zip_DUMPBITS(8)
  4369.                     }
  4370.                     if (zip_copy_leng == 0) zip_method = -1
  4371.                 }
  4372.                 if (d == c) return d
  4373.             }
  4374.             if (zip_method == -1) {
  4375.                 if (zip_eof) break;
  4376.                 zip_NEEDBITS(1);
  4377.                 if (zip_GETBITS(1) != 0) zip_eof = true;
  4378.                 zip_DUMPBITS(1);
  4379.                 zip_NEEDBITS(2);
  4380.                 zip_method = zip_GETBITS(2);
  4381.                 zip_DUMPBITS(2);
  4382.                 zip_tl = null;
  4383.                 zip_copy_leng = 0
  4384.             }
  4385.             switch (zip_method) {
  4386.             case 0:
  4387.                 e = zip_inflate_stored(a, b + d, c - d);
  4388.                 break;
  4389.             case 1:
  4390.                 e = zip_tl != null ? zip_inflate_codes(a, b + d, c - d) : zip_inflate_fixed(a, b + d, c - d);
  4391.                 break;
  4392.             case 2:
  4393.                 e = zip_tl != null ? zip_inflate_codes(a, b + d, c - d) : zip_inflate_dynamic(a, b + d, c - d);
  4394.                 break;
  4395.             default:
  4396.                 e = -1;
  4397.                 break
  4398.             }
  4399.             if (e == -1) {
  4400.                 if (zip_eof) return 0;
  4401.                 return -1
  4402.             }
  4403.             d += e
  4404.         }
  4405.         return d
  4406.     }
  4407.  
  4408.     function zip_inflate(a) {
  4409.         var b, c, d;
  4410.         zip_inflate_start();
  4411.         zip_inflate_data = a;
  4412.         zip_inflate_pos = 0;
  4413.         b = new Array(1024);
  4414.         for (a = "";
  4415.         (c = zip_inflate_internal(b, 0, b.length)) > 0;) for (d = 0; d < c; d++) a += String.fromCharCode(b[d]);
  4416.         zip_inflate_data = null;
  4417.         return a
  4418.     }
  4419.     fljs.swf.tag.DefineBitsJpeg3 = function () {};
  4420.     fljs.inherits(fljs.swf.tag.DefineBitsJpeg3, fljs.swf.tag.DefineBitsJPEG2);
  4421.     fljs.addMethods(fljs.swf.tag.DefineBitsJpeg3, {
  4422.         read: function (a, b) {
  4423.             var c = a.stream.byteIndex;
  4424.             this.CharacterId = a.readUI16();
  4425.             var d = fljs.Player.getInstance();
  4426.             d.mainTimeline && d.mainTimeline.resources.addToFrame(this.CharacterId, d.mainTimeline.framesLoaded_);
  4427.             if (d.loadExtResources) {
  4428.                 a.skipBytes(b.TagLength - 2);
  4429.                 d = "img/" + d.name + "-" + this.CharacterId + ".png";
  4430.                 fljs.console("image").info(d);
  4431.                 c = new Image;
  4432.                 c.addEventListener("load", fljs.bind(this.onLoadImage, this, a, b, c), false);
  4433.                 fljs.Player.getInstance().delayFrame++;
  4434.                 c.src =
  4435.                 d
  4436.             } else {
  4437.                 d = this.AlphaDataOffset = a.readUI32();
  4438.                 (new fljs.swf.build.JpegBuilder).parseJpeg(this, a, d, true);
  4439.                 d = b.TagLength - (a.stream.byteIndex - c);
  4440.                 c = a.stream.byteIndex;
  4441.                 var e = new Image;
  4442.                 e.width = this.Width;
  4443.                 e.height = this.Height;
  4444.                 e.addEventListener("load", fljs.bind(this.onLoadData, this, a, b, e, c, d));
  4445.                 fljs.Player.getInstance().delayFrame++;
  4446.                 e.src = this.DataUri
  4447.             }
  4448.         },
  4449.         onLoadData: function (a, b, c, d, e) {
  4450.             a = a.stream.buffer.substr(d + 2, e - 2);
  4451.             a = zip_inflate(a);
  4452.             a = new fljs.swf.SwfStream(new fljs.swf.StringStream(a));
  4453.             b = document.createElement("canvas");
  4454.             b.width = this.Width;
  4455.             b.height = this.Height;
  4456.             d = b.getContext("2d");
  4457.             d.drawImage(c, 0, 0);
  4458.             c = d.getImageData(0, 0, this.Width, this.Height);
  4459.             e = c.data;
  4460.             for (var f = 0; f < this.Width * this.Height * 4;) {
  4461.                 e[f + 3] = a.readUI8();
  4462.                 f += 4
  4463.             }
  4464.             d.putImageData(c, 0, 0);
  4465.             this.DataUri = b.toDataURL();
  4466.             c = fljs.Player.getInstance();
  4467.             if (c.dictionary) {
  4468.                 this.evaluate(c);
  4469.                 c.delayFrame--;
  4470.                 c.mainTimeline.resources.remove(this.CharacterId)
  4471.             } else this.callback(this);
  4472.             return true
  4473.         },
  4474.         onLoadImage: function (a, b, c) {
  4475.             this.Width = c.width;
  4476.             this.Height = c.height;
  4477.             a = document.createElement("canvas");
  4478.             a.width = this.Width;
  4479.             a.height = this.Height;
  4480.             a.getContext("2d").drawImage(c, 0, 0);
  4481.             this.DataUri = a.toDataURL();
  4482.             c = fljs.Player.getInstance();
  4483.             this.evaluate(c);
  4484.             c.setTimeout(fljs.bind(this.afterLoadImage, this));
  4485.             return true
  4486.         },
  4487.         afterLoadImage: function () {
  4488.             c = fljs.Player.getInstance();
  4489.             c.delayFrame--;
  4490.             c.mainTimeline.resources.remove(this.CharacterId)
  4491.         },
  4492.         evaluate: function (a) {
  4493.             this.defId = "image" + this.CharacterId;
  4494.             a.addDefinition(this, this.CharacterId);
  4495.             a = new fljs.swf.def.BitmapDef;
  4496.             a.setCharaId(this.defId);
  4497.             a.element.sets([[fljs.dom.Namespace.Xlink, "xlink:href", this.DataUri], [null, "x", 0], [null, "y", 0], [null, "width", this.Width], [null,
  4498.                 "height", this.Height]]);
  4499.             a.define();
  4500.             this.def = a
  4501.         }
  4502.     });
  4503.     fljs.swf.tag.ExportAssets = function () {};
  4504.     fljs.addMethods(fljs.swf.tag.ExportAssets, {
  4505.         read: function (a) {
  4506.             this.Count = a.readUI16();
  4507.             this.Tags = [];
  4508.             this.Names = [];
  4509.             for (var b = 0; b < this.Count; b++) {
  4510.                 this.Tags[b] = a.readUI16();
  4511.                 this.Names[b] = a.readString()
  4512.             }
  4513.         },
  4514.         evaluate: function (a) {
  4515.             for (var b = 0; b < this.Tags.length; b++) a.assets[this.Names[b]] = this.Tags[b]
  4516.         }
  4517.     });
  4518.     fljs.swf.tag.PlaceObject3 = function () {};
  4519.     fljs.inherits(fljs.swf.tag.PlaceObject3, fljs.swf.tag.PlaceObject2);
  4520.     fljs.addMethods(fljs.swf.tag.PlaceObject3, {
  4521.         read: function (a) {
  4522.             this.startByteIndex = a.stream.byteIndex;
  4523.             this.PlaceFlagHasClipActions = a.readUB(1);
  4524.             this.PlaceFlagHasClipDepth = a.readUB(1);
  4525.             this.PlaceFlagHasName = a.readUB(1);
  4526.             this.PlaceFlagHasRatio = a.readUB(1);
  4527.             this.PlaceFlagHasColorTransform = a.readUB(1);
  4528.             this.PlaceFlagHasMatrix = a.readUB(1);
  4529.             this.PlaceFlagHasCharacter = a.readUB(1);
  4530.             this.PlaceFlagMove = a.readUB(1);
  4531.             a.readUB(3);
  4532.             this.PlaceFlagHasImage = a.readUB(1);
  4533.             this.PlaceFlagHasClassName = a.readUB(1);
  4534.             this.PlaceFlagHasCacheAsBitmap =
  4535.             a.readUB(1);
  4536.             this.PlaceFlagHasBlendMode = a.readUB(1);
  4537.             this.PlaceFlagHasFilterList = a.readUB(1);
  4538.             this.Depth = a.readUI16();
  4539.             if (this.PlaceFlagHasClassName || this.PlaceFlagHasImage && this.PlaceFlagHasCharacter) this.ClassName = a.readString();
  4540.             if (this.PlaceFlagHasCharacter) this.CharacterId = a.readUI16();
  4541.             if (this.PlaceFlagHasMatrix) this.Matrix = a.readMATRIX();
  4542.             if (this.PlaceFlagHasColorTransform) this.ColorTransform = a.readCXFORMWITHALPHA();
  4543.             if (this.PlaceFlagHasRatio) this.Ratio = a.readUI16();
  4544.             if (this.PlaceFlagHasName) this.Name = a.readSTRING();
  4545.             if (this.PlaceFlagHasClipDepth) this.ClipDepth = a.readUI16();
  4546.             if (this.PlaceFlagHasFilterList) this.SurfaceFilterList = a.readFilterList();
  4547.             if (this.PlaceFlagHasBlendMode) this.BlendMode = a.readUI8();
  4548.             if (this.PlaceFlagHasClipActions) this.ClipActions = a.readCLIPACTIONS()
  4549.         }
  4550.     });
  4551.     fljs.swf.tag.DefineShape4 = function () {};
  4552.     fljs.inherits(fljs.swf.tag.DefineShape4, fljs.swf.tag.DefineShape);
  4553.     fljs.addMethods(fljs.swf.tag.DefineShape4, {
  4554.         read: function (a) {
  4555.             a.beginContext(fljs.swf.tag.DefineShape4);
  4556.             this.ShapeId = a.readUI16();
  4557.             this.ShapeBounds = a.readRECT();
  4558.             this.EdgeBounds = a.readRECT();
  4559.             a.readUB(6);
  4560.             this.UsesNonScalingStrokes = a.readUB(1);
  4561.             this.UsesScalingStrokes = a.readUB(1);
  4562.             this.Shapes = a.readSHAPEWITHSTYLE();
  4563.             a.endContext()
  4564.         }
  4565.     });
  4566.     fljs.swf.tag.DefineBitsLossless2 = function () {};
  4567.     fljs.addMethods(fljs.swf.tag.DefineBitsLossless2, {
  4568.         read: function (a, b) {
  4569.             var c = a.stream.byteIndex;
  4570.             this.CharacterId = a.readUI16();
  4571.             this.BitmapFormat = a.readUI8();
  4572.             this.BitmapWidth = a.readUI16();
  4573.             this.BitmapHeight = a.readUI16();
  4574.             if (this.BitmapFormat == 3) this.BitmapColorTableSize = a.readUI8();
  4575.             a = a.stream.buffer.substr(a.stream.byteIndex + 2, b.TagLength - (a.stream.byteIndex - c) - 2);
  4576.             a = zip_inflate(a);
  4577.             a = new fljs.swf.SwfStream(new fljs.swf.StringStream(a));
  4578.             b = document.createElement("canvas");
  4579.             b.width = this.BitmapWidth;
  4580.             b.height =
  4581.             this.BitmapHeight;
  4582.             c = b.getContext("2d");
  4583.             var d = c.createImageData(this.BitmapWidth, this.BitmapHeight),
  4584.                 e = d.data;
  4585.             if (this.BitmapFormat == 3) {
  4586.                 this.ColorTableRgb = [];
  4587.                 for (var f = 0; f < this.BitmapColorTableSize + 1; f++) this.ColorTableRgb[f] = a.readRGBA();
  4588.                 var g = Math.floor((this.BitmapWidth + 3) / 4) * 4;
  4589.                 for (var j = f = 0; f < this.BitmapWidth * this.BitmapHeight * 4;) {
  4590.                     var h = this.ColorTableRgb[a.readUI8()];
  4591.                     e[f++] = h.Red;
  4592.                     e[f++] = h.Green;
  4593.                     e[f++] = h.Blue;
  4594.                     e[f++] = h.Alpha;
  4595.                     j++;
  4596.                     if (j == this.BitmapWidth) {
  4597.                         a.skipBytes(g - this.BitmapWidth);
  4598.                         j = 0
  4599.                     }
  4600.                 }
  4601.             } else for (f =
  4602.             0; f < this.BitmapWidth * this.BitmapHeight * 4;) {
  4603.                 h = a.readARGB();
  4604.                 e[f++] = h.Red;
  4605.                 e[f++] = h.Green;
  4606.                 e[f++] = h.Blue;
  4607.                 e[f++] = h.Alpha
  4608.             }
  4609.             c.putImageData(d, 0, 0);
  4610.             this.DataUri = b.toDataURL()
  4611.         },
  4612.         evaluate: function (a) {
  4613.             a.addDefinition(this, this.CharacterId);
  4614.             this.Width = this.BitmapWidth;
  4615.             this.Height = this.BitmapHeight;
  4616.             this.defId = "image" + this.CharacterId;
  4617.             a = new fljs.swf.def.BitmapDef;
  4618.             a.setCharaId(this.defId);
  4619.             a.element.sets([[fljs.dom.Namespace.Xlink, "xlink:href", this.DataUri], [null, "x", 0], [null, "y", 0], [null, "width", this.Width], [null, "height",
  4620.                 this.Height]]);
  4621.             a.define();
  4622.             this.def = a
  4623.         }
  4624.     });
  4625.     fljs.swf.tag.DefineBitsLossless = function () {};
  4626.     fljs.addMethods(fljs.swf.tag.DefineBitsLossless, {
  4627.         read: function (a, b) {
  4628.             var c = a.stream.byteIndex;
  4629.             this.CharacterId = a.readUI16();
  4630.             this.BitmapFormat = a.readUI8();
  4631.             this.BitmapWidth = a.readUI16();
  4632.             this.BitmapHeight = a.readUI16();
  4633.             if (this.BitmapFormat == 3) this.BitmapColorTableSize = a.readUI8();
  4634.             a = a.stream.buffer.substr(a.stream.byteIndex + 2, b.TagLength - (a.stream.byteIndex - c) - 2);
  4635.             a = zip_inflate(a);
  4636.             a = new fljs.swf.SwfStream(new fljs.swf.StringStream(a));
  4637.             b = document.createElement("canvas");
  4638.             b.width = this.BitmapWidth;
  4639.             b.height =
  4640.             this.BitmapHeight;
  4641.             c = b.getContext("2d");
  4642.             var d = c.createImageData(this.BitmapWidth, this.BitmapHeight),
  4643.                 e = d.data;
  4644.             if (this.BitmapFormat == 3) {
  4645.                 this.ColorTableRgb = [];
  4646.                 for (var f = 0; f < this.BitmapColorTableSize + 1; f++) this.ColorTableRgb[f] = a.readRGB();
  4647.                 var g = Math.floor((this.BitmapWidth + 3) / 4) * 4;
  4648.                 for (var j = f = 0; f < this.BitmapWidth * this.BitmapHeight * 4;) {
  4649.                     var h = this.ColorTableRgb[a.readUI8()];
  4650.                     e[f++] = h.Red;
  4651.                     e[f++] = h.Green;
  4652.                     e[f++] = h.Blue;
  4653.                     e[f++] = 255;
  4654.                     j++;
  4655.                     if (j == this.BitmapWidth) {
  4656.                         a.skipBytes(g - this.BitmapWidth);
  4657.                         j = 0
  4658.                     }
  4659.                 }
  4660.             } else if (this.BitmapFormat == 4) {
  4661.                 g = Math.floor((this.BitmapWidth * 2 + 3) / 4) * 4;
  4662.                 for (j = f = 0; f < this.BitmapWidth * this.BitmapHeight * 4;) {
  4663.                     h = a.readPix15();
  4664.                     e[f++] = h.Red;
  4665.                     e[f++] = h.Green;
  4666.                     e[f++] = h.Blue;
  4667.                     e[f++] = 255;
  4668.                     j++;
  4669.                     if (j == this.BitmapWidth) {
  4670.                         a.skipBytes(g - this.BitmapWidth);
  4671.                         j = 0
  4672.                     }
  4673.                 }
  4674.             } else if (this.BitmapFormat == 5) for (f = 0; f < this.BitmapWidth * this.BitmapHeight * 4;) {
  4675.                 h = a.readARGB();
  4676.                 e[f++] = h.Red;
  4677.                 e[f++] = h.Green;
  4678.                 e[f++] = h.Blue;
  4679.                 e[f++] = 255
  4680.             }
  4681.             c.putImageData(d, 0, 0);
  4682.             this.DataUri = b.toDataURL()
  4683.         },
  4684.         evaluate: function (a) {
  4685.             a.addDefinition(this, this.CharacterId);
  4686.             this.Width = this.BitmapWidth;
  4687.             this.Height = this.BitmapHeight;
  4688.             this.defId = "image" + this.CharacterId;
  4689.             a = new fljs.swf.def.BitmapDef;
  4690.             a.setCharaId(this.defId);
  4691.             a.element.sets([[fljs.dom.Namespace.Xlink, "xlink:href", this.DataUri], [null, "x", 0], [null, "y", 0], [null, "width", this.Width], [null, "height", this.Height]]);
  4692.             a.define();
  4693.             this.def = a
  4694.         }
  4695.     });
  4696.     fljs.swf.tag.DefineFont3 = function () {};
  4697.     fljs.addMethods(fljs.swf.tag.DefineFont3, {
  4698.         read: function (a) {
  4699.             var b;
  4700.             this.FontId = a.readUI16();
  4701.             this.FontFlagsHasLayout = a.readUB(1);
  4702.             this.FontFlagsShiftJIS = a.readUB(1);
  4703.             this.FontFlagsSmallText = a.readUB(1);
  4704.             this.FontFlagsANSI = a.readUB(1);
  4705.             this.FontFlagsWideOffsets = a.readUB(1);
  4706.             this.FontFlagsWideCodes = a.readUB(1);
  4707.             a.FontFlagsWideCodes = this.FontFlagsWideCodes;
  4708.             this.FontFlagsItalic = a.readUB(1);
  4709.             this.FontFlagsBold = a.readUB(1);
  4710.             this.LanguageCode = a.readLangCode();
  4711.             this.FontNameLen = a.readUI8();
  4712.             var c = [];
  4713.             for (b = 0; b < this.FontNameLen; b++) c.push(String.fromCharCode(a.readUI8()));
  4714.             this.FontName = c.join("");
  4715.             this.NumGlyphs = a.readUI16();
  4716.             this.OffsetTable = [];
  4717.             if (this.FontFlagsWideOffsets) {
  4718.                 for (b = 0; b < this.NumGlyphs; b++) this.OffsetTable.push(a.readUI32());
  4719.                 this.CodeTableOffset = a.readUI32()
  4720.             } else {
  4721.                 for (b = 0; b < this.NumGlyphs; b++) this.OffsetTable.push(a.readUI16());
  4722.                 this.CodeTableOffset = a.readUI16()
  4723.             }
  4724.             this.GlyphShapeTable = [];
  4725.             for (b = 0; b < this.NumGlyphs; b++) this.GlyphShapeTable.push(a.readShape());
  4726.             this.CodeTable = [];
  4727.             for (b = 0; b < this.NumGlyphs; b++) this.CodeTable.push(a.readUI16());
  4728.             if (this.FontFlagsHasLayout) {
  4729.                 this.FontAscent =
  4730.                 a.readSI16();
  4731.                 this.FontDescent = a.readSI16();
  4732.                 this.FontLeading = a.readSI16();
  4733.                 this.FontAdvanceTable = [];
  4734.                 for (b = 0; b < this.NumGlyphs; b++) this.FontAdvanceTable.push(a.readSI16());
  4735.                 this.FontBoundsTable = [];
  4736.                 for (b = 0; b < this.NumGlyphs; b++) {
  4737.                     this.FontBoundsTable.push(a.readRECT());
  4738.                     a.stream.align()
  4739.                 }
  4740.                 this.KerningCount = a.readUI16();
  4741.                 this.FontKerningTable = [];
  4742.                 for (b = 0; b < this.KerningCount; b++) this.FontKerningTable.push(a.readKerningRecord())
  4743.             }
  4744.         },
  4745.         evaluate: function (a) {
  4746.             var b = (new fljs.swf.build.FontBuilder(this, a)).buildDef();
  4747.             a.defineFont2(this.FontId, this.GlyphShapeTable.length, b, this.FontName, this.FontFlagsBold, this.FontFlagsItalic, this.CodeTable, this)
  4748.         }
  4749.     });
  4750.     fljs.swf.tag.DoInitAction = function () {};
  4751.     fljs.addMethods(fljs.swf.tag.DoInitAction, {
  4752.         read: function (a, b) {
  4753.             this.SpriteId = a.readUI16();
  4754.             this.Actions = a.readActionRecords(b.TagLength - 2 - 1);
  4755.             this.ActionEndFlag = a.readUI8()
  4756.         },
  4757.         evaluate: function (a) {
  4758.             if (!this.processed) {
  4759.                 this.processed = true;
  4760.                 a.doInitAction(this)
  4761.             }
  4762.         }
  4763.     });
  4764.     fljs.swf.tag.tagMap = {
  4765.         0: fljs.swf.tag.End,
  4766.         1: fljs.swf.tag.ShowFrame,
  4767.         2: fljs.swf.tag.DefineShape,
  4768.         4: fljs.swf.tag.PlaceObject,
  4769.         5: fljs.swf.tag.RemoveObject,
  4770.         6: fljs.swf.tag.DefineBits,
  4771.         8: fljs.swf.tag.JpegTables,
  4772.         9: fljs.swf.tag.SetBackgroundColor,
  4773.         10: fljs.swf.tag.DefineFont,
  4774.         11: fljs.swf.tag.DefineText,
  4775.         12: fljs.swf.tag.DoAction,
  4776.         13: fljs.swf.tag.DefineFontInfo,
  4777.         14: fljs.swf.tag.DefineSound,
  4778.         15: fljs.swf.tag.StartSound,
  4779.         18: fljs.swf.tag.SoundStreamHead,
  4780.         19: fljs.swf.tag.SoundStreamBlock,
  4781.         20: fljs.swf.tag.DefineBitsLossless,
  4782.         21: fljs.swf.tag.DefineBitsJPEG2,
  4783.         22: fljs.swf.tag.DefineShape2,
  4784.         24: fljs.swf.tag.Protect,
  4785.         26: fljs.swf.tag.PlaceObject2,
  4786.         28: fljs.swf.tag.RemoveObject2,
  4787.         32: fljs.swf.tag.DefineShape3,
  4788.         33: fljs.swf.tag.DefineText2,
  4789.         34: fljs.swf.tag.DefineButton2,
  4790.         35: fljs.swf.tag.DefineBitsJpeg3,
  4791.         36: fljs.swf.tag.DefineBitsLossless2,
  4792.         37: fljs.swf.tag.DefineEditText,
  4793.         39: fljs.swf.tag.DefineSprite,
  4794.         43: fljs.swf.tag.FrameLabel,
  4795.         45: fljs.swf.tag.SoundStreamHead2,
  4796.         48: fljs.swf.tag.DefineFont2,
  4797.         56: fljs.swf.tag.ExportAssets,
  4798.         59: fljs.swf.tag.DoInitAction,
  4799.         62: fljs.swf.tag.DefineFontInfo2,
  4800.         70: fljs.swf.tag.PlaceObject3,
  4801.         75: fljs.swf.tag.DefineFont3,
  4802.         82: fljs.swf.tag.DoAbc,
  4803.         83: fljs.swf.tag.DefineShape4
  4804.     };
  4805.     fljs.swf.SwfStream = function (a) {
  4806.         this.stream = a;
  4807.         this.twipsPerPixel = 20;
  4808.         this.logger = fljs.console("parse")
  4809.     };
  4810.     fljs.addMethods(fljs.swf.SwfStream, {
  4811.         _mark: function (a, b) {
  4812.             this.debug && this.logger.info(a + ": " + b)
  4813.         },
  4814.         hasMore: function () {
  4815.             return this.stream.hasMore()
  4816.         },
  4817.         skipBytes: function (a) {
  4818.             this.stream.skipBytes(a)
  4819.         },
  4820.         readBytes: function (a) {
  4821.             return this.stream.readBytes(a)
  4822.         },
  4823.         readUI8: function () {
  4824.             return this.stream.nextUByte()
  4825.         },
  4826.         readUI16: function () {
  4827.             var a = this.stream.nextUShort();
  4828.             this._mark("readUI16", a);
  4829.             return a
  4830.         },
  4831.         readUI32: function () {
  4832.             return this.stream.nextULong()
  4833.         },
  4834.         readSI8: function () {
  4835.             return this.stream.nextSByte()
  4836.         },
  4837.         readSI16: function () {
  4838.             return this.stream.nextSShort()
  4839.         },
  4840.         readSI32: function () {
  4841.             return this.stream.nextSLong()
  4842.         },
  4843.         readUB: function (a) {
  4844.             return this.stream.nextUBits(a)
  4845.         },
  4846.         readSB: function (a) {
  4847.             return this.stream.nextSBits(a)
  4848.         },
  4849.         readFB: function (a) {
  4850.             return this.stream.nextFBits(a)
  4851.         },
  4852.         readFIXED: function () {
  4853.             return this.readFixed()
  4854.         },
  4855.         readFixed: function () {
  4856.             return this.stream.nextFLong()
  4857.         },
  4858.         readFIXED8: function () {
  4859.             return this.readFixed8()
  4860.         },
  4861.         readFixed8: function () {
  4862.             return this.stream.nextFShort()
  4863.         },
  4864.         readFLOAT16: function () {
  4865.             return this.stream.nextHalfFloat()
  4866.         },
  4867.         readFLOAT: function () {
  4868.             return this.readFloat()
  4869.         },
  4870.         readFloat: function () {
  4871.             return this.stream.nextSingleFloat()
  4872.         },
  4873.         readFloats: function (a) {
  4874.             for (var b = [], c = 0; c < a; c++) b.push(this.readFloat());
  4875.             return b
  4876.         },
  4877.         readDOUBLE: function () {
  4878.             return this.stream.nextDoubleFloat()
  4879.         },
  4880.         readDouble: function () {
  4881.             return this.stream.nextDoubleFloat()
  4882.         },
  4883.         readEncodedU32: function () {
  4884.             return this.stream.nextEncodedULong()
  4885.         },
  4886.         readString: function () {
  4887.             return this.stream.nextString()
  4888.         },
  4889.         readSTRING: function () {
  4890.             return this.stream.nextString()
  4891.         },
  4892.         readSwfHeader: function () {
  4893.             var a = String.fromCharCode(this.readUI8(), this.readUI8(), this.readUI8()),
  4894.                 b = this.readUI8(),
  4895.                 c = this.readUI32();
  4896.             if (a == "CWS") {
  4897.                 var d = fljs.console("rar");
  4898.                 d.info("deflating...");
  4899.                 var e = this.stream.buffer.substr(this.stream.byteIndex + 2);
  4900.                 d.info("unzipping...");
  4901.                 e = zip_inflate(e);
  4902.                 d.info("streaming...");
  4903.                 this.stream = new fljs.swf.StringStream(e);
  4904.                 d.info("done");
  4905.                 d.info(this.stream.buffer.length)
  4906.             }
  4907.             d = this.readRECT();
  4908.             e = this.readFIXED8();
  4909.             var f = this.readUI16();
  4910.             return this.header = {
  4911.                 Signature: a,
  4912.                 Version: b,
  4913.                 FileLength: c,
  4914.                 FrameSize: d,
  4915.                 FrameRate: e,
  4916.                 FrameCount: f
  4917.             }
  4918.         },
  4919.         readLANGCODE: function () {
  4920.             return {
  4921.                 LanguageCode: this.readUI8()
  4922.             }
  4923.         },
  4924.         readRecordHeader: function () {
  4925.             var a = this.readUI16(),
  4926.                 b = a & 63;
  4927.             a = a >> 6 & 1023;
  4928.             if (b == 63) b = this.readSI32();
  4929.             return {
  4930.                 TagType: a,
  4931.                 TagLength: b,
  4932.                 byteIndex: this.stream.byteIndex
  4933.             }
  4934.         },
  4935.         readMATRIX: function () {
  4936.             return this.readMatrix()
  4937.         },
  4938.         readCXFORM: function () {
  4939.             var a = this.readUB(1),
  4940.                 b = this.readUB(1),
  4941.                 c = this.readUB(4),
  4942.                 d = 1,
  4943.                 e = 1,
  4944.                 f = 1;
  4945.             if (b) {
  4946.                 d = this.readSB(c) / 256;
  4947.                 e = this.readSB(c) / 256;
  4948.                 f = this.readSB(c) / 256
  4949.             }
  4950.             var g = 0,
  4951.                 j = 0,
  4952.                 h = 0;
  4953.             if (a) {
  4954.                 g = this.readSB(c);
  4955.                 j = this.readSB(c);
  4956.                 h = this.readSB(c)
  4957.             }
  4958.             return {
  4959.                 HasAddTerms: a,
  4960.                 HasMultTerms: b,
  4961.                 Nbits: c,
  4962.                 RedMultTerm: d,
  4963.                 GreenMultTerm: e,
  4964.                 BlueMultTerm: f,
  4965.                 RedAddTerm: g,
  4966.                 GreenAddTerm: j,
  4967.                 BlueAddTerm: h,
  4968.                 AlphaMultTerm: 1,
  4969.                 AlphaAddTerm: 0
  4970.             }
  4971.         },
  4972.         readCXFORMWITHALPHA: function () {
  4973.             this.stream.align();
  4974.             var a = this.readUB(1),
  4975.                 b = this.readUB(1),
  4976.                 c = this.readUB(4),
  4977.                 d = 1,
  4978.                 e = 1,
  4979.                 f = 1,
  4980.                 g = 1;
  4981.             if (b) {
  4982.                 d = this.readSB(c) / 256;
  4983.                 e = this.readSB(c) / 256;
  4984.                 f = this.readSB(c) / 256;
  4985.                 g = this.readSB(c) / 256
  4986.             }
  4987.             var j = 0,
  4988.                 h = 0,
  4989.                 m = 0,
  4990.                 k = 0;
  4991.             if (a) {
  4992.                 j = this.readSB(c);
  4993.                 h = this.readSB(c);
  4994.                 m = this.readSB(c);
  4995.                 k = this.readSB(c)
  4996.             }
  4997.             return {
  4998.                 HasAddTerms: a,
  4999.                 HasMultTerms: b,
  5000.                 Nbits: c,
  5001.                 RedMultTerm: d,
  5002.                 GreenMultTerm: e,
  5003.                 BlueMultTerm: f,
  5004.                 AlphaMultTerm: g,
  5005.                 RedAddTerm: j,
  5006.                 GreenAddTerm: h,
  5007.                 BlueAddTerm: m,
  5008.                 AlphaAddTerm: k
  5009.             }
  5010.         },
  5011.         readFILTERLIST: function () {},
  5012.         readCLIPACTIONS: function () {
  5013.             this.readUI16();
  5014.             var a = this.readClipEventFlags(),
  5015.                 b = this.readClipActionRecords();
  5016.             return {
  5017.                 AllEventFlags: a,
  5018.                 ClipActionRecords: b
  5019.             }
  5020.         },
  5021.         readClipActionRecords: function () {
  5022.             for (var a = [], b; b = this.readClipActionRecord();) a.push(b);
  5023.             return a
  5024.         },
  5025.         readClipActionRecord: function () {
  5026.             var a = this.readClipEventFlags();
  5027.             if (!a) return null;
  5028.             var b = this.readUI32(),
  5029.                 c = b,
  5030.                 d;
  5031.             if (a & fljs.swf.ClipEventFlags.ClipEventKeyPress) {
  5032.                 d = this.readUI8();
  5033.                 c -= 1
  5034.             }
  5035.             c = this.readActionRecords(c);
  5036.             return {
  5037.                 EventFlags: a,
  5038.                 ActionRecordSize: b,
  5039.                 KeyCode: d,
  5040.                 Actions: c
  5041.             }
  5042.         },
  5043.         readActionRecords: function (a) {
  5044.             for (var b = this.stream.byteIndex, c = []; this.stream.byteIndex != b + a;) c.push(this.readActionRecord());
  5045.             if (c.length) {
  5046.                 a = c[c.length - 1];
  5047.                 a.ActionCode != 0 && c.push({
  5048.                     code: "0x0",
  5049.                     address: a.address + a.Length,
  5050.                     ActionCode: 0,
  5051.                     Action: "End"
  5052.                 })
  5053.             }
  5054.             return c
  5055.         },
  5056.         readActionRecord: function () {
  5057.             var a = this.stream.byteIndex,
  5058.                 b = this.readUI8();
  5059.             a = {
  5060.                 code: "0x" + b.toString(16),
  5061.                 address: a,
  5062.                 ActionCode: b
  5063.             };
  5064.             if (b >= 128) a.Length = this.readUI16();
  5065.             switch (b) {
  5066.             case 129:
  5067.                 a.Action = "ActionGotoFrame";
  5068.                 a.Frame = this.readUI16();
  5069.                 break;
  5070.             case 131:
  5071.                 a.Action = "ActionGetUrl";
  5072.                 a.UrlString = this.readString();
  5073.                 a.TargetString = this.readString();
  5074.                 break;
  5075.             case 4:
  5076.                 a.Action = "ActionNextFrame";
  5077.                 break;
  5078.             case 5:
  5079.                 a.Action = "ActionPrevFrame";
  5080.                 break;
  5081.             case 6:
  5082.                 a.Action = "ActionPlay";
  5083.                 break;
  5084.             case 7:
  5085.                 a.Action = "ActionStop";
  5086.                 break;
  5087.             case 8:
  5088.                 a.Action = "ActionToggleQuality";
  5089.                 break;
  5090.             case 9:
  5091.                 a.Action = "ActionStopSounds";
  5092.                 break;
  5093.             case 138:
  5094.                 a.Action = "ActionWaitForFrame";
  5095.                 a.Frame = this.readUI16();
  5096.                 a.SkipCount = this.readUI8();
  5097.                 break;
  5098.             case 139:
  5099.                 a.Action = "ActionSetTarget";
  5100.                 a.TargetName = this.readString();
  5101.                 break;
  5102.             case 8:
  5103.                 a.Action = "ActionToggleQuality";
  5104.                 break;
  5105.             case 139:
  5106.                 a.Action = "ActionSetTarget";
  5107.                 a.TargetName = this.readString();
  5108.                 break;
  5109.             case 140:
  5110.                 a.Action = "ActionGotoLabel";
  5111.                 a.Label = this.readString();
  5112.                 break;
  5113.             case 150:
  5114.                 this.readActionPush(a);
  5115.                 break;
  5116.             case 153:
  5117.                 a.Action = "ActionJump";
  5118.                 a.BranchOffset = this.readSI16();
  5119.                 break;
  5120.             case 157:
  5121.                 a.Action = "ActionIf";
  5122.                 a.BranchOffset = this.readSI16();
  5123.                 break;
  5124.             case 154:
  5125.                 a.Action = "ActionGetUrl2";
  5126.                 a.SendVarsMethod = this.readUB(2);
  5127.                 a.Reserved = this.readUB(4);
  5128.                 a.LoadTargetFlag = this.readUB(1);
  5129.                 a.LoadVariablesFlag = this.readUB(1);
  5130.                 break;
  5131.             case 159:
  5132.                 this.readActionGotoFrame2(a);
  5133.                 break;
  5134.             case 141:
  5135.                 a.Action = "ActionWaitForFrame2";
  5136.                 a.SkipCount = this.readUI8();
  5137.                 break;
  5138.             case 136:
  5139.                 this.readActionConstantPool(a);
  5140.                 break;
  5141.             case 155:
  5142.                 this.readActionDefineFunction(a);
  5143.                 break;
  5144.             case 148:
  5145.                 this.readActionWith(a);
  5146.                 break;
  5147.             case 135:
  5148.                 a.Action = "ActionStoreRegister";
  5149.                 a.RegisterNumber = this.readUI8();
  5150.                 break;
  5151.             case 142:
  5152.                 this.readActionDefineFunction2(a);
  5153.                 break;
  5154.             case 143:
  5155.                 this.readActionTry(a);
  5156.                 break;
  5157.             default:
  5158.                 a.Action = "Unknown";
  5159.                 break
  5160.             }
  5161.             return a
  5162.         },
  5163.         readActionPush: function (a) {
  5164.             for (var b = a.Length, c = this.stream.byteIndex, d = []; this.stream.byteIndex < c + b;) {
  5165.                 var e = this.readUI8(),
  5166.                     f;
  5167.                 switch (e) {
  5168.                 case 0:
  5169.                     f = this.readString();
  5170.                     break;
  5171.                 case 1:
  5172.                     f = this.readFloat();
  5173.                     break;
  5174.                 case 4:
  5175.                 case 5:
  5176.                 case 8:
  5177.                     f = this.readUI8();
  5178.                     break;
  5179.                 case 6:
  5180.                     f = this.readDouble();
  5181.                     break;
  5182.                 case 7:
  5183.                     f = this.readUI32();
  5184.                     break;
  5185.                 case 9:
  5186.                     f = this.readUI16();
  5187.                     break
  5188.                 }
  5189.                 d.push({
  5190.                     Type: e,
  5191.                     Value: f
  5192.                 })
  5193.             }
  5194.             a.Action = "ActionPush";
  5195.             a.Values = d
  5196.         },
  5197.         readActionGotoFrame2: function (a) {
  5198.             this.readUB(6);
  5199.             var b =
  5200.             this.readUB(1),
  5201.                 c = this.readUB(1),
  5202.                 d;
  5203.             if (b) d = this.readUI16();
  5204.             a.Action = "ActionGotoFrame2";
  5205.             a.SceneBiasFlag = b;
  5206.             a.PlayFlag = c;
  5207.             a.SceneBias = d
  5208.         },
  5209.         readActionConstantPool: function (a) {
  5210.             for (var b = a.Length, c = this.stream.byteIndex, d = [], e = 0; this.stream.byteIndex < c + b;) {
  5211.                 var f = this.readString();
  5212.                 e > 0 && d.push(f);
  5213.                 e++
  5214.             }
  5215.             a.Action = "ActionConstantPool";
  5216.             a.Count = b;
  5217.             a.ConstantPool = d
  5218.         },
  5219.         readActionDefineFunction: function (a) {
  5220.             for (var b = this.readString(), c = this.readUI16(), d = [], e = 0; e < c; e++) d.push(this.readString());
  5221.             e = this.readUI16();
  5222.             var f = this.readActionRecords(e);
  5223.             a.Action = "ActionDefineFunction";
  5224.             a.FunctionName = b;
  5225.             a.NumParams = c;
  5226.             a.Params = d;
  5227.             a.CodeSize = e;
  5228.             a.Code = f
  5229.         },
  5230.         readActionWith: function (a) {
  5231.             var b = this.readUI16(),
  5232.                 c = this.readActionRecords(b);
  5233.             a.Action = "ActionWith";
  5234.             a.Size = b;
  5235.             a.Code = c
  5236.         },
  5237.         readActionDefineFunction2: function (a) {
  5238.             a.FunctionName = this.readString();
  5239.             a.NumParams = this.readUI16();
  5240.             a.RegisterCount = this.readUI8();
  5241.             a.PreloadParentFlag = this.readUB(1);
  5242.             a.PreloadRootFlag = this.readUB(1);
  5243.             a.SupressSuperFlag = this.readUB(1);
  5244.             a.PreloadSuperFlag = this.readUB(1);
  5245.             a.SupressArgumentsFlag =
  5246.             this.readUB(1);
  5247.             a.PreloadArgumentsFlag = this.readUB(1);
  5248.             a.SupressThisFlag = this.readUB(1);
  5249.             a.PreloadThisFlag = this.readUB(1);
  5250.             this.readUB(7);
  5251.             a.PreloadGlobalFlag = this.readUB(1);
  5252.             a.Parameters = [];
  5253.             for (var b = 0; b < a.NumParams; b++) a.Parameters.push(this.readRegisterParam());
  5254.             a.CodeSize = this.readUI16();
  5255.             b = this.readActionRecords(a.CodeSize);
  5256.             a.Action = "ActionDefineFunction2";
  5257.             a.Code = b
  5258.         },
  5259.         readRegisterParam: function () {
  5260.             return {
  5261.                 Register: this.readUI8(),
  5262.                 ParamName: this.readString()
  5263.             }
  5264.         },
  5265.         readActionTry: function (a) {
  5266.             this.readUB(5);
  5267.             a.CatchInRegisterFlag =
  5268.             this.readUB(1);
  5269.             a.FinallyBlockFlag = this.readUB(1);
  5270.             a.CatchBlockFlag = this.readUB(1);
  5271.             a.TrySize = this.readUI16();
  5272.             a.CatchSize = this.readUI16();
  5273.             a.FinallySize = this.readUI16();
  5274.             if (a.CatchInRegisterFlag) a.CatchRegister = this.readUI8();
  5275.             else a.CatchName = this.readString();
  5276.             this.skipBytes(a.TrySize);
  5277.             this.skipBytes(a.CatchSize);
  5278.             this.skipBytes(a.FinallySize)
  5279.         },
  5280.         readClipEventFlags: function () {
  5281.             return this.header.Version <= 5 ? this.readUB(16) << 16 : this.readUB(32)
  5282.         },
  5283.         readRGB: function () {
  5284.             return {
  5285.                 Red: this.readUI8(),
  5286.                 Green: this.readUI8(),
  5287.                 Blue: this.readUI8()
  5288.             }
  5289.         },
  5290.         readRGBA: function () {
  5291.             return {
  5292.                 Red: this.readUI8(),
  5293.                 Green: this.readUI8(),
  5294.                 Blue: this.readUI8(),
  5295.                 Alpha: this.readUI8()
  5296.             }
  5297.         },
  5298.         readARGB: function () {
  5299.             return {
  5300.                 Alpha: this.readUI8(),
  5301.                 Red: this.readUI8(),
  5302.                 Green: this.readUI8(),
  5303.                 Blue: this.readUI8()
  5304.             }
  5305.         },
  5306.         readRect: function () {
  5307.             this.stream.align();
  5308.             var a = this.readUB(5);
  5309.             return {
  5310.                 Nbits: a,
  5311.                 Xmin: this.readSB(a) / this.twipsPerPixel,
  5312.                 Xmax: this.readSB(a) / this.twipsPerPixel,
  5313.                 Ymin: this.readSB(a) / this.twipsPerPixel,
  5314.                 Ymax: this.readSB(a) / this.twipsPerPixel
  5315.             }
  5316.         },
  5317.         readRECT: function () {
  5318.             return this.readRect()
  5319.         },
  5320.         readShapeWithStyle: function () {
  5321.             this.stream.align();
  5322.             var a = this.readFILLSTYLEARRAY(),
  5323.                 b = this.readLINESTYLEARRAY();
  5324.             this.stream.align();
  5325.             var c = this.readUB(4),
  5326.                 d = this.readUB(4);
  5327.             this.NumFillBits = c;
  5328.             this.NumLineBits = d;
  5329.             var e = this.readSHAPERECORDS();
  5330.             return {
  5331.                 FillStyles: a,
  5332.                 LineStyles: b,
  5333.                 NumFillBits: c,
  5334.                 NumLineBits: d,
  5335.                 ShapeRecords: e
  5336.             }
  5337.         },
  5338.         readSHAPEWITHSTYLE: function () {
  5339.             return this.readShapeWithStyle()
  5340.         },
  5341.         readSHAPERECORDS: function () {
  5342.             for (var a = [], b = this.readSHAPERECORD(); !b.isEndOfShape;) {
  5343.                 a.push(b);
  5344.                 b = this.readSHAPERECORD()
  5345.             }
  5346.             this.stream.align();
  5347.             return a
  5348.         },
  5349.         readSHAPERECORD: function () {
  5350.             return this.readUB(1) == 0 ? this.readNonEdgeSHAPERECORD() : this.readEdgeSHAPERECORD()
  5351.         },
  5352.         readNonEdgeSHAPERECORD: function () {
  5353.             var a = this.readUB(1),
  5354.                 b = this.readUB(1),
  5355.                 c = this.readUB(1),
  5356.                 d = this.readUB(1),
  5357.                 e = this.readUB(1);
  5358.             if (a == 0 && b == 0 && c == 0 && d == 0 && e == 0) return {
  5359.                 isEndOfShape: true,
  5360.                 type: "END"
  5361.             };
  5362.             else {
  5363.                 var f, g, j;
  5364.                 if (e) {
  5365.                     f = this.readUB(5);
  5366.                     g = this.readSB(f);
  5367.                     j = this.readSB(f)
  5368.                 }
  5369.                 var h;
  5370.                 if (d) h = this.readUB(this.NumFillBits);
  5371.                 var m;
  5372.                 if (c) m = this.readUB(this.NumFillBits);
  5373.                 var k;
  5374.                 if (b) k = this.readUB(this.NumLineBits);
  5375.                 var l, n, p, u;
  5376.                 if (a) {
  5377.                     l = this.readFILLSTYLEARRAY();
  5378.                     n = this.readLINESTYLEARRAY();
  5379.                     this.stream.align();
  5380.                     p = this.readUB(4);
  5381.                     u = this.readUB(4);
  5382.                     this.NumFillBits = p;
  5383.                     this.NumLineBits = u
  5384.                 }
  5385.                 return {
  5386.                     isEndOfShape: false,
  5387.                     type: "NONEDGE",
  5388.                     StateNewStyles: a,
  5389.                     StateLineStyle: b,
  5390.                     StateFillStyle1: c,
  5391.                     StateFillStyle0: d,
  5392.                     StateMoveTo: e,
  5393.                     MoveBits: f,
  5394.                     MoveDeltaX: g / this.twipsPerPixel,
  5395.                     MoveDeltaY: j / this.twipsPerPixel,
  5396.                     FillStyle0: h,
  5397.                     FillStyle1: m,
  5398.                     LineStyle: k,
  5399.                     FillStyles: l,
  5400.                     LineStyles: n,
  5401.                     NumFillBits: p,
  5402.                     NumLineBits: u
  5403.                 }
  5404.             }
  5405.         },
  5406.         readEdgeSHAPERECORD: function () {
  5407.             return this.readUB(1) == 1 ? this.readSTRAIGHTEDGERECORD() : this.readCURVEDEDGERECORD()
  5408.         },
  5409.         readSTRAIGHTEDGERECORD: function () {
  5410.             var a = this.readUB(4),
  5411.                 b = this.readUB(1),
  5412.                 c;
  5413.             if (b == 0) c = this.readUB(1);
  5414.             var d;
  5415.             if (b == 1 || c == 0) {
  5416.                 d = this.readSB(a + 2);
  5417.                 if (c == 0) e = 0
  5418.             }
  5419.             var e;
  5420.             if (b == 1 || c == 1) {
  5421.                 e = this.readSB(a + 2);
  5422.                 if (c == 1) d = 0
  5423.             }
  5424.             return {
  5425.                 isStraightEdge: true,
  5426.                 type: "STRAIGHT",
  5427.                 NumBits: a,
  5428.                 GeneralLineFlag: b,
  5429.                 VertLineFlag: c,
  5430.                 DeltaX: d / this.twipsPerPixel,
  5431.                 DeltaY: e / this.twipsPerPixel
  5432.             }
  5433.         },
  5434.         readCURVEDEDGERECORD: function () {
  5435.             var a = this.readUB(4),
  5436.                 b = this.readSB(a + 2),
  5437.                 c = this.readSB(a + 2),
  5438.                 d =
  5439.                 this.readSB(a + 2),
  5440.                 e = this.readSB(a + 2);
  5441.             return {
  5442.                 isCurvedEdge: true,
  5443.                 type: "CURVED",
  5444.                 NumBits: a,
  5445.                 ControlDeltaX: b / this.twipsPerPixel,
  5446.                 ControlDeltaY: c / this.twipsPerPixel,
  5447.                 AnchorDeltaX: d / this.twipsPerPixel,
  5448.                 AnchorDeltaY: e / this.twipsPerPixel
  5449.             }
  5450.         },
  5451.         readFILLSTYLEARRAY: function () {
  5452.             var a = this.readUI8();
  5453.             if (this.context == fljs.swf.tag.DefineShape2 || this.context == fljs.swf.tag.DefineShape3 || this.context == fljs.swf.tag.DefineShape4) if (a == 255) a = a = this.readUI16();
  5454.             for (var b = [], c = 0; c < a; c++) b[c] = this.readFILLSTYLE();
  5455.             return b
  5456.         },
  5457.         readFILLSTYLE: function () {
  5458.             var a =
  5459.             this.readUI8(),
  5460.                 b;
  5461.             if (a == 0) b = this.context == fljs.swf.tag.DefineShape3 || this.context == fljs.swf.tag.DefineShape4 ? this.readRGBA() : this.readRGB();
  5462.             var c, d;
  5463.             if (a == 16 || a == 18) {
  5464.                 c = this.readMatrix();
  5465.                 d = this.readGRADIENT()
  5466.             }
  5467.             if (a == 19) {
  5468.                 c = this.readMatrix();
  5469.                 d = this.readFOCALGRADIENT()
  5470.             }
  5471.             var e, f;
  5472.             if (a == 64 || a == 65 || a == 66 || a == 67) {
  5473.                 e = this.readUI16();
  5474.                 f = this.readMatrix()
  5475.             }
  5476.             this.stream.align();
  5477.             return {
  5478.                 FillStyleType: a,
  5479.                 Color: b,
  5480.                 GradientMatrix: c,
  5481.                 Gradient: d,
  5482.                 BitmapId: e,
  5483.                 BitmapMatrix: f
  5484.             }
  5485.         },
  5486.         readLINESTYLEARRAY: function () {
  5487.             var a = this.readUI8();
  5488.             if (a == 255) a = a = this.readUI16();
  5489.             var b = [];
  5490.             if (this.context == fljs.swf.tag.DefineShape4) for (var c = 0; c < a; c++) b[c] = this.readLINESTYLE2();
  5491.             else for (c = 0; c < a; c++) b[c] = this.readLINESTYLE();
  5492.             return b
  5493.         },
  5494.         readLINESTYLE: function () {
  5495.             var a = this.readUI16(),
  5496.                 b;
  5497.             b = this.context == fljs.swf.tag.DefineShape || this.context == fljs.swf.tag.DefineShape2 ? this.readRGB() : this.readRGBA();
  5498.             return {
  5499.                 Width: a / this.twipsPerPixel,
  5500.                 Color: b
  5501.             }
  5502.         },
  5503.         readLINESTYLE2: function () {
  5504.             var a = this.readUI16(),
  5505.                 b = this.readUB(2),
  5506.                 c = this.readUB(2),
  5507.                 d = this.readUB(1),
  5508.                 e = this.readUB(1),
  5509.                 f = this.readUB(1),
  5510.                 g = this.readUB(1);
  5511.             this.readUB(5);
  5512.             var j = this.readUB(1),
  5513.                 h = this.readUB(2),
  5514.                 m;
  5515.             if (c == 2) m = this.readUI16();
  5516.             var k;
  5517.             if (d == 0) k = this.readRGBA();
  5518.             var l;
  5519.             if (d == 1) l = this.readFILLSTYLE();
  5520.             return {
  5521.                 Width: a / this.twipsPerPixel,
  5522.                 StartCapStyle: b,
  5523.                 JoinStyle: c,
  5524.                 HasFillFlag: d,
  5525.                 NoHScaleFlag: e,
  5526.                 NoVScaleFlag: f,
  5527.                 PixelHintingFlag: g,
  5528.                 NoClose: j,
  5529.                 EndCapStyle: h,
  5530.                 MiterLimitFactor: m,
  5531.                 Color: k,
  5532.                 FillType: l
  5533.             }
  5534.         },
  5535.         readGRADIENT: function () {
  5536.             this.stream.align();
  5537.             for (var a = this.readUB(2), b = this.readUB(2), c = this.readUB(4), d = [], e = 0; e < c; e++) d.push(this.readGRADRECORD());
  5538.             return {
  5539.                 SpreadMode: a,
  5540.                 InterpolationMode: b,
  5541.                 NumGradients: c,
  5542.                 GradientRecords: d
  5543.             }
  5544.         },
  5545.         readFOCALGRADIENT: function () {
  5546.             this.stream.align();
  5547.             for (var a = this.readUB(2), b = this.readUB(2), c = this.readUB(4), d = [], e = 0; e < c; e++) d.push(this.readGRADRECORD());
  5548.             e = this.readFIXED8();
  5549.             return {
  5550.                 SpreadMode: a,
  5551.                 InterpolationMode: b,
  5552.                 NumGradients: c,
  5553.                 GradientRecords: d,
  5554.                 FocalPoint: e
  5555.             }
  5556.         },
  5557.         readGRADRECORD: function () {
  5558.             var a = this.readUI8(),
  5559.                 b;
  5560.             b = this.context == fljs.swf.tag.DefineShape || this.context == fljs.swf.tag.DefineShape2 ? this.readRGB() : this.readRGBA();
  5561.             return {
  5562.                 Ratio: a,
  5563.                 Color: b
  5564.             }
  5565.         },
  5566.         readID: function () {},
  5567.         readMatrix: function () {
  5568.             this.stream.align();
  5569.             var a = this.readUB(1),
  5570.                 b, c, d;
  5571.             if (a) {
  5572.                 b = this.readUB(5);
  5573.                 c = this.readFB(b);
  5574.                 d = this.readFB(b)
  5575.             }
  5576.             var e = this.readUB(1),
  5577.                 f, g, j;
  5578.             if (e) {
  5579.                 f = this.readUB(5);
  5580.                 g = this.readFB(f);
  5581.                 j = this.readFB(f)
  5582.             }
  5583.             var h = this.readUB(5),
  5584.                 m = this.readSB(h),
  5585.                 k = this.readSB(h);
  5586.             return {
  5587.                 HasScale: a,
  5588.                 NScaleBits: b,
  5589.                 ScaleX: c,
  5590.                 ScaleY: d,
  5591.                 HasRotate: e,
  5592.                 NRotateBits: f,
  5593.                 RotateSkew0: g,
  5594.                 RotateSkew1: j,
  5595.                 NTranslateBits: h,
  5596.                 TranslateX: m / this.twipsPerPixel,
  5597.                 TranslateY: k / this.twipsPerPixel
  5598.             }
  5599.         },
  5600.         readSHAPE: function () {
  5601.             var a =
  5602.             this.readUB(4),
  5603.                 b = this.readUB(4);
  5604.             this.NumFillBits = a;
  5605.             this.NumLineBits = b;
  5606.             var c = this.readSHAPERECORDS();
  5607.             return {
  5608.                 NumFillBits: a,
  5609.                 NumLineBits: b,
  5610.                 ShapeRecords: c
  5611.             }
  5612.         },
  5613.         readShape: function () {
  5614.             return this.readSHAPE()
  5615.         },
  5616.         readTEXTRECORDS: function () {
  5617.             for (var a = [];;) {
  5618.                 this.stream.align();
  5619.                 if (this.readUB(1)) a.push(this.readTEXTRECORD());
  5620.                 else {
  5621.                     this.stream.align();
  5622.                     break
  5623.                 }
  5624.             }
  5625.             return a
  5626.         },
  5627.         readTEXTRECORD: function () {
  5628.             var a = this.readUB(3),
  5629.                 b = this.readUB(1),
  5630.                 c = this.readUB(1),
  5631.                 d = this.readUB(1),
  5632.                 e = this.readUB(1),
  5633.                 f;
  5634.             if (b) f = this.readUI16();
  5635.             var g;
  5636.             if (c) g = this.context == fljs.swf.tag.DefineText2 ? this.readRGBA() : this.readRGB();
  5637.             var j;
  5638.             if (e) j = this.readSI16() / this.twipsPerPixel;
  5639.             var h;
  5640.             if (d) h = this.readSI16() / this.twipsPerPixel;
  5641.             var m;
  5642.             if (b) m = this.readUI16() / this.twipsPerPixel;
  5643.             for (var k = this.readUI8(), l = [], n = 0; n < k; n++) l.push(this.readGLYPHENTRY());
  5644.             return {
  5645.                 StyleFlagsReserved: a,
  5646.                 StyleFlagsHasFont: b,
  5647.                 StyleFlagsHasColor: c,
  5648.                 StyleFlagsHasYOffset: d,
  5649.                 StyleFlagsHasXOffset: e,
  5650.                 FontId: f,
  5651.                 TextColor: g,
  5652.                 XOffset: j,
  5653.                 YOffset: h,
  5654.                 TextHeight: m,
  5655.                 GlyphCount: k,
  5656.                 GlyphEntries: l
  5657.             }
  5658.         },
  5659.         readGLYPHENTRY: function () {
  5660.             return {
  5661.                 GlyphIndex: this.readUB(this.GlyphBits),
  5662.                 GlyphAdvance: this.readSB(this.AdvanceBits) / this.twipsPerPixel
  5663.             }
  5664.         },
  5665.         readLangCode: function () {
  5666.             return this.readUI8()
  5667.         },
  5668.         readKerningRecord: function () {
  5669.             var a, b;
  5670.             if (this.FontFlagsWideCodes) {
  5671.                 a = this.readUI16();
  5672.                 b = this.readUI16()
  5673.             } else {
  5674.                 a = this.readUI8();
  5675.                 b = this.readUI8()
  5676.             }
  5677.             var c = this.readSI16();
  5678.             return {
  5679.                 FontKerningCode1: a,
  5680.                 FontKerningCode2: b,
  5681.                 FontKerningAdjustment: c
  5682.             }
  5683.         },
  5684.         readMp3SoundData: function (a) {
  5685.             for (var b = this.stream.byteIndex, c = this.readSI16(), d = this.stream.byteIndex, e = []; this.stream.byteIndex < b + a;) e.push(this.readMp3Frame(e.length));
  5686.             a = this.stream.byteIndex - d;
  5687.             return {
  5688.                 SeekSamples: c,
  5689.                 Mp3Frames: e,
  5690.                 byteIndex: d,
  5691.                 byteCount: a,
  5692.                 buffer: this.stream.buffer
  5693.             }
  5694.         },
  5695.         readMp3Frame: function (a) {
  5696.             var b = this.readUB(11);
  5697.             if (b != 2047) throw new Error("readMp3Frame: Syncword is wrong in frame# " + a + " @ " + this.stream.byteIndex);
  5698.             a = this.readUB(2);
  5699.             var c = this.readUB(2),
  5700.                 d = this.readUB(1),
  5701.                 e = this.readUB(4),
  5702.                 f = this.readUB(2),
  5703.                 g = this.readUB(1);
  5704.             this.readUB(1);
  5705.             var j = this.readUB(2),
  5706.                 h = this.readUB(2),
  5707.                 m = this.readUB(1),
  5708.                 k = this.readUB(1),
  5709.                 l = this.readUB(2);
  5710.             d == 0 && this.readUI16();
  5711.             var n = Math.floor((a == {
  5712.                 MPEG2_5: 0,
  5713.                 MPEG2: 2,
  5714.                 MPEG1: 3
  5715.             }.MPEG1 ? 144 : 72) * {
  5716.                 1: [null, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320],
  5717.                 2: [null, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160]
  5718.             }[{
  5719.                 0: 2,
  5720.                 2: 2,
  5721.                 3: 1}[a]][e] * 1E3 / {
  5722.                 0: [11025, 12E3, 8E3],
  5723.                 2: [22050, 24E3, 16E3],
  5724.                 3: [44100, 48E3, 32E3]
  5725.             }[a][f]) + g - 4,
  5726.                 p = this.readBytes(n);
  5727.             return {
  5728.                 Syncword: b,
  5729.                 MpegVersion: a,
  5730.                 Layer: c,
  5731.                 ProtectionBit: d,
  5732.                 Bitrate: e,
  5733.                 SamplingRate: f,
  5734.                 PaddingBit: g,
  5735.                 ChannelMode: j,
  5736.                 ModeExtension: h,
  5737.                 Copyright: m,
  5738.                 Original: k,
  5739.                 Emphasis: l,
  5740.                 byteCount: n,
  5741.                 SampleData: p
  5742.             }
  5743.         },
  5744.         readSoundInfo: function () {
  5745.             this.readUB(2);
  5746.             var a =
  5747.             this.readUB(1),
  5748.                 b = this.readUB(1),
  5749.                 c = this.readUB(1),
  5750.                 d = this.readUB(1),
  5751.                 e = this.readUB(1),
  5752.                 f = this.readUB(1),
  5753.                 g;
  5754.             if (f) g = this.readUI32();
  5755.             var j;
  5756.             if (e) j = this.readUI32();
  5757.             var h;
  5758.             if (d) h = this.readUI16();
  5759.             var m, k;
  5760.             if (c) {
  5761.                 m = this.readUI8();
  5762.                 k = [];
  5763.                 for (var l = 0; l < m; l++) k.push(this.readEnvelopeRecord())
  5764.             }
  5765.             return {
  5766.                 SyncStop: a,
  5767.                 SyncNoMultiple: b,
  5768.                 HasEnvelope: c,
  5769.                 HasLoops: d,
  5770.                 HasOutPoint: e,
  5771.                 HasInPoint: f,
  5772.                 InPoint: g,
  5773.                 OutPoint: j,
  5774.                 LoopCount: h,
  5775.                 EnvPoints: m,
  5776.                 EnvelopeRecords: k
  5777.             }
  5778.         },
  5779.         readEnvelopeRecord: function () {
  5780.             return {
  5781.                 Pos44: this.readUI32(),
  5782.                 LeftLevel: this.readUI16(),
  5783.                 RightLevel: this.readUI16()
  5784.             }
  5785.         },
  5786.         readButtonRecords: function () {
  5787.             for (var a = [], b; b = this.readButtonRecord();) a.push(b);
  5788.             return a
  5789.         },
  5790.         readButtonRecord: function () {
  5791.             var a = {};
  5792.             this.stream.align();
  5793.             this.readUB(2);
  5794.             a.ButtonHasBlendMode = this.readUB(1);
  5795.             a.ButtonHasFilterList = this.readUB(1);
  5796.             a.ButtonStateHitTest = this.readUB(1);
  5797.             a.ButtonStateDown = this.readUB(1);
  5798.             a.ButtonStateOver = this.readUB(1);
  5799.             a.ButtonStateUp = this.readUB(1);
  5800.             if (!a.ButtonHasBlendMode && !a.ButtonHasFilterList && !a.ButtonStateHitTest && !a.ButtonStateDown && !a.ButtonStateOver && !a.ButtonStateUp) return null;
  5801.             a.CharacterId = this.readUI16();
  5802.             a.PlaceDepth = this.readUI16();
  5803.             a.PlaceMatrix = this.readMatrix();
  5804.             if (this.context == fljs.swf.tag.DefineButton2) {
  5805.                 a.ColorTransform = this.readCXFORMWITHALPHA();
  5806.                 if (a.ButtonHasFilterList) a.FilterList = this.readFilterList();
  5807.                 if (a.ButtonHasBlendMode) a.BlendMode = this.readUI8()
  5808.             }
  5809.             return a
  5810.         },
  5811.         readFilterList: function () {
  5812.             for (var a = [], b = this.readUI8(), c = 0; c < b; c++) a.push(this.readFilter());
  5813.             return a
  5814.         },
  5815.         readFilter: function () {
  5816.             var a = {};
  5817.             a.FilterId = this.readUI8();
  5818.             switch (a.FilterId) {
  5819.             case 0:
  5820.                 a.DropShadowFilter =
  5821.                 this.readDropShadowFilter();
  5822.                 break;
  5823.             case 1:
  5824.                 a.BlurFilter = this.readBlurFilter();
  5825.                 break;
  5826.             case 2:
  5827.                 a.GlowFilter = this.readGlowFilter();
  5828.                 break;
  5829.             case 3:
  5830.                 a.BevelFilter = this.readBevelFilter();
  5831.                 break;
  5832.             case 4:
  5833.                 a.GradientGlowFilter = this.readGradientGlowFilter();
  5834.                 break;
  5835.             case 5:
  5836.                 a.ConvolutionFilter = this.readConvolutionFilter();
  5837.                 break;
  5838.             case 6:
  5839.                 a.ColorMatrixFilter = this.readColorMatrixFilter();
  5840.                 break;
  5841.             case 7:
  5842.                 a.GradientBevelFitler = this.readGradientBevelFilter();
  5843.                 break
  5844.             }
  5845.             return a
  5846.         },
  5847.         readColorMatrixFilter: function () {
  5848.             return {
  5849.                 Matrix: this.readFloats(20)
  5850.             }
  5851.         },
  5852.         readConvolutionFilter: function () {
  5853.             var a = {};
  5854.             a.MatrixX = this.readUI8();
  5855.             a.MatrixY = this.readUI8();
  5856.             a.Divisor = this.readFloat();
  5857.             a.Bias = this.readFloat();
  5858.             a.Matrix = this.readFloats(a.MatrixX * a.MatrixY);
  5859.             a.DefaultColor = this.readRGBA();
  5860.             this.readUB(6);
  5861.             a.Clamp = this.readUB(1);
  5862.             a.PreserveAlpha = this.readUB(1);
  5863.             return a
  5864.         },
  5865.         readBlurFilter: function () {
  5866.             var a = {
  5867.                 BlurX: this.readFixed(),
  5868.                 BlurY: this.readFixed(),
  5869.                 Passes: this.readUB(5)
  5870.             };
  5871.             this.readUB(3);
  5872.             return a
  5873.         },
  5874.         readDropShadowFilter: function () {
  5875.             return {
  5876.                 DropShadowColor: this.readRGBA(),
  5877.                 BlurX: this.readFixed(),
  5878.                 BlurY: this.readFixed(),
  5879.                 Angle: this.readFixed(),
  5880.                 Distance: this.readFixed(),
  5881.                 Strength: this.readFixed8(),
  5882.                 InnerShadow: this.readUB(1),
  5883.                 Knockout: this.readUB(1),
  5884.                 CompositeSource: this.readUB(1),
  5885.                 Passes: this.readUB(5)
  5886.             }
  5887.         },
  5888.         readGlowFilter: function () {
  5889.             return {
  5890.                 GlowColor: this.readRGBA(),
  5891.                 BlurX: this.readFixed(),
  5892.                 BlurY: this.readFixed(),
  5893.                 Strength: this.readFixed8(),
  5894.                 InnerGlow: this.readUB(1),
  5895.                 Knockout: this.readUB(1),
  5896.                 CompositeSource: this.readUB(1),
  5897.                 Passes: this.readUB(5)
  5898.             }
  5899.         },
  5900.         readBevelFilter: function () {
  5901.             return {
  5902.                 ShadowColor: this.readRGBA(),
  5903.                 HighlightColor: this.readRGBA(),
  5904.                 BlurX: this.readFixed(),
  5905.                 BlurY: this.readFixed(),
  5906.                 Angle: this.readFixed(),
  5907.                 Distance: this.readFixed(),
  5908.                 Strength: this.readFixed8(),
  5909.                 InnerShadow: this.readUB(1),
  5910.                 Knockout: this.readUB(1),
  5911.                 CompositeSource: this.readUB(1),
  5912.                 OnTop: this.readUB(1),
  5913.                 Passes: this.readUB(4)
  5914.             }
  5915.         },
  5916.         readGradientGlowFilter: function () {
  5917.             var a = {};
  5918.             a.NumColors = this.readUI8();
  5919.             a.GradientColors = [];
  5920.             for (var b = 0; b < a.NumColors; b++) a.GradientColors.push(this.readRGBA());
  5921.             a.GradientRatios = [];
  5922.             for (b = 0; b < a.NumColors; b++) a.GradientRatios.push(this.readUI8());
  5923.             a.BlurX = this.readFixed();
  5924.             a.BlurY = this.readFixed();
  5925.             a.Angle = this.readFixed();
  5926.             a.Distance = this.readFixed();
  5927.             a.Strength = this.readFixed8();
  5928.             a.InnerShadow = this.readUB(1);
  5929.             a.Knockout = this.readUB(1);
  5930.             a.CompositeSource = this.readUB(1);
  5931.             a.OnTop = this.readUB(1);
  5932.             a.Passes = this.readUB(4);
  5933.             return a
  5934.         },
  5935.         readGradientBevelFilter: function () {
  5936.             var a = {};
  5937.             a.NumColors = this.readUI8();
  5938.             a.GradientColors = [];
  5939.             for (var b = 0; b < a.NumColors; b++) a.GradientColors.push(this.readRGBA());
  5940.             a.GradientRatios = [];
  5941.             for (b = 0; b < a.NumColors; b++) a.GradientRatios.push(this.readUI8());
  5942.             a.BlurX = this.readFixed();
  5943.             a.BlurY = this.readFixed();
  5944.             a.Angle = this.readFixed();
  5945.             a.Distance = this.readFixed();
  5946.             a.Strength = this.readFixed8();
  5947.             a.InnerShadow = this.readUB(1);
  5948.             a.Knockout = this.readUB(1);
  5949.             a.CompositeSource = this.readUB(1);
  5950.             a.OnTop = this.readUB(1);
  5951.             a.Passes = this.readUB(4);
  5952.             return a
  5953.         },
  5954.         readButtonCondActions: function (a) {
  5955.             for (var b = [], c = this.stream.byteIndex, d; d = this.readUI16();) b.push(this.readButtonCondAction(d - 2));
  5956.             b.push(this.readButtonCondAction(a - (this.stream.byteIndex - c)));
  5957.             return b
  5958.         },
  5959.         readButtonCondAction: function (a) {
  5960.             var b = {};
  5961.             b.CondActionSize = a + 2;
  5962.             b.CondIdleToOverDown = this.readUB(1);
  5963.             b.CondOutDownToIdle = this.readUB(1);
  5964.             b.CondOutDownToOverDown = this.readUB(1);
  5965.             b.CondOverDownToOutDown = this.readUB(1);
  5966.             b.CondOverDownToOverUp = this.readUB(1);
  5967.             b.CondOverUpToOverDown = this.readUB(1);
  5968.             b.CondOverUpToIdle = this.readUB(1);
  5969.             b.CondIdleToOverUp = this.readUB(1);
  5970.             b.CondKeyPress = this.readUB(7);
  5971.             b.CondOverDownToIdle = this.readUB(1);
  5972.             b.Actions = this.readActionRecords(a - 2);
  5973.             return b
  5974.         },
  5975.         readPix15: function () {
  5976.             this.stream.align();
  5977.             this.readUB(1);
  5978.             return {
  5979.                 Red: Math.floor(this.readUB(5) * 8.226),
  5980.                 Green: Math.floor(this.readUB(5) * 8.226),
  5981.                 Blue: Math.floor(this.readUB(5) * 8.226)
  5982.             }
  5983.         },
  5984.         beginContext: function (a) {
  5985.             this.context = a
  5986.         },
  5987.         endContext: function () {
  5988.             this.NumLineBits = this.NumFillBits = this.context = null
  5989.         }
  5990.     });
  5991.     fljs.swf.StringStream = function (a) {
  5992.         this.buffer = String(a);
  5993.         this.bitIndex = this.byteIndex = this._byte = 0;
  5994.         this.byteIndexForBits = -1;
  5995.         this.logger = fljs.console("parse")
  5996.     };
  5997.     fljs.addMethods(fljs.swf.StringStream, {
  5998.         length: function () {
  5999.             return this.buffer.length
  6000.         },
  6001.         hasMore: function () {
  6002.             return this.byteIndex < this.buffer.length
  6003.         },
  6004.         seek: function (a) {
  6005.             this._byte = 0;
  6006.             this.byteIndex = a;
  6007.             this.bitIndex = 0;
  6008.             this.byteIndexForBits = -1
  6009.         },
  6010.         skipBytes: function (a) {
  6011.             this.byteIndex += a
  6012.         },
  6013.         readBytes: function (a) {
  6014.             for (var b = [], c = 0; c < a; c++) b.push(String.fromCharCode(this.buffer.charCodeAt(this.byteIndex++) & 255));
  6015.             return b
  6016.         },
  6017.         readBytesRev: function (a) {
  6018.             for (var b = [], c = 0; c < a; c++) b.unshift(String.fromCharCode(this.buffer.charCodeAt(this.byteIndex++) & 255));
  6019.             return b
  6020.         },
  6021.         align: function () {
  6022.             this.bitIndex = 8
  6023.         },
  6024.         nextUByte: function () {
  6025.             return this.buffer.charCodeAt(this.byteIndex++) & 255
  6026.         },
  6027.         nextSByte: function () {
  6028.             var a = this.buffer.charCodeAt(this.byteIndex++) & 255;
  6029.             if (a >= 128) a -= 256;
  6030.             return a
  6031.         },
  6032.         nextUShort: function () {
  6033.             var a = (this.buffer.charCodeAt(this.byteIndex++) & 255) + ((this.buffer.charCodeAt(this.byteIndex++) & 255) << 8);
  6034.             if (a < 0) a += 65536;
  6035.             return a
  6036.         },
  6037.         nextSShort: function () {
  6038.             var a = this.nextUShort();
  6039.             if (a > 32767) a -= 65536;
  6040.             return a
  6041.         },
  6042.         nextULong: function () {
  6043.             var a = this.buffer.charCodeAt(this.byteIndex++) & 255,
  6044.                 b = this.buffer.charCodeAt(this.byteIndex++) & 255,
  6045.                 c = this.buffer.charCodeAt(this.byteIndex++) & 255,
  6046.                 d = this.buffer.charCodeAt(this.byteIndex++) & 255;
  6047.             a = a + (b << 8) + (c << 16) + (d << 24);
  6048.             if (a < 0) a += 4294967296;
  6049.             return a
  6050.         },
  6051.         nextSLong: function () {
  6052.             var a = this.nextULong();
  6053.             if (a > 2147483647) a -= 4294967296;
  6054.             return a
  6055.         },
  6056.         nextEncodedULong: function () {
  6057.             var a = this.buffer.charCodeAt(this.byteIndex++) & 255;
  6058.             if (!(a & 128)) return a;
  6059.             a = a & 127 | (this.buffer.charCodeAt(this.byteIndex++) & 255) << 7;
  6060.             if (!(a & 16384)) return a;
  6061.             a = a & 16383 | (this.buffer.charCodeAt(this.byteIndex++) & 255) << 14;
  6062.             if (!(a & 2097152)) return a;
  6063.             a = a & 2097151 | (this.buffer.charCodeAt(this.byteIndex++) & 255) << 21;
  6064.             if (!(a & 268435456)) return a;
  6065.             return a = a & 268435455 | (this.buffer.charCodeAt(this.byteIndex++) & 255) << 28
  6066.         },
  6067.         nextString: function () {
  6068.             for (var a = [], b; b = this.nextUByte();) a.push(String.fromCharCode(b));
  6069.             return a.join("")
  6070.         },
  6071.         _nextByteForBits: function () {
  6072.             this._byte = this.nextUByte();
  6073.             this.bitIndex = 0;
  6074.             this.byteIndexForBits = this.byteIndex
  6075.         },
  6076.         nextUBits: function (a) {
  6077.             this.byteIndex != this.byteIndexForBits && this._nextByteForBits();
  6078.             for (var b =
  6079.             0, c = 0; c < a; c++) {
  6080.                 this.bitIndex == 8 && this._nextByteForBits();
  6081.                 b = (b << 1) + (this._byte >> 7 - this.bitIndex & 1);
  6082.                 this.bitIndex += 1
  6083.             }
  6084.             return b
  6085.         },
  6086.         nextSBits: function (a, b) {
  6087.             b = this.nextUBits(a, b);
  6088.             if (b >> a - 1) b -= Math.pow(2, a);
  6089.             return b
  6090.         },
  6091.         nextFShort: function () {
  6092.             return this.nextSShort() * Math.pow(2, -8)
  6093.         },
  6094.         nextFLong: function () {
  6095.             return this.nextSLong() * Math.pow(2, -16)
  6096.         },
  6097.         nextFBits: function (a) {
  6098.             return this.nextSBits(a) * Math.pow(2, -16)
  6099.         },
  6100.         nextHalfFloat: function () {
  6101.             return this.nextUShort()
  6102.         },
  6103.         nextSingleFloat: function () {
  6104.             return this.nextULong()
  6105.         },
  6106.         nextDoubleFloat: function () {
  6107.             return this.nextULong() + this.nextULong()
  6108.         }
  6109.     });
  6110.     fljs.swf.TagHeader = function () {};
  6111.     fljs.addMethods(fljs.swf.TagHeader, {
  6112.         tagClass: function () {
  6113.             return fljs.swf.tag.tagMap[this.type]
  6114.         }
  6115.     });
  6116.     fljs.swf.TagReader = function (a) {
  6117.         this.stream = new fljs.swf.SwfStream(new fljs.swf.StringStream(a));
  6118.         this.tagMap = fljs.swf.tag.tagMap
  6119.     };
  6120.     fljs.addMethods(fljs.swf.TagReader, {
  6121.         position: function () {
  6122.             return this.stream.stream.byteIndex
  6123.         },
  6124.         readSwfHeader: function () {
  6125.             return this.stream.readSwfHeader()
  6126.         },
  6127.         readTagHeader: function () {
  6128.             var a = this.stream.readRecordHeader(),
  6129.                 b = new fljs.swf.TagHeader;
  6130.             b.data = a;
  6131.             b.type = a.TagType;
  6132.             b.length = a.TagLength;
  6133.             return b
  6134.         },
  6135.         readTag: function (a, b) {
  6136.             var c = a.tagClass();
  6137.             if (c) {
  6138.                 var d = new c;
  6139.                 c = this.stream.stream.byteIndex;
  6140.                 d.read(this.stream, a.data, this, null, fljs.Player.getInstance().stage);
  6141.                 d.header = a;
  6142.                 d.byteIndex = c;
  6143.                 if (!b && this.stream.stream.byteIndex < c + a.length) this.stream.skipBytes(c + a.length - this.stream.stream.byteIndex);
  6144.                 else b || this.checkLocation(d)
  6145.             }
  6146.             return d
  6147.         },
  6148.         skipTag: function (a) {
  6149.             this.stream.skipBytes(a.length)
  6150.         },
  6151.         checkLocation: function (a) {
  6152.             if (this.stream.stream.byteIndex != a.byteIndex + a.header.length) {
  6153.                 fljs.console("parse");
  6154.             }
  6155.         }
  6156.     });
  6157.     fljs.swf.DefinitionParser = function (a) {
  6158.         this.reader = new fljs.swf.TagReader(a);
  6159.         this.pendingSprite = this.pendingHeader = null;
  6160.         this.done = false
  6161.     };
  6162.     fljs.addMethods(fljs.swf.DefinitionParser, {
  6163.         readHeader: function () {
  6164.             var a = this.reader.readSwfHeader();
  6165.             return this.reader.stream.header = a
  6166.         },
  6167.         readSomeTags: function (a) {
  6168.             fljs.console("parse");
  6169.             if (!this.done) {
  6170.                 var b;
  6171.                 b = this.pendingSprite ? this.pendingSprite.tag : a.mainTimeline;
  6172.                 for (var c = this.reader, d = 0, e = c.stream.stream.byteIndex; c.stream.hasMore();) {
  6173.                     var f = c.stream.stream.byteIndex,
  6174.                         g;
  6175.                     if (this.pendingHeader) {
  6176.                         g = this.pendingHeader;
  6177.                         this.pendingHeader = null
  6178.                     } else g = c.readTagHeader();
  6179.                     if (d > 0 && g.length > 2E4) {
  6180.                         this.pendingHeader =
  6181.                         g;
  6182.                         a.mainTimeline.__bytesLoaded += e - c.stream.stream.byteIndex;
  6183.                         return
  6184.                     }
  6185.                     var j = c.stream.stream.byteIndex;
  6186.                     switch (g.tagClass()) {
  6187.                     case fljs.swf.tag.DefineShape:
  6188.                     case fljs.swf.tag.DefineShape2:
  6189.                     case fljs.swf.tag.DefineShape3:
  6190.                     case fljs.swf.tag.DefineShape4:
  6191.                     case fljs.swf.tag.DefineFont:
  6192.                     case fljs.swf.tag.DefineFont2:
  6193.                     case fljs.swf.tag.DefineFont3:
  6194.                     case fljs.swf.tag.DefineFontInfo:
  6195.                     case fljs.swf.tag.DefineFontInfo2:
  6196.                     case fljs.swf.tag.DefineText:
  6197.                     case fljs.swf.tag.DefineText2:
  6198.                     case fljs.swf.tag.DefineEditText:
  6199.                     case fljs.swf.tag.DefineSound:
  6200.                     case fljs.swf.tag.JpegTables:
  6201.                     case fljs.swf.tag.DefineBits:
  6202.                     case fljs.swf.tag.DefineBitsJPEG2:
  6203.                     case fljs.swf.tag.DefineBitsLossless:
  6204.                     case fljs.swf.tag.DefineBitsLossless2:
  6205.                     case fljs.swf.tag.DefineButton2:
  6206.                     case fljs.swf.tag.FrameLabel:
  6207.                     case fljs.swf.tag.ExportAssets:
  6208.                         var h =
  6209.                         c.readTag(g);
  6210.                         if (c.stream.stream.byteIndex != j + g.length) {
  6211.                             rar.rar = true;
  6212.                             return
  6213.                         }
  6214.                         h.evaluate(a, this, null, b);
  6215.                         break;
  6216.                     case fljs.swf.tag.DefineBitsJpeg3:
  6217.                         c.readTag(g);
  6218.                         if (c.stream.stream.byteIndex != j + g.length) {
  6219.                             rar.rar = true;
  6220.                             return
  6221.                         }
  6222.                         break;
  6223.                     case fljs.swf.tag.DefineSprite:
  6224.                         h = c.readTag(g, true);
  6225.                         h.evaluate(a, this, null, a.stage);
  6226.                         this.pendingSprite = {
  6227.                             header: g,
  6228.                             tag: h,
  6229.                             endByteIndex: j + g.length
  6230.                         };
  6231.                         b = h;
  6232.                         break;
  6233.                     case fljs.swf.tag.PlaceObject:
  6234.                     case fljs.swf.tag.RemoveObject:
  6235.                     case fljs.swf.tag.SetBackgroundColor:
  6236.                     case fljs.swf.tag.DoAction:
  6237.                     case fljs.swf.tag.DoInitAction:
  6238.                     case fljs.swf.tag.Protect:
  6239.                     case fljs.swf.tag.StartSound:
  6240.                     case fljs.swf.tag.SoundStreamHead:
  6241.                     case fljs.swf.tag.SoundStreamBlock:
  6242.                     case fljs.swf.tag.PlaceObject2:
  6243.                     case fljs.swf.tag.PlaceObject3:
  6244.                     case fljs.swf.tag.RemoveObject2:
  6245.                     case fljs.swf.tag.SoundStreamHead2:
  6246.                     case fljs.swf.tag.DoAbc:
  6247.                     case fljs.swf.tag.End:
  6248.                         h =
  6249.                         c.readTag(g);
  6250.                         b.frameData_[b.framesLoaded_].tags.push([h, g]);
  6251.                         if (c.stream.stream.byteIndex != j + g.length) {
  6252.                             rar.rar = true;
  6253.                             return
  6254.                         }
  6255.                         break;
  6256.                     case fljs.swf.tag.ShowFrame:
  6257.                         c.readTag(g);
  6258.                         b.frameData_[b.framesLoaded_].loaded = true;
  6259.                         b.framesLoaded_ += 1;
  6260.                         if (b.framesLoaded_ == b.totalFrames_) if (this.pendingSprite) {
  6261.                             c.stream.stream.byteIndex < this.pendingSprite.endByteIndex && c.stream.skipBytes(this.pendingSprite.endByteIndex - c.stream.stream.byteIndex);
  6262.                             b.__bytesLoaded = b.__bytesTotal;
  6263.                             this.pendingSprite = null;
  6264.                             b = a.mainTimeline
  6265.                         } else {
  6266.                             b.__bytesLoaded =
  6267.                             b.__bytesTotal;
  6268.                             this.done = true;
  6269.                             return
  6270.                         } else b.frameData_[b.framesLoaded_] = {
  6271.                             tags: []
  6272.                         };
  6273.                         break;
  6274.                     default:
  6275.                         fljs.console("unk");
  6276.                         c.skipTag(g)
  6277.                     }
  6278.                     d += c.stream.stream.byteIndex - f;
  6279.                     if (d > 2E4) {
  6280.                         a.mainTimeline.__bytesLoaded += c.stream.stream.byteIndex - e;
  6281.                         return
  6282.                     }
  6283.                 }
  6284.             }
  6285.         }
  6286.     });
  6287.     fljs.swf.DefParser = fljs.swf.DefinitionParser;
  6288.     fljs.swf.act = {};
  6289.     fljs.swf.act.ActionInterpreter = function (a) {
  6290.         this.player = a;
  6291.         this.trace = false;
  6292.         this.consts = new fljs.swf.act.ConstantsPool;
  6293.         this.globals = new fljs.swf.act.Globals(a);
  6294.         this.traceLogger = fljs.console("trace")
  6295.     };
  6296.     fljs.swf.act.ActionInterpreter.ActionCode = {
  6297.         End: 0,
  6298.         NextFrame: 4,
  6299.         PreviousFrame: 5,
  6300.         Play: 6,
  6301.         Stop: 7,
  6302.         Subtract: 11,
  6303.         Multiply: 12,
  6304.         Divide: 13,
  6305.         Not: 18,
  6306.         Pop: 23,
  6307.         ToInteger: 24,
  6308.         GetVariable: 28,
  6309.         SetVariable: 29,
  6310.         Trace: 38,
  6311.         StartDrag: 39,
  6312.         EndDrag: 40,
  6313.         GetTime: 52,
  6314.         Delete: 58,
  6315.         DefineLocal: 60,
  6316.         CallFunction: 61,
  6317.         Return: 62,
  6318.         NewObject: 64,
  6319.         DefineLocal2: 65,
  6320.         InitObject: 67,
  6321.         TypeOf: 68,
  6322.         Add2: 71,
  6323.         Less2: 72,
  6324.         Equals2: 73,
  6325.         PushDuplicate: 76,
  6326.         GetMember: 78,
  6327.         SetMember: 79,
  6328.         Increment: 80,
  6329.         Decrement: 81,
  6330.         CallMethod: 82,
  6331.         Greater: 103,
  6332.         GotoFrame: 129,
  6333.         GetUrl: 131,
  6334.         StoreRegister: 135,
  6335.         ConstantPool: 136,
  6336.         WaitForFrame: 138,
  6337.         SetTarget: 139,
  6338.         GotoLabel: 140,
  6339.         DefineFunction2: 142,
  6340.         With: 148,
  6341.         Push: 150,
  6342.         Jump: 153,
  6343.         GetUrl2: 154,
  6344.         DefineFunction: 155,
  6345.         If: 157,
  6346.         GotoFrame2: 159
  6347.     };
  6348.     fljs.addMethods(fljs.swf.act.ActionInterpreter, {
  6349.         value: function (a, b) {
  6350.             switch (b.Type) {
  6351.             case 0:
  6352.             case 2:
  6353.             case 3:
  6354.             case 5:
  6355.             case 10:
  6356.             case 11:
  6357.                 return b;
  6358.             case 1:
  6359.             case 6:
  6360.             case 7:
  6361.                 return {
  6362.                     Type: 1,
  6363.                     Value: b.Value
  6364.                 };
  6365.             case 4:
  6366.                 return a.reg(b.Value);
  6367.             case 8:
  6368.             case 9:
  6369.                 return {
  6370.                     Type: 0,
  6371.                     Value: this.consts.lookup(b.Value)
  6372.                 };
  6373.             default:
  6374.                 return "[ERR: unknown value]"
  6375.             }
  6376.         },
  6377.         callFunction: function (a, b, c, d) {
  6378.             a = new fljs.swf.act.Context(c, b.Context, this, false, b.Value.SupressThisFlag);
  6379.             for (var e = 0; e < b.Value.NumParams; e++) {
  6380.                 var f = b.Value.Parameters[e].Register,
  6381.                     g = d[e];
  6382.                 g || (g = {
  6383.                     Type: 3,
  6384.                     Value: undefined
  6385.                 });
  6386.                 f ? a.setReg(f, g) : a.setLocal(b.Value.Parameters[e].ParamName, g)
  6387.             }
  6388.             f = 1;
  6389.             if (b.Value.PreloadThisFlag) {
  6390.                 a.setReg(f, a.locals.get("this"));
  6391.                 f += 1
  6392.             }
  6393.             if (b.Value.PreloadArgumentsFlag) {
  6394.                 a.setReg(f, {
  6395.                     Type: 3,
  6396.                     Value: undefined
  6397.                 });
  6398.                 f += 1
  6399.             }
  6400.             if (b.Value.PreloadSuperFlag) {
  6401.                 a.setReg(f, {
  6402.                     Type: 3,
  6403.                     Value: undefined
  6404.                 });
  6405.                 f += 1
  6406.             }
  6407.             if (b.Value.PreloadRootFlag) {
  6408.                 a.setReg(f, a.locals.get("_root"));
  6409.                 f += 1
  6410.             }
  6411.             if (b.Value.PreloadParentFlag) {
  6412.                 a.setReg(f, a.locals.get("_parent"));
  6413.                 f += 1
  6414.             }
  6415.             b.Value.PreloadGlobalFlag && a.setReg(f, a.locals.get("_global"));
  6416.             d = this.consts;
  6417.             this.consts = b.Consts;
  6418.             b = this.eval(c, b.Value.Code, a);
  6419.             this.consts = d;
  6420.             return b
  6421.         },
  6422.         callMethod: function (a, b, c, d) {
  6423.             var e;
  6424.             switch (b.Type) {
  6425.             case 0:
  6426.                 a = new fljs.swf.act.String(b.Value);
  6427.                 e = a.get(c).apply(a, d);
  6428.                 break;
  6429.             case 3:
  6430.                 break;
  6431.             case 11:
  6432.                 c = b.Value.get(c);
  6433.                 switch (c.Type) {
  6434.                 case 10:
  6435.                     e = c.Value.apply(b.Value, d);
  6436.                     break;
  6437.                 case 12:
  6438.                     e = this.callFunction(a, c, b.Value, d);
  6439.                     break
  6440.                 }
  6441.                 break
  6442.             }
  6443.             return e
  6444.         },
  6445.         callWith: function (a, b, c) {
  6446.             a = new fljs.swf.act.Context(c, a, this, true);
  6447.             this.eval(c, b.Value.Code, a)
  6448.         },
  6449.         callback: function (a, b, c) {
  6450.             c || (c = []);
  6451.             switch (b.Type) {
  6452.             case 10:
  6453.                 b.Value.apply(a, c);
  6454.                 break;
  6455.             case 12:
  6456.                 this.callFunction(null, b, a, c);
  6457.                 break
  6458.             }
  6459.         },
  6460.         eval: function (a, b, c) {
  6461.             c || (c = new fljs.swf.act.Context(a, null, this));
  6462.             for (var d = fljs.swf.act.ActionInterpreter.ActionCode, e = [], f = 0; f < b.length; f++) {
  6463.                 var g = b[f];
  6464.                 g = b[f];
  6465.                 switch (g.ActionCode) {
  6466.                 case d.ConstantPool:
  6467.                     this.consts = new fljs.swf.act.ConstantsPool;
  6468.                     for (var j in g.ConstantPool) this.consts.push(g.ConstantPool[j]);
  6469.                     this.trace && e.push("ConstantPool = " + this.consts);
  6470.                     break;
  6471.                 case d.Push:
  6472.                     for (j in g.Values) c.stack.push(this.value(c, g.Values[j]));
  6473.                     if (this.trace) {
  6474.                         var h = [];
  6475.                         for (j in g.Values) h.push(this.value(c, g.Values[j]));
  6476.                         e.push("Push(" + h + ")")
  6477.                     }
  6478.                     break;
  6479.                 case d.GetVariable:
  6480.                     g = c.stack.pop().Value;
  6481.                     h = c.get(g);
  6482.                     c.stack.push(h);
  6483.                     this.trace && e.push("GetVariable(" + [g, h] + ")");
  6484.                     break;
  6485.                 case d.CallMethod:
  6486.                     g = c.stack.pop().Value;
  6487.                     var m = c.stack.pop(),
  6488.                         k = c.stack.pop().Value;
  6489.                     h = [];
  6490.                     for (j = 0; j < k; j++) h.push(c.stack.pop());
  6491.                     var l;
  6492.                     if (g) l = this.callMethod(c, m, g, h);
  6493.                     else switch (m.Type) {
  6494.                     case 10:
  6495.                         l = m.Value.apply(null, h);
  6496.                         break;
  6497.                     case 12:
  6498.                         l = this.callFunction(c, m, null, h);
  6499.                         break
  6500.                     }
  6501.                     if (typeof l == "undefined") l = {
  6502.                         Type: 3,
  6503.                         Value: undefined
  6504.                     };
  6505.                     c.stack.push(l);
  6506.                     this.trace && e.push("Call(" + [m, g, h, l] + ")");
  6507.                     break;
  6508.                 case d.SetVariable:
  6509.                     h = c.stack.pop();
  6510.                     k = c.stack.pop().Value;
  6511.                     m = k.split(":");
  6512.                     if (m.length == 1) {
  6513.                         a = c.self;
  6514.                         g = m[0]
  6515.                     } else {
  6516.                         a = c.resolvePath(m[0]);
  6517.                         g = m[1]
  6518.                     }
  6519.                     switch (h.Type) {
  6520.                     case 0:
  6521.                     case 1:
  6522.                     case 2:
  6523.                     case 3:
  6524.                     case 5:
  6525.                     case 6:
  6526.                     case 7:
  6527.                         a.set(g, {
  6528.                             Type: h.Type,
  6529.                             Value: h.Value
  6530.                         });
  6531.                         break;
  6532.                     default:
  6533.                         a.set(g, h);
  6534.                         break
  6535.                     }
  6536.                     this.trace && e.push("Set: " + [k, g, h]);
  6537.                     break;
  6538.                 case d.Divide:
  6539.                     g = c.stack.pop();
  6540.                     h = c.stack.pop();
  6541.                     k = {
  6542.                         Type: 1,
  6543.                         Value: h.Value / g.Value
  6544.                     };
  6545.                     if (fljs.Player.getInstance().swfVersion == 4 && (isNaN(k.Value) || k.Value == Number.POSITIVE_INFINITY || k.Value == Number.NEGATIVE_INFINITY)) k = {
  6546.                         Type: 0,
  6547.                         Value: "#ERROR#"
  6548.                     };
  6549.                     c.stack.push(k);
  6550.                     this.trace && e.push([g, "/", h].toString());
  6551.                     break;
  6552.                 case d.Multiply:
  6553.                     g = c.stack.pop();
  6554.                     h = c.stack.pop();
  6555.                     c.stack.push({
  6556.                         Type: 1,
  6557.                         Value: Number(g.Value) * Number(h.Value)
  6558.                     });
  6559.                     this.trace && e.push([g, "*", h].toString());
  6560.                     break;
  6561.                 case d.Equals2:
  6562.                     g = c.stack.pop();
  6563.                     h = c.stack.pop();
  6564.                     c.stack.push({
  6565.                         Type: 5,
  6566.                         Value: g.Value == h.Value
  6567.                     });
  6568.                     this.trace && e.push([g, "==", h].toString());
  6569.                     break;
  6570.                 case d.Not:
  6571.                     g = Number(c.stack.pop().Value);
  6572.                     if (fljs.Player.getInstance().swfVersion == 4) g == 0 ? c.stack.push({
  6573.                         Type: 1,
  6574.                         Value: 1
  6575.                     }) : c.stack.push({
  6576.                         Type: 1,
  6577.                         Value: 0
  6578.                     });
  6579.                     else c.stack.push({
  6580.                         Type: 5,
  6581.                         Value: !g
  6582.                     });
  6583.                     this.trace && e.push(["!", g].toString());
  6584.                     break;
  6585.                 case d.If:
  6586.                     h = c.stack.pop();
  6587.                     if (h.Value) {
  6588.                         for (j = f + 1; b[j] && b[j].address != b[f + 1].address + g.BranchOffset;) if (g.BranchOffset > 0) j += 1;
  6589.                         else j -= 1;
  6590.                         f = j - 1
  6591.                     }
  6592.                     this.trace && e.push(["if(", h, ")", f].toString());
  6593.                     break;
  6594.                 case d.Pop:
  6595.                     c.stack.pop();
  6596.                     this.trace && e.push("pop");
  6597.                     break;
  6598.                 case d.WaitForFrame:
  6599.                     if (c.self.get__framesloaded().Value < g.Frame + 1) f += 1 + g.SkipCount;
  6600.                     this.trace && e.push("waitForFrame(" + [g.Frame + 1, g.SkipCount] + ")");
  6601.                     break;
  6602.                 case d.GotoFrame:
  6603.                     c.self.gotoFrame({
  6604.                         Type: 1,
  6605.                         Value: g.Frame + 1
  6606.                     });
  6607.                     this.trace && e.push("gotoFrame(" + (g.Frame + 1) + ")");
  6608.                     break;
  6609.                 case d.GetUrl:
  6610.                     c.self.getUrl({
  6611.                         Type: 0,
  6612.                         Value: g.UrlString
  6613.                     }, {
  6614.                         Type: 0,
  6615.                         Value: g.TargetString
  6616.                     });
  6617.                     this.trace && e.push('getUrl("' + g.UrlString + '")');
  6618.                     break;
  6619.                 case d.GetUrl2:
  6620.                     if (g.LoadTargetFlag) this.trace && e.push("unsupported getUrl call");
  6621.                     else if (g.LoadVariablesFlag) this.trace && e.push("unsupported getUrl call");
  6622.                     else {
  6623.                         g.SendVarsMethod && this.trace && e.push("unsupported getUrl call");
  6624.                         g = c.stack.pop();
  6625.                         h = c.stack.pop();
  6626.                         c.self.getUrl(h, g);
  6627.                         this.trace && e.push('getUrl("' + h + '", "' + g + '")')
  6628.                     }
  6629.                     break;
  6630.                 case d.Play:
  6631.                     c.self.play();
  6632.                     this.trace && e.push("play()");
  6633.                     break;
  6634.                 case d.Stop:
  6635.                     c.self.stop();
  6636.                     this.trace && e.push("stop()");
  6637.                     break;
  6638.                 case d.DefineFunction:
  6639.                     if (g.FunctionName) {
  6640.                         c.set(g.FunctionName, {
  6641.                             Type: 12,
  6642.                             Value: g,
  6643.                             Consts: this.consts,
  6644.                             Context: c
  6645.                         });
  6646.                         this.trace && e.push(g.FunctionName + " = function() {}")
  6647.                     } else {
  6648.                         c.stack.push({
  6649.                             Type: 12,
  6650.                             Value: g,
  6651.                             Consts: this.consts,
  6652.                             Context: c
  6653.                         });
  6654.                         this.trace && e.push("Push(function " + g.FunctionName + "() {})")
  6655.                     }
  6656.                     break;
  6657.                 case d.SetTarget:
  6658.                     c.setTarget(g.TargetName);
  6659.                     this.trace && e.push("SetTarget(" + g.TargetName + ")");
  6660.                     break;
  6661.                 case d.PreviousFrame:
  6662.                     c.self.prevFrame();
  6663.                     this.trace && e.push("PrevFrame()");
  6664.                     break;
  6665.                 case d.NextFrame:
  6666.                     c.self.nextFrame();
  6667.                     this.trace && e.push("NextFrame()");
  6668.                     break;
  6669.                 case d.Jump:
  6670.                     h = g.BranchOffset > 0 ? 1 : -1;
  6671.                     for (j = f + 1; b[j] && b[j].address != b[f + 1].address + g.BranchOffset;) j += h;
  6672.                     f = j - 1;
  6673.                     this.trace && e.push("Jump(" + g.BranchOffset + ")");
  6674.                     break;
  6675.                 case d.NewObject:
  6676.                     g =
  6677.                     c.stack.pop().Value;
  6678.                     k = c.stack.pop().Value;
  6679.                     h = [];
  6680.                     for (j = 0; j < k; j++) h.push(c.stack.pop());
  6681.                     k = c.get(g);
  6682.                     switch (k.Type) {
  6683.                     case 11:
  6684.                         a = new k.Value;
  6685.                         a.init.apply(a, h);
  6686.                         a = {
  6687.                             Type: 11,
  6688.                             Value: a
  6689.                         };
  6690.                         break
  6691.                     }
  6692.                     c.stack.push(a);
  6693.                     this.trace && e.push("New(" + g + ")");
  6694.                     break;
  6695.                 case d.GetMember:
  6696.                     g = c.stack.pop().Value;
  6697.                     a = c.stack.pop();
  6698.                     c.stack.push(a.Value.get(g));
  6699.                     this.trace && e.push("GetMember (" + [a, g] + ")");
  6700.                     break;
  6701.                 case d.SetMember:
  6702.                     h = c.stack.pop();
  6703.                     g = c.stack.pop().Value;
  6704.                     a = c.stack.pop();
  6705.                     a.Value.set(g, h);
  6706.                     this.trace && e.push("SetMember (" + [a, g, h] + ")");
  6707.                     break;
  6708.                 case d.InitObject:
  6709.                     k = c.stack.pop().Value;
  6710.                     a = new fljs.swf.act.Object;
  6711.                     for (f = 0; f < k; f++) {
  6712.                         h = c.stack.pop();
  6713.                         g = c.stack.pop().Value;
  6714.                         a.set(g, h)
  6715.                     }
  6716.                     this.trace && e.push("InitObject (" + [a, k] + ")");
  6717.                     break;
  6718.                 case d.Trace:
  6719.                     h = c.stack.pop();
  6720.                     this.traceLogger.info(h.Value);
  6721.                     this.trace && e.push("Trace (" + h.Value + ")");
  6722.                     break;
  6723.                 case d.Increment:
  6724.                     h = c.stack.pop();
  6725.                     c.stack.push({
  6726.                         Type: h.Type,
  6727.                         Value: h.Value + 1
  6728.                     });
  6729.                     this.trace && e.push("Increment (" + h.Value + ")");
  6730.                     break;
  6731.                 case d.With:
  6732.                     a = c.stack.pop();
  6733.                     this.callWith(c, g, a.Value);
  6734.                     this.trace && e.push("With (" + a + ")");
  6735.                     break;
  6736.                 case d.End:
  6737.                     this.trace && e.push("End");
  6738.                     break;
  6739.                 case d.DefineFunction2:
  6740.                     if (g.FunctionName) {
  6741.                         c.set(g.FunctionName, {
  6742.                             Type: 12,
  6743.                             Value: g,
  6744.                             Consts: this.consts,
  6745.                             Context: c
  6746.                         });
  6747.                         this.trace && e.push(g.FunctionName + " = function() {}")
  6748.                     } else {
  6749.                         c.stack.push({
  6750.                             Type: 12,
  6751.                             Value: g,
  6752.                             Consts: this.consts,
  6753.                             Context: c
  6754.                         });
  6755.                         this.trace && e.push("Push(function " + g.FunctionName + "() {})")
  6756.                     }
  6757.                     this.trace && e.push("DefineFunction2(" + g.FunctionName + ")");
  6758.                     break;
  6759.                 case d.StoreRegister:
  6760.                     c.setReg(g.RegisterNumber, c.stack[c.stack.length - 1]);
  6761.                     this.trace && e.push("StoreRegister(" + g.RegisterNumber + ")");
  6762.                     break;
  6763.                 case d.GotoLabel:
  6764.                     c.self.gotoFrame({
  6765.                         Type: 0,
  6766.                         Value: g.Label
  6767.                     });
  6768.                     this.trace && e.push("GotoLabel(" + g.Label + ")");
  6769.                     break;
  6770.                 case d.StartDrag:
  6771.                     c.stack.pop();
  6772.                     c.stack.pop();
  6773.                     if (c.stack.pop().Value) {
  6774.                         c.stack.pop();
  6775.                         c.stack.pop();
  6776.                         c.stack.pop();
  6777.                         c.stack.pop()
  6778.                     }
  6779.                     break;
  6780.                 case d.EndDrag:
  6781.                     break;
  6782.                 case d.Add2:
  6783.                     h = c.stack.pop();
  6784.                     k = c.stack.pop();
  6785.                     g = h.Type == 0 || k.Type == 0 ? 0 : h.Type == 6 || k.Type == 6 ? 6 : h.Type == 1 || k.Type == 1 ? 1 : 7;
  6786.                     c.stack.push({
  6787.                         Type: g,
  6788.                         Value: k.Value + h.Value
  6789.                     });
  6790.                     break;
  6791.                 case d.Subtract:
  6792.                     g = Number(c.stack.pop().Value);
  6793.                     h = Number(c.stack.pop().Value);
  6794.                     c.stack.push({
  6795.                         Type: 1,
  6796.                         Value: h - g
  6797.                     });
  6798.                     break;
  6799.                 case d.DefineLocal:
  6800.                     h = c.stack.pop();
  6801.                     g = c.stack.pop().Value;
  6802.                     c.setLocal(g, h);
  6803.                     break;
  6804.                 case d.PushDuplicate:
  6805.                     h = c.stack[c.stack.length - 1];
  6806.                     switch (h.Type) {
  6807.                     case 0:
  6808.                     case 1:
  6809.                     case 2:
  6810.                     case 3:
  6811.                     case 5:
  6812.                     case 6:
  6813.                     case 7:
  6814.                         g = {
  6815.                             Type: h.Type,
  6816.                             Value: h.Value
  6817.                         };
  6818.                         break;
  6819.                     default:
  6820.                         g = h;
  6821.                         break
  6822.                     }
  6823.                     c.stack.push(g);
  6824.                     break;
  6825.                 case d.GetTime:
  6826.                     c.stack.push({
  6827.                         Type: 1,
  6828.                         Value: fljs.now() - fljs.Player.getInstance().startTime
  6829.                     });
  6830.                     break;
  6831.                 case d.Greater:
  6832.                     h = c.stack.pop();
  6833.                     k = c.stack.pop();
  6834.                     c.stack.push({
  6835.                         Type: 5,
  6836.                         Value: k.Value > h.Value
  6837.                     });
  6838.                     break;
  6839.                 case d.CallFunction:
  6840.                     g = c.stack.pop().Value;
  6841.                     k = c.stack.pop().Value;
  6842.                     h = [];
  6843.                     for (j = 0; j < k; j++) h.push(c.stack.pop());
  6844.                     k = c.get(g);
  6845.                     if (g) switch (k.Type) {
  6846.                     case 10:
  6847.                         l = k.Value.apply(null, h);
  6848.                         break;
  6849.                     case 12:
  6850.                         l = this.callFunction(c, k, null, h);
  6851.                         break
  6852.                     }
  6853.                     if (typeof l == "undefined") l = {
  6854.                         Type: 3,
  6855.                         Value: undefined
  6856.                     };
  6857.                     c.stack.push(l);
  6858.                     break;
  6859.                 case d.DefineLocal2:
  6860.                     g = c.stack.pop().Value;
  6861.                     g in c.locals || c.setLocal(g, {
  6862.                         Type: 3,
  6863.                         Value: undefined
  6864.                     });
  6865.                     break;
  6866.                 case d.TypeOf:
  6867.                     h = c.stack.pop();
  6868.                     g = {
  6869.                         0: "string",
  6870.                         1: "number",
  6871.                         2: "null",
  6872.                         3: "undefined",
  6873.                         5: "boolean",
  6874.                         6: "number",
  6875.                         7: "number",
  6876.                         10: "function",
  6877.                         11: "object",
  6878.                         12: "function"
  6879.                     }[h.Type];
  6880.                     if (h.Value instanceof fljs.swf.act.MovieClip) g = "movieclip";
  6881.                     c.stack.push({
  6882.                         Type: 0,
  6883.                         Value: g
  6884.                     });
  6885.                     break;
  6886.                 case d.ToInteger:
  6887.                     h = Number(c.stack.pop().Value);
  6888.                     h = h >= 0 ? Math.floor(h) : Math.ceil(h);
  6889.                     c.stack.push({
  6890.                         Type: 1,
  6891.                         Value: h
  6892.                     });
  6893.                     break;
  6894.                 case d.Return:
  6895.                     return c.stack.pop();
  6896.                 case d.GotoFrame2:
  6897.                     h = c.stack.pop();
  6898.                     if (h.Type == 0) {
  6899.                         m = h.Value.split(":");
  6900.                         if (m.length == 1) {
  6901.                             a = c.self;
  6902.                             h = m[0]
  6903.                         } else {
  6904.                             a = c.resolvePath(m[0]);
  6905.                             h = m[1]
  6906.                         }
  6907.                         h = parseInt(h) ? {
  6908.                             Type: 1,
  6909.                             Value: parseInt(h)
  6910.                         } : {
  6911.                             Type: 0,
  6912.                             Value: h
  6913.                         }
  6914.                     } else {
  6915.                         a = c.self;
  6916.                         h = h
  6917.                     }
  6918.                     if (g.SceneBias) h.Value += g.SceneBias;
  6919.                     g.PlayFlag ? c.self.gotoandPlay(h) : c.self.gotoFrame(h);
  6920.                     break;
  6921.                 case d.Less2:
  6922.                     h = c.stack.pop().Value;
  6923.                     k = c.stack.pop().Value;
  6924.                     c.stack.push({
  6925.                         Type: 5,
  6926.                         Value: k < h
  6927.                     });
  6928.                     break;
  6929.                 case d.Decrement:
  6930.                     h = c.stack.pop();
  6931.                     c.stack.push({
  6932.                         Type: h.Type,
  6933.                         Value: h.Value - 1
  6934.                     });
  6935.                     break;
  6936.                 case d.Delete:
  6937.                     g = c.stack.pop().Value;
  6938.                     a = c.stack.pop();
  6939.                     a.Value.del(g);
  6940.                     break;
  6941.                 default:
  6942.                     rar.rar = rar;
  6943.                     this.trace && e.push("skipped: 0x" + g.ActionCode.toString(16))
  6944.                 }
  6945.             }
  6946.             this.trace && fljs.console("actions").info(e.join("\n"))
  6947.         }
  6948.     });
  6949.     fljs.swf.act.Context = function (a, b, c, d, e) {
  6950.         this.self = a;
  6951.         if (this.parent = b) this.root = b.root ? b.root : b;
  6952.         this.withCtx = d;
  6953.         this.stack = [];
  6954.         this.interp = c;
  6955.         this.locals = this.withCtx ? this.parent.locals : new fljs.swf.act.Object;
  6956.         if (!this.withCtx) {
  6957.             a = fljs.Player.getInstance().mainTimeline.getAs2Object();
  6958.             this.locals.set("_root", {
  6959.                 Type: 11,
  6960.                 Value: a
  6961.             });
  6962.             this.locals.set("_level0", {
  6963.                 Type: 11,
  6964.                 Value: a
  6965.             });
  6966.             this.locals.set("_global", {
  6967.                 Type: 11,
  6968.                 Value: c.globals
  6969.             });
  6970.             if (this.self) {
  6971.                 for (c = this; !c.self;) c = c.parent;
  6972.                 b = c.self;
  6973.                 c = b.dispObj.getParent() ? b.dispObj.getParent().getAs2Object() : a
  6974.             } else b = c = a;
  6975.             this.locals.set("_parent", {
  6976.                 Type: 11,
  6977.                 Value: c
  6978.             });
  6979.             e || this.locals.set("this", {
  6980.                 Type: 11,
  6981.                 Value: b
  6982.             })
  6983.         }
  6984.         this.regs = []
  6985.     };
  6986.     fljs.addMethods(fljs.swf.act.Context, {
  6987.         set: function (a, b) {
  6988.             if (a in this.locals) this.locals.set(a, b);
  6989.             else {
  6990.                 if (this.withCtx) if (a in this.self) {
  6991.                     this.self.set(a, b);
  6992.                     return
  6993.                 }
  6994.                 this.parent ? this.parent.set(a, b) : this.self.set(a, b)
  6995.             }
  6996.         },
  6997.         setLocal: function (a, b) {
  6998.             this.parent ? this.locals.set(a, b) : this.set(a, b)
  6999.         },
  7000.         get: function (a) {
  7001.             var b;
  7002.             b = this.locals.get(a);
  7003.             if (b.Type != 3) return b;
  7004.             if (this.withCtx) {
  7005.                 b = this.self.get(a);
  7006.                 if (b.Type != 3) return b
  7007.             }
  7008.             if (this.parent) return this.parent.get(a);
  7009.             else b = this.root ? this.root.get(a) : this.self.get(a);
  7010.             if (b.Type != 3) return b;
  7011.             return this.interp.globals.get(a)
  7012.         },
  7013.         reg: function (a) {
  7014.             return this.regs[a]
  7015.         },
  7016.         setReg: function (a, b) {
  7017.             this.regs[a] = b
  7018.         },
  7019.         resolvePath: function (a) {
  7020.             var b;
  7021.             b = a.indexOf(".") == -1 ? "/" : ".";
  7022.             a = a.split(b);
  7023.             b = this.self;
  7024.             if (a[0] == "" && a.length > 1) b = this.root ? this.root.self : this.self;
  7025.             for (var c in a) {
  7026.                 var d = a[c];
  7027.                 if (d) if (d != ".") b = d == ".." ? b.parent.Value : b.dispObj.__childNames[d].getAs2Object()
  7028.             }
  7029.             return b
  7030.         },
  7031.         setTarget: function (a) {
  7032.             if (a) {
  7033.                 a = this.resolvePath(a);
  7034.                 if (!this.origTarget) this.origTarget = this.self
  7035.             } else a = this.origTarget;
  7036.             this.self = a
  7037.         }
  7038.     });
  7039.     fljs.swf.act.ConstantsPool = function () {
  7040.         this.consts = []
  7041.     };
  7042.     fljs.addMethods(fljs.swf.act.ConstantsPool, {
  7043.         clear: function () {
  7044.             this.consts = []
  7045.         },
  7046.         push: function (a) {
  7047.             this.consts.push(a)
  7048.         },
  7049.         lookup: function (a) {
  7050.             return this.consts[a]
  7051.         }
  7052.     });
  7053.     fljs.swf.act.Object = function () {
  7054.         this.self = {};
  7055.         this.funcs = {};
  7056.         this.props = {}
  7057.     };
  7058.     fljs.swf.act.Object.Type = {
  7059.         Bool: 5,
  7060.         Func: 10
  7061.     };
  7062.     fljs.addMethods(fljs.swf.act.Object, {
  7063.         setNativeFunc: function (a, b) {
  7064.             this.funcs[a] = b
  7065.         },
  7066.         setNativeProperty: function (a, b) {
  7067.             this.props[a] = b
  7068.         },
  7069.         set: function (a, b) {
  7070.             if (this.props && a in this.props) this["set_" + this.props[a]](b);
  7071.             else this.self[a] = b
  7072.         },
  7073.         get: function (a) {
  7074.             if (this.funcs && a in this.funcs) return {
  7075.                 Type: 10,
  7076.                 Value: this[this.funcs[a]]
  7077.             };
  7078.             if (this.props && a in this.props) return this["get_" + this.props[a]]();
  7079.             else if (this.self && a in this.self) {
  7080.                 a = this.self[a];
  7081.                 return a == null ? {
  7082.                     Type: 2,
  7083.                     Value: null
  7084.                 } : a
  7085.             } else return {
  7086.                 Type: 3,
  7087.                 Value: undefined
  7088.             }
  7089.         },
  7090.         del: function (a) {
  7091.             if (this.props && a in this.props) this["set_" + this.props[a]]({
  7092.                 Type: 3,
  7093.                 Value: undefined
  7094.             });
  7095.             else delete this.self[a]
  7096.         }
  7097.     });
  7098.     fljs.swf.act.MovieClip = function (a) {
  7099.         fljs.swf.act.Object.call(this);
  7100.         this.dispObj = a;
  7101.         this.logger = fljs.console("mcaction");
  7102.         this.funcs = fljs.swf.act.MovieClip.funcs;
  7103.         this.props = fljs.swf.act.MovieClip.props
  7104.     };
  7105.     fljs.inherits(fljs.swf.act.MovieClip, fljs.swf.act.Object);
  7106.     fljs.swf.act.MovieClip.props = {
  7107.         _framesloaded: "_framesloaded",
  7108.         _visible: "_visible",
  7109.         _x: "_x",
  7110.         _y: "_y",
  7111.         onEnterFrame: "onEnterFrame",
  7112.         onRollOver: "onRollOver",
  7113.         onRollOut: "onRollOut",
  7114.         onPress: "onPress",
  7115.         onRelease: "onRelease",
  7116.         _xmouse: "_ymouse",
  7117.         _xscale: "_xscale",
  7118.         _yscale: "_yscale",
  7119.         _width: "_width"
  7120.     };
  7121.     fljs.swf.act.MovieClip.funcs = {
  7122.         nextFrame: "nextFrame",
  7123.         prevFrame: "prevFrame",
  7124.         gotoFrame: "gotoFrame",
  7125.         gotoAndStop: "gotoFrame",
  7126.         gotoAndPlay: "gotoAndPlay",
  7127.         play: "play",
  7128.         stop: "stop",
  7129.         localToGlobal: "localToGlobal",
  7130.         hitTest: "hitTest",
  7131.         getBytesLoaded: "getBytesLoaded",
  7132.         getBytesTotal: "getBytesTotal"
  7133.     };
  7134.     fljs.addMethods(fljs.swf.act.MovieClip, {
  7135.         get: function (a) {
  7136.             var b = this.dispObj.__childNames[a];
  7137.             return b ? {
  7138.                 Type: 11,
  7139.                 Value: b.getAs2Object()
  7140.             } : fljs.base(this, "get", a)
  7141.         },
  7142.         nextFrame: function () {
  7143.             this.logger.info("nextFrame");
  7144.             this.dispObj.currentFrameIndex_ < this.dispObj.totalFrames_ - 1 && this.dispObj.nextFrame()
  7145.         },
  7146.         prevFrame: function () {
  7147.             this.logger.info("prevFrame");
  7148.             this.dispObj.currentFrameIndex_ > 0 && this.dispObj.prevFrame()
  7149.         },
  7150.         gotoFrame: function (a) {
  7151.             this.logger.info("gotoFrame: " + a);
  7152.             this.dispObj.gotoAndStop(a.Value)
  7153.         },
  7154.         gotoAndPlay: function (a) {
  7155.             this.logger.info("gotoAndPlay: " + a);
  7156.             this.dispObj.gotoAndPlay(a.Value)
  7157.         },
  7158.         play: function () {
  7159.             this.logger.info("play");
  7160.             this.dispObj.play()
  7161.         },
  7162.         stop: function () {
  7163.             this.logger.info("stop");
  7164.             this.dispObj.stop()
  7165.         },
  7166.         getUrl: function (a, b) {
  7167.             if (b.Value == "") window.location = a.Value;
  7168.             if (a.Value.substr(0, 10) == "FSCommand:") switch (a.Value.substr(10)) {
  7169.             case "quit":
  7170.                 fljs.Player.getInstance().pause();
  7171.                 break;
  7172.             case "fullscreen":
  7173.                 break;
  7174.             case "allowscale":
  7175.                 break;
  7176.             case "showmenu":
  7177.                 break;
  7178.             case "exec":
  7179.                 break;
  7180.             case "trapallkeys":
  7181.                 break
  7182.             } else {
  7183.                 b = b.Value;
  7184.                 if (fljs.agent.OS == "iPhone" || fljs.agent.OS == "iPad") if (b == "_blank") b = "_self";
  7185.                 window.open(a.Value, b);
  7186.                 return {
  7187.                     Type: 0,
  7188.                     Value: ""
  7189.                 }
  7190.             }
  7191.         },
  7192.         localToGlobal: function (a) {
  7193.             a = new flash.geom.Point(a.Value.get("x"), a.Value.get("y"));
  7194.             a = this.dispObj.localToGlobal(a);
  7195.             var b = new fljs.swf.act.Object;
  7196.             b.set("x", a.x);
  7197.             b.set("y", a.y);
  7198.             return {
  7199.                 Type: 11,
  7200.                 Value: b
  7201.             }
  7202.         },
  7203.         hitTest: function (a, b, c) {
  7204.             if (arguments.length == 1) {
  7205.                 c = arguments[0];
  7206.                 var d;
  7207.                 if (c.Type != 0) d = c.Value;
  7208.                 return {
  7209.                     Type: 5,
  7210.                     Value: this.dispObj.hitTestObject(d.Value.dispObj)
  7211.                 }
  7212.             }
  7213.         },
  7214.         getBytesLoaded: function () {
  7215.             return {
  7216.                 Type: 1,
  7217.                 Value: this.dispObj.__bytesLoaded
  7218.             }
  7219.         },
  7220.         getBytesTotal: function () {
  7221.             return {
  7222.                 Type: 1,
  7223.                 Value: this.dispObj.__bytesTotal
  7224.             }
  7225.         },
  7226.         get__framesloaded: function () {
  7227.             return {
  7228.                 Type: 1,
  7229.                 Value: this.dispObj.framesLoaded_
  7230.             }
  7231.         },
  7232.         get__xscale: function () {
  7233.             return {
  7234.                 Type: 1,
  7235.                 Value: this.dispObj.scaleX
  7236.             }
  7237.         },
  7238.         set__xscale: function (a) {
  7239.             this.dispObj.scaleX = a.Value
  7240.         },
  7241.         get__yscale: function () {
  7242.             return {
  7243.                 Type: 1,
  7244.                 Value: this.dispObj.scaleY
  7245.             }
  7246.         },
  7247.         set__yscale: function (a) {
  7248.             this.dispObj.scaleY = a.Value
  7249.         },
  7250.         get__visible: function () {
  7251.             return {
  7252.                 Type: 5,
  7253.                 Value: this.dispObj.getVisible()
  7254.             }
  7255.         },
  7256.         set__visible: function (a) {
  7257.             this.dispObj.setVisible(a.Value)
  7258.         },
  7259.         get__x: function () {
  7260.             return {
  7261.                 Type: 1,
  7262.                 Value: this.dispObj.x
  7263.             }
  7264.         },
  7265.         set__x: function (a) {
  7266.             this.dispObj.x = a.Value
  7267.         },
  7268.         get__y: function () {
  7269.             return {
  7270.                 Type: 1,
  7271.                 Value: this.dispObj.y
  7272.             }
  7273.         },
  7274.         set__y: function (a) {
  7275.             this.dispObj.y = a.Value
  7276.         },
  7277.         set_onEnterFrame: function (a) {
  7278.             this._onEnterFrame = a
  7279.         },
  7280.         set_onRollOver: function (a) {
  7281.             this.set_onMouseEvent(flash.events.MouseEvent.MOUSE_OVER, a)
  7282.         },
  7283.         set_onRollOut: function (a) {
  7284.             this.set_onMouseEvent(flash.events.MouseEvent.MOUSE_OUT, a)
  7285.         },
  7286.         set_onPress: function (a) {
  7287.             this.set_onMouseEvent(flash.events.MouseEvent.MOUSE_DOWN, a)
  7288.         },
  7289.         set_onRelease: function (a) {
  7290.             this.set_onMouseEvent(flash.events.MouseEvent.MOUSE_UP, a)
  7291.         },
  7292.         set_onMouseEvent: function (a, b) {
  7293.             var c = this["_on" + a] && !(this["_on" + a].Type == 2 || this["_on" + a].Type == 3),
  7294.                 d = !(b.Type == 2 || b.Type == 3);
  7295.             c && !d && this.dispObj.removeEventListener(a, this["_on" + a + "Handler"]);
  7296.             if (!c && d) {
  7297.                 this["_on" + a + "Handler"] || (this["_on" + a + "Handler"] = fljs.bind(this.onMouseEventHandler, this, a));
  7298.                 this.dispObj.addEventListener(a, this["_on" + a + "Handler"])
  7299.             }
  7300.             this["_on" + a] = b
  7301.         },
  7302.         get_xmouse: function () {
  7303.             return this.dispObj.get_mouseX()
  7304.         },
  7305.         get_ymouse: function () {
  7306.             return this.dispObj.get_mouseY()
  7307.         },
  7308.         onMouseEventHandler: function (a) {
  7309.             fljs.Player.getInstance().interpreter.callback(this, this["_on" + a])
  7310.         },
  7311.         get__width: function () {
  7312.             return {
  7313.                 Type: 1,
  7314.                 Value: this.dispObj.getWidth()
  7315.             }
  7316.         },
  7317.         set__width: function (a) {
  7318.             this.dispObj.setWidth(a.Value)
  7319.         }
  7320.     });
  7321.     fljs.swf.act.Mouse = function () {
  7322.         fljs.swf.act.Object.call(this);
  7323.         this.funcs = fljs.swf.act.Mouse.funcs;
  7324.         this.props = fljs.swf.act.Mouse.props
  7325.     };
  7326.     fljs.inherits(fljs.swf.act.Mouse, fljs.swf.act.Object);
  7327.     fljs.swf.act.Mouse.props = {};
  7328.     fljs.swf.act.Mouse.funcs = {
  7329.         hide: "hide",
  7330.         show: "show",
  7331.         addListener: "addListener",
  7332.         removeListener: "removeListener"
  7333.     };
  7334.     fljs.addMethods(fljs.swf.act.Mouse, {
  7335.         hide: function () {
  7336.             fljs.Player.getInstance().element.getElement().setAttributeNS(null, "cursor", 'url("img/nothing.cur")')
  7337.         },
  7338.         show: function () {
  7339.             fljs.Player.getInstance().element.getElement().setAttributeNS(null, "cursor", "")
  7340.         },
  7341.         addListener: function () {},
  7342.         removeListener: function () {}
  7343.     });
  7344.     fljs.swf.act.Mouse._self = {};
  7345.     fljs.swf.act.Mouse._props = {};
  7346.     fljs.swf.act.Mouse._funcs = {
  7347.         hide: "hide",
  7348.         show: "show"
  7349.     };
  7350.     fljs.addStaticMethods(fljs.swf.act.Mouse, {
  7351.         set: function (a, b) {
  7352.             delete this._funcs[a];
  7353.             delete this._props[a];
  7354.             this._self[a] = b
  7355.         },
  7356.         get: function (a) {
  7357.             var b = this._funcs[a];
  7358.             if (b) return {
  7359.                 Type: 10,
  7360.                 Value: this[b]
  7361.             };
  7362.             if (b = this._props[a]) return this[b];
  7363.             else {
  7364.                 a = this._self[a];
  7365.                 return a == null ? {
  7366.                     Type: 2,
  7367.                     Value: null
  7368.                 } : a
  7369.             }
  7370.         },
  7371.         hide: function () {
  7372.             fljs.Player.getInstance().element.getElement().setAttributeNS(null, "cursor", 'url("img/nothing.cur")')
  7373.         },
  7374.         show: function () {
  7375.             fljs.Player.getInstance().element.getElement().setAttributeNS(null, "cursor", "")
  7376.         }
  7377.     });
  7378.     fljs.swf.act.Sound = function () {
  7379.         this.funcs = fljs.swf.act.Sound.funcs;
  7380.         this.props = {}
  7381.     };
  7382.     fljs.inherits(fljs.swf.act.Sound, fljs.swf.act.Object);
  7383.     fljs.swf.act.Sound.funcs = {
  7384.         attachSound: "attachSound",
  7385.         start: "start",
  7386.         stop: "stop"
  7387.     };
  7388.     fljs.addMethods(fljs.swf.act.Sound, {
  7389.         init: function (a) {
  7390.             this.target = a
  7391.         },
  7392.         attachSound: function (a) {
  7393.             var b = fljs.Player.getInstance();
  7394.             this.target = b.sounds[b.assets[a.Value]]
  7395.         },
  7396.         start: function () {
  7397.             var a = fljs.Player.getInstance();
  7398.             if (!this.audio) this.audio = a.allocAudio();
  7399.             var b = this.audio,
  7400.                 c = this.target,
  7401.                 d = new fljs.swf.StringStream(a.reader.stream.stream.buffer);
  7402.             d.byteIndex = c.Mp3SoundData.byteIndex;
  7403.             c = d.readBytes(c.Mp3SoundData.byteCount).join("");
  7404.             c = "data:audio/mpeg;base64," + btoa(c);
  7405.             b.setAttribute("src", c);
  7406.             b.addEventListener("load", function () {
  7407.                 b.currentTime = 0;
  7408.                 b.fljsPlaying = true;
  7409.                 a.playing && b.play()
  7410.             }, true);
  7411.             b.load()
  7412.         },
  7413.         stop: function () {
  7414.             if (this.audio) {
  7415.                 fljs.Player.getInstance();
  7416.                 var a = this.audio;
  7417.                 a.fljsPlaying = false;
  7418.                 a.pause()
  7419.             }
  7420.         }
  7421.     });
  7422.     fljs.swf.act.Math = function () {
  7423.         this.funcs = fljs.swf.act.Math.funcs;
  7424.         this.props = fljs.swf.act.Math.props
  7425.     };
  7426.     fljs.inherits(fljs.swf.act.Math, fljs.swf.act.Object);
  7427.     fljs.swf.act.Math.props = {};
  7428.     fljs.swf.act.Math.funcs = {
  7429.         floor: "floor"
  7430.     };
  7431.     fljs.addMethods(fljs.swf.act.Math, {
  7432.         floor: function (a) {
  7433.             return {
  7434.                 Type: 1,
  7435.                 Value: Math.floor(a.Value)
  7436.             }
  7437.         }
  7438.     });
  7439.     fljs.swf.act.Math._self = {};
  7440.     fljs.swf.act.Math._props = {};
  7441.     fljs.swf.act.Math._funcs = {
  7442.         floor: "floor",
  7443.         random: "random"
  7444.     };
  7445.     fljs.addStaticMethods(fljs.swf.act.Math, {
  7446.         set: function (a, b) {
  7447.             delete this._funcs[a];
  7448.             delete this._props[a];
  7449.             this._self[a] = b
  7450.         },
  7451.         get: function (a) {
  7452.             var b = this._funcs[a];
  7453.             if (b) return {
  7454.                 Type: 10,
  7455.                 Value: this[b]
  7456.             };
  7457.             if (b = this._props[a]) return this[b];
  7458.             else {
  7459.                 a = this._self[a];
  7460.                 return a == null ? {
  7461.                     Type: 2,
  7462.                     Value: null
  7463.                 } : a
  7464.             }
  7465.         },
  7466.         floor: function (a) {
  7467.             return {
  7468.                 Type: 1,
  7469.                 Value: Math.floor(a.Value)
  7470.             }
  7471.         },
  7472.         random: function () {
  7473.             return {
  7474.                 Type: 1,
  7475.                 Value: Math.random()
  7476.             }
  7477.         }
  7478.     });
  7479.     fljs.swf.act.System = function () {
  7480.         this.funcs = {};
  7481.         this.props = fljs.swf.act.System.props;
  7482.         this.security = new fljs.swf.act.SystemSecurity
  7483.     };
  7484.     fljs.inherits(fljs.swf.act.System, fljs.swf.act.Object);
  7485.     fljs.swf.act.System.props = {
  7486.         security: "security"
  7487.     };
  7488.     fljs.swf.act.SystemSecurity = function () {
  7489.         this.funcs = fljs.swf.act.SystemSecurity.funcs;
  7490.         this.props = {}
  7491.     };
  7492.     fljs.inherits(fljs.swf.act.SystemSecurity, fljs.swf.act.Object);
  7493.     fljs.swf.act.SystemSecurity.funcs = {
  7494.         allowDomain: "allowDomain"
  7495.     };
  7496.     fljs.addMethods(fljs.swf.act.SystemSecurity, {
  7497.         allowDomain: function () {},
  7498.         get_security: function () {
  7499.             return {
  7500.                 Type: 11,
  7501.                 Value: this.security
  7502.             }
  7503.         }
  7504.     });
  7505.     fljs.swf.act.String = function (a) {
  7506.         this.str = a;
  7507.         this.funcs = fljs.swf.act.String.funcs;
  7508.         this.props = {}
  7509.     };
  7510.     fljs.inherits(fljs.swf.act.String, fljs.swf.act.Object);
  7511.     fljs.swf.act.String.funcs = {
  7512.         substr: "substr"
  7513.     };
  7514.     fljs.addMethods(fljs.swf.act.String, {
  7515.         substr: function (a, b) {
  7516.             return {
  7517.                 Type: 0,
  7518.                 Value: this.str.substr(a.Value, b.Value)
  7519.             }
  7520.         }
  7521.     });
  7522.     fljs.swf.act.Globals = function () {
  7523.         fljs.swf.act.Object.call(this);
  7524.         this.funcs = fljs.swf.act.Globals.funcs;
  7525.         this.props = fljs.swf.act.Globals.props;
  7526.         this.Mouse = {
  7527.             Type: 11,
  7528.             Value: fljs.swf.act.Mouse
  7529.         };
  7530.         this.Sound = {
  7531.             Type: 11,
  7532.             Value: fljs.swf.act.Sound
  7533.         };
  7534.         this.System = {
  7535.             Type: 11,
  7536.             Value: fljs.swf.act.System
  7537.         };
  7538.         this.Math = {
  7539.             Type: 11,
  7540.             Value: fljs.swf.act.Math
  7541.         }
  7542.     };
  7543.     fljs.inherits(fljs.swf.act.Globals, fljs.swf.act.Object);
  7544.     fljs.swf.act.Globals.props = {
  7545.         Mouse: "Mouse",
  7546.         Sound: "Sound",
  7547.         System: "System",
  7548.         Math: "Math",
  7549.         setInterval: "setInterval",
  7550.         clearInterval: "clearInterval"
  7551.     };
  7552.     fljs.swf.act.Globals.funcs = {};
  7553.     fljs.addMethods(fljs.swf.act.Globals, {
  7554.         get_Mouse: function () {
  7555.             return this.Mouse
  7556.         },
  7557.         get_Sound: function () {
  7558.             return this.Sound
  7559.         },
  7560.         get_System: function () {
  7561.             return this.System
  7562.         },
  7563.         get_Math: function () {
  7564.             return this.Math
  7565.         },
  7566.         get_setInterval: function () {
  7567.             return {
  7568.                 Type: 10,
  7569.                 Value: fljs.bind(this.setInterval, this)
  7570.             }
  7571.         },
  7572.         get_clearInterval: function () {
  7573.             return {
  7574.                 Type: 10,
  7575.                 Value: fljs.bind(this.clearInterval, this)
  7576.             }
  7577.         },
  7578.         setInterval: function () {
  7579.             var a = fljs.Player.getInstance().interpreter,
  7580.                 b;
  7581.             b = [];
  7582.             switch (arguments[0].Type) {
  7583.             case 10:
  7584.                 b = [arguments[0].Value, null];
  7585.                 for (var c = 2; c < arguments.length; c++) b.push(arguments[c]);
  7586.                 a = fljs.bind.apply(null, b);
  7587.                 b = arguments[1].Value;
  7588.                 b = [a, b];
  7589.                 break;
  7590.             case 11:
  7591.                 b = [];
  7592.                 for (c = 3; c < arguments.length; c++) b.push(arguments[c]);
  7593.                 a = fljs.bind(a.callMethod, a, null, arguments[0], arguments[1], b);
  7594.                 b = arguments[2].Value;
  7595.                 b = [a, b];
  7596.                 break;
  7597.             case 12:
  7598.                 b = [];
  7599.                 for (c = 2; c < arguments.length; c++) b.push(arguments[c]);
  7600.                 a = fljs.bind(a.callFunction, a, null, arguments[0], null, b);
  7601.                 b = arguments[1].Value;
  7602.                 b = [a, b];
  7603.                 break
  7604.             }
  7605.             return {
  7606.                 Type: 1,
  7607.                 Value: setInterval.apply(null, b)
  7608.             }
  7609.         },
  7610.         clearInterval: function (a) {
  7611.             clearInterval(a.Value)
  7612.         }
  7613.     });
  7614.     flash.display.Document = function () {
  7615.         flash.display.MovieClip.call(this)
  7616.     };
  7617.     fljs.inherits(flash.display.Document, flash.display.MovieClip);
  7618.     fljs.player.AbsTimeSync = function (a) {
  7619.         this.frameRate = a
  7620.     };
  7621.     fljs.addMethods(fljs.player.AbsTimeSync, {
  7622.         start: function () {
  7623.             this.frameCount = 1;
  7624.             this.frameStart = 0;
  7625.             this.startAt = +new Date
  7626.         },
  7627.         delay: function () {
  7628.             this.frameCount++;
  7629.             return 1E3 * (this.frameCount - this.frameStart) / this.frameRate - (+new Date - this.startAt)
  7630.         }
  7631.     });
  7632.     fljs.player.AudioSync = function (a) {
  7633.         this.frameRate = a;
  7634.         this.oneFrame = 1E3 / this.frameRate;
  7635.         this.audio = null;
  7636.         this.frames = {};
  7637.         this.timeSync = new fljs.player.AbsTimeSync(a)
  7638.     };
  7639.     fljs.addMethods(fljs.player.AudioSync, {
  7640.         setAudio: function (a) {
  7641.             this.audio = a;
  7642.             this.audio.setSync(this)
  7643.         },
  7644.         setFrameTime: function (a, b) {
  7645.             this.frames[a] = b
  7646.         },
  7647.         start: function (a) {
  7648.             if (this.audio.frameShouldPlay(a) && typeof this.frames[a] != "undefined") this.audioSync = true;
  7649.             else {
  7650.                 this.timeSync.start();
  7651.                 this.audioSync = false
  7652.             }
  7653.             this.lastFrame = a
  7654.         },
  7655.         stop: function () {},
  7656.         delay: function (a) {
  7657.             if (a != this.lastFrame + 1) {
  7658.                 this.start(a);
  7659.                 return this.oneFrame
  7660.             }
  7661.             this.lastFrame = a;
  7662.             if (this.audioSync) if (this.audio.frameShouldPlay(a) && typeof this.frames[a] != "undefined") {
  7663.                 expTime = this.audio.currentTime();
  7664.                 time = this.frames[a];
  7665.                 return time - expTime
  7666.             } else {
  7667.                 this.timeSync.start();
  7668.                 this.audioSync = false;
  7669.                 return this.oneFrame
  7670.             } else if (this.audio.frameShouldPlay(a) && typeof this.frames[a] != "undefined") {
  7671.                 this.audioSync = true;
  7672.                 return this.oneFrame
  7673.             } else return this.timeSync.delay(a)
  7674.         }
  7675.     });
  7676.     fljs.enterFrameDispatcher = function () {
  7677.         this.enterFrameListeners = []
  7678.     };
  7679.     fljs.addMethods(fljs.enterFrameDispatcher, {
  7680.         addEventListener: function (a, b) {
  7681.             this.enterFrameListeners.push(b)
  7682.         },
  7683.         removeEventListener: function (a, b) {
  7684.             for (var c in this.enterFrameListeners) this.enterFrameListeners[c] == b && this.enterFrameListeners.splice(c, 1)
  7685.         },
  7686.         dispatchEvent: function (a) {
  7687.             for (var b in this.enterFrameListeners) this.enterFrameListeners[b](a)
  7688.         }
  7689.     });
  7690.     fljs.Player = function () {
  7691.         this.muted = this.debug = this.predefine = false;
  7692.         this.playing = true;
  7693.         this.audioId = 1;
  7694.         this.audios = {};
  7695.         this._volume = 1;
  7696.         this.params = {};
  7697.         this.renderTextAsGlyphs = false;
  7698.         this.loadExtResources = fljs.agent.browser == "Safari" || fljs.agent.browser == "Firefox" || fljs.agent.browser == "Opera"
  7699.     };
  7700.     fljs.Player.getInstance = function () {
  7701.         return fljs.Player._instance || (fljs.Player._instance = new fljs.Player)
  7702.     };
  7703.     fljs.addMethods(fljs.Player, {
  7704.         initialize: function (a) {
  7705.             fljs.debug = this.debug;
  7706.             this.containerElement = a;
  7707.             this.dictionary = {};
  7708.             this.displayList = [];
  7709.             this.frameNum = -1;
  7710.             this.fontsWithoutInfo = {};
  7711.             this.fonts = {};
  7712.             this.fonts2 = {};
  7713.             this.fonts2ByName = {};
  7714.             this.fonts2ByStyle = {};
  7715.             this.sounds = {};
  7716.             this.tagMap = fljs.swf.tag.tagMap;
  7717.             this.logger = fljs.console("player");
  7718.             this.dispatcher = new fljs.enterFrameDispatcher;
  7719.             this.buildSvg();
  7720.             this.assets = {};
  7721.             this.actionQueue = [];
  7722.             this.initActionQueue = [];
  7723.             this.delayFrame = 0;
  7724.             this.startTime = fljs.now();
  7725.             this.initTimeoutHandler()
  7726.         },
  7727.         initTimeoutHandler: function () {
  7728.             this.timeouts = [];
  7729.             this.timeoutMessageName = "fljs-timeout-message";
  7730.             window.addEventListener("message", fljs.bind(this.timeoutHandler, this), true)
  7731.         },
  7732.         timeoutHandler: function (a) {
  7733.             if (a.source == window && a.data == this.timeoutMessageName) {
  7734.                 a.stopPropagation();
  7735.                 this.timeouts.length > 0 && this.timeouts.shift()()
  7736.             }
  7737.         },
  7738.         setTimeout: function (a) {
  7739.             this.timeouts.push(a);
  7740.             window.postMessage(this.timeoutMessageName, "*")
  7741.         },
  7742.         buildSvg: function () {
  7743.             for (var a = this.containerElement.firstChild, b; a;) {
  7744.                 if (a.nodeName == "SVG") {
  7745.                     b =
  7746.                     new fljs.dom.Element(a);
  7747.                     break
  7748.                 }
  7749.                 a = a.nextSibling
  7750.             }
  7751.             if (!a) {
  7752.                 for (var a = this.containerElement.firstChild, b; a;) {
  7753.                     b = a.nextSibling;
  7754.                     this.containerElement.removeChild(a);
  7755.                     a = b
  7756.                 };
  7757.                 b = new fljs.dom.Element;
  7758.                 b.create(fljs.dom.Namespace.Svg, "svg")
  7759.             }
  7760.             b.set(null, "overflow", "hidden");
  7761.             b.sets([[null, "width", this.containerElement.offsetWidth], [null, "height", this.containerElement.offsetHeight], [null, "stroke-linecap", "round"], [null, "stroke-linejoin", "round"], [null, "fill-rule", "evenodd"], [null, "clip-rule", "evenodd"]]);
  7762.             if (fljs.agent.OS == "iPhone" || fljs.agent.OS == "iPad") b.sets([[null, "color-rendering", "optimizeSpeed"], [null, "image-rendering",
  7763.                 "optimizeSpeed"]]);
  7764.             b.update();
  7765.             this.svg = this.element = this.element_ = b;
  7766.             a || this.containerElement.appendChild(b.element);
  7767.             b = this.defs = new fljs.dom.Element;
  7768.             b.create(fljs.dom.Namespace.Svg, "defs");
  7769.             this.svg.append(b)
  7770.         },
  7771.         createStage: function () {
  7772.             new flash.display.DisplayObject;
  7773.             this.stage = new flash.display.Stage;
  7774.             this.stage.setParent(this);
  7775.             this.svg.append(this.stage._clipElement);
  7776.             this.stage.initialize();
  7777.             this.stage.setFrameRate(this.header.FrameRate)
  7778.         },
  7779.         addDefinition: function (a, b) {
  7780.             this.dictionary[b] = a
  7781.         },
  7782.         defineFont: function (a, b, c) {
  7783.             this.fonts[a] = {
  7784.                 glyphCount: b,
  7785.                 element: c
  7786.             };
  7787.             this.defs.element.appendChild(c)
  7788.         },
  7789.         defineFont2: function (a, b, c, d, e, f, g, j) {
  7790.             this.fonts2[a] = {
  7791.                 glyphCount: b,
  7792.                 element: c,
  7793.                 name: d,
  7794.                 bold: e,
  7795.                 italic: f,
  7796.                 codeTable: g,
  7797.                 tag: j
  7798.             };
  7799.             this.fonts2ByName[d] = a;
  7800.             this.fonts2ByStyle[[d, e, f].toString()] = a;
  7801.             for (var h in c) this.defs.append(c[h])
  7802.         },
  7803.         lookupFontByName: function (a) {
  7804.             return "font-" + String(this.fonts2ByName[a])
  7805.         },
  7806.         lookupFontByStyle: function (a, b, c) {
  7807.             a = [a, b, c].toString();
  7808.             return "font-" + String(this.fonts2ByStyle[a])
  7809.         },
  7810.         addToDisplayList: function (a, b) {
  7811.             this.displayList[b] = a
  7812.         },
  7813.         loadSwf: function (a, b, c, d, e, f) {
  7814.             b.style.width = c + "px";
  7815.             b.style.height = d + "px";
  7816.             this.name = e;
  7817.             for (var g in f) this.params[g] = f[g];
  7818.             this.initialize(b);
  7819.             (new fljs.swf.SwfLoader).load(a, fljs.bind(this.readSwf, this))
  7820.         },
  7821.         readSwf: function (a) {
  7822.             this.parser = new fljs.swf.DefinitionParser(a.stream.buffer);
  7823.             this.readHeader();
  7824.             this.createStage();
  7825.             this.buildMainTimeline();
  7826.             this.interpreter = new fljs.swf.act.ActionInterpreter(this);
  7827.             this.sync = new fljs.player.AbsTimeSync(this.header.FrameRate);
  7828.             this.sync.start();
  7829.             this.enterFrame()
  7830.         },
  7831.         showFrame: function () {
  7832.             delay = this.sync.delay(this.mainTimeline.currentFrameIndex_, this.delayFrame);
  7833.             delay = Math.max(0, delay);
  7834.             this.lastFrameAt = fljs.now();
  7835.             this.waitingOnFrame = true;
  7836.             if (fljs.agent.browser == "Opera") {
  7837.                 this.element.getElement().setAttributeNS(null, "fill-color", "red");
  7838.                 this.element.getElement().setAttributeNS(null, "fill-color", "none")
  7839.             }
  7840.             var a = fljs.bind(this.enterFrame, this, this.frameNum);
  7841.             delay >= 10 ? setTimeout(a, delay) : this.setTimeout(a)
  7842.         },
  7843.         enterFrame: function (a) {
  7844.             if (!this.delayFrame) {
  7845.                 this.logger.info("player frame#" + a);
  7846.                 this.waitingOnFrame = false;
  7847.                 if (!this.playing) return;
  7848.                 this.frameNum += 1;
  7849.                 var b;
  7850.                 if (this.element.getElement().suspendRedraw) b = this.element.getElement().suspendRedraw(100);
  7851.                 this.dispatcher.dispatchEvent(new flash.events.Event(flash.events.Event.ENTER_FRAME));
  7852.                 this.parser.readSomeTags(this);
  7853.                 this.doActionQueue();
  7854.                 this.element.getElement().unsuspendRedraw && this.element.getElement().unsuspendRedraw(b)
  7855.             }
  7856.             this.showFrame()
  7857.         },
  7858.         doActions: function (a, b) {
  7859.             this.actionQueue.push({
  7860.                 target: this.containingDispObj(a).getAs2Object(),
  7861.                 actions: b
  7862.             })
  7863.         },
  7864.         doInitAction: function (a) {
  7865.             this.initActionQueue.push({
  7866.                 target: null,
  7867.                 actions: a.Actions
  7868.             })
  7869.         },
  7870.         containingDispObj: function (a) {
  7871.             for (; !(a instanceof flash.display.MovieClip && !a.getEnabled());) a = a.getParent();
  7872.             return a
  7873.         },
  7874.         doActionQueue: function () {
  7875.             for (var a in this.initActionQueue) {
  7876.                 var b = this.initActionQueue[a];
  7877.                 this.interpreter.eval(null, b.actions)
  7878.             }
  7879.             this.initActionQueue = [];
  7880.             for (a in this.actionQueue) {
  7881.                 b = this.actionQueue[a];
  7882.                 this.interpreter.eval(b.target, b.actions)
  7883.             }
  7884.             this.actionQueue = []
  7885.         },
  7886.         readHeader: function () {
  7887.             var a =
  7888.             this.parser.readHeader();
  7889.             this.header = a;
  7890.             this.swfVersion = a.Version;
  7891.             var b = a.FrameSize.Xmin,
  7892.                 c = a.FrameSize.Ymin;
  7893.             this.svg.sets([[null, "viewBox", [b, c, a.FrameSize.Xmax - b, a.FrameSize.Ymax - c].join(" ")], [null, "preserveAspectRatio", "none"]]);
  7894.             this.svg.update()
  7895.         },
  7896.         buildMainTimeline: function () {
  7897.             var a = new flash.display.Document;
  7898.             a.setName("_root");
  7899.             a.__frameNum = 0;
  7900.             var b = new flash.display.Scene;
  7901.             b.labels = [];
  7902.             b.name = "Scene 1";
  7903.             b.numFrames = this.header.FrameCount;
  7904.             a.frameData_ = [];
  7905.             for (var c = 0; c < this.header.FrameCount; c++) a.frameData_.push({
  7906.                 scripts: [],
  7907.                 parts: [],
  7908.                 tags: [],
  7909.                 label: ""
  7910.             });
  7911.             a.labels_ = {};
  7912.             a.sceneIndices_ = {};
  7913.             a.currentSceneIndex_ = 0;
  7914.             a.scenes_ = [b];
  7915.             a.currentFrameIndex_ = 0;
  7916.             a.currentLabel_ = null;
  7917.             a._enabled = false;
  7918.             a.framesLoaded_ = 0;
  7919.             a.totalFrames_ = this.header.FrameCount;
  7920.             a.next_ = null;
  7921.             a.playing_ = true;
  7922.             a.__bytesLoaded = this.parser.reader.stream.stream.byteIndex;
  7923.             a.__bytesTotal = this.header.FileLength;
  7924.             this.mainTimeline = a;
  7925.             b = a.getAs2Object();
  7926.             for (c in this.params) b.set(c, {
  7927.                 Type: 0,
  7928.                 Value: this.params[c]
  7929.             });
  7930.             this.stage.addChild(a);
  7931.             a.onCreate()
  7932.         },
  7933.         play: function () {
  7934.             if (!this.playing) {
  7935.                 for (var a in this.audios) {
  7936.                     var b =
  7937.                     this.audios[a];
  7938.                     b.fljsPlaying && b.play()
  7939.                 }
  7940.                 this.playing = true;
  7941.                 this.setPlayingControl();
  7942.                 this.waitingOnFrame || this.enterFrame()
  7943.             }
  7944.         },
  7945.         pause: function () {
  7946.             if (this.playing) {
  7947.                 this.playing = false;
  7948.                 this.setPlayingControl();
  7949.                 for (var a in this.audios) this.audios[a].pause()
  7950.             }
  7951.         },
  7952.         mute: function () {
  7953.             this.prevVolume = this.getVolume();
  7954.             this.setVolume(0);
  7955.             this.setVolumeControl();
  7956.             for (var a in this.audios) this.audioSetVolume(this.audios[a])
  7957.         },
  7958.         unmute: function () {
  7959.             this.setVolume(this.prevVolume);
  7960.             this.setVolumeControl();
  7961.             for (var a in this.audios) this.audioSetVolume(this.audios[a])
  7962.         },
  7963.         allocAudio: function () {
  7964.             var a = new Audio,
  7965.                 b = this;
  7966.             a.addEventListener("loadedmetadata", function () {
  7967.                 b.audioSetVolume(a)
  7968.             }, false);
  7969.             a.fljsPlay = a.play;
  7970.             a.play = function () {
  7971.                 a.fljsPlaying = true;
  7972.                 b.playing && a.fljsPlay()
  7973.             };
  7974.             a.fljsId = this.audioId++;
  7975.             return this.audios[a.fljsId] = a
  7976.         },
  7977.         releaseAudio: function (a) {
  7978.             delete this.audios[a.fljsId]
  7979.         },
  7980.         audioSetVolume: function (a) {
  7981.             if (!a.fljsWaiting) {
  7982.                 a.volume = Math.max(0, Math.min(this._volume + 0.0010, 1));
  7983.                 a.volume = Math.max(0, Math.min(this._volume, 1))
  7984.             }
  7985.         },
  7986.         buildControls: function (a) {
  7987.             if (fljs.agent.browser != "Explorer") {
  7988.                 var b = a.ownerDocument,
  7989.                     c = b.createElement("input");
  7990.                 c.setAttribute("type", "button");
  7991.                 var d = this;
  7992.                 c.addEventListener("click", function () {
  7993.                     d.playing ? d.pause() : d.play()
  7994.                 }, true);
  7995.                 a.appendChild(c);
  7996.                 b = b.createElement("input");
  7997.                 b.setAttribute("type", "button");
  7998.                 b.addEventListener("click", function () {
  7999.                     d.getVolume() > 0 ? d.mute() : d.unmute()
  8000.                 }, true);
  8001.                 a.appendChild(b);
  8002.                 this.controls = {
  8003.                     playing: c,
  8004.                     volume: b
  8005.                 };
  8006.                 this.setPlayingControl();
  8007.                 this.setVolumeControl()
  8008.             }
  8009.         },
  8010.         setPlayingControl: function () {
  8011.             if (this.controls) this.controls.playing.value = this.playing ? "pause" : "play"
  8012.         },
  8013.         setVolumeControl: function () {
  8014.             if (this.controls) this.controls.volume.value = this.muted ? "unmute" : "mute"
  8015.         },
  8016.         getVolume: function () {
  8017.             return this._volume == 0.999 ? 1 : this._volume
  8018.         },
  8019.         setSolume: function (a) {
  8020.             this.prevVolume = this._volume;
  8021.             this._volume = a;
  8022.             this.muted = this._volume == 0;
  8023.             if (this._volume == 1) this._volume = 0.999;
  8024.             this.setVolumeControl()
  8025.         }
  8026.     });
  8027.     fljs.base64 = {};
  8028.     fljs.base64.chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  8029.     fljs.base64.atob = function (a) {
  8030.         for (var b = a.length, c = [], d = 0, e, f, g, j, h, m = fljs.base64.chars; d < b;) {
  8031.             e = m.indexOf(a.charAt(d++));
  8032.             f = m.indexOf(a.charAt(d++));
  8033.             g = m.indexOf(a.charAt(d++));
  8034.             j = m.indexOf(a.charAt(d++));
  8035.             e = e << 2 | f >> 4;
  8036.             f = (f & 15) << 4 | g >> 2;
  8037.             h = (g & 3) << 6 | j;
  8038.             c.push(String.fromCharCode(4096 | e));
  8039.             g != 64 && c.push(String.fromCharCode(4096 | f));
  8040.             j != 64 && c.push(String.fromCharCode(4096 | h))
  8041.         }
  8042.         String(c.join(""))
  8043.     };
  8044.     fljs.swf.SwfLoader = function () {
  8045.         var a;
  8046.         this.complete = false;
  8047.         try {
  8048.             a = new XMLHttpRequest
  8049.         } catch (b) {
  8050.             a = false
  8051.         }
  8052.         if (!a) return null;
  8053.         this.xmlhttp = a
  8054.     };
  8055.     fljs.addMethods(fljs.swf.SwfLoader, {
  8056.         load: function (a, b) {
  8057.             if (fljs.agent.browser == "Explorer" || fljs.agent.browser == "Opera") a += ".b64";
  8058.             this.logger = fljs.console("demo");
  8059.             this.complete = false;
  8060.             try {
  8061.                 this.xmlhttp.overrideMimeType && this.xmlhttp.overrideMimeType("text/plain; charset=x-user-defined");
  8062.                 this.xmlhttp.open("GET", a, true);
  8063.                 this.xmlhttp.onreadystatechange = fljs.bind(this.onLoad, this, b);
  8064.                 this.xmlhttp.send(null)
  8065.             } catch (c) {
  8066.                 return false
  8067.             }
  8068.             return true
  8069.         },
  8070.         onLoad: function (a) {
  8071.             if (!(this.xmlhttp.readyState != 4 || this.complete)) {
  8072.                 this.complete =
  8073.                 true;
  8074.                 var b;
  8075.                 b = fljs.agent.browser == "Explorer" ? fljs.base64.atob(this.xmlhttp.responseText) : fljs.agent.browser == "Opera" ? window.atob(this.xmlhttp.responseText) : this.xmlhttp.responseText;
  8076.                 b = new fljs.swf.StringStream(b);
  8077.                 b = new fljs.swf.SwfStream(b);
  8078.                 a(b)
  8079.             }
  8080.         }
  8081.     });
  8082.     var player = fljs.Player.getInstance();
  8083.     player.loadSwf(url, element, width, height, name, params);
  8084.     return player
  8085. }