Guest User

Untitled

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