home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Demo / elearn / Chimie / lib / lib_interf.swf / scripts / frame_1 / DoAction.as
Text File  |  2004-05-12  |  113KB  |  4,401 lines

  1. MovieClip.prototype.dashTo = function(startx, starty, endx, endy, len, gap)
  2. {
  3.    if(arguments.length < 6)
  4.    {
  5.       return false;
  6.    }
  7.    var seglength;
  8.    var deltax;
  9.    var deltay;
  10.    var segs;
  11.    var cx;
  12.    var cy;
  13.    seglength = len + gap;
  14.    deltax = endx - startx;
  15.    deltay = endy - starty;
  16.    delta = Math.sqrt(deltax * deltax + deltay * deltay);
  17.    segs = Math.floor(Math.abs(delta / seglength));
  18.    radians = Math.atan2(deltay,deltax);
  19.    cx = startx;
  20.    cy = starty;
  21.    deltax = Math.cos(radians) * seglength;
  22.    deltay = Math.sin(radians) * seglength;
  23.    var n = 0;
  24.    while(n < segs)
  25.    {
  26.       this.moveTo(cx,cy);
  27.       this.lineTo(cx + Math.cos(radians) * len,cy + Math.sin(radians) * len);
  28.       cx += deltax;
  29.       cy += deltay;
  30.       n++;
  31.    }
  32.    this.moveTo(cx,cy);
  33.    delta = Math.sqrt((endx - cx) * (endx - cx) + (endy - cy) * (endy - cy));
  34.    if(delta > len)
  35.    {
  36.       this.lineTo(cx + Math.cos(radians) * len,cy + Math.sin(radians) * len);
  37.    }
  38.    else if(delta > 0)
  39.    {
  40.       this.lineTo(cx + Math.cos(radians) * delta,cy + Math.sin(radians) * delta);
  41.    }
  42.    this.moveTo(endx,endy);
  43. };
  44. MovieClip.prototype.drawArc = function(x, y, radius, arc, startAngle, yRadius)
  45. {
  46.    if(arguments.length < 5)
  47.    {
  48.       return undefined;
  49.    }
  50.    if(yRadius == undefined)
  51.    {
  52.       yRadius = radius;
  53.    }
  54.    var segAngle;
  55.    var theta;
  56.    var angle;
  57.    var angleMid;
  58.    var segs;
  59.    var ax;
  60.    var ay;
  61.    var bx;
  62.    var by;
  63.    var cx;
  64.    var cy;
  65.    arc = 360;
  66.    segs = Math.ceil(Math.abs(arc) / 45);
  67.    segAngle = arc / segs;
  68.    theta = (- segAngle / 180) * 3.141592653589793;
  69.    angle = 90;
  70.    ax = x - Math.cos(angle) * radius;
  71.    ay = y - Math.sin(angle) * yRadius;
  72.    if(segs > 0)
  73.    {
  74.       var i = 0;
  75.       while(i < segs)
  76.       {
  77.          angle += theta;
  78.          angleMid = angle - theta / 2;
  79.          bx = ax + Math.cos(angle) * radius;
  80.          by = ay + Math.sin(angle) * yRadius;
  81.          cx = ax + Math.cos(angleMid) * (radius / Math.cos(theta / 2));
  82.          cy = ay + Math.sin(angleMid) * (yRadius / Math.cos(theta / 2));
  83.          this.curveTo(cx,cy,bx,by);
  84.          i++;
  85.       }
  86.    }
  87.    return {x:bx,y:by};
  88. };
  89. MovieClip.prototype.drawBurst = function(x, y, sides, innerRadius, outerRadius, angle)
  90. {
  91.    if(arguments < 5)
  92.    {
  93.       return undefined;
  94.    }
  95.    if(sides > 2)
  96.    {
  97.       var step;
  98.       var halfStep;
  99.       var qtrStep;
  100.       var start;
  101.       var n;
  102.       var dx;
  103.       var dy;
  104.       var cx;
  105.       var cy;
  106.       step = 6.283185307179586 / sides;
  107.       halfStep = step / 2;
  108.       qtrStep = step / 4;
  109.       start = angle / 180 * 3.141592653589793;
  110.       this.moveTo(x + Math.cos(start) * outerRadius,y - Math.sin(start) * outerRadius);
  111.       n = 1;
  112.       while(n <= sides)
  113.       {
  114.          cx = x + Math.cos(start + step * n - qtrStep * 3) * (innerRadius / Math.cos(qtrStep));
  115.          cy = y - Math.sin(start + step * n - qtrStep * 3) * (innerRadius / Math.cos(qtrStep));
  116.          dx = x + Math.cos(start + step * n - halfStep) * innerRadius;
  117.          dy = y - Math.sin(start + step * n - halfStep) * innerRadius;
  118.          this.curveTo(cx,cy,dx,dy);
  119.          cx = x + Math.cos(start + step * n - qtrStep) * (innerRadius / Math.cos(qtrStep));
  120.          cy = y - Math.sin(start + step * n - qtrStep) * (innerRadius / Math.cos(qtrStep));
  121.          dx = x + Math.cos(start + step * n) * outerRadius;
  122.          dy = y - Math.sin(start + step * n) * outerRadius;
  123.          this.curveTo(cx,cy,dx,dy);
  124.          n++;
  125.       }
  126.    }
  127. };
  128. MovieClip.prototype.drawGear = function(x, y, sides, innerRadius, outerRadius, angle, holeSides, holeRadius)
  129. {
  130.    if(arguments < 5)
  131.    {
  132.       return undefined;
  133.    }
  134.    if(sides > 2)
  135.    {
  136.       var step;
  137.       var qtrStep;
  138.       var start;
  139.       var n;
  140.       var dx;
  141.       var dy;
  142.       step = 6.283185307179586 / sides;
  143.       qtrStep = step / 4;
  144.       start = angle / 180 * 3.141592653589793;
  145.       this.moveTo(x + Math.cos(start) * outerRadius,y - Math.sin(start) * outerRadius);
  146.       n = 1;
  147.       while(n <= sides)
  148.       {
  149.          dx = x + Math.cos(start + step * n - qtrStep * 3) * innerRadius;
  150.          dy = y - Math.sin(start + step * n - qtrStep * 3) * innerRadius;
  151.          this.lineTo(dx,dy);
  152.          dx = x + Math.cos(start + step * n - qtrStep * 2) * innerRadius;
  153.          dy = y - Math.sin(start + step * n - qtrStep * 2) * innerRadius;
  154.          this.lineTo(dx,dy);
  155.          dx = x + Math.cos(start + step * n - qtrStep) * outerRadius;
  156.          dy = y - Math.sin(start + step * n - qtrStep) * outerRadius;
  157.          this.lineTo(dx,dy);
  158.          dx = x + Math.cos(start + step * n) * outerRadius;
  159.          dy = y - Math.sin(start + step * n) * outerRadius;
  160.          this.lineTo(dx,dy);
  161.          n++;
  162.       }
  163.       if(holeSides > 2)
  164.       {
  165.          if(holeRadius == undefined)
  166.          {
  167.             holeRadius = innerRadius / 3;
  168.          }
  169.          step = 6.283185307179586 / holeSides;
  170.          this.moveTo(x + Math.cos(start) * holeRadius,y - Math.sin(start) * holeRadius);
  171.          n = 1;
  172.          while(n <= holeSides)
  173.          {
  174.             dx = x + Math.cos(start + step * n) * holeRadius;
  175.             dy = y - Math.sin(start + step * n) * holeRadius;
  176.             this.lineTo(dx,dy);
  177.             n++;
  178.          }
  179.       }
  180.    }
  181. };
  182. MovieClip.prototype.drawOval = function(x, y, radius, yRadius)
  183. {
  184.    if(arguments.length < 3)
  185.    {
  186.       return undefined;
  187.    }
  188.    var theta;
  189.    var xrCtrl;
  190.    var yrCtrl;
  191.    var angle;
  192.    var angleMid;
  193.    var px;
  194.    var py;
  195.    var cx;
  196.    var cy;
  197.    if(yRadius == undefined)
  198.    {
  199.       yRadius = radius;
  200.    }
  201.    theta = 0.7853981633974483;
  202.    xrCtrl = radius / Math.cos(theta / 2);
  203.    yrCtrl = yRadius / Math.cos(theta / 2);
  204.    angle = 0;
  205.    this.moveTo(x + radius,y);
  206.    var i = 0;
  207.    while(i < 8)
  208.    {
  209.       angle += theta;
  210.       angleMid = angle - theta / 2;
  211.       cx = x + Math.cos(angleMid) * xrCtrl;
  212.       cy = y + Math.sin(angleMid) * yrCtrl;
  213.       px = x + Math.cos(angle) * radius;
  214.       py = y + Math.sin(angle) * yRadius;
  215.       this.curveTo(cx,cy,px,py);
  216.       i++;
  217.    }
  218. };
  219. MovieClip.prototype.drawPoly = function(x, y, sides, radius, angle)
  220. {
  221.    if(arguments.length < 4)
  222.    {
  223.       return undefined;
  224.    }
  225.    var count = Math.abs(sides);
  226.    if(count > 2)
  227.    {
  228.       var step;
  229.       var start;
  230.       var n;
  231.       var dx;
  232.       var dy;
  233.       step = 6.283185307179586 / sides;
  234.       start = angle / 180 * 3.141592653589793;
  235.       this.moveTo(x + Math.cos(start) * radius,y - Math.sin(start) * radius);
  236.       n = 1;
  237.       while(n <= count)
  238.       {
  239.          dx = x + Math.cos(start + step * n) * radius;
  240.          dy = y - Math.sin(start + step * n) * radius;
  241.          this.lineTo(dx,dy);
  242.          n++;
  243.       }
  244.    }
  245. };
  246. MovieClip.prototype.drawRect = function(x, y, w, h, cornerRadius)
  247. {
  248.    if(arguments.length < 4)
  249.    {
  250.       return undefined;
  251.    }
  252.    if(cornerRadius > 0)
  253.    {
  254.       var theta;
  255.       var angle;
  256.       var cx;
  257.       var cy;
  258.       var px;
  259.       var py;
  260.       if(cornerRadius > Math.min(w,h) / 2)
  261.       {
  262.          cornerRadius = Math.min(w,h) / 2;
  263.       }
  264.       theta = 0.7853981633974483;
  265.       this.moveTo(x + cornerRadius,y);
  266.       this.lineTo(x + w - cornerRadius,y);
  267.       angle = -1.5707963267948966;
  268.       cx = x + w - cornerRadius + Math.cos(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  269.       cy = y + cornerRadius + Math.sin(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  270.       px = x + w - cornerRadius + Math.cos(angle + theta) * cornerRadius;
  271.       py = y + cornerRadius + Math.sin(angle + theta) * cornerRadius;
  272.       this.curveTo(cx,cy,px,py);
  273.       angle += theta;
  274.       cx = x + w - cornerRadius + Math.cos(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  275.       cy = y + cornerRadius + Math.sin(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  276.       px = x + w - cornerRadius + Math.cos(angle + theta) * cornerRadius;
  277.       py = y + cornerRadius + Math.sin(angle + theta) * cornerRadius;
  278.       this.curveTo(cx,cy,px,py);
  279.       this.lineTo(x + w,y + h - cornerRadius);
  280.       angle += theta;
  281.       cx = x + w - cornerRadius + Math.cos(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  282.       cy = y + h - cornerRadius + Math.sin(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  283.       px = x + w - cornerRadius + Math.cos(angle + theta) * cornerRadius;
  284.       py = y + h - cornerRadius + Math.sin(angle + theta) * cornerRadius;
  285.       this.curveTo(cx,cy,px,py);
  286.       angle += theta;
  287.       cx = x + w - cornerRadius + Math.cos(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  288.       cy = y + h - cornerRadius + Math.sin(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  289.       px = x + w - cornerRadius + Math.cos(angle + theta) * cornerRadius;
  290.       py = y + h - cornerRadius + Math.sin(angle + theta) * cornerRadius;
  291.       this.curveTo(cx,cy,px,py);
  292.       this.lineTo(x + cornerRadius,y + h);
  293.       angle += theta;
  294.       cx = x + cornerRadius + Math.cos(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  295.       cy = y + h - cornerRadius + Math.sin(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  296.       px = x + cornerRadius + Math.cos(angle + theta) * cornerRadius;
  297.       py = y + h - cornerRadius + Math.sin(angle + theta) * cornerRadius;
  298.       this.curveTo(cx,cy,px,py);
  299.       angle += theta;
  300.       cx = x + cornerRadius + Math.cos(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  301.       cy = y + h - cornerRadius + Math.sin(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  302.       px = x + cornerRadius + Math.cos(angle + theta) * cornerRadius;
  303.       py = y + h - cornerRadius + Math.sin(angle + theta) * cornerRadius;
  304.       this.curveTo(cx,cy,px,py);
  305.       this.lineTo(x,y + cornerRadius);
  306.       angle += theta;
  307.       cx = x + cornerRadius + Math.cos(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  308.       cy = y + cornerRadius + Math.sin(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  309.       px = x + cornerRadius + Math.cos(angle + theta) * cornerRadius;
  310.       py = y + cornerRadius + Math.sin(angle + theta) * cornerRadius;
  311.       this.curveTo(cx,cy,px,py);
  312.       angle += theta;
  313.       cx = x + cornerRadius + Math.cos(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  314.       cy = y + cornerRadius + Math.sin(angle + theta / 2) * cornerRadius / Math.cos(theta / 2);
  315.       px = x + cornerRadius + Math.cos(angle + theta) * cornerRadius;
  316.       py = y + cornerRadius + Math.sin(angle + theta) * cornerRadius;
  317.       this.curveTo(cx,cy,px,py);
  318.    }
  319.    else
  320.    {
  321.       this.moveTo(x,y);
  322.       this.lineTo(x + w,y);
  323.       this.lineTo(x + w,y + h);
  324.       this.lineTo(x,y + h);
  325.       this.lineTo(x,y);
  326.    }
  327. };
  328. MovieClip.prototype.drawStar = function(x, y, points, innerRadius, outerRadius, angle)
  329. {
  330.    if(arguments.length < 5)
  331.    {
  332.       return undefined;
  333.    }
  334.    var count = Math.abs(points);
  335.    if(count > 2)
  336.    {
  337.       var step;
  338.       var halfStep;
  339.       var start;
  340.       var n;
  341.       var dx;
  342.       var dy;
  343.       step = 6.283185307179586 / points;
  344.       halfStep = step / 2;
  345.       start = angle / 180 * 3.141592653589793;
  346.       this.moveTo(x + Math.cos(start) * outerRadius,y - Math.sin(start) * outerRadius);
  347.       n = 1;
  348.       while(n <= count)
  349.       {
  350.          dx = x + Math.cos(start + step * n - halfStep) * innerRadius;
  351.          dy = y - Math.sin(start + step * n - halfStep) * innerRadius;
  352.          this.lineTo(dx,dy);
  353.          dx = x + Math.cos(start + step * n) * outerRadius;
  354.          dy = y - Math.sin(start + step * n) * outerRadius;
  355.          this.lineTo(dx,dy);
  356.          n++;
  357.       }
  358.    }
  359. };
  360. MovieClip.prototype.drawWedge = function(x, y, startAngle, arc, radius, yRadius)
  361. {
  362.    if(arguments.length < 5)
  363.    {
  364.       return undefined;
  365.    }
  366.    this.moveTo(x,y);
  367.    if(yRadius == undefined)
  368.    {
  369.       yRadius = radius;
  370.    }
  371.    var segAngle;
  372.    var theta;
  373.    var angle;
  374.    var angleMid;
  375.    var segs;
  376.    var ax;
  377.    var ay;
  378.    var bx;
  379.    var by;
  380.    var cx;
  381.    var cy;
  382.    if(Math.abs(arc) > 360)
  383.    {
  384.       arc = 360;
  385.    }
  386.    segs = Math.ceil(Math.abs(arc) / 45);
  387.    segAngle = arc / segs;
  388.    theta = (- segAngle / 180) * 3.141592653589793;
  389.    angle = (- startAngle / 180) * 3.141592653589793;
  390.    if(segs > 0)
  391.    {
  392.       ax = x + Math.cos(startAngle / 180 * 3.141592653589793) * radius;
  393.       ay = y + Math.sin((- startAngle) / 180 * 3.141592653589793) * yRadius;
  394.       this.lineTo(ax,ay);
  395.       var i = 0;
  396.       while(i < segs)
  397.       {
  398.          angle += theta;
  399.          angleMid = angle - theta / 2;
  400.          bx = x + Math.cos(angle) * radius;
  401.          by = y + Math.sin(angle) * yRadius;
  402.          cx = x + Math.cos(angleMid) * (radius / Math.cos(theta / 2));
  403.          cy = y + Math.sin(angleMid) * (yRadius / Math.cos(theta / 2));
  404.          this.curveTo(cx,cy,bx,by);
  405.          i++;
  406.       }
  407.       this.lineTo(x,y);
  408.    }
  409. };
  410. if(typeof Object.debug == "undefined")
  411. {
  412.    Object.debug = function(m)
  413.    {
  414.       trace(m + " [time:" + getTimer() + "]");
  415.    };
  416. }
  417. if(typeof Object.lista == "undefined")
  418. {
  419.    Object.lista = function(m)
  420.    {
  421.       if(m == undefined)
  422.       {
  423.          trace("Your object is undefined");
  424.       }
  425.       else
  426.       {
  427.          trace("*************LISTA*******************\n" + m + " [time:" + getTimer() + "] \n--------------------------------------");
  428.          trace("object " + typeof m + " contains:");
  429.          for(var j in m)
  430.          {
  431.             trace(j + "= " + m[j]);
  432.          }
  433.       }
  434.       trace("***************END*****************");
  435.    };
  436. }
  437. Function.prototype["extends"] = function(superCls)
  438. {
  439.    this.prototype.__proto__ = superCls.prototype;
  440.    this.prototype.__constructor__ = superCls;
  441.    ASSetPropFlags(this.prototype,["__constructor__"],1);
  442. };
  443. Function.prototype["implements"] = function(superCls)
  444. {
  445.    Object.debug(">> Object.implements() called; sub, super: " + [this,superCls]);
  446.    var sb = this.prototype;
  447.    var sp = superCls.prototype;
  448.    for(var i in sp)
  449.    {
  450.       sb[i] = sp[i];
  451.    }
  452. };
  453. Object.Exe = function(funct, interval, cine, p2, p3, p4)
  454. {
  455.    this.proces = setInterval(funct,interval,cine,p2,p3,p4);
  456. };
  457. Object.Exe.prototype.kill = function(cine)
  458. {
  459.    var cine = cine || this.proces;
  460.    clearInterval(cine);
  461.    delete this;
  462. };
  463. MovieClip.prototype.createMc = function(n, x, y)
  464. {
  465.    var depth = this.nextDepth();
  466.    this.createEmptyMovieclip(n,depth);
  467.    var nc = this[n];
  468.    x == undefined ? 0 : (nc._x = x);
  469.    y == undefined ? 0 : (nc._y = y);
  470.    return nc;
  471. };
  472. MovieClip.prototype.isPlaying = function()
  473. {
  474.    if(this._previousframe == undefined)
  475.    {
  476.       this._previousframe = this._currentframe;
  477.    }
  478.    if(this._previousframe == this._currentframe)
  479.    {
  480.       var playing = false;
  481.    }
  482.    else
  483.    {
  484.       playing = true;
  485.    }
  486.    this._previousframe = this._currentframe;
  487.    return playing;
  488. };
  489. MovieClip.prototype.attachMc = function(id, n, x, y)
  490. {
  491.    var depth = this.nextDepth();
  492.    this.attachMovie(id,n,depth);
  493.    var nc = this[n];
  494.    if(x != undefined)
  495.    {
  496.       nc._x = x;
  497.    }
  498.    if(y != undefined)
  499.    {
  500.       nc._y = y;
  501.    }
  502.    return nc;
  503. };
  504. MovieClip.prototype.attachCmp = function(symbolID, name, ┬ºclass┬º, x, y, args)
  505. {
  506.    var nc = this.attachMc(symbolID,name,x,y);
  507.    nc.transform(eval("class"),args);
  508.    return nc;
  509. };
  510. MovieClip.prototype.transform = function(cls, args)
  511. {
  512.    if(typeof cls == "function")
  513.    {
  514.       this.__proto__ = cls.prototype;
  515.       this.tmp = cls;
  516.       this.tmp(args);
  517.       delete this.tmp;
  518.    }
  519.    else
  520.    {
  521.       trace("tansform: Incorrect superClass type or path - " + typeof cls);
  522.    }
  523. };
  524. MovieClip.prototype.mcImplements = function(superCls)
  525. {
  526.    var sb = this;
  527.    var sp = superCls.prototype;
  528.    for(var i in sp)
  529.    {
  530.       sb[i] = sp[i];
  531.    }
  532. };
  533. MovieClip.prototype.copyMc = function(n)
  534. {
  535.    var depth = this.nextDepth();
  536.    var str = String(this);
  537.    var newName = "copy_of_" + str.substring(str.lastIndexOf(".") + 1,str.length) + depth;
  538.    delete str;
  539.    return this.duplicateMovieClip(newName,depth);
  540. };
  541. MovieClip.prototype.attachEvent = function(eventName, myFunction)
  542. {
  543.    this[eventName] = function()
  544.    {
  545.       myFunction(this);
  546.    };
  547. };
  548. MovieClip.prototype.clearMc = function()
  549. {
  550.    for(var i in this)
  551.    {
  552.       if(typeof this[i] == "movieclip")
  553.       {
  554.          this[i].removeMovieClip();
  555.       }
  556.    }
  557. };
  558. MovieClip.prototype.write = function(tx, x, y)
  559. {
  560.    this.createTextField("mytext",this.nextDepth(),x,y,this._width,30);
  561.    with(this)
  562.    {
  563.       mytext.autoSize = "left";
  564.       mytext.type = "dynamic";
  565.       mytext.html = true;
  566.       mytext.wordWrap = true;
  567.       mytext.selectable = false;
  568.       mytext.htmlText = tx;
  569.       mytext.embedFonts = true;
  570.    }
  571.    return this.mytext;
  572. };
  573. MovieClip.prototype.nextDepth = function()
  574. {
  575.    MovieClip.nextDepthCounter = MovieClip.nextDepthCounter + 1;
  576.    return MovieClip.nextDepthCounter;
  577. };
  578. ASSetPropFlags(MovieClip.prototype,null,1,1);
  579. var BO = Object.BaseObject = function(arg)
  580. {
  581.    this.nuanta = arg;
  582.    Object.__MainPlayControler__.registerBO(this);
  583. };
  584. BO.tip = "BaseObject";
  585. BO["extends"](MovieClip);
  586. var BOp = BO.prototype;
  587. BOp.setCursor = function(crs)
  588. {
  589.    this.$hasCursor = true;
  590.    this.$cursor = crs;
  591. };
  592. BOp.removeCursor = function()
  593. {
  594.    this.$hasCursor = false;
  595.    this.$cursor = null;
  596. };
  597. BOp.setLocation = function(x, y)
  598. {
  599.    var tx = this._x;
  600.    var ty = this._y;
  601.    if(x == undefined)
  602.    {
  603.       x = tx;
  604.    }
  605.    else
  606.    {
  607.       this._x = x;
  608.    }
  609.    if(y == undefined)
  610.    {
  611.       y = ty;
  612.    }
  613.    else
  614.    {
  615.       this._y = y;
  616.    }
  617. };
  618. BOp.setScale = function(x, y)
  619. {
  620.    var tx = _xscale;
  621.    var ty = _yscale;
  622.    if(x == undefined)
  623.    {
  624.       x = tx;
  625.    }
  626.    else
  627.    {
  628.       _xscale = x;
  629.    }
  630.    if(y == undefined)
  631.    {
  632.       y = ty;
  633.    }
  634.    else
  635.    {
  636.       _yscale = y;
  637.    }
  638.    if(tx != x || ty != y)
  639.    {
  640.       trace("modificat scala");
  641.    }
  642. };
  643. BOp.setDimensions = function(w, h)
  644. {
  645.    var tw = _width;
  646.    var th = _height;
  647.    if(w == undefined)
  648.    {
  649.       w = tw;
  650.    }
  651.    else
  652.    {
  653.       _width = w;
  654.    }
  655.    if(h == undefined)
  656.    {
  657.       h = th;
  658.    }
  659.    else
  660.    {
  661.       _height = h;
  662.    }
  663.    if(tw != w || th != h)
  664.    {
  665.       trace("modificat widt si/sau height");
  666.    }
  667. };
  668. BOp.setRotation = function(r)
  669. {
  670.    var tr = _rotation;
  671.    if(r == undefined)
  672.    {
  673.       r = tr;
  674.    }
  675.    else
  676.    {
  677.       _rotation = r;
  678.    }
  679.    if(tr != r)
  680.    {
  681.       trace("modificat rotatie");
  682.    }
  683. };
  684. BOp.setAlpha = function(a)
  685. {
  686.    var ta = _alpha;
  687.    if(a == undefined)
  688.    {
  689.       a = ta;
  690.    }
  691.    else
  692.    {
  693.       _alpha = a;
  694.    }
  695.    if(ta != a)
  696.    {
  697.       trace("modificat alpha");
  698.    }
  699. };
  700. BOp.setRGBHex = function(c)
  701. {
  702.    var tc = this.getRGB();
  703.    if(c == undefined)
  704.    {
  705.       c = tc;
  706.    }
  707.    else
  708.    {
  709.       new Color(this).setRGB(c);
  710.    }
  711.    if(tc != c)
  712.    {
  713.       "this._ee.processAppearanceEvent"("colorChanged");
  714.    }
  715. };
  716. BOp.msetRGB = function(c)
  717. {
  718.    var tc = this.getRGB();
  719.    if(c == undefined)
  720.    {
  721.       c = tc;
  722.    }
  723.    else
  724.    {
  725.       new Color(this).setRGB(c);
  726.    }
  727.    if(tc != c)
  728.    {
  729.    }
  730. };
  731. BOp.setColor = function(r, g, b)
  732. {
  733.    this.setRGBHex(r << 16 | g << 8 | b);
  734. };
  735. BOp.mgetRGB = function()
  736. {
  737.    return new Color(this).getRGB();
  738. };
  739. BOp.$remove = function()
  740. {
  741.    this.removeMovieClip();
  742. };
  743. BOp.Rectangle = function(n, x, y, wide, high, fillColor)
  744. {
  745.    this.createMc(n,x,y);
  746.    var u = this[n];
  747.    u.beginFill(fillColor || 6710886,100);
  748.    var x2 = 0 + wide;
  749.    var y2 = 0 + high;
  750.    u.moveTo(0,0);
  751.    u.lineTo(x2,0);
  752.    u.lineTo(x2,y2);
  753.    u.lineTo(0,y2);
  754.    u.lineTo(0,0);
  755.    u.endFill();
  756.    return u;
  757. };
  758. BOp.rec_outline = function(n, x, y, wide, high, lineColor, g)
  759. {
  760.    this.createMc(n,x,y);
  761.    var u = this[n];
  762.    var g = g || 1;
  763.    u.lineStyle(g,lineColor,50);
  764.    var x2 = 0 + wide;
  765.    var y2 = 0 + high;
  766.    u.moveTo(0,0);
  767.    u.lineTo(x2,0);
  768.    u.lineTo(x2,y2);
  769.    u.lineTo(0,y2);
  770.    u.lineTo(0,0);
  771.    u.endFill();
  772.    return u;
  773. };
  774. BOp.line = function(n, x1, y1, x2, y2, lineColor, gros)
  775. {
  776.    this.createMc(n,x1,y1);
  777.    var u = this[n];
  778.    var gros = gros || 1;
  779.    var lineColor = lineColor;
  780.    u.lineStyle(gros,lineColor,80);
  781.    u.moveTo(0,0);
  782.    u.lineTo(x2 - x1,y2 - y1);
  783.    return u;
  784. };
  785. BOp.loadImg = function(src, n, x, y, wide, high)
  786. {
  787.    this.createMc(n,x,y);
  788.    this[n]._alpha = 0;
  789.    this[n].loadMovie(src);
  790.    this.dfer = function()
  791.    {
  792.       if(this[n]._width != 0)
  793.       {
  794.          var wi = this[n]._width;
  795.          var hi = this[n]._height;
  796.          this[n]._width = wide || wi;
  797.          this[n]._height = high || hi;
  798.          this.inte.kill();
  799.          delete this.inte;
  800.          delete this.dfer;
  801.          this[n]._alpha = 100;
  802.          this.ev_LImg();
  803.       }
  804.    };
  805.    this.inte = new Object.Exe(this,"dfer",50);
  806.    return this[n];
  807. };
  808. BOp.interval = function(interval, actiune)
  809. {
  810.    var a;
  811.    var actiune = actiune;
  812.    var count = function(cine, interval, actiune)
  813.    {
  814.       a++;
  815.       if(a >= interval)
  816.       {
  817.          cine.interv.kill();
  818.          actiune();
  819.       }
  820.    };
  821.    this.count = count;
  822.    this.interv = new Object.Exe(this.count,1000,this,interval,actiune);
  823.    this.onUnload = function()
  824.    {
  825.       this.interv.kill();
  826.    };
  827. };
  828. BOp.fade = function(pas, strt, stp, inc)
  829. {
  830.    var pas = pas || 1;
  831.    var strt = strt || 0;
  832.    var remove = false;
  833.    if(stp == 0)
  834.    {
  835.       var remove = true;
  836.    }
  837.    else if(Number(stp) == undefined)
  838.    {
  839.       stp = 100;
  840.    }
  841.    var inc = inc;
  842.    var anim;
  843.    var eu = this;
  844.    if(strt < stp)
  845.    {
  846.       anim = function(eu)
  847.       {
  848.          if(eu._alpha <= stp)
  849.          {
  850.             eu._alpha += pas;
  851.             updateAfterEvent();
  852.          }
  853.          else
  854.          {
  855.             eu.fadez.kill();
  856.             delete eu.fadez;
  857.          }
  858.          if(inc)
  859.          {
  860.             pas++;
  861.          }
  862.       };
  863.    }
  864.    else
  865.    {
  866.       if(strt <= stp)
  867.       {
  868.          this._alpha = strt;
  869.          this.fadez.kill();
  870.          return undefined;
  871.       }
  872.       anim = function(eu)
  873.       {
  874.          if(eu._alpha >= stp)
  875.          {
  876.             eu._alpha -= pas;
  877.             updateAfterEvent();
  878.          }
  879.          else
  880.          {
  881.             eu.fadez.kill();
  882.             delete eu.fadez;
  883.             if(remove)
  884.             {
  885.                eu.removeMovieClip();
  886.             }
  887.          }
  888.          if(inc)
  889.          {
  890.             pas++;
  891.          }
  892.       };
  893.    }
  894.    this._alpha = strt;
  895.    this.anim = anim;
  896.    if(this.fadez != undefined)
  897.    {
  898.       this.fadez.kill();
  899.       delete this.fadez;
  900.    }
  901.    this.fadez = new Object.Exe(this.anim,50,this);
  902.    this.onUnload = function()
  903.    {
  904.       this.fadez.kill();
  905.    };
  906. };
  907. BOp.ev_LImg = function()
  908. {
  909.    ASBroadcaster.initialize(this);
  910.    this.addListener(this);
  911.    this.broadcastMessage("onLoadImg",this);
  912. };
  913. BOp.xmlLoaded = function(obj)
  914. {
  915.    this.__proto__.obj = obj;
  916.    !this.nuanta ? this.msetRGB(obj.getAttribute("cl2") || "0x466099") : this.msetRGB(obj.getAttribute("cl1") || "0x466099");
  917.    globalStyleFormat.darkshadow = obj.getAttribute("cl1");
  918.    globalStyleFormat.shadow = obj.getAttribute("cl1");
  919.    globalStyleFormat.highlight3D = obj.getAttribute("cl2");
  920.    globalStyleFormat.highlight = 13421772;
  921.    globalStyleFormat.face = obj.getAttribute("cl2");
  922.    globalStyleFormat.background = 16777215;
  923.    globalStyleFormat.arrow = obj.getAttribute("cl1");
  924.    globalStyleFormat.backgroundDisabled = 16777215;
  925. };
  926. delete BO;
  927. delete BOp;
  928. Object.ferestreXml = function(xmlSA)
  929. {
  930.    this.xmlSA = xmlSA;
  931. };
  932. Object.ferestreXml.prototype.getVarsById = function(id)
  933. {
  934.    var i = 0;
  935.    while(i < this.xmlSA.fereastra.length)
  936.    {
  937.       if(id == this.xmlSA.fereastra[i].attributes.id)
  938.       {
  939.          var retArr = new Array();
  940.          var myNode = this.xmlSA.fereastra[i];
  941.          retArr.push(myNode.attributes.x);
  942.          retArr.push(myNode.attributes.y);
  943.          retArr.push(myNode.attributes.width);
  944.          retArr.push(myNode.attributes.height);
  945.          retArr.push(myNode.attributes.title);
  946.          retArr.push(myNode.text[0].getValue());
  947.          if(undefined != myNode.img[0])
  948.          {
  949.             var iArr = new Array();
  950.             var myNodec = myNode.img[0];
  951.             iArr.push(myNodec.attributes.src);
  952.             iArr.push(myNodec.attributes.vspace);
  953.             retArr.push(iArr);
  954.          }
  955.          return retArr;
  956.       }
  957.       i++;
  958.    }
  959.    trace("id not found: " + id);
  960.    return null;
  961. };
  962. Object.ferestreXML.prototype.getTooltipById = function(id)
  963. {
  964.    var i = 0;
  965.    while(i < this.xmlSA.tooltip.length)
  966.    {
  967.       if(id == this.xmlSA.tooltip[i].attributes.id)
  968.       {
  969.          var retArr = new Array();
  970.          var myNode = this.xmlSA.tooltip[i];
  971.          retArr.push(myNode.getValue());
  972.          return retArr;
  973.       }
  974.       i++;
  975.    }
  976.    trace("id not found " + id);
  977.    return null;
  978. };
  979. Object.ferestreXML.prototype.getLabelById = function(id)
  980. {
  981.    var i = 0;
  982.    while(i < this.xmlSA.label.length)
  983.    {
  984.       if(id == this.xmlSA.label[i].attributes.id)
  985.       {
  986.          var retArr = new Array();
  987.          var myNode = this.xmlSA.label[i];
  988.          retArr.push(myNode.getValue());
  989.          return retArr;
  990.       }
  991.       i++;
  992.    }
  993.    trace("id not found " + id);
  994.    return null;
  995. };
  996. Object.Glyph = function()
  997. {
  998. };
  999. Object.Glyph["extends"](Object.BaseObject);
  1000. var fp = Object.Glyph.prototype;
  1001. fp.construct = function(cz, tip, sy, x, y, w, h)
  1002. {
  1003.    var tp;
  1004.    var m = this.__proto__;
  1005.    m.cnt = this.cnt = Object.film;
  1006.    var cont = this.cnt;
  1007.    m.cz = cz;
  1008.    m.wid = Number(w) || 250;
  1009.    m.hig = Number(h) || 200;
  1010.    m.sy = sy;
  1011.    switch(tip)
  1012.    {
  1013.       case Object.POP:
  1014.          tp = "fr";
  1015.          break;
  1016.       case Object.TLT:
  1017.          tp = "tlt";
  1018.          break;
  1019.       case Object.Ara:
  1020.          tp = "ara";
  1021.          break;
  1022.       case Object.Msg:
  1023.          tp = "msg";
  1024.          break;
  1025.       case Object.Lbl:
  1026.          tp = "lb";
  1027.          break;
  1028.       default:
  1029.          tp = "gly";
  1030.    }
  1031.    if(cont[tp] == undefined)
  1032.    {
  1033.       if(tp == "fr")
  1034.       {
  1035.          if(cont.tlt)
  1036.          {
  1037.             removeMovieClip(cont.tlt);
  1038.          }
  1039.       }
  1040.       m.fre = this.fre = cont.createMc(tp,x,y);
  1041.       var tip = tip || Object.Glyph;
  1042.       this.fre.transform(tip);
  1043.       this.fre.cntconstruct();
  1044.       this.fre.bgconstruct();
  1045.       this.poz(this.fre,x,y);
  1046.       return true;
  1047.    }
  1048.    return false;
  1049. };
  1050. fp.bgconstruct = function()
  1051. {
  1052.    var cine = this.fre;
  1053.    w = this.wid;
  1054.    h = this.hig;
  1055.    var fundal = cine.createMc("fundal",0,0);
  1056.    mfundal.transform(Object.BaseObject);
  1057.    fundal.swapDepths(this.cont);
  1058.    fundal.transform(Object.BaseObject);
  1059.    fundal.msetRGB(this.obj.getAttribute("cl2") || "0x466099");
  1060.    var c1 = fundal.attachCmp("c1","colt1",Object.BaseObject,0,0,args);
  1061.    if(c1 == undefined)
  1062.    {
  1063.       c1 = fundal.rectangle("colt1",0,0,15,15);
  1064.    }
  1065.    var c3 = fundal.attachCmp("c3","colt3",Object.BaseObject,w,h,args);
  1066.    if(c3 == undefined)
  1067.    {
  1068.       c3 = fundal.rectangle("colt3",w,h,15,15);
  1069.    }
  1070.    var c4 = fundal.attachCmp("c4","colt4",Object.BaseObject,0,h,args);
  1071.    if(c4 == undefined)
  1072.    {
  1073.       c4 = fundal.rectangle("colt4",0,h,15,15);
  1074.    }
  1075.    var c2 = fundal.attachCmp("c2","colt2",Object.BaseObject,w,0,args);
  1076.    if(c2 == undefined)
  1077.    {
  1078.       c2 = fundal.rectangle("colt2",w,0,15,15);
  1079.    }
  1080.    var d1 = fundal.rectangle("dr1",c1._width,c1._y,c2._x - c1._x - c1._width,c1._height,16777215);
  1081.    var d2 = fundal.rectangle("dr2",c2._x,c2._y + c2._height,c2._width,c3._y - c2._y - c2._height);
  1082.    var d3 = fundal.rectangle("dr3",c4._width,c4._y,c3._x - c4._x - c4._width,c4._height,16777215);
  1083.    var d4 = fundal.rectangle("dr4",0,c1._height,c1._width,c4._y - c1._y - c4._height,16777215);
  1084.    var centru = fundal.rectangle("centru",c1._width - 1,c1._height - 1,c2._x - c1._x - c1._width + 2,c4._y - c1._y - c1._height + 2,16777215);
  1085.    fundal.onPress = null;
  1086.    fundal.enabled = false;
  1087.    return fundal;
  1088. };
  1089. fp.poz = function(cine, x, y)
  1090. {
  1091.    var stw = 1024;
  1092.    var sth = 718;
  1093.    if(x + cine._width > stw)
  1094.    {
  1095.       x -= cine._x + cine._width - stw;
  1096.    }
  1097.    if(y + cine._height > sth)
  1098.    {
  1099.       y -= cine._y + cine._height - sth + 40;
  1100.    }
  1101.    cine.setLocation(x,y);
  1102. };
  1103. fp.vis_link = function()
  1104. {
  1105.    this.vlink = this.fre.vlink = new Object.VL(this.fre);
  1106. };
  1107. fp.kill = function(cine)
  1108. {
  1109.    this.bara.fadez.kill();
  1110.    removeMovieClip(this.vlink.layer);
  1111.    removeMovieClip(this);
  1112.    fscommand("show");
  1113.    getURL("FSCommand:appletDo",1);
  1114. };
  1115. delete fp;
  1116. Object.PlayCtrlX = function(xFile)
  1117. {
  1118.    ASBroadcaster.initialize(this);
  1119.    var xi = new Object.XMLloader(xFile,this);
  1120. };
  1121. Object.PlayCtrlX.prototype.swXmlLoaded = function(xmlSA)
  1122. {
  1123.    this.xmlSA = xmlSA;
  1124.    this.movies = this.xmlSA.movie;
  1125.    this.mcMomArr = new Array();
  1126.    this.mcMovMomArr = new Array();
  1127.    this.mcMomTitArr = new Array();
  1128.    this.mcMovArr = new Array();
  1129.    this.cStopMoments = new Array();
  1130.    this.type = parseInt(this.xmlSA.attributes.type);
  1131.    this.broadcastMessage("xmlLoaded",this);
  1132.    this.parent = eval(this.xmlSA.attributes.parent);
  1133.    this.mainCnt = this.parent._container_;
  1134.    this.__miniTile__ = this.parent.minititle;
  1135.    this.parent.title__.text = this.xmlSA.attributes.title;
  1136.    if(this.type <= 2)
  1137.    {
  1138.       var pCont = eval(this.parent + "." + this.xmlSA.attributes.play);
  1139.       var pCr = pCont.attachMc("play_ctrl","_play_cntrl_",0,0);
  1140.       this.playMcCntrl = new Object.PlayButton(pCr.playMc,this);
  1141.       if(this.type == 1)
  1142.       {
  1143.          pCr.rollover.onRollOver = function()
  1144.          {
  1145.             _root.menu.gotoAndPlay("start");
  1146.             this.enabled = false;
  1147.          };
  1148.       }
  1149.       else if(this.type == 2)
  1150.       {
  1151.          pCr.rollover.master = this;
  1152.          pCr.rollover.onRelease = function()
  1153.          {
  1154.             this.master.playMv(0);
  1155.          };
  1156.       }
  1157.    }
  1158.    else
  1159.    {
  1160.       this.parent.bottom.bg._visible = false;
  1161.       this.parent.bottom.bar_h._visible = false;
  1162.       this.parent.bottom.bar_over_h._visible = false;
  1163.    }
  1164.    if(this.type == 1)
  1165.    {
  1166.       this.movingMc = new Object.MomentsBar(eval(this.parent + "." + this.xmlSA.attributes.moving),this);
  1167.    }
  1168.    var x = 0;
  1169.    while(x < this.movies.length)
  1170.    {
  1171.       var y = 0;
  1172.       while(y < this.movies[x].moment.length)
  1173.       {
  1174.          if(this.movies[x].moment[y].attributes.type == 1)
  1175.          {
  1176.             this.mcMomTitArr.push(this.movies[x].moment[y].attributes.title);
  1177.             this.mcMovArr.push(x);
  1178.             this.mcMovMomArr.push(y);
  1179.          }
  1180.          y++;
  1181.       }
  1182.       x++;
  1183.    }
  1184.    this.parent.playCntrlLoaded();
  1185.    this.mcMovThr = setInterval(this,"initMov",100,0);
  1186. };
  1187. Object.PlayCtrlX.prototype.initMov = function(plMv, type)
  1188. {
  1189.    if(this.cLoadedMovie !== this.movies[this.mcMovArr[plMv]].attributes.src)
  1190.    {
  1191.       if(this.cLevel != null)
  1192.       {
  1193.          var lev = this.cLevel;
  1194.          this.oldLevel = this.cLevel;
  1195.       }
  1196.       var newLevel = this.mainCnt.createMc("_loaded_" + plMv,0,0);
  1197.       loadMovie(this.movies[this.mcMovArr[plMv]].attributes.src,newLevel);
  1198.       this.cLoadedMovie = this.movies[this.mcMovArr[plMv]].attributes.src;
  1199.       this.onStopMoment = false;
  1200.       this.cStopMoments = new Array();
  1201.       var myCMoment = this.movies[this.mcMovArr[plMv]].moment[this.mcMovMomArr[plMv]].getValue();
  1202.       var m = 0;
  1203.       while(m < this.movies[this.mcMovArr[plMv]].moment.length)
  1204.       {
  1205.          var myM = this.movies[this.mcMovArr[plMv]].moment[m].getValue();
  1206.          this.cStopMoments.push(myM);
  1207.          m++;
  1208.       }
  1209.       this.cLevel = newLevel;
  1210.       this.nLevel = plMv;
  1211.    }
  1212.    var lev = this.cLevel;
  1213.    lev.gotoAndStop(1);
  1214.    var part = lev.getBytesLoaded();
  1215.    var total = lev.getBytesTotal();
  1216.    if(part > 0 && total / part == 1)
  1217.    {
  1218.       if(undefined != this.oldLevel)
  1219.       {
  1220.          trace("unload: " + this.oldLevel);
  1221.          unloadMovie(this.oldLevel);
  1222.          this.oldLevel = null;
  1223.       }
  1224.       clearInterval(this.mcMovThr);
  1225.       this.mcMovThr = null;
  1226.       this.change(lev);
  1227.       if(this.cStopMoments[0] != 1 && this.movies[this.mcMovArr[plMv]].attributes.src != this.movies[this.mcMovArr[plMv - 1]].attributes.src && type != 1)
  1228.       {
  1229.          trace("play intro");
  1230.          lev.gotoAndPlay(1,this);
  1231.       }
  1232.       else
  1233.       {
  1234.          this.playMv(plMv);
  1235.       }
  1236.    }
  1237. };
  1238. Object.PlayCtrlX.prototype.change = function(lev)
  1239. {
  1240.    lev.__playing__ = new Boolean();
  1241.    ASBroadcaster.initialize(lev);
  1242.    lev.addListener(this);
  1243.    lev.master = this;
  1244.    lev.__plCntrl__ = this;
  1245.    Object.film = lev;
  1246.    lev.old_stop = lev.stop;
  1247.    ASSetPropFlags(lev,stop,0,4);
  1248.    lev.stop = function()
  1249.    {
  1250.       if(arguments[0] != this.__plCntrl__ && this.__plCntrl__.type < 3)
  1251.       {
  1252.          trace("Bad Stop!");
  1253.          return undefined;
  1254.       }
  1255.       this.old_stop();
  1256.       this.__playing__ = false;
  1257.       this.broadcastMessage("mcstop");
  1258.    };
  1259.    lev.old_play = lev.play;
  1260.    ASSetPropFlags(lev,stop,0,4);
  1261.    lev.play = function()
  1262.    {
  1263.       if(arguments[0] != this.__plCntrl__ && this.__plCntrl__.type < 3)
  1264.       {
  1265.          trace("Bad Play!");
  1266.          return undefined;
  1267.       }
  1268.       this.old_play();
  1269.       this.__playing__ = true;
  1270.       this.broadcastMessage("mcplay");
  1271.    };
  1272.    lev.old_gotoAndPlay = lev.gotoAndPlay;
  1273.    ASSetPropFlags(lev,gotoAndPlay,0,4);
  1274.    lev.gotoAndPlay = function()
  1275.    {
  1276.       if(arguments[1] != this.__plCntrl__ && this.__plCntrl__.type < 3)
  1277.       {
  1278.          trace("Bad gotoAndPlay! " + arguments[0]);
  1279.          return undefined;
  1280.       }
  1281.       this.old_gotoAndPlay(arguments[0]);
  1282.       this.__playing__ = true;
  1283.       this.broadcastMessage("mcgotoAndPlay",arguments[0]);
  1284.    };
  1285.    lev.old_gotoAndStop = lev.gotoAndStop;
  1286.    ASSetPropFlags(lev,gotoAndStop,0,4);
  1287.    lev.gotoAndStop = function()
  1288.    {
  1289.       if(arguments[1] != this.__plCntrl__ && this.__plCntrl__.type < 3)
  1290.       {
  1291.          trace("Bad gotoAndStop! " + arguments[0]);
  1292.          return undefined;
  1293.       }
  1294.       this.old_gotoAndStop(arguments[0]);
  1295.       this.__playing__ = false;
  1296.       this.broadcastMessage("mcgotoAndStop",arguments[0]);
  1297.    };
  1298.    lev.transform(Object.BaseObject);
  1299.    lev.oldEnterFrame = lev.onEnterFrame;
  1300.    lev.onEnterFrame = function()
  1301.    {
  1302.       lev.oldEnterFrame();
  1303.       this.__plCntrl__.loadedMovieIsAtFrame(this.__plCntrl__.cLevel._currentframe);
  1304.    };
  1305.    lev.isPlaying = function()
  1306.    {
  1307.       return this.__playing__;
  1308.    };
  1309.    Object.film = lev;
  1310.    if(Object.component.behaviour == 0)
  1311.    {
  1312.       var xi = new Object.XMLloader(this.movies[this.mcMovArr[this.nLevel]].attributes.csrc,lev);
  1313.       lev.swXmlLoaded = function(xmlSA)
  1314.       {
  1315.          Object.contentFerXml = new Object.ferestreXml(xmlSA);
  1316.          lev.broadcastMessage("update",lev);
  1317.          Object.__MainPlayControler__.broadcastMessage("update",lev);
  1318.       };
  1319.    }
  1320.    this.parent.newMovieLoaded(lev);
  1321. };
  1322. Object.PlayCtrlX.prototype.mcstop = function()
  1323. {
  1324.    trace("stoped " + this.cLevel._currentframe);
  1325.    this.playMcCntrl.setState("Stop");
  1326. };
  1327. Object.PlayCtrlX.prototype.mcplay = function()
  1328. {
  1329.    trace("play " + this.cLevel._currentframe);
  1330.    this.playMcCntrl.setState("Play");
  1331. };
  1332. Object.PlayCtrlX.prototype.mcgotoAndStop = function()
  1333. {
  1334.    trace("gotoAndStop " + arguments[0] + " " + this.cLevel._currentframe);
  1335.    this.checkM(arguments[0]);
  1336.    this.playMcCntrl.setState("Stop");
  1337. };
  1338. Object.PlayCtrlX.prototype.mcgotoAndPlay = function()
  1339. {
  1340.    trace("gotoAndPlay " + arguments[0] + " " + this.cLevel._currentframe);
  1341.    this.checkM(arguments[0]);
  1342.    this.playMcCntrl.setState("Play");
  1343. };
  1344. Object.PlayCtrlX.prototype.loadedMovieIsAtFrame = function(cf)
  1345. {
  1346.    var myClev = this.cLevel;
  1347.    if(myClev._totalframes == myClev._currentframe)
  1348.    {
  1349.       this.stopMc();
  1350.       var t = this.nLevel + 1;
  1351.       if(t == this.mcMovArr.length)
  1352.       {
  1353.          this.playMcCntrl.setState("Disable");
  1354.       }
  1355.    }
  1356.    if(this.type == 3)
  1357.    {
  1358.       return undefined;
  1359.    }
  1360.    if(this._lastframe != cf)
  1361.    {
  1362.       this.checkM(cf);
  1363.    }
  1364.    this._lastframe = cf;
  1365.    var cf = cf + 1;
  1366.    if(this.cLevel.isPlaying() == true)
  1367.    {
  1368.       var i = 0;
  1369.       while(i < this.cStopMoments.length)
  1370.       {
  1371.          if(cf == this.cStopMoments[i])
  1372.          {
  1373.             this.stopMc();
  1374.             return undefined;
  1375.          }
  1376.          i++;
  1377.       }
  1378.    }
  1379. };
  1380. Object.PlayCtrlX.prototype.playMv = function(plMv, type)
  1381. {
  1382.    removeMovieClip(Object.film.fr);
  1383.    if(this.cLoadedMovie == this.movies[this.mcMovArr[plMv]].attributes.src && this.mcMovThr == null)
  1384.    {
  1385.       var myCMoment = this.movies[this.mcMovArr[plMv]].moment[this.mcMovMomArr[plMv]].getValue();
  1386.       this.cLevel.gotoAndPlay(myCMoment,this);
  1387.    }
  1388.    else if(this.mcMovThr == null)
  1389.    {
  1390.       this.mcMovThr = setInterval(this,"initMov",100,plMv,type);
  1391.       this.movingMc.delCurrent();
  1392.    }
  1393. };
  1394. Object.PlayCtrlX.prototype.playMc = function()
  1395. {
  1396.    removeMovieClip(Object.film.fr);
  1397.    if(this.cLevel.isPlaying() == true || this.mcMovThr != null)
  1398.    {
  1399.       return undefined;
  1400.    }
  1401.    var cf = this.cLevel._currentframe;
  1402.    var tf = this.cLevel._totalframes;
  1403.    if(cf == tf)
  1404.    {
  1405.       if(this.lookAtNextMovieAndSeeIfItIsEnabled_ForCristea(this.nlevel) == false)
  1406.       {
  1407.          return undefined;
  1408.       }
  1409.       var plMv = this.nLevel;
  1410.       while(this.movies[this.mcMovArr[plMv]].attributes.src == this.cLoadedMovie)
  1411.       {
  1412.          plMv++;
  1413.       }
  1414.       if(plMv < this.mcMovArr.length)
  1415.       {
  1416.          this.mcMovThr = setInterval(this,"initMov",100,plMv,0);
  1417.          this.movingMc.delCurrent();
  1418.       }
  1419.       else
  1420.       {
  1421.          this.playMcCntrl.setState("Disable");
  1422.       }
  1423.    }
  1424.    else if(this.findMainMoment(cf + 1) != null)
  1425.    {
  1426.       var c = this.findMainMoment(cf + 1);
  1427.       if(this.getEnabled(cf + 1) == true)
  1428.       {
  1429.          this.cLevel.play(this);
  1430.       }
  1431.       else
  1432.       {
  1433.          trace("Disabled");
  1434.       }
  1435.    }
  1436.    else
  1437.    {
  1438.       this.cLevel.play(this);
  1439.    }
  1440. };
  1441. Object.PlayCtrlX.prototype.stopMc = function()
  1442. {
  1443.    if(this.cLevel.isPlaying() == false || this.mcMovThr != null)
  1444.    {
  1445.       return undefined;
  1446.    }
  1447.    this.cLevel.stop(this);
  1448. };
  1449. Object.PlayCtrlX.prototype.checkM = function(cf)
  1450. {
  1451.    var m = this.findMainMoment(cf);
  1452.    if(null != m)
  1453.    {
  1454.       this.movingMc.setCurrent(m);
  1455.    }
  1456. };
  1457. Object.PlayCtrlX.prototype.getEnabled = function(cf)
  1458. {
  1459.    var m = this.findMainMoment(cf);
  1460.    if(null != m)
  1461.    {
  1462.       var en = this.movingMc.getEnabled(m);
  1463.       return en;
  1464.    }
  1465.    return false;
  1466. };
  1467. Object.PlayCtrlX.prototype.setEnabled = function(m)
  1468. {
  1469.    this.movingMc.setEnabled(m);
  1470. };
  1471. Object.PlayCtrlX.prototype.lookAtNextMovieAndSeeIfItIsEnabled_ForCristea = function()
  1472. {
  1473.    var en = this.movingMc.getEnabled(this.nLevel + 1);
  1474.    return en;
  1475. };
  1476. Object.PlayCtrlX.prototype.findMainMoment = function(cf)
  1477. {
  1478.    var mLevel = this.nlevel;
  1479.    var mMoment = null;
  1480.    var m = 0;
  1481.    while(m < this.movies[this.mcMovArr[this.nLevel]].moment.length)
  1482.    {
  1483.       if(this.movies[this.mcMovArr[mLevel]].moment[m].attributes.type == 1 && this.movies[this.mcMovArr[this.nLevel]].moment[m].getValue() == cf)
  1484.       {
  1485.          mMoment = m;
  1486.          while(this.movies[this.mcMovArr[mLevel - 1]].attributes.src == this.movies[this.mcMovArr[this.nlevel]].attributes.src)
  1487.          {
  1488.             mLevel--;
  1489.          }
  1490.          break;
  1491.       }
  1492.       m++;
  1493.    }
  1494.    if(mMoment != null)
  1495.    {
  1496.       var y = mLevel;
  1497.       while(y < this.mcMovMomArr.length)
  1498.       {
  1499.          if(cf == this.movies[this.mcMovArr[this.nLevel]].moment[this.mcMovMomArr[y]].getValue())
  1500.          {
  1501.             trace("Found " + y);
  1502.             return y;
  1503.          }
  1504.          y++;
  1505.       }
  1506.    }
  1507.    return null;
  1508. };
  1509. Object.PlayCtrlX.prototype.registerBO = function(cine)
  1510. {
  1511.    this.addListener(cine);
  1512. };
  1513. Object.PlayCtrlX.prototype.getAttribute = function(att)
  1514. {
  1515.    if(att == "cl1" or att == "cl2")
  1516.    {
  1517.       return "0x" + this.xmlSA.attributes[att];
  1518.    }
  1519.    return this.xmlSA.attributes[att];
  1520. };
  1521. Object.Error = function()
  1522. {
  1523.    trace(arguments[0]);
  1524. };
  1525. Object.PlayButton = function(instance, cntrl)
  1526. {
  1527.    if("movieclip" == typeof instance)
  1528.    {
  1529.       this.playMc = instance;
  1530.    }
  1531.    else
  1532.    {
  1533.       new Object.Error("initialization error in Object.PlayButton: " + typeOf(instance));
  1534.    }
  1535.    if("object" == typeof cntrl)
  1536.    {
  1537.       this.playCntrl = cntrl;
  1538.    }
  1539.    else
  1540.    {
  1541.       new Object.Error("initialization error in Object.PlayButton");
  1542.    }
  1543.    this.mcPlayMovThr = setInterval(this,"initPlayMc",100);
  1544. };
  1545. Object.PlayButton.prototype.initPlayMc = function()
  1546. {
  1547.    clearInterval(this.mcPlayMovThr);
  1548.    this.myOldRelease = this.playMc.onRelease;
  1549.    this.playMc.master = this;
  1550.    this.state = "Pause";
  1551.    this.playMc.__plCntrl__ = this.playCntrl;
  1552.    this.playMc.onRelease = function()
  1553.    {
  1554.       this.myOldRelease();
  1555.       if(this.master.state == "Play")
  1556.       {
  1557.          this.__plCntrl__.stopMc();
  1558.       }
  1559.       else if(this.master.state == "Stop" || this.master.state == "Pause")
  1560.       {
  1561.          this.__plCntrl__.playMc();
  1562.       }
  1563.       else
  1564.       {
  1565.          return undefined;
  1566.       }
  1567.    };
  1568. };
  1569. Object.PlayButton.prototype.setState = function(state)
  1570. {
  1571.    this.playMc.gotoAndStop(state);
  1572.    this.state = state;
  1573. };
  1574. Object.MomentsBar = function(cont, cntrl)
  1575. {
  1576.    this.movingMc = cont;
  1577.    this.cntrl = cntrl;
  1578.    this.mcMomArr = new Array();
  1579.    this.mcMomEnabled = new Array();
  1580.    this.mcMovMomArr = new Array();
  1581.    this.mcMomTitArr = new Array();
  1582.    var movies = this.cntrl.xmlSA.movie;
  1583.    var x = 0;
  1584.    while(x < movies.length)
  1585.    {
  1586.       var y = 0;
  1587.       while(y < movies[x].moment.length)
  1588.       {
  1589.          var toLoad = null;
  1590.          if(movies[x].moment[y].attributes.type == 1)
  1591.          {
  1592.             toLoad = movies[x].moment[y].attributes.src;
  1593.             var mEnabled = Boolean(mTitle = movies[x].moment[y].attributes.enabled);
  1594.             this.loadMovieInPlayBar(toLoad,y,movies[x].moment[y].attributes.title,mEnabled);
  1595.          }
  1596.          y++;
  1597.       }
  1598.       x++;
  1599.    }
  1600.    this.mcMomThr = setInterval(this,"initMom",100);
  1601. };
  1602. Object.MomentsBar.prototype.loadMovieInPlayBar = function(toLoad, cMvMov, mTitle, mEnabled)
  1603. {
  1604.    this.tx != undefined ? (this.tx += 105) : (this.tx = 0);
  1605.    var tMc = this.movingMc.createMc("__mc" + this.tx,this.tx,0);
  1606.    this.mcMomArr.push(tMc);
  1607.    this.mcMomEnabled.push(mEnabled);
  1608.    this.mcMomTitArr.push(mTitle);
  1609.    this.mcMovMomArr.push(cMvMov);
  1610.    loadMovie(toLoad,tMc);
  1611. };
  1612. Object.MomentsBar.prototype.initMom = function()
  1613. {
  1614.    var total = 0;
  1615.    var part = 0;
  1616.    for(var mc in this.mcMomArr)
  1617.    {
  1618.       total += this.mcMomArr[mc].getBytesTotal();
  1619.       part += this.mcMomArr[mc].getBytesLoaded();
  1620.    }
  1621.    if(part > 0 && total / part == 1)
  1622.    {
  1623.       clearInterval(this.mcMomThr);
  1624.       var mc = 0;
  1625.       while(mc < this.mcMomArr.length)
  1626.       {
  1627.          this.init(mc);
  1628.          if(this.mcMomEnabled[mc] == true)
  1629.          {
  1630.             this.setEnabled(mc);
  1631.          }
  1632.          mc++;
  1633.       }
  1634.    }
  1635. };
  1636. Object.MomentsBar.prototype.setCurrent = function(mc)
  1637. {
  1638.    this.currentMc._x = this.currentMc.x;
  1639.    this.currentMc._y = this.currentMc.y;
  1640.    this.currentMc._xscale = this.currentMc._yscale = 100;
  1641.    this.mcMomArr[mc]._x -= 3;
  1642.    this.mcMomArr[mc]._y -= 7;
  1643.    this.mcMomArr[mc]._xscale = 105;
  1644.    this.mcMomArr[mc]._yscale = 105;
  1645.    this.currentMc = this.mcMomArr[mc];
  1646. };
  1647. Object.MomentsBar.prototype.delCurrent = function()
  1648. {
  1649.    this.currentMc._x = this.currentMc.x;
  1650.    this.currentMc._y = this.currentMc.y;
  1651.    this.currentMc._xscale = this.currentMc._yscale = 100;
  1652. };
  1653. Object.MomentsBar.prototype.getEnabled = function(m)
  1654. {
  1655.    return this.mcMomEnabled[m];
  1656. };
  1657. Object.MomentsBar.prototype.init = function(mc)
  1658. {
  1659.    this.mcMomArr[mc].x = this.mcMomArr[mc]._x;
  1660.    this.mcMomArr[mc].y = this.mcMomArr[mc]._y;
  1661.    this.mcMomArr[mc].__mcLnk__ = parseInt(mc);
  1662.    this.mcMomArr[mc].__plCntrl__ = this.cntrl;
  1663.    this.mcMomArr[mc].__title__ = this.mcMomTitArr[mc];
  1664.    this.mcMomArr[mc].oldRollOver = this.mcMomArr[mc].onRollOver;
  1665.    this.mcMomArr[mc].onRollOver = function()
  1666.    {
  1667.       this.oldRollOver();
  1668.       this.__plCntrl__.__miniTile__.text = this.__title__;
  1669.    };
  1670.    this.mcMomArr[mc].oldRollOut = this.mcMomArr[mc].onRollOut;
  1671.    this.mcMomArr[mc].onRollOut = function()
  1672.    {
  1673.       this.oldRollOut();
  1674.       this.__plCntrl__.__miniTile__.text = "";
  1675.    };
  1676. };
  1677. Object.MomentsBar.prototype.setEnabled = function(mc)
  1678. {
  1679.    this.mcMomEnabled[mc] = true;
  1680.    this.mcMomArr[mc].oldRelease = this.mcMomArr[mc].onRelease;
  1681.    this.mcMomArr[mc].onRelease = function()
  1682.    {
  1683.       this.__plCntrl__.playMv(this.__mcLnk__,1);
  1684.    };
  1685. };
  1686. Object.POP = function()
  1687. {
  1688. };
  1689. Object.POP["extends"](Object.Glyph);
  1690. var POPp = Object.POP.prototype;
  1691. POPp.construct = function(cz, sy, tit, x, y, w, h)
  1692. {
  1693.    var tip = Object.POP;
  1694.    var exist = super.construct(cz,tip,sy,x,y,w,h);
  1695.    if(exist)
  1696.    {
  1697.       this.fre.tit = tit;
  1698.       this.fre.barconstruct();
  1699.       this.fre.cont.setSize(this.fre.wid,this.fre.hig - this.fre.bara._height + 10);
  1700.       this.fre.cont.refreshPane();
  1701.    }
  1702. };
  1703. POPp.bgconstruct = function()
  1704. {
  1705.    var fnd = super.bgconstruct();
  1706.    this.dev = 4;
  1707.    this.fre.fundal.dr1._y += this.dev;
  1708. };
  1709. POPp.cntconstruct = function()
  1710. {
  1711.    var cine = this.fre;
  1712.    var sy = this.sy;
  1713.    var xoffset = 8;
  1714.    var yoffset = 10;
  1715.    var isinlib = false;
  1716.    var img;
  1717.    var vspace = this.vspace = Number(Object.contentFerXml.getVarsById(sy)[6][1]) || 10;
  1718.    if(Object.library[sy].img == undefined)
  1719.    {
  1720.       img = Object.contentFerXml.getVarsById(sy)[6][0];
  1721.    }
  1722.    else
  1723.    {
  1724.       img = Object.library[sy].img;
  1725.       vspace += Object.library[sy].vspace;
  1726.    }
  1727.    var c = cine.attachMc("FScrollPaneSymbol","cont",xoffset,yoffset);
  1728.    c.boundingBox_mc.transform(Object.BaseObject);
  1729.    c.boundingBox_mc.msetRGB("0xffffff");
  1730.    c.setScrollContent("work_load");
  1731.    c.setDragContent(false);
  1732.    c.tmp_mc.transform(Object.BaseObject);
  1733.    c.tmp_mc.rectangle("spacer",0,0,this.wid,10,"0xffffff");
  1734.    if(img != undefined)
  1735.    {
  1736.       if(img.indexOf(".") == -1)
  1737.       {
  1738.          isinlib = true;
  1739.          img = img.substr(img.lastIndexOf("/") + 1);
  1740.          var i = c.tmp_mc.attachMc(img,"imag",10,10);
  1741.          vspace += i._height;
  1742.       }
  1743.       else
  1744.       {
  1745.          var i = c.tmp_mc.loadImg(img,"imag",10,10);
  1746.       }
  1747.    }
  1748.    if(Object.component.behaviour == 1)
  1749.    {
  1750.       c.tmp_mc.attachMc("mc" + sy,"txt",10,vspace);
  1751.    }
  1752.    else
  1753.    {
  1754.       if(!isinlib)
  1755.       {
  1756.          c.tmp_mc.onLoadImg = function()
  1757.          {
  1758.             vspace += i._height;
  1759.             c.tmp_mc.write(Object.contentFerXml.getVarsById(sy)[5],10,vspace);
  1760.             this._parent._parent.onLoadCnt();
  1761.             c.refreshPane();
  1762.          };
  1763.       }
  1764.       else
  1765.       {
  1766.          c.tmp_mc.write(Object.contentFerXml.getVarsById(sy)[5],10,vspace);
  1767.       }
  1768.       if(img == undefined)
  1769.       {
  1770.          c.tmp_mc.write(Object.contentFerXml.getVarsById(sy)[5],10,vspace);
  1771.       }
  1772.    }
  1773.    this.wid = c.tmp_mc._width + 30;
  1774.    return c;
  1775. };
  1776. POPp.barconstruct = function()
  1777. {
  1778.    var cine = this.fre;
  1779.    var culoare = this.obj.getAttribute("cl1") || "0xccaacc";
  1780.    var xoffset = 10;
  1781.    var yoffset = 10;
  1782.    var bara = cine.createMc("bara",cine.fundal.colt1._width,2);
  1783.    bara.transform(Object.BaseObject);
  1784.    var bc1 = bara.attachCmp("b_c_1","colt1",Object.BaseObject,0,0,args);
  1785.    if(bc1 == undefined)
  1786.    {
  1787.       bc1 = bara.rectangle("colt1",0,0,15,25,culoare);
  1788.    }
  1789.    bc1.msetRGB(culoare);
  1790.    var bc2 = bara.attachCmp("b_c_2","colt2",Object.BaseObject,cine.fundal.colt2._x - cine.fundal.colt1._x - cine.fundal.colt1._width,0,args);
  1791.    if(bc2 == undefined)
  1792.    {
  1793.       bc2 = bara.rectangle("colt2",cine.fundal.colt2._x - cine.fundal.colt1._x - cine.fundal.colt1._width,0,15,25,culoare);
  1794.    }
  1795.    bc2._x -= bc2._width;
  1796.    bc2.msetRGB(culoare);
  1797.    var r = bara.rectangle("bar",bc1._width,0,bc2._x - bc1._x - bc1._width,bc1._height,culoare);
  1798.    var cls_e = cine.attachCmp("close_er","cls_er",Object.BaseObject,cine.fundal.colt2._x,bara._y + bara._height / 2);
  1799.    cls_e.cls.onPress = function()
  1800.    {
  1801.       bara._parent.kill(cine);
  1802.       if(cine.blk != undefined)
  1803.       {
  1804.          cine.blk.removeMovieClip();
  1805.       }
  1806.    };
  1807.    cine.cont._y = bara._height + bara._y + this.dev;
  1808.    this.setTitle(this.tit);
  1809.    bara.onPress = function()
  1810.    {
  1811.       bara.fade(1,60,60);
  1812.       this.dx = _xmouse - bara._parent._x;
  1813.       this.dy = _ymouse - bara._parent._y;
  1814.       this.che = Object.film.createMc("chenar",bara._parent._x,bara._parent._y);
  1815.       this.che.transform(Object.BaseObject);
  1816.       this.che.rec_outline("chenar",0,0,bara._parent.fundal._width,bara._parent.fundal._height,13421772);
  1817.       startDrag(this.che,0,0,36,1024 - this.che._width,768 - this.che._height - 30);
  1818.    };
  1819.    bara.onRollOver = function()
  1820.    {
  1821.       bara.fade(1,95,60,true);
  1822.    };
  1823.    bara.onRollOut = function()
  1824.    {
  1825.       bara.fade(1,bara._alpha,100,true);
  1826.    };
  1827.    bara.onReleaseOutside = bara.onRelease = function()
  1828.    {
  1829.       bara.fade(1,bara._alpha,100,true);
  1830.       bara._parent._x = this.che._x;
  1831.       bara._parent._y = this.che._y;
  1832.       removeMovieClip(this.che);
  1833.       bara._parent.vlink.update();
  1834.    };
  1835.    bara.fade(1,40,100,true);
  1836.    return bara;
  1837. };
  1838. POPp.setTitle = function(tit, culoare)
  1839. {
  1840.    var culoare = culoare || this.bara._parent.obj.getAttribute("cl2");
  1841.    var fnt = this.bara._parent.obj.getAttribute("font");
  1842.    if(this.bara.mytext != undefined)
  1843.    {
  1844.       this.bara.mytext.removeTextField();
  1845.    }
  1846.    this.bara.createTextField("mytext",this.nextDepth(),5,3,this.bara._width - 30,35);
  1847.    with(this.bara)
  1848.    {
  1849.       myformat = new TextFormat();
  1850.       myformat.color = 16777215;
  1851.       myformat.font = "eLearning_Black";
  1852.       myformat.size = "14";
  1853.       myformat.bold = true;
  1854.       mytext._alpha = 100;
  1855.       mytext.multiline = true;
  1856.       mytext.type = "dynamic";
  1857.       mytext.html = true;
  1858.       mytext.wordWrap = true;
  1859.       mytext.selectable = false;
  1860.       mytext.embedFonts = true;
  1861.       mytext.htmlText = tit;
  1862.       mytext.setTextFormat(myformat);
  1863.    }
  1864. };
  1865. POPp.poz = null;
  1866. POPp.vis_link = null;
  1867. Object.MO = function(id)
  1868. {
  1869.    this.init(id);
  1870. };
  1871. Object.MO.tip = "MouseInteraction";
  1872. Object.MO["extends"](Object.BaseObject);
  1873. var MOp = Object.MO.prototype;
  1874. MOp.init = function(id)
  1875. {
  1876.    this.behave();
  1877.    this.parseID(id);
  1878.    ASBroadcaster.initialize(this);
  1879.    this.b_manager = new Object();
  1880.    this.b_manager.ids = new Object();
  1881.    this.b_manager.ids.id = 0;
  1882. };
  1883. MOp.addEvent = function(type, funct)
  1884. {
  1885.    var c = this.b_manager[this.b_manager.ids.id++] = new Object();
  1886.    c[type] = funct;
  1887.    this.addListener(c);
  1888. };
  1889. MOp.behave = function()
  1890. {
  1891.    this.onPress = function()
  1892.    {
  1893.       this.BroadcastMessage("onpress",this);
  1894.    };
  1895.    this.onRollOver = function()
  1896.    {
  1897.       this.BroadcastMessage("onrollover",this);
  1898.    };
  1899.    this.onRollOut = function()
  1900.    {
  1901.       this.BroadcastMessage("onrollout",this);
  1902.    };
  1903.    this.onRelease = function()
  1904.    {
  1905.       this.BroadcastMessage("onrelease",this);
  1906.    };
  1907. };
  1908. MOp.parseID = function(id)
  1909. {
  1910.    var set_id = new Object();
  1911.    prs2 = function(id)
  1912.    {
  1913.       switch(id.substring(0,1))
  1914.       {
  1915.          case "f":
  1916.             set_id.fer = id;
  1917.             return set_id.fer;
  1918.          case "t":
  1919.             set_id.tlt = id;
  1920.             return set_id.tlt;
  1921.          case "p":
  1922.             set_id.fer = id;
  1923.             this.make_group(id);
  1924.             return set_id.fer;
  1925.          case "m":
  1926.             set_id.msg = id;
  1927.             return set_id.msg;
  1928.          default:
  1929.             trace(id + " - parametru introdus incorect!");
  1930.       }
  1931.    };
  1932.    var v = id;
  1933.    var i;
  1934.    var j;
  1935.    var par = new Array();
  1936.    while(i < v.length)
  1937.    {
  1938.       if(isNaN(parseInt(v.charAt(i))))
  1939.       {
  1940.          if(j >= 2)
  1941.          {
  1942.             break;
  1943.          }
  1944.          j++;
  1945.          par[j - 1] = v.charAt(i);
  1946.       }
  1947.       else
  1948.       {
  1949.          par[j - 1] += v.charAt(i);
  1950.       }
  1951.       i++;
  1952.    }
  1953.    for(var k in par)
  1954.    {
  1955.       if(par[k].length < 2)
  1956.       {
  1957.          trace(par[k] + " - parametru introdus incorect");
  1958.          break;
  1959.       }
  1960.       prs2(par[k]);
  1961.    }
  1962.    if(set_id.fer != undefined)
  1963.    {
  1964.       this.id_fer = set_id.fer;
  1965.    }
  1966.    if(set_id.tlt != undefined)
  1967.    {
  1968.       this.id_tlt = set_id.tlt;
  1969.    }
  1970.    if(set_id.msg != undefined)
  1971.    {
  1972.       this.id_msg = set_id.msg;
  1973.    }
  1974.    return set_id;
  1975. };
  1976. MOp.make_group = function(id)
  1977. {
  1978.    trace("referinta este " + this.cz);
  1979.    if(!Object.arahnides)
  1980.    {
  1981.       Object.arahnides = new Object();
  1982.    }
  1983.    if(!Object.arahnides[id])
  1984.    {
  1985.       Object.arahnides[id] = new Object();
  1986.       Object.arahnides[id].content = new Array();
  1987.       Object.arahnides[id].content[0] = this.cz;
  1988.    }
  1989.    else
  1990.    {
  1991.       Object.arahnides[id].content.push(this.cz);
  1992.    }
  1993. };
  1994. Object.CZ = function(id)
  1995. {
  1996.    this.init(id);
  1997. };
  1998. Object.CZ.tip = "ClickableZone";
  1999. Object.CZ["extends"](Object.MO);
  2000. var CZp = Object.CZ.prototype;
  2001. CZp.init = function(id)
  2002. {
  2003.    this.useHandCursor = false;
  2004.    if(id == undefined)
  2005.    {
  2006.       trace("Nu a fost introdus ID in " + this);
  2007.       return undefined;
  2008.    }
  2009.    super.init(id);
  2010.    if(this.id_tlt != undefined)
  2011.    {
  2012.       this.addEvent("onrollover",this.tltp);
  2013.       this.addEvent("onrollout",this.dtltp);
  2014.    }
  2015.    if(this.id_fer != undefined)
  2016.    {
  2017.       this.addEvent("onpress",this.fer);
  2018.       this.addEvent("onrollover",this.label);
  2019.       this.addEvent("onrollout",this.dlabel);
  2020.       this.addEvent("onpress",this.dlabel);
  2021.    }
  2022. };
  2023. CZp.label = function(cine)
  2024. {
  2025.    Object.film.attachMovie("palma","cursor_palma",123);
  2026.    Mouse.hide();
  2027.    with(Object.film.cursor_palma)
  2028.    {
  2029.       _rotation = -135;
  2030.       _xscale = _yscale = 30;
  2031.    }
  2032.    Object.film.cursor_palma.startDrag(true);
  2033.    Object.film.cursor_palma.onMouseMove = function()
  2034.    {
  2035.       updateAfterEvent();
  2036.    };
  2037. };
  2038. CZp.dlabel = function()
  2039. {
  2040.    Mouse.show();
  2041.    Object.film.cursor_palma.removeMovieClip();
  2042. };
  2043. CZp.fer = function(cine)
  2044. {
  2045.    fscommand("ascund");
  2046.    getURL("FSCommand:appletDo",0);
  2047.    var cine = cine || this;
  2048.    this.cz = cine;
  2049.    var sy = cine.id_fer;
  2050.    if(Object.component.behaviour == 1)
  2051.    {
  2052.       var f = Object.library[sy];
  2053.       if(sy != undefined)
  2054.       {
  2055.          if(sy.substring(0,1) == "f")
  2056.          {
  2057.             new Object.POP().construct(cine,sy,f.title,f.x,f.y,f.width,f.height);
  2058.          }
  2059.          else
  2060.          {
  2061.             new Object.Ara().construct(cine,sy,f.title,f.x,f.y,f.width,f.height);
  2062.          }
  2063.       }
  2064.    }
  2065.    else if(sy != undefined)
  2066.    {
  2067.       var parametrii = Object.contentFerXml.getVarsById(sy);
  2068.       if(sy.substring(0,1) == "f")
  2069.       {
  2070.          new Object.POP().construct(cine,sy,parametrii[4],parametrii[0],parametrii[1],parametrii[2],parametrii[3]);
  2071.       }
  2072.       else
  2073.       {
  2074.          new Object.Ara().construct(cine,sy,parametrii[4],parametrii[0],parametrii[1],parametrii[2],parametrii[3]);
  2075.       }
  2076.    }
  2077. };
  2078. CZp.tltp = function(cine)
  2079. {
  2080.    this.yoff = 15;
  2081.    this.xoff = 10;
  2082.    var cine = cine || this;
  2083.    this.cz = cine;
  2084.    var sy = cine.id_tlt;
  2085.    if(Object.component.behaviour == 1)
  2086.    {
  2087.       var tx = Object.library[sy].text;
  2088.       if(tx != undefined)
  2089.       {
  2090.          cine.tooltip = new Object.TLT().construct(cine,tx,_level0._xmouse + this.xoff,_level0._ymouse + this.yoff);
  2091.       }
  2092.    }
  2093.    else if(sy != undefined)
  2094.    {
  2095.       var tx = Object.contentFerXml.getTooltipById(cine.id_tlt);
  2096.       cine.tooltip = new Object.TLT().construct(cine,tx,_xmouse + this.xoff,_ymouse + this.yoff);
  2097.    }
  2098. };
  2099. Czp.dtltp = function(cine)
  2100. {
  2101.    Object.film.tlt.fadez.kill();
  2102.    removeMovieClip(Object.film.tlt);
  2103. };
  2104. Object.Btn = function(id)
  2105. {
  2106.    this.init(id);
  2107. };
  2108. Object.Btn.tip = "button_zone";
  2109. Object.Btn["extends"](Object.MO);
  2110. var Bp = Object.Btn.prototype;
  2111. Bp.init = function(id)
  2112. {
  2113.    super.init(id);
  2114.    this.addEvent("onrollover",this.rlov);
  2115.    this.addEvent("onrollout",this.rlou);
  2116.    this.addEvent("onpress",this.down);
  2117.    this.addEvent("onrelease",this.rlou);
  2118. };
  2119. Bp.setText = function(tx)
  2120. {
  2121.    this.Label = tx;
  2122. };
  2123. Bp.getText = function()
  2124. {
  2125.    return this.Label;
  2126. };
  2127. Bp.rlov = function(cine)
  2128. {
  2129.    var cine = cine || this;
  2130.    cine.gotoAndStop("over");
  2131. };
  2132. Bp.rlou = function(cine)
  2133. {
  2134.    var cine = cine || this;
  2135.    cine.gotoAndStop("up");
  2136. };
  2137. Bp.down = function(cine)
  2138. {
  2139.    var cine = cine || this;
  2140.    cine.gotoAndStop("down");
  2141. };
  2142. Object.TLT = function()
  2143. {
  2144. };
  2145. Object.TLT["extends"](Object.Glyph);
  2146. var TLTp = Object.TLT.prototype;
  2147. TLTp.construct = function(cz, sy, x, y)
  2148. {
  2149.    if(sy == undefined)
  2150.    {
  2151.       return undefined;
  2152.    }
  2153.    var tip = Object.TLT;
  2154.    var exist = super.construct(cz,tip,sy,x,y,w,h);
  2155. };
  2156. TLTp.cntconstruct = function()
  2157. {
  2158.    var cine = this;
  2159.    var tx = this.sy;
  2160.    cine.createMc("cont",5,5);
  2161.    with(cine.cont)
  2162.    {
  2163.       var txt = Function.replaceFunny(tx);
  2164.       var w = 250;
  2165.       myformat = new TextFormat();
  2166.       myformat.bold = true;
  2167.       myformat.font = "eLEARNING_Medium";
  2168.       myformat.size = 25;
  2169.       myformat.bullet = false;
  2170.       createTextField("mytext",1,0,0,5,10);
  2171.       mytext.autoSize = "left";
  2172.       mytext.type = "dynamic";
  2173.       mytext.selectable = false;
  2174.       mytext.html = true;
  2175.       mytext.wordWrap = true;
  2176.       mytext.setTextFormat(myformat);
  2177.       mytext.htmlText = txt;
  2178.       mytext.embedFonts = true;
  2179.    }
  2180.    var w = cine.cont.mytext.textWidth;
  2181.    if(w > 250)
  2182.    {
  2183.       w = 250;
  2184.    }
  2185.    else
  2186.    {
  2187.       w += 30;
  2188.    }
  2189.    cine.cont.mytext._width = w;
  2190.    this.wid = w;
  2191.    this.hig = cine.cont.mytext._height - 10;
  2192. };
  2193. TLTp.bgconstruct = function()
  2194. {
  2195.    var fnd = super.bgconstruct();
  2196.    fnd.fade(2,50,100,true);
  2197. };
  2198. TLTp.poz = function(cine, x, y)
  2199. {
  2200.    var stw = 1024;
  2201.    var sth = 718;
  2202.    if(x + cine._width > stw)
  2203.    {
  2204.       x -= cine._x + cine._width - stw;
  2205.    }
  2206.    if(y + cine._height > sth)
  2207.    {
  2208.       trace("situatie anormala" + this.fre);
  2209.       y = _ymouse - 10 - this.fre._height;
  2210.    }
  2211.    cine.setLocation(x,y);
  2212. };
  2213. TLTp.vis_link = null;
  2214. Object.Msg = function()
  2215. {
  2216. };
  2217. Object.Msg.tip = "Messages";
  2218. Object.Msg["extends"](Object.Glyph);
  2219. var Mp = Object.Msg.prototype;
  2220. Mp.construct = function(sy, tit, ico)
  2221. {
  2222.    var tip = Object.Msg;
  2223.    var x = x || 100;
  2224.    var y = y || 200;
  2225.    var m = this.__proto__;
  2226.    if(ico == undefined)
  2227.    {
  2228.       m.icon = "icon_alert";
  2229.       trace("Nu ati introdus parametrul pentru Iconitza");
  2230.    }
  2231.    else
  2232.    {
  2233.       m.icon = ico;
  2234.    }
  2235.    m.wid = w;
  2236.    m.hig = h;
  2237.    m.ico = ico;
  2238.    var exist = super.construct(cz,tip,sy,x,y,w,h);
  2239.    if(exist)
  2240.    {
  2241.       this.fre.tit = tit;
  2242.       this.cont.boundingBox_mc._visible = false;
  2243.       this.bar = this.fre.barconstruct(this.fre,tit,w,h,x,y);
  2244.       this.fre.cont.boundingBox_mc._visible = false;
  2245.       this.bt_ok();
  2246.       this.centrez(this.fre);
  2247.       this.fnc_blc();
  2248.       return true;
  2249.    }
  2250.    return false;
  2251. };
  2252. Mp.bgconstruct = Object.POP.prototype.bgconstruct;
  2253. Mp.barconstruct = Object.POP.prototype.barconstruct;
  2254. Mp.setTitle = Object.POP.prototype.setTitle;
  2255. Mp.icoconstruct = function(cine)
  2256. {
  2257.    var margine = 15;
  2258.    var ico = cine.attachMc(this.icon,"icn",0,0);
  2259.    ico._x += margine;
  2260.    ico._y += margine;
  2261.    return ico;
  2262. };
  2263. Mp.bt_ok = function()
  2264. {
  2265.    var eu = this.fre;
  2266.    var margine = 4;
  2267.    var ms = 30;
  2268.    var mj = 15;
  2269.    var inchid = eu.createMc("shell",0,eu._height);
  2270.    var bg = inchid.createMc("bkgrnd");
  2271.    bg.transform(Object.BaseObject);
  2272.    var buton = inchid.attachMc("ok_er","k_er",2,2);
  2273.    var clt = bg.attachMc("c4","colt",0,0);
  2274.    inchid._x = eu.fundal._width - buton._width - margine * 2;
  2275.    inchid._y = eu.fundal._height - buton._height - clt._height;
  2276.    clt._y = buton._height - clt._height / 2 - margine / 2;
  2277.    bg.rectangle("r1",bg.colt._x + bg.colt._width,bg.colt._y,eu.fundal._width - inchid._x - bg.colt._width,bg.colt._height);
  2278.    bg.rectangle("r2",0,0,bg._width,bg.r1._y + 1);
  2279.    bg.msetRGB(this.obj.getAttribute("cl1") || "0x466099");
  2280.    bg.fade(2,50,100,true);
  2281.    buton.ok.onPress = function()
  2282.    {
  2283.       eu.kill(eu);
  2284.       eu.blk.removeMovieClip();
  2285.    };
  2286. };
  2287. Mp.cntconstruct = function()
  2288. {
  2289.    var eu = this.fre;
  2290.    var tx = this.sy;
  2291.    eu.createMc("cont",0,eu.bara._height + 5);
  2292.    var ico = this.icoconstruct(eu.cont);
  2293.    var in_space = 15;
  2294.    var up_space = 10;
  2295.    if(Object.component.behaviour == 1)
  2296.    {
  2297.       eu.cont.attachMc("mc" + sy,"txt",ico._width + ico._x + in_space,up_space);
  2298.       return undefined;
  2299.    }
  2300.    var txte = eu.cont.createMc("txbox",ico._width + ico._x + in_space,up_space);
  2301.    txte.transform(Object.BaseObject);
  2302.    with(txte)
  2303.    {
  2304.       var txt = Function.replaceFunny(tx);
  2305.       if(tx.length > 1)
  2306.       {
  2307.          trace(txt);
  2308.          var w = 250;
  2309.       }
  2310.       else
  2311.       {
  2312.          w = 10;
  2313.       }
  2314.       myformat = new TextFormat();
  2315.       myformat.bold = true;
  2316.       myformat.font = "eLEARNING_Black";
  2317.       myformat.size = 14;
  2318.       myformat.bullet = false;
  2319.       createTextField("mytext",1,0,0,w,10);
  2320.       mytext.autoSize = "left";
  2321.       mytext.type = "dynamic";
  2322.       mytext.selectable = false;
  2323.       mytext.html = true;
  2324.       mytext.wordWrap = true;
  2325.       mytext.setTextFormat(myformat);
  2326.       mytext.embedFonts = true;
  2327.       mytext.text = txt;
  2328.       mytext.htmlText = txt;
  2329.       mytext.setTextFormat(myformat);
  2330.    }
  2331.    var margine = 30;
  2332.    if(txte.mytext._height < ico._height)
  2333.    {
  2334.       this.hig = ico._height + margine * 3;
  2335.    }
  2336.    else
  2337.    {
  2338.       this.hig = txte.mytext._height + margine * 3;
  2339.       ico._y = txte._y + txte._height / 2 - ico._height / 2;
  2340.    }
  2341.    this.wid = this._width;
  2342. };
  2343. Mp.centrez = function(cine)
  2344. {
  2345.    cine._x = Stage.width / 2 - cine._width / 2;
  2346.    cine._y = Stage.height / 2 - cine._height / 2;
  2347. };
  2348. Mp.fnc_blc = function()
  2349. {
  2350.    var blk = this.cnt.rectangle("blocker",0,0,Stage.width,Stage.height,16777215);
  2351.    this.fre.blk = blk;
  2352.    blk.swapDepths(this.fre);
  2353.    blk.transform(Object.BaseObject);
  2354.    blk.fade(3,20,40,true);
  2355.    blk.onPress = function()
  2356.    {
  2357.    };
  2358.    blk.enabled = false;
  2359. };
  2360. Mp.vis_link = null;
  2361. delete Mp;
  2362. _global.mesaj = function(mesaj, titlu, icon)
  2363. {
  2364.    var parseID = Object.MO.prototype.parseID;
  2365.    if(mesaj == undefined)
  2366.    {
  2367.       var mesaj = "Introduce├╛i mesajul dorit !";
  2368.    }
  2369.    if(titlu == undefined)
  2370.    {
  2371.       var titlu = "Aten├╛ie - Mesaj de eroare";
  2372.    }
  2373.    mesaj = new String(mesaj);
  2374.    if(mesaj.substring(0,1) == "#")
  2375.    {
  2376.       mesaj = mesaj.substring(1,mesaj.length);
  2377.    }
  2378.    else
  2379.    {
  2380.       var simb = parseID(mesaj);
  2381.       var sy = simb.msg;
  2382.       if(Object.component.behaviour == 1)
  2383.       {
  2384.          mesaj;
  2385.          icon = Object.library[sy].img;
  2386.          titlu = Object.library[sy].title;
  2387.       }
  2388.       else
  2389.       {
  2390.          mesaj = Object.contentFerXml.getVarsById(sy)[5];
  2391.          titlu = Object.contentFerXml.getVarsById(sy)[4];
  2392.          icon = Object.contentFerXml.getVarsById(sy)[6][0];
  2393.       }
  2394.    }
  2395.    if(mesaj == undefined)
  2396.    {
  2397.       return undefined;
  2398.    }
  2399.    return new Object.Msg().construct(mesaj,titlu,icon);
  2400. };
  2401. Object.VL = function(cine)
  2402. {
  2403.    this.fer = cine;
  2404.    this.kill();
  2405.    this.construct();
  2406.    this.layer.mcImplements(Object.VL);
  2407. };
  2408. var vp = Object.VL.prototype;
  2409. vp.construct = function()
  2410. {
  2411.    this.layer = Object.film.createEmptyMovieClip("v_link",900);
  2412.    this.layer.transform(Object.BaseObject);
  2413.    this.layer.swapDepths(this.fer);
  2414.    this.update();
  2415.    updateAfterEvent();
  2416. };
  2417. vp.update = function()
  2418. {
  2419.    var xdif = 15;
  2420.    var ydif = 20;
  2421.    var cine = this.fer;
  2422.    this.clear();
  2423.    this.l1 = this.layer.line("linie1",cine.cz._x,cine.cz._y,cine._x - xdif,cine.cz._y,this.fer.obj.getAttribute("cl1"));
  2424.    this.l2 = this.layer.line("linie2",cine._x - xdif,cine.cz._y,cine._x - xdif,cine._y + ydif,this.fer.obj.getAttribute("cl1"));
  2425.    this.l3 = this.layer.line("linie3",cine._x - xdif,cine._y + ydif,cine._x,cine._y + ydif,this.fer.obj.getAttribute("cl1"));
  2426. };
  2427. vp.clear = function()
  2428. {
  2429.    removeMovieClip(this.l1);
  2430.    removeMovieClip(this.l2);
  2431.    removeMovieClip(this.l3);
  2432. };
  2433. delete vp;
  2434. XML.prototype.getElementsByTagName = function(targetName)
  2435. {
  2436.    function diverDown(node, targetName)
  2437.    {
  2438.       var nodeList = node.childNodes;
  2439.       var i = 0;
  2440.       while(i < nodeList.length)
  2441.       {
  2442.          if(nodeList[i].nodeType == 1 && nodeList[i].hasChildNodes)
  2443.          {
  2444.             if(nodeList[i].nodeName == targetName)
  2445.             {
  2446.                var n = 0;
  2447.                while(n < nodeList[i].parentNode.childNodes.length)
  2448.                {
  2449.                   if(nodeList[i].parentNode.childNodes[n].nodeName == targetName)
  2450.                   {
  2451.                      returnValue[index] = nodeList[i].parentNode.childNodes[n];
  2452.                      index++;
  2453.                   }
  2454.                   n++;
  2455.                }
  2456.                return undefined;
  2457.             }
  2458.             diverDown(nodeList[i],targetName);
  2459.          }
  2460.          i++;
  2461.       }
  2462.       index = 0;
  2463.    }
  2464.    var index = 0;
  2465.    var returnValue = new Array();
  2466.    diverDown(this,targetName);
  2467.    if(returnValue.length == 0)
  2468.    {
  2469.       returnValue = null;
  2470.    }
  2471.    return returnValue;
  2472. };
  2473. XML.prototype.findRootNode = function(XMLNode)
  2474. {
  2475.    var nd = null;
  2476.    trace("in findRootNode");
  2477.    nd = XMLNode.parentNode;
  2478.    while(nd != null)
  2479.    {
  2480.       XMLNode = nd;
  2481.       nd = nd.parentNode;
  2482.    }
  2483.    return XMLNode;
  2484. };
  2485. Object.XMLloader = function(lXML, creator)
  2486. {
  2487.    this.creator = creator;
  2488.    this.cXML = new XML();
  2489.    this.cXML.ignoreWhite = true;
  2490.    this.cXML.parent = this;
  2491.    this.cXML.onLoad = function(success)
  2492.    {
  2493.       if(success)
  2494.       {
  2495.          this.parent.xmlSA = new Object.XMLSA(this);
  2496.       }
  2497.       else
  2498.       {
  2499.          trace("error=" + this.status);
  2500.       }
  2501.    };
  2502.    this.cXML.load(lXML);
  2503.    this.thr = setInterval(this,"checkState",100);
  2504. };
  2505. Object.XMLloader.prototype.checkState = function()
  2506. {
  2507.    if(this.xmlSA != null)
  2508.    {
  2509.       this.creator.swXmlLoaded(this.xmlSA);
  2510.       clearInterval(this.thr);
  2511.    }
  2512. };
  2513. Object.XMLSA = function(watchXML)
  2514. {
  2515.    if(watchXML != undefined)
  2516.    {
  2517.       this.parse(watchXML,true);
  2518.    }
  2519. };
  2520. Object.XMLSA.prototype.getValue = function()
  2521. {
  2522.    if(this.__xml.firstChild.nodeType == 1)
  2523.    {
  2524.       var ret = "";
  2525.       var t = 0;
  2526.       while(t < this.__xml.childNodes.length)
  2527.       {
  2528.          ret += this.__xml.childNodes[t];
  2529.          t++;
  2530.       }
  2531.       return ret;
  2532.    }
  2533.    var ret = "";
  2534.    var t = 0;
  2535.    while(t < this.__xml.childNodes.length)
  2536.    {
  2537.       ret += this.__xml.childNodes[t];
  2538.       t++;
  2539.    }
  2540.    return ret;
  2541. };
  2542. Object.XMLSA.prototype.setValue = function(text)
  2543. {
  2544.    this.__xml.firstChild.nodeValue = text;
  2545. };
  2546. Object.XMLSA.prototype.parse = function(node, replaceRoot)
  2547. {
  2548.    if(replaceRoot)
  2549.    {
  2550.       this.__root = node;
  2551.       node = node.firstChild;
  2552.    }
  2553.    this.__xml = node;
  2554.    this.attributes = node.attributes;
  2555.    if(node.nodeType == 1 and node.firstChild.nodeType == 1)
  2556.    {
  2557.       var childCounter = 0;
  2558.       while(childCounter < node.childNodes.length)
  2559.       {
  2560.          var tempName = node.childNodes[childCounter].nodeName;
  2561.          if(this[tempName] == undefined)
  2562.          {
  2563.             this[tempName] = new Array();
  2564.          }
  2565.          var tempIndex;
  2566.          tempIndex = this[tempName].push(new Object.XMLSA());
  2567.          this[tempName][tempIndex - 1].parse(node.childNodes[childCounter]);
  2568.          childCounter++;
  2569.       }
  2570.    }
  2571. };
  2572. Object.PlayStopClass = function()
  2573. {
  2574.    ASBroadcaster.initialize(this);
  2575.    this.movie = this._parent[this._targetInstanceName];
  2576.    this.check();
  2577.    this.init();
  2578.    this.attachEvents();
  2579. };
  2580. Object.PlayStopClass.prototype = new MovieClip();
  2581. Object.PlayStopClass["extends"](MovieClip);
  2582. Object.PlayStopClass.prototype.check = function()
  2583. {
  2584.    if("function" != typeof this.movie.isPlaying)
  2585.    {
  2586.       trace("error:in PlayStop mc must implement Boolean isPlaying()");
  2587.    }
  2588. };
  2589. Object.PlayStopClass.prototype.init = function()
  2590. {
  2591.    if("function" != typeof this.playHandler.setState)
  2592.    {
  2593.       this.playHandler.setState = function(arg)
  2594.       {
  2595.          this.gotoAndPlay(arg);
  2596.       };
  2597.    }
  2598.    if(this.loop == true)
  2599.    {
  2600.       trace("loop enabled");
  2601.    }
  2602.    ASBroadcaster.initialize(this.movie);
  2603.    this.movie.addListener(this);
  2604.    this.movie.master = this;
  2605.    this.movie.old_stop = this.movie.stop;
  2606.    ASSetPropFlags(this.movie,"stop",0,4);
  2607.    this.movie.stop = function()
  2608.    {
  2609.       this.old_stop();
  2610.       this.isPlaying();
  2611.       this.broadcastMessage("mcStoped","broadcast");
  2612.    };
  2613. };
  2614. Object.PlayStopClass.prototype.attachEvents = function()
  2615. {
  2616.    this.playHandler.master = this;
  2617.    this.playHandler.onRelease = function()
  2618.    {
  2619.       if(this.master.movie.isPlaying())
  2620.       {
  2621.          if(this.master.getContinuous() == true)
  2622.          {
  2623.             this.master.setContinuous(false);
  2624.          }
  2625.          this.master.movie.stop();
  2626.          this.setState("stop");
  2627.       }
  2628.       else
  2629.       {
  2630.          this.master.movie.play();
  2631.          this.setState("play");
  2632.       }
  2633.    };
  2634.    this.checkBox.setChangeHandler("setContinuousCb");
  2635. };
  2636. Object.PlayStopClass.prototype.dettachEvents = function()
  2637. {
  2638.    this.playHandler.onRelease = function()
  2639.    {
  2640.       trace("disabled");
  2641.    };
  2642. };
  2643. Object.PlayStopClass.prototype.mcStoped = function()
  2644. {
  2645.    if(this.movie._currentframe == this.movie._totalframes && true == this.loop)
  2646.    {
  2647.       this.movie.play();
  2648.    }
  2649.    else if(true == this.getContinuous() && this.movie._currentframe != this.movie._totalframes)
  2650.    {
  2651.       this.movie.play();
  2652.    }
  2653.    else
  2654.    {
  2655.       this.playHandler.setState("stop");
  2656.    }
  2657. };
  2658. Object.PlayStopClass.prototype.getContinuous = function()
  2659. {
  2660.    return this.checkBox.getValue();
  2661. };
  2662. Object.PlayStopClass.prototype.setContinuous = function()
  2663. {
  2664.    this.checkBox.setValue(false);
  2665. };
  2666. Object.PlayStopClass.prototype.setContinuousCb = function()
  2667. {
  2668.    if(true == this.getContinuous() && this.movie._currentframe != this.movie._totalframes && false == this.movie.isPlaying())
  2669.    {
  2670.       this.movie.play();
  2671.       this.playHandler.setState("play");
  2672.    }
  2673.    this.broadcastMessage("loop",this.getLoop());
  2674. };
  2675. Object.PlayStopClass.prototype.setState = function(arg)
  2676. {
  2677. };
  2678. var AutorFereastraClass = Object.AutorFereastraClass = function()
  2679. {
  2680.    this.path = "";
  2681.    var myLv = targetPath(this);
  2682.    this.tscr._visible = false;
  2683.    this.behaviour = Object.component.behaviour;
  2684.    this._parent.addListener(this);
  2685.    Object.__MainPlayControler__.addListener(this);
  2686.    this.width = this._width;
  2687.    this.height = this._height;
  2688.    this._xscale = this._yscale = 100;
  2689.    this.cLevel = eval(myLv.substring(0,myLv.indexOf(".")));
  2690.    if(this._width != undefined && this._height != undefined && this.id != undefined)
  2691.    {
  2692.       this.update();
  2693.    }
  2694.    else
  2695.    {
  2696.       trace("w: " + this._width + "\nh: " + this._height + "\nid: " + this.Id);
  2697.    }
  2698. };
  2699. AutorFereastraClass.prototype = new MovieClip();
  2700. AutorFereastraClass["extends"](MovieClip);
  2701. AutorFereastraClass.prototype.setSize = function(w, h)
  2702. {
  2703.    this.width = w;
  2704.    this.height = h;
  2705.    this._xscale = this._yscale = 100;
  2706.    this.update();
  2707. };
  2708. AutorFereastraClass.prototype.update = function()
  2709. {
  2710.    this._xscale = this._yscale = 100;
  2711.    this.show();
  2712. };
  2713. AutorFereastraClass.prototype.show = function()
  2714. {
  2715.    this.scr._visible = false;
  2716.    this.scr.removeMovieClip();
  2717.    this.scr.unloadMovie();
  2718.    this.attachMc("FScrollPaneSymbol","scr",0,0);
  2719.    this.scr.setSize(this.width,this.height);
  2720.    this.behaviour != 1 ? this.xmlShow() : this.libShow();
  2721.    this.scr.refreshPane();
  2722. };
  2723. AutorFereastraClass.prototype.xmlShow = function()
  2724. {
  2725.    if(undefined != Object.contentFerXml)
  2726.    {
  2727.       var tArr = Object.contentFerXml.getVarsById(this.id);
  2728.       this.cText = tArr[5];
  2729.       if(undefined != tArr[6])
  2730.       {
  2731.          this.img = tArr[6][0];
  2732.          this.vspace = parseInt(tArr[6][1]);
  2733.       }
  2734.       else
  2735.       {
  2736.          this.img = undefined;
  2737.       }
  2738.    }
  2739.    else
  2740.    {
  2741.       this.cText = "<font face=\'eLearning Black\'>Loading...</font>";
  2742.    }
  2743.    this.scr.setScrollContent("dummy");
  2744.    var c = this.scr.getScrollContent();
  2745.    c.clear();
  2746.    c.lineStyle(2,6719658);
  2747.    c.drawRect(0,0,this.width - 20,this.height);
  2748.    c._xscale = c._yscale = 100;
  2749.    c._y = c._x = 0;
  2750.    if(undefined != this.img)
  2751.    {
  2752.       c.createMc("imgMc",0,0);
  2753.       this.imgMc = c.imgMc;
  2754.       c.imgMc.loadMovie(this.path + this.img);
  2755.       c._visible = false;
  2756.       var prel = new Object.Preloader(this,c.imgMc);
  2757.    }
  2758.    this.textMc = c.write(this.cText,0,0);
  2759.    c.clear();
  2760. };
  2761. AutorFereastraClass.prototype.loadComplete = function()
  2762. {
  2763.    var mc = this.scr.getScrollContent();
  2764.    this.imgMc._x = this.width / 2 - this.imgMc._width / 2;
  2765.    this.imgMc._y = this.vspace / 2;
  2766.    this.textMc._y = this.vspace + this.imgMc._height;
  2767.    this.textMc._x = 5;
  2768.    mc._visible = true;
  2769. };
  2770. AutorFereastraClass.prototype.libShow = function()
  2771. {
  2772.    var w = Object.library[this.id].width;
  2773.    var h = Object.library[this.id].height;
  2774.    this.scr.setSize(w,h);
  2775.    this.scr.setScrollContent("mc" + this.id);
  2776. };
  2777. AutorFereastraClass.prototype.onUnload = function()
  2778. {
  2779.    this.scr._visible = false;
  2780.    this.scr.removeMovieClip();
  2781.    this.scr.unloadMovie();
  2782. };
  2783. AutorFereastraClass.prototype.setxmlSrc = function(xs)
  2784. {
  2785.    this.xmlSrc = xs;
  2786. };
  2787. AutorFereastraClass.prototype.getSrc = function()
  2788. {
  2789.    return this.xmlSrc;
  2790. };
  2791. AutorFereastraClass.prototype.setId = function(xid)
  2792. {
  2793.    this.xmlId = xid;
  2794. };
  2795. AutorFereastraClass.prototype.getId = function()
  2796. {
  2797.    return this.xmlId;
  2798. };
  2799. AutorFereastraClass.prototype.setWidth = function(w)
  2800. {
  2801.    this.width = w;
  2802. };
  2803. AutorFereastraClass.prototype.getWidth = function()
  2804. {
  2805.    return this.width;
  2806. };
  2807. AutorFereastraClass.prototype.setHeight = function(h)
  2808. {
  2809.    this.height = h;
  2810. };
  2811. AutorFereastraClass.prototype.getHeight = function()
  2812. {
  2813.    return this.height;
  2814. };
  2815. delete AutorFereastraClass;
  2816. var XmlTextBoxClass = Object.XmlTextBoxClass = function()
  2817. {
  2818.    this.path = "";
  2819.    this.watch("id",function(id, o, n)
  2820.    {
  2821.       this.id = n;
  2822.       this.update();
  2823.    }
  2824.    );
  2825.    var myLv = targetPath(this);
  2826.    this.tscr._visible = false;
  2827.    this.behaviour = Object.component.behaviour;
  2828.    this._parent.addListener(this);
  2829.    Object.__MainPlayControler__.addListener(this);
  2830.    this.width = this._width;
  2831.    this.height = this._height;
  2832.    this._xscale = this._yscale = 100;
  2833.    this.cLevel = eval(myLv.substring(0,myLv.indexOf(".")));
  2834.    if(this._width != undefined && this._height != undefined && this.id != undefined)
  2835.    {
  2836.       this.update();
  2837.    }
  2838.    else
  2839.    {
  2840.       trace("w: " + this._width + "\nh: " + this._height + "\nid: " + this.Id);
  2841.    }
  2842. };
  2843. XmlTextBoxClass.prototype = new MovieClip();
  2844. XmlTextBoxClass["extends"](MovieClip);
  2845. XmlTextBoxClass.prototype.setSize = function(w, h)
  2846. {
  2847.    this.width = w;
  2848.    this.height = h;
  2849.    this._xscale = this._yscale = 100;
  2850.    this.update();
  2851. };
  2852. XmlTextBoxClass.prototype.update = function()
  2853. {
  2854.    this._xscale = this._yscale = 100;
  2855.    this.show();
  2856. };
  2857. XmlTextBoxClass.prototype.show = function()
  2858. {
  2859.    this.scr._visible = false;
  2860.    this.scr.removeMovieClip();
  2861.    this.scr.unloadMovie();
  2862.    this.attachMc("FScrollPaneSymbol","scr",0,0);
  2863.    this.scr.boundingBox_mc._visible = false;
  2864.    this.scr.setSize(this.width,this.height);
  2865.    this.behaviour != 1 ? this.xmlShow() : this.libShow();
  2866.    this.scr.refreshPane();
  2867. };
  2868. XmlTextBoxClass.prototype.xmlShow = function()
  2869. {
  2870.    if(undefined != Object.contentFerXml)
  2871.    {
  2872.       var tArr = Object.contentFerXml.getVarsById(this.id);
  2873.       this.cText = tArr[5];
  2874.       if(undefined != tArr[6])
  2875.       {
  2876.          this.img = tArr[6][0];
  2877.          this.vspace = parseInt(tArr[6][1]);
  2878.       }
  2879.       else
  2880.       {
  2881.          this.img = undefined;
  2882.       }
  2883.    }
  2884.    else
  2885.    {
  2886.       this.cText = "<font face=\'eLEARNING_Black\'>Loading...</font>";
  2887.    }
  2888.    this.scr.setScrollContent("dummy");
  2889.    var c = this.scr.getScrollContent();
  2890.    c.clear();
  2891.    c.lineStyle(2,16777215);
  2892.    c.drawRect(0,0,this.width - 20,this.height);
  2893.    c._xscale = c._yscale = 100;
  2894.    c._y = c._x = 0;
  2895.    if(undefined != this.img)
  2896.    {
  2897.       c.createMc("imgMc",0,0);
  2898.       this.imgMc = c.imgMc;
  2899.       c.imgMc.loadMovie(this.path + this.img);
  2900.       c._visible = false;
  2901.       var prel = new Object.Preloader(this,c.imgMc);
  2902.    }
  2903.    this.textMc = c.write(this.cText,0,0);
  2904.    c.clear();
  2905. };
  2906. XmlTextBoxClass.prototype.loadComplete = function()
  2907. {
  2908.    var mc = this.scr.getScrollContent();
  2909.    this.imgMc._x = this.width / 2 - this.imgMc._width / 2;
  2910.    this.textMc._y = this.vspace + this.imgMc._height;
  2911.    this.textMc._x = 5;
  2912.    mc._visible = true;
  2913.    this.scr.refreshPane();
  2914. };
  2915. XmlTextBoxClass.prototype.libShow = function()
  2916. {
  2917.    var w = Object.library[this.id].width;
  2918.    var h = Object.library[this.id].height;
  2919.    this.scr.setSize(w,h);
  2920.    this.scr.setScrollContent("mc" + this.id);
  2921. };
  2922. XmlTextBoxClass.prototype.onUnload = function()
  2923. {
  2924.    this.scr._visible = false;
  2925.    this.scr.removeMovieClip();
  2926.    this.scr.unloadMovie();
  2927. };
  2928. XmlTextBoxClass.prototype.setxmlSrc = function(xs)
  2929. {
  2930.    this.xmlSrc = xs;
  2931. };
  2932. XmlTextBoxClass.prototype.getSrc = function()
  2933. {
  2934.    return this.xmlSrc;
  2935. };
  2936. XmlTextBoxClass.prototype.setId = function(xid)
  2937. {
  2938.    this.xmlId = xid;
  2939. };
  2940. XmlTextBoxClass.prototype.getId = function()
  2941. {
  2942.    return this.xmlId;
  2943. };
  2944. XmlTextBoxClass.prototype.setWidth = function(w)
  2945. {
  2946.    this.width = w;
  2947. };
  2948. XmlTextBoxClass.prototype.getWidth = function()
  2949. {
  2950.    return this.width;
  2951. };
  2952. XmlTextBoxClass.prototype.setHeight = function(h)
  2953. {
  2954.    this.height = h;
  2955. };
  2956. XmlTextBoxClass.prototype.getHeight = function()
  2957. {
  2958.    return this.height;
  2959. };
  2960. Function.prototype.replaceFunny = function(str)
  2961. {
  2962.    var s = str.indexOf("@@");
  2963.    while(s < str.length && s > 0)
  2964.    {
  2965.       var c = parseInt(str.substr(s + 2,3));
  2966.       str = str.substring(0,s) + String.fromCharCode(c) + str.substring(s + 5,str.length);
  2967.       s = str.indexOf("@@",s);
  2968.    }
  2969.    return str;
  2970. };
  2971. var SwLabelClass = Object.SwLabelClass = function()
  2972. {
  2973.    this.behaviour = Object.component.behaviour;
  2974.    this._parent.addListener(this);
  2975.    Object.__MainPlayControler__.addListener(this);
  2976.    this.createTextField("txLabel",this.nextDepth(),0,0,0,0);
  2977.    with(this.txlabel)
  2978.    {
  2979.       autoSize = "left";
  2980.       multiline = false;
  2981.       type = "dynamic";
  2982.       html = true;
  2983.       selectable = false;
  2984.       embedFonts = true;
  2985.    }
  2986.    this.update();
  2987. };
  2988. SwLabelClass.prototype = new MovieClip();
  2989. SwLabelClass["extends"](MovieClip);
  2990. SwLabelClass.prototype.update = function()
  2991. {
  2992.    this._xscale = this._yscale = 100;
  2993.    this.behaviour != 1 ? this.xmlShow() : this.libShow();
  2994. };
  2995. SwLabelClass.prototype.libShow = function()
  2996. {
  2997.    var mtx = Function.replaceFunny(Object.library[this.id].text);
  2998.    this.txLabel.htmlText = mtx;
  2999.    this.txLabel._width = this.txLabel.textWidth + 10;
  3000.    this.txLabel._height = this.txLabel.textHeight;
  3001. };
  3002. SwLabelClass.prototype.xmlShow = function()
  3003. {
  3004.    if(undefined != Object.contentFerXml)
  3005.    {
  3006.       var tArr = Object.contentFerXml.getLabelById(this.id);
  3007.       this.txLabel.htmlText = tArr[0];
  3008.    }
  3009.    else
  3010.    {
  3011.       this.txLabel.htmlText = "<font face=\'Arial\'>Loading...</font>";
  3012.    }
  3013.    this.txLabel._width = this.txLabel.textWidth + 15;
  3014.    this.txLabel._height = this.txLabel.textHeight;
  3015. };
  3016. delete SwLabelClass;
  3017. var TestCmpClass = Object.TestCmpClass = function()
  3018. {
  3019.    this._visible = false;
  3020.    this.arrPlhs = new Array();
  3021.    this.arrDragsB = new Array();
  3022.    this.arrDrags = new Array();
  3023.    this.Id = 0;
  3024. };
  3025. TestCmpClass.prototype = new MovieClip();
  3026. TestCmpClass["extends"](MovieClip);
  3027. TestCmpClass.prototype.addRel = function()
  3028. {
  3029.    var drag = arguments.shift();
  3030.    var btnBeh = arguments.pop();
  3031.    var strType = arguments.pop();
  3032.    var plhs = arguments[0];
  3033.    if(!drag.init_x && typeof drag == "movieclip")
  3034.    {
  3035.       drag.mcExtends(Object.DragClassB,this,plhs,strType,btnBeh);
  3036.       this.setNewDragB(drag);
  3037.    }
  3038.    var i = 0;
  3039.    while(i < plhs.length)
  3040.    {
  3041.       if(!plhs[i].init_x)
  3042.       {
  3043.          plhs[i].mcExtends(Object.PlhClass,this,strType);
  3044.       }
  3045.       this.setNewPlh(plhs[i]);
  3046.       if(typeof drag == "movieclip")
  3047.       {
  3048.          plhs[i].setNewDrag(drag);
  3049.       }
  3050.       i++;
  3051.    }
  3052. };
  3053. TestCmpClass.prototype.setNewPlh = function(plh)
  3054. {
  3055.    var found = 0;
  3056.    var i = 0;
  3057.    while(i < this.arrPlhs.length)
  3058.    {
  3059.       if(this.arrPlhs[i] == plh)
  3060.       {
  3061.          found = 1;
  3062.       }
  3063.       i++;
  3064.    }
  3065.    if(!found)
  3066.    {
  3067.       this.arrPlhs.push(plh);
  3068.    }
  3069.    found = 0;
  3070. };
  3071. TestCmpClass.prototype.setNewDragB = function(drag)
  3072. {
  3073.    var found = 0;
  3074.    var i = 0;
  3075.    while(i < this.arrDragsB.length)
  3076.    {
  3077.       if(this.arrDragsB[1] == drag)
  3078.       {
  3079.          found = 1;
  3080.       }
  3081.       i++;
  3082.    }
  3083.    if(!found)
  3084.    {
  3085.       this.arrDragsB.push(drag);
  3086.    }
  3087.    found = 0;
  3088. };
  3089. TestCmpClass.prototype.setNewDrag = function(drag)
  3090. {
  3091.    var found = 0;
  3092.    var i = 0;
  3093.    while(i < this.arrDrags.length)
  3094.    {
  3095.       if(this.arrDrags[1] == drag)
  3096.       {
  3097.          found = 1;
  3098.       }
  3099.       i++;
  3100.    }
  3101.    if(!found)
  3102.    {
  3103.       this.arrDrags.push(drag);
  3104.    }
  3105.    found = 0;
  3106. };
  3107. TestCmpClass.prototype.removeDrag = function(arg1)
  3108. {
  3109.    var i = 0;
  3110.    while(i < this.arrDrags.length)
  3111.    {
  3112.       if(this.arrDrags[i] == arg1)
  3113.       {
  3114.          this.arrDrags.splice(i,1);
  3115.          return true;
  3116.       }
  3117.       i++;
  3118.    }
  3119.    return false;
  3120. };
  3121. TestCmpClass.prototype.getPlhs = function(strTypev)
  3122. {
  3123.    var arr = new Array();
  3124.    var i = 0;
  3125.    while(i < this.arrPlhs.length)
  3126.    {
  3127.       if(this.arrPlhs[i].strType == strTypev)
  3128.       {
  3129.          arr.push(this.arrPlhs[i]);
  3130.       }
  3131.       i++;
  3132.    }
  3133.    return arr;
  3134. };
  3135. TestCmpClass.prototype.getBros = function(strTypev)
  3136. {
  3137.    var arr = new Array();
  3138.    var i = 0;
  3139.    while(i < this.arrDrags.length)
  3140.    {
  3141.       if(this.arrDrags[i].strType == strTypev)
  3142.       {
  3143.          arr.push(this.arrDrags[i]);
  3144.       }
  3145.       i++;
  3146.    }
  3147.    return arr;
  3148. };
  3149. TestCmpClass.prototype.getBrosB = function(strTypev)
  3150. {
  3151.    var arr = new Array();
  3152.    var i = 0;
  3153.    while(i < this.arrDragsB.length)
  3154.    {
  3155.       if(this.arrDragsB[i].strType == strTypev)
  3156.       {
  3157.          arr.push(this.arrDragsB[i]);
  3158.       }
  3159.       i++;
  3160.    }
  3161.    return arr;
  3162. };
  3163. TestCmpClass.prototype.getNName = function()
  3164. {
  3165.    this.Id = this.Id + 1;
  3166.    return "__created_movie__" + this.Id;
  3167. };
  3168. TestCmpClass.prototype.getNDepth = function()
  3169. {
  3170.    var depth = this.nextDepth();
  3171.    return depth;
  3172. };
  3173. TestCmpClass.prototype.validate = function(strTypev, resB, resG, onlyArr, serverInvolved, txBxDisplayRez)
  3174. {
  3175.    var plhsToCheck = new Array();
  3176.    var badAnswer = false;
  3177.    var arrToSend = new Array();
  3178.    var rezTx = "";
  3179.    if(undefined == onlyArr)
  3180.    {
  3181.       var i = 0;
  3182.       while(i < this.arrPlhs.length)
  3183.       {
  3184.          if(this.arrPlhs[i].strType == strTypev)
  3185.          {
  3186.             plhsToCheck.push(this.arrPlhs[i]);
  3187.          }
  3188.          i++;
  3189.       }
  3190.    }
  3191.    else
  3192.    {
  3193.       plhsToCheck = onlyArr;
  3194.    }
  3195.    if(serverInvolved)
  3196.    {
  3197.       var i = 0;
  3198.       while(i < plhsToCheck.length)
  3199.       {
  3200.          arrToSend.push(plhsToCheck[i],plhsToCheck[i].getCont());
  3201.          i++;
  3202.       }
  3203.       var arrSrez = this.performServerValid(arrToSend);
  3204.       badAnswer = arrSrez[0];
  3205.       rezTx = arrSrez[1];
  3206.    }
  3207.    else
  3208.    {
  3209.       var i = 0;
  3210.       while(i < plhsToCheck.length)
  3211.       {
  3212.          if(badAnswer)
  3213.          {
  3214.             break;
  3215.          }
  3216.          var corDrags = plhsToCheck[i].getDrags();
  3217.          if(corDrags.length > 0)
  3218.          {
  3219.             var cntNs = plhsToCheck[i].getCont();
  3220.             if(cntNs == null)
  3221.             {
  3222.                badAnswer = true;
  3223.             }
  3224.             else
  3225.             {
  3226.                badAnswer = true;
  3227.                var y = 0;
  3228.                while(y < corDrags.length)
  3229.                {
  3230.                   if(corDrags[y] == cntNs.plhF)
  3231.                   {
  3232.                      badAnswer = false;
  3233.                   }
  3234.                   if(corDrags[y] == cntNs)
  3235.                   {
  3236.                      badAnswer = false;
  3237.                   }
  3238.                   y++;
  3239.                }
  3240.             }
  3241.          }
  3242.          else if(corDrags.length == 0)
  3243.          {
  3244.             var cntNs = plhsToCheck[i].getCont();
  3245.             if(cntNs != null)
  3246.             {
  3247.                badAnswer = true;
  3248.             }
  3249.          }
  3250.          i++;
  3251.       }
  3252.       if(badAnswer)
  3253.       {
  3254.          rezTx = "Bad";
  3255.       }
  3256.       else
  3257.       {
  3258.          rezTx = "Good";
  3259.       }
  3260.    }
  3261.    if(badAnswer)
  3262.    {
  3263.       if(resB)
  3264.       {
  3265.          this.reset(strTypev,onlyArr,txBxDisplayRez);
  3266.       }
  3267.       if(undefined != txBxDisplayRez)
  3268.       {
  3269.          txBxDisplayRez.text = rezTx;
  3270.       }
  3271.    }
  3272.    else
  3273.    {
  3274.       if(resG)
  3275.       {
  3276.          this.reset(strTypev,onlyArr,txBxDisplayRez);
  3277.       }
  3278.       if(undefined != txBxDisplayRez)
  3279.       {
  3280.          txBxDisplayRez.text = rezTx;
  3281.       }
  3282.    }
  3283. };
  3284. TestCmpClass.prototype.performServerValid = function(rezArr)
  3285. {
  3286.    var arrMy = new Array();
  3287.    arrMy.push(true);
  3288.    arrMy.push("Good");
  3289.    return arrMy;
  3290. };
  3291. TestCmpClass.prototype.reset = function(strTypev, onlyArr, txBxDisplayRez)
  3292. {
  3293.    if(undefined == onlyArr)
  3294.    {
  3295.       var i = 0;
  3296.       while(i < this.arrPlhs.length)
  3297.       {
  3298.          if(this.arrPlhs[i].strType == strTypev)
  3299.          {
  3300.             this.arrPlhs[i].setCont(null);
  3301.          }
  3302.          i++;
  3303.       }
  3304.    }
  3305.    else
  3306.    {
  3307.       var i = 0;
  3308.       while(i < onlyArr.length)
  3309.       {
  3310.          onlyArr[i].setCont(null);
  3311.          i++;
  3312.       }
  3313.    }
  3314.    if(undefined != txBxDisplayRez)
  3315.    {
  3316.       txBxDisplayRez.text = "";
  3317.    }
  3318. };
  3319. Object.DragClassB = function(plhF, arrPlhs, strType, btnBeh)
  3320. {
  3321.    this.init_x = this._x;
  3322.    this.init_y = this._y;
  3323.    this.btnBeh = btnBeh;
  3324.    this.strType = strType;
  3325.    this.plhF = plhF;
  3326.    this.lastCreated = null;
  3327.    this.corPlhs = arrPlhs;
  3328.    this.cnt = null;
  3329.    this.init();
  3330. };
  3331. Object.DragClassB.prototype.init = function()
  3332. {
  3333.    this.onMouseMove = function()
  3334.    {
  3335.       if(!this.btnBeh)
  3336.       {
  3337.          return undefined;
  3338.       }
  3339.       if(this.getLastCreated() == null && this.hitTest(_root._xmouse,_root._ymouse,false))
  3340.       {
  3341.          var nName = this.plhF.getNName();
  3342.          var nDepth = this.plhF.getNDepth();
  3343.          duplicateMovieClip(this,nName,16384 + nDepth);
  3344.          nName = eval(this._parent + "." + nName);
  3345.          if(nDepth < this.getDepth())
  3346.          {
  3347.             this.swapDepths(nName);
  3348.          }
  3349.          nName.mcExtends(Object.DragClass,this,this.corPlhs,this.strType);
  3350.          this.setNewDrag(nName);
  3351.          this.setLastCreated(nName);
  3352.       }
  3353.       else if(this.getLastCreated() != null && !this.hitTest(_root._xmouse,_root._ymouse,false))
  3354.       {
  3355.          this.removeDrag(this.getLastCreated());
  3356.          removeMovieClip(this.getLastCreated());
  3357.          this.setLastCreated(null);
  3358.       }
  3359.    };
  3360.    this.setLastCreated = function(arg1)
  3361.    {
  3362.       this.lastCreated = arg1;
  3363.    };
  3364.    this.getLastCreated = function()
  3365.    {
  3366.       return this.lastCreated;
  3367.    };
  3368.    this.removeDrag = function(arg1)
  3369.    {
  3370.       return this.plhF.removeDrag(arg1);
  3371.    };
  3372.    this.getBros = function()
  3373.    {
  3374.       if(this.btnBeh)
  3375.       {
  3376.          var arr = this.plhF.getBros(this.strType);
  3377.          return arr;
  3378.       }
  3379.       var arr = this.plhF.getBrosB(this.strType);
  3380.       return arr;
  3381.    };
  3382.    this.getPlhs = function(strTypev)
  3383.    {
  3384.       return this.plhF.getPlhs(strTypev);
  3385.    };
  3386.    this.setNewDrag = function(drag)
  3387.    {
  3388.       this.plhF.setNewDrag(drag);
  3389.    };
  3390.    this.setCnt = function(arg)
  3391.    {
  3392.       this.cnt = arg;
  3393.    };
  3394.    this.getCnt = function()
  3395.    {
  3396.       return this.cnt;
  3397.    };
  3398.    this.rlse = function()
  3399.    {
  3400.       this._x = this.init_x;
  3401.       this._y = this.init_y;
  3402.    };
  3403.    this.onPress = function()
  3404.    {
  3405.       if(this.btnBeh)
  3406.       {
  3407.          return undefined;
  3408.       }
  3409.       startDrag(this,0);
  3410.    };
  3411.    this.onRelease = function()
  3412.    {
  3413.       if(this.btnBeh)
  3414.       {
  3415.          return undefined;
  3416.       }
  3417.       plCobjs = this.plhF.getPlhs(this.strType);
  3418.       i = 0;
  3419.       while(i < plCobjs.length)
  3420.       {
  3421.          plCobj = plCobjs[i];
  3422.          if(plCobj.hitTest(this))
  3423.          {
  3424.             plCobj.setCont(this);
  3425.             stopDrag();
  3426.             this._x = plCobj._x + (plCobj._width / 2 - this._width / 2);
  3427.             this._y = plCobj._y;
  3428.             this._parent[this.strType](plCobj,this.corPlhs);
  3429.             return undefined;
  3430.          }
  3431.          i++;
  3432.       }
  3433.       this.stopDrag();
  3434.       this._parent[this.strType]();
  3435.       this.rlse();
  3436.    };
  3437.    this.onReleaseOutside = this.onRelease;
  3438.    this.onDragOut = function()
  3439.    {
  3440.       if(this.btnBeh)
  3441.       {
  3442.          return undefined;
  3443.       }
  3444.       var bros = this.plhF.getBrosB(this.strType);
  3445.       i = 0;
  3446.       while(i < bros.length)
  3447.       {
  3448.          if(this.hitTest(bros[i]) && this.getDepth() < bros[i].getDepth())
  3449.          {
  3450.             this.swapDepths(bros[i]);
  3451.          }
  3452.          i++;
  3453.       }
  3454.    };
  3455.    this.setCnt = function(arg)
  3456.    {
  3457.       this.cnt = arg;
  3458.    };
  3459.    this.getCnt = function()
  3460.    {
  3461.       return this.cnt;
  3462.    };
  3463. };
  3464. Object.DragClass = function(plhF, arrPlhs, strType)
  3465. {
  3466.    this.init_x = this._x;
  3467.    this.init_y = this._y;
  3468.    this.strType = strType;
  3469.    this.plhF = plhF;
  3470.    this.corPlhs = arrPlhs;
  3471.    this.cnt = null;
  3472.    this.init();
  3473. };
  3474. Object.DragClass.prototype.init = function()
  3475. {
  3476.    this.rlse = function()
  3477.    {
  3478.       this._x = this.init_x;
  3479.       this._y = this.init_y;
  3480.    };
  3481.    this.onPress = function()
  3482.    {
  3483.       this.plhF.setLastCreated(null);
  3484.       startDrag(this,0);
  3485.    };
  3486.    this.onMouseMove = function()
  3487.    {
  3488.       plCobjs = this.plhF.getPlhs(this.strType);
  3489.       var j = this.plhF.plhF.arrPlhs.length - 1;
  3490.       while(j >= 0)
  3491.       {
  3492.          this._parent.normal(this.plhF.plhF.arrPlhs[j]);
  3493.          if(this.plhF.plhF.arrPlhs[j].nucleo.hitTest(this.hit))
  3494.          {
  3495.             this._parent.highlight(this.plhF.plhF.arrPlhs[j]);
  3496.          }
  3497.          j--;
  3498.       }
  3499.    };
  3500.    this.onRelease = function()
  3501.    {
  3502.       plCobjs = this.plhF.getPlhs(this.strType);
  3503.       i = plCobjs.length - 1;
  3504.       while(i >= 0)
  3505.       {
  3506.          plCobj = plCobjs[i];
  3507.          if(plCobj.nucleo.hitTest(this.hit))
  3508.          {
  3509.             trace("release" + plCobj);
  3510.             this._parent.normal(plCobj);
  3511.             this._parent.callback(this,plCobjs[i],this.plhF.plhF.arrPlhs);
  3512.             plCobj.setCont(this);
  3513.             stopDrag();
  3514.             var point = new Object();
  3515.             point.x = plCobj._x;
  3516.             point.y = plCobj._y;
  3517.             plCobj.localToGlobal(point);
  3518.             this.globalToLocal(point);
  3519.             this._x = point.x;
  3520.             this._y = point.y;
  3521.             return undefined;
  3522.          }
  3523.          i--;
  3524.       }
  3525.       var j = this.plhF.plhF.arrPlhs.length - 1;
  3526.       while(j >= 0)
  3527.       {
  3528.          this._parent.normal(this.plhF.plhF.arrPlhs[j]);
  3529.          if(this.plhF.plhF.arrPlhs[j].nucleo.hitTest(this.hit))
  3530.          {
  3531.             this._parent.ncallback(this,this.plhF.plhF.arrPlhs[j]);
  3532.             break;
  3533.          }
  3534.          j--;
  3535.       }
  3536.       this.plhF.removeDrag(this);
  3537.       if(this.getCnt() != null)
  3538.       {
  3539.          this.getCnt().setCont(null);
  3540.       }
  3541.       removeMovieClip(this);
  3542.    };
  3543.    this.onReleaseOutside = this.onRelease;
  3544.    this.onDragOut = function()
  3545.    {
  3546.       var bros = this.plhF.getBros();
  3547.       i = 0;
  3548.       while(i < bros.length)
  3549.       {
  3550.          if(this.hitTest(bros[i]) && this.getDepth() < bros[i].getDepth())
  3551.          {
  3552.             this.swapDepths(bros[i]);
  3553.          }
  3554.          i++;
  3555.       }
  3556.    };
  3557.    this.setCnt = function(arg)
  3558.    {
  3559.       this.cnt = arg;
  3560.    };
  3561.    this.getCnt = function()
  3562.    {
  3563.       return this.cnt;
  3564.    };
  3565. };
  3566. Object.PlhClass = function(plhF, strType)
  3567. {
  3568.    this.init_x = this._x;
  3569.    this.init_y = this._y;
  3570.    this.strType = strType;
  3571.    this.plhF = plhF;
  3572.    this.init();
  3573.    this.Cont = null;
  3574.    this.arrDrags = new Array();
  3575. };
  3576. Object.PlhClass.prototype.init = function()
  3577. {
  3578.    this.setCont = function(cnt)
  3579.    {
  3580.       if(this.Cont != null && this.Cont != cnt && this.Cont.getCnt() == this)
  3581.       {
  3582.          if(this.cont.plhF.removeDrag(this.cont))
  3583.          {
  3584.             removeMovieClip(this.cont);
  3585.          }
  3586.          else
  3587.          {
  3588.             this.cont.rlse();
  3589.          }
  3590.       }
  3591.       this.Cont = cnt;
  3592.       cnt.setCnt(this);
  3593.    };
  3594.    this.getCont = function()
  3595.    {
  3596.       return this.Cont;
  3597.    };
  3598.    this.setNewDrag = function(drag)
  3599.    {
  3600.       var found = 0;
  3601.       var i = 0;
  3602.       while(i < this.arrDrags.length)
  3603.       {
  3604.          if(this.arrDrags[1] == drag)
  3605.          {
  3606.             found = 1;
  3607.          }
  3608.          i++;
  3609.       }
  3610.       if(!found)
  3611.       {
  3612.          this.arrDrags.push(drag);
  3613.       }
  3614.       found = 0;
  3615.    };
  3616.    this.getDrags = function()
  3617.    {
  3618.       return this.arrDrags;
  3619.    };
  3620. };
  3621. MovieClip.prototype.mcExtends = function(superClass)
  3622. {
  3623.    if(typeof superClass == "function")
  3624.    {
  3625.       this.__proto__ = superClass.prototype;
  3626.       if(typeof this.attachMovie == "undefined")
  3627.       {
  3628.          var o = this.__proto__;
  3629.          var p = o.__proto__.__proto__;
  3630.          while(p != null)
  3631.          {
  3632.             p = p.__proto__;
  3633.             o = o.__proto__;
  3634.          }
  3635.          o.__proto__ = MovieClip.prototype;
  3636.       }
  3637.       arguments.splice(0,1);
  3638.       superClass.apply(this,arguments);
  3639.    }
  3640.    else
  3641.    {
  3642.       trace("mcExtends: Incorrect superClass type or path - " + typeof superClass);
  3643.    }
  3644. };
  3645. var TestMcClass = Object.TestMcClass = function()
  3646. {
  3647.    this._visible = false;
  3648.    this.init();
  3649. };
  3650. TestMcClass.prototype = new MovieClip();
  3651. TestMcClass["extends"](MovieClip);
  3652. TestMcClass.prototype.init = function()
  3653. {
  3654.    this.testComp = this._parent[this.testComp];
  3655.    this.mc = this._parent[this._targetInstanceName];
  3656.    var i = 0;
  3657.    while(i < this.plhs.length)
  3658.    {
  3659.       this.plhs[i] = this._parent[this.plhs[i]];
  3660.       i++;
  3661.    }
  3662.    this.testComp.addRel(this.mc,this.plhs,this.test,this.btnBeh);
  3663. };
  3664. Object.FRadioButtonGroupC = function()
  3665. {
  3666.    this.radioInstances = new Array();
  3667.    trace("hey");
  3668. };
  3669. Object.FRadioButtonGroupC.prototype = new FUIComponentClass();
  3670. var FRB = Object.FRadioButtonGroupC.prototype;
  3671. FRB.addRadioInstance = function(instance)
  3672. {
  3673.    this.radioInstances.push(instance);
  3674.    this.radioInstances[0].tabEnabled = true;
  3675. };
  3676. FRB.setEnabled = function(enableFlag)
  3677. {
  3678.    var i = 0;
  3679.    while(i < this.radioInstances.length)
  3680.    {
  3681.       this.radioInstances[i].setEnabled(enableFlag);
  3682.       i++;
  3683.    }
  3684. };
  3685. FRB.getEnabled = function()
  3686. {
  3687.    var i = 0;
  3688.    while(i < this.radioInstances.length)
  3689.    {
  3690.       if(this.radioInstances[i].getEnabled() != this.radioInstances[0].getEnabled())
  3691.       {
  3692.          return undefined;
  3693.       }
  3694.       i++;
  3695.    }
  3696.    return this.radioInstances[0].getEnabled();
  3697. };
  3698. FRB.setClickHandler = function(clickHandler, obj)
  3699. {
  3700.    var i = 0;
  3701.    while(i < this.radioInstances.length)
  3702.    {
  3703.       this.radioInstances[i].setClickHandler(clickHandler,obj);
  3704.       i++;
  3705.    }
  3706. };
  3707. FRB.getValue = function()
  3708. {
  3709.    var i = 0;
  3710.    while(i < this.radioInstances.length)
  3711.    {
  3712.       if(this.radioInstances[i].selected == true)
  3713.       {
  3714.          if(this.radioInstances[i].data == "" || this.radioInstances[i].data == undefined)
  3715.          {
  3716.             return this.radioInstances[i].getLabel();
  3717.          }
  3718.          return this.radioInstances[i].data;
  3719.       }
  3720.       i++;
  3721.    }
  3722. };
  3723. FRB.getData = function()
  3724. {
  3725.    var i = 0;
  3726.    while(i < this.radioInstances.length)
  3727.    {
  3728.       if(this.radioInstances[i].selected)
  3729.       {
  3730.          return this.radioInstances[i].getData();
  3731.       }
  3732.       i++;
  3733.    }
  3734. };
  3735. FRB.getInstance = function()
  3736. {
  3737.    var i = 0;
  3738.    while(i < this.radioInstances.length)
  3739.    {
  3740.       if(this.radioInstances[i].selected == true)
  3741.       {
  3742.          return i;
  3743.       }
  3744.       undefined;
  3745.       i++;
  3746.    }
  3747. };
  3748. FRB.setValue = function(dataValue)
  3749. {
  3750.    var i = 0;
  3751.    while(i < this.radioInstances.length)
  3752.    {
  3753.       if(this.radioInstances[i].data == dataValue)
  3754.       {
  3755.          this.radioInstances[i].setValue(true);
  3756.          return undefined;
  3757.       }
  3758.       i++;
  3759.    }
  3760.    var i = 0;
  3761.    while(i < this.radioInstances.length)
  3762.    {
  3763.       if(this.radioInstances[i].getLabel() == dataValue)
  3764.       {
  3765.          this.radioInstances[i].setValue(true);
  3766.       }
  3767.       i++;
  3768.    }
  3769. };
  3770. FRB.setSize = function(w)
  3771. {
  3772.    var i = 0;
  3773.    while(i < this.radioInstances.length)
  3774.    {
  3775.       this.radioInstances[i].setSize(w);
  3776.       i++;
  3777.    }
  3778. };
  3779. FRB.getSize = function()
  3780. {
  3781.    var widestRadio = 0;
  3782.    var i = 0;
  3783.    while(i < this.radioInstances.length)
  3784.    {
  3785.       if(this.radioInstances[i].width >= widestRadio)
  3786.       {
  3787.          widestRadio = this.radioInstances[i].width;
  3788.       }
  3789.       i++;
  3790.    }
  3791.    return widestRadio;
  3792. };
  3793. FRB.setGroupName = function(groupName)
  3794. {
  3795.    this.oldGroupName = this.radioInstances[0].groupName;
  3796.    var i = 0;
  3797.    while(i < this.radioInstances.length)
  3798.    {
  3799.       this.radioInstances[i].groupName = groupName;
  3800.       this.radioInstances[i].addToRadioGroup();
  3801.       i++;
  3802.    }
  3803.    delete this._parent[this.oldGroupName];
  3804. };
  3805. FRB.getGroupName = function()
  3806. {
  3807.    return this.radioInstances[0].groupName;
  3808. };
  3809. FRB.setLabelPlacement = function(pos)
  3810. {
  3811.    var i = 0;
  3812.    while(i < this.radioInstances.length)
  3813.    {
  3814.       this.radioInstances[i].setLabelPlacement(pos);
  3815.       i++;
  3816.    }
  3817. };
  3818. FRB.setStyleProperty = function(propName, value, isGlobal)
  3819. {
  3820.    var i = 0;
  3821.    while(i < this.radioInstances.length)
  3822.    {
  3823.       this.radioInstances[i].setStyleProperty(propName,value,isGlobal);
  3824.       i++;
  3825.    }
  3826. };
  3827. FRB.addListener = function()
  3828. {
  3829.    var i = 0;
  3830.    while(i < this.radioInstances.length)
  3831.    {
  3832.       this.radioInstances[i].addListener();
  3833.       i++;
  3834.    }
  3835. };
  3836. FRB.applyChanges = function()
  3837. {
  3838.    var i = 0;
  3839.    while(i < this.radioInstances.length)
  3840.    {
  3841.       this.radioInstances[i].applyChanges();
  3842.       i++;
  3843.    }
  3844. };
  3845. FRB.removeListener = function(component)
  3846. {
  3847.    var i = 0;
  3848.    while(i < this.radioInstances.length)
  3849.    {
  3850.       this.radioInstances[i].removeListener(component);
  3851.       i++;
  3852.    }
  3853. };
  3854. Object.BUClass = function()
  3855. {
  3856.    this.init();
  3857. };
  3858. Object.BUClass.prototype = new FUIComponentClass();
  3859. Object.registerClass("ButonUniversal",Object.BUClass);
  3860. var BUC = Object.BUClass.prototype;
  3861. BUC.init = function()
  3862. {
  3863.    super.setSize(this._width,this._height);
  3864.    this.boundingBox_mc._visible = false;
  3865.    this.textStyle = new TextFormat();
  3866.    this.textStyle.font = "eLEARNING_Medium";
  3867.    this.textStyle.size = 18;
  3868.    this.textStyle.align = "left";
  3869.    this.attachMovie("fpb_states2","fpbState_mc",1);
  3870.    this.attachMovie("FLabelSymbol","fLabel_mc",2);
  3871.    this.attachMovie("fpb_hitArea","fpb_hitArea_mc",3);
  3872.    super.init();
  3873.    this.createTextField("styleTable",100,0,0,0,0);
  3874.    this.styleTable.type = "dynamic";
  3875.    this.styleTable.embedFonts = true;
  3876.    this.btnState = false;
  3877.    this.setClickHandler(this.clickHandler);
  3878.    this._xscale = 100;
  3879.    this._yscale = 100;
  3880.    this.setSize(this.width,this.inaltime);
  3881.    if(this.data == "" || this.tipBtn == 3 || this.tipBtn == 4)
  3882.    {
  3883.       this.data = undefined;
  3884.    }
  3885.    else
  3886.    {
  3887.       this.setData(this.data);
  3888.    }
  3889.    if(this.tipBtn == undefined)
  3890.    {
  3891.       this.tipBtn = 4;
  3892.    }
  3893.    this.selected = false;
  3894.    if(this.label != undefined)
  3895.    {
  3896.       this.setLabel(this.label);
  3897.    }
  3898.    this.ROLE_SYSTEM_PUSHBUTTON = 43;
  3899.    this.STATE_SYSTEM_PRESSED = 8;
  3900.    this.EVENT_OBJECT_STATECHANGE = 32778;
  3901.    this.EVENT_OBJECT_NAMECHANGE = 32780;
  3902.    this._accImpl.master = this;
  3903.    this._accImpl.stub = false;
  3904.    this._accImpl.get_accRole = this.get_accRole;
  3905.    this._accImpl.get_accName = this.get_accName;
  3906.    this._accImpl.get_accState = this.get_accState;
  3907.    this._accImpl.get_accDefaultAction = this.get_accDefaultAction;
  3908.    this._accImpl.accDoDefaultAction = this.accDoDefaultAction;
  3909.    if(this.tipBtn == 1 || this.tipBtn == 2)
  3910.    {
  3911.       this.addToRadioGroup();
  3912.    }
  3913. };
  3914. BUC.setHitArea = function(w, h)
  3915. {
  3916.    var hit = this.fpb_hitArea_mc;
  3917.    this.hitArea = hit;
  3918.    hit._visible = false;
  3919.    hit._width = w;
  3920.    hit._height = arguments.length <= 1 ? hit._height : h;
  3921. };
  3922. BUC.setSize = function(w, h)
  3923. {
  3924.    w = w >= 6 ? w : 6;
  3925.    if(arguments.length > 1)
  3926.    {
  3927.       if(h < 6)
  3928.       {
  3929.          h = 6;
  3930.       }
  3931.    }
  3932.    super.setSize(w,h);
  3933.    this.setLabel(this.getLabel());
  3934.    this.arrangeLabel();
  3935.    this.setHitArea(w,h);
  3936.    this.boundingBox_mc._width = w;
  3937.    this.boundingBox_mc._height = h;
  3938.    this.drawFrame();
  3939.    if(this.focused)
  3940.    {
  3941.       super.myOnSetFocus();
  3942.    }
  3943.    this.initContentPos("fLabel_mc");
  3944. };
  3945. BUC.arrangeLabel = function()
  3946. {
  3947.    var label = this.fLabel_mc;
  3948.    var h = this.height;
  3949.    var w = this.width - 2;
  3950.    var b = 1;
  3951.    this.fLabel_mc.setSize(w - b * 4);
  3952.    label._x = 10;
  3953.    label._y = h / 2 - label._height / 2;
  3954. };
  3955. BUC.getLabel = function()
  3956. {
  3957.    return this.fLabel_mc.labelField.text;
  3958. };
  3959. BUC.setLabel = function(label)
  3960. {
  3961.    this.fLabel_mc.setLabel(label);
  3962.    this.txtFormat();
  3963.    this.arrangeLabel();
  3964.    if(Accessibility.isActive())
  3965.    {
  3966.       Accessibility.sendEvent(this,0,this.EVENT_OBJECT_NAMECHANGE);
  3967.    }
  3968. };
  3969. BUC.setData = function(dataValue)
  3970. {
  3971.    this.data = dataValue;
  3972. };
  3973. BUC.getData = function()
  3974. {
  3975.    return this.data;
  3976. };
  3977. BUC.getState = function()
  3978. {
  3979.    return this.selected;
  3980. };
  3981. BUC.getGroupName = function()
  3982. {
  3983.    return this.groupName;
  3984. };
  3985. BUC.setGroupName = function(groupName)
  3986. {
  3987.    var i = 0;
  3988.    while(i < this._parent[this.groupName].radioInstances.length)
  3989.    {
  3990.       if(this._parent[this.groupName].radioInstances[i] == this)
  3991.       {
  3992.          delete this._parent[this.groupName].radioInstances[i];
  3993.       }
  3994.       i++;
  3995.    }
  3996.    this.groupName = groupName;
  3997.    this.addToRadioGroup();
  3998. };
  3999. BUC.setValue = function(selected)
  4000. {
  4001.    if(selected || selected == undefined)
  4002.    {
  4003.       this.setState(true);
  4004.       this.focusRect.removeMovieClip();
  4005.       this.drawFrame();
  4006.       this.setBtnState(true);
  4007.       this.executeCallBack();
  4008.    }
  4009.    else if(selected == false)
  4010.    {
  4011.       this.setState(false);
  4012.    }
  4013. };
  4014. BUC.setTabState = function(selected)
  4015. {
  4016.    Selection.setFocus(this);
  4017.    this.setState(selected);
  4018.    this.drawFocusRect();
  4019.    this.executeCallBack();
  4020. };
  4021. BUC.getValue = function()
  4022. {
  4023.    if(this.selected)
  4024.    {
  4025.       if(this.data == "" || this.data == undefined)
  4026.       {
  4027.          return this.getLabel();
  4028.       }
  4029.       return this.data;
  4030.    }
  4031. };
  4032. BUC.setState = function(selected)
  4033. {
  4034.    if((selected || selected == undefined) && (this.tipBtn == 1 || this.tipBtn == 2))
  4035.    {
  4036.       this.tabEnabled = true;
  4037.       for(var i in this._parent)
  4038.       {
  4039.          if(this != this._parent[i] && this._parent[i].groupName == this.groupName && (this._parent[i].tipBtn == 1 || this._parent[i].tipBtn == 2))
  4040.          {
  4041.             this._parent[i].setState(false);
  4042.             this._parent[i].tabEnabled = false;
  4043.          }
  4044.       }
  4045.    }
  4046.    if(this.enable && this.tipBtn != 4)
  4047.    {
  4048.       this.flabel_mc.setEnabled(true);
  4049.       if(selected || selected == undefined)
  4050.       {
  4051.          this.fpbState_mc.gotoAndStop(3);
  4052.          if(this.tipBtn === 1)
  4053.          {
  4054.             this.enabled = false;
  4055.          }
  4056.          this.selected = true;
  4057.          this.tabEnabled = true;
  4058.          this.tabFocused = true;
  4059.          this.fLabel_mc.setColor("0xeeeeee");
  4060.       }
  4061.       else
  4062.       {
  4063.          this.fpbState_mc.gotoAndStop(1);
  4064.          this.drawFrame();
  4065.          this.enabled = true;
  4066.          this.selected = false;
  4067.          this.tabEnabled = false;
  4068.          var enabTrue = this._parent[this.groupName].getEnabled();
  4069.          var noneSelect = this._parent[this.groupName].getValue() == undefined;
  4070.          if(enabTrue && noneSelect)
  4071.          {
  4072.             this._parent[this.groupName].radioInstances[0].tabEnabled = true;
  4073.          }
  4074.       }
  4075.    }
  4076.    else
  4077.    {
  4078.       this.flabel_mc.setEnabled(false);
  4079.       if(selected || selected == undefined)
  4080.       {
  4081.          this.fpbState_m.gotoAndStop("selectedDisabled");
  4082.          this.enabled = false;
  4083.          this.selected = true;
  4084.          this.tabEnabled = false;
  4085.       }
  4086.       else
  4087.       {
  4088.          this.fpbState_m.gotoAndStop("unselectedDisabled");
  4089.          this.enabled = false;
  4090.          this.selected = false;
  4091.          this.tabEnabled = false;
  4092.       }
  4093.    }
  4094.    if(Accessibility.isActive())
  4095.    {
  4096.       Accessibility.sendEvent(this,0,this.EVENT_OBJECT_STATECHANGE,true);
  4097.    }
  4098. };
  4099. BUC.getEnabled = function()
  4100. {
  4101.    return this.enabled;
  4102. };
  4103. BUC.setEnabled = function(enable)
  4104. {
  4105.    if(enable || enable == undefined)
  4106.    {
  4107.       this.gotoFrame(1);
  4108.       this.drawFrame();
  4109.       this.flabel_mc.setEnabled(true);
  4110.       this.enabled = true;
  4111.       this.enable = true;
  4112.       super.setEnabled(true);
  4113.    }
  4114.    else
  4115.    {
  4116.       this.gotoFrame(4);
  4117.       this.drawFrame();
  4118.       this.flabel_mc.setEnabled(false);
  4119.       this.enabled = false;
  4120.       this.enable = false;
  4121.       super.setEnabled(false);
  4122.    }
  4123. };
  4124. BUC.getGroupName = function()
  4125. {
  4126.    return this.groupName;
  4127. };
  4128. BUC.txtFormat = function()
  4129. {
  4130.    var txtS = this.textStyle;
  4131.    var sTbl = this.styleTable;
  4132.    txtS.align = sTbl.textAlign.value != undefined ? undefined : (txtS.align = "left");
  4133.    txtS.leftMargin = sTbl.textLeftMargin.value != undefined ? undefined : (txtS.leftMargin = 1);
  4134.    txtS.rightMargin = sTbl.textRightMargin.value != undefined ? undefined : (txtS.rightMargin = 1);
  4135.    if(this.fLabel_mc._height > this.height)
  4136.    {
  4137.       super.setSize(this.width,this.fLabel_mc._height);
  4138.    }
  4139.    else
  4140.    {
  4141.       super.setSize(this.width,this.height);
  4142.    }
  4143.    this.fLabel_mc.labelField.setTextFormat(this.textStyle);
  4144.    this.setEnabled(this.enable);
  4145. };
  4146. BUC.drawFrame = function()
  4147. {
  4148.    var b = 1;
  4149.    var x1 = 0;
  4150.    var y1 = 0;
  4151.    var x2 = this.width;
  4152.    var y2 = this.height;
  4153.    var mc_array = ["up_mc","over_mc","down_mc","disabled_mc"];
  4154.    var frame = mc_array[this.fpbState_mc._currentframe - 1];
  4155.    var mc = "frame";
  4156.    var i = 0;
  4157.    while(i < 6)
  4158.    {
  4159.       x1 += i % 2 * b;
  4160.       y1 += i % 2 * b;
  4161.       x2 -= (i + 1) % 2 * b;
  4162.       y2 -= (i + 1) % 2 * b;
  4163.       var w = Math.abs(x1 - x2) + 2 * b;
  4164.       var h = Math.abs(y1 - y2) + 2 * b;
  4165.       this.fpbState_mc[frame][mc + i]._width = w;
  4166.       this.fpbState_mc[frame][mc + i]._height = h;
  4167.       this.fpbState_mc[frame][mc + i]._x = x1 - b;
  4168.       this.fpbState_mc[frame][mc + i]._y = y1 - b;
  4169.       i++;
  4170.    }
  4171. };
  4172. BUC.setClickHandler = function(chng, obj)
  4173. {
  4174.    this.handlerObj = arguments.length >= 2 ? obj : this._parent;
  4175.    this.clickHandler = chng;
  4176. };
  4177. BUC.executeCallBack = function()
  4178. {
  4179.    if(this.tipBtn == 3 || this.tipBtn == 2 || this.tipBtn == 4)
  4180.    {
  4181.       this.handlerObj[this.clickHandler](this);
  4182.    }
  4183.    else
  4184.    {
  4185.       this.handlerObj[this.clickHandler](this._parent[this.radioGroup]);
  4186.    }
  4187. };
  4188. BUC.initContentPos = function(mc)
  4189. {
  4190.    this.incrVal = 1;
  4191.    this.initx = this[mc]._x - this.getBtnState() * this.incrVal;
  4192.    this.inity = this[mc]._y - this.getBtnState() * this.incrVal;
  4193.    this.togx = this.initx + this.incrVal;
  4194.    this.togy = this.inity + this.incrVal;
  4195. };
  4196. BUC.setBtnState = function(state)
  4197. {
  4198.    this.btnState = state;
  4199.    if(state)
  4200.    {
  4201.       this.fLabel_mc._x = this.togx;
  4202.       this.fLabel_mc._y = this.togy;
  4203.    }
  4204.    else
  4205.    {
  4206.       this.fLabel_mc._x = this.initx;
  4207.       this.fLabel_mc._y = this.inity;
  4208.    }
  4209. };
  4210. BUC.getBtnState = function()
  4211. {
  4212.    return this.btnState;
  4213. };
  4214. BUC.myOnSetFocus = function()
  4215. {
  4216.    this.focused = true;
  4217.    super.myOnSetFocus();
  4218. };
  4219. BUC.selectat = function(b)
  4220. {
  4221.    if(b != undefined)
  4222.    {
  4223.       if(b)
  4224.       {
  4225.          this.boundingBox_mc._visible = true;
  4226.          this.boundingBox_mc._width = this._width + 4;
  4227.          this.boundingBox_mc._height = this._height + 4;
  4228.          this.boundingBox_mc._x = -2;
  4229.          this.boundingBox_mc._y = -2;
  4230.       }
  4231.       else
  4232.       {
  4233.          this.boundingBox_mc._visible = false;
  4234.          this.boundingBox_mc._width = this._width - 4;
  4235.          this.boundingBox_mc._height = this._height - 4;
  4236.       }
  4237.    }
  4238.    else if(this.boundingBox_mc._visible)
  4239.    {
  4240.       this.boundingBox_mc._visible = false;
  4241.       this.boundingBox_mc._width = this._width - 4;
  4242.       this.boundingBox_mc._height = this._height - 4;
  4243.    }
  4244.    else
  4245.    {
  4246.       this.boundingBox_mc._visible = true;
  4247.       this.boundingBox_mc._width += 4;
  4248.       this.boundingBox_mc._height += 4;
  4249.       this.boundingBox_mc._x = -2;
  4250.       this.boundingBox_mc._y = -2;
  4251.    }
  4252. };
  4253. BUC.addToRadioGroup = function()
  4254. {
  4255.    if(this._parent[this.groupName] == undefined)
  4256.    {
  4257.       this._parent[this.groupName] = new Object.FRadioButtonGroupC();
  4258.    }
  4259.    this._parent[this.groupName].addRadioInstance(this);
  4260. };
  4261. BUC.onPress = function()
  4262. {
  4263.    this.pressFocus();
  4264.    switch(this.tipBtn)
  4265.    {
  4266.       case 1:
  4267.          this.setState(true);
  4268.          break;
  4269.       case 2:
  4270.          if(this.selected)
  4271.          {
  4272.             this.setState(false);
  4273.          }
  4274.          else
  4275.          {
  4276.             this.setState(true);
  4277.          }
  4278.          break;
  4279.       case 3:
  4280.          if(this.selected)
  4281.          {
  4282.             this.setState(false);
  4283.          }
  4284.          else
  4285.          {
  4286.             this.setState(true);
  4287.          }
  4288.          break;
  4289.       case 4:
  4290.          this.fpbState_mc.gotoAndStop(3);
  4291.          this.fLabel_mc.setColor("0xeeeeee");
  4292.    }
  4293.    this.drawFrame();
  4294.    this.executeCallBack();
  4295.    this.setBtnState(true);
  4296.    if(Accessibility.isActive())
  4297.    {
  4298.       Accessibility.sendEvent(this,0,this.EVENT_OBJECT_STATECHANGE,true);
  4299.    }
  4300. };
  4301. BUC.onRelease = function()
  4302. {
  4303.    if(this.tipBtn == 4)
  4304.    {
  4305.       this.fpbState_mc.gotoAndStop(2);
  4306.       this.fLabel_mc.setColor("0x000000");
  4307.    }
  4308.    this.drawFrame();
  4309.    this.setBtnState(false);
  4310.    if(Accessibility.isActive())
  4311.    {
  4312.       Accessibility.sendEvent(this,0,this.EVENT_OBJECT_STATECHANGE,true);
  4313.    }
  4314. };
  4315. BUC.onRollOver = function()
  4316. {
  4317.    if(this.tipBtn == 1 || this.tipBtn == 4 || (this.tipBtn == 2 || this.tipBtn == 3) && !this.selected)
  4318.    {
  4319.       this.fpbState_mc.gotoAndStop(2);
  4320.    }
  4321.    this.drawFrame();
  4322. };
  4323. BUC.onRollOut = function()
  4324. {
  4325.    if(this.tipBtn == 1 | this.tipBtn == 4 || (this.tipBtn == 2 || this.tipBtn == 3) && !this.selected)
  4326.    {
  4327.       this.fpbState_mc.gotoAndStop(1);
  4328.    }
  4329.    this.drawFrame();
  4330. };
  4331. BUC.onReleaseOutside = function()
  4332. {
  4333.    this.setBtnState(false);
  4334.    if(this.tipBtn == 1)
  4335.    {
  4336.       this.fpbState_mc.gotoAndStop(1);
  4337.    }
  4338.    this.drawFrame();
  4339. };
  4340. BUC.onDragOut = function()
  4341. {
  4342.    this.setBtnState(false);
  4343.    if(this.tipBtn == 1)
  4344.    {
  4345.       this.fpbState_mc.gotoAndStop(1);
  4346.    }
  4347.    this.drawFrame();
  4348. };
  4349. BUC.onDragOver = function()
  4350. {
  4351.    this.setBtnState(true);
  4352.    if(this.tipBtn == 1)
  4353.    {
  4354.       this.fpbState_mc.gotoAndStop(3);
  4355.    }
  4356.    this.drawFrame();
  4357. };
  4358. BUC.myOnKeyDown = function()
  4359. {
  4360.    if(Key.getCode() == 32 && this.pressOnce == undefined)
  4361.    {
  4362.       this.onPress();
  4363.       this.pressOnce = 1;
  4364.    }
  4365. };
  4366. BUC.myOnKeyUp = function()
  4367. {
  4368.    if(Key.getCode() == 32)
  4369.    {
  4370.       this.onRelease();
  4371.       this.pressOnce = undefined;
  4372.    }
  4373. };
  4374. BUC.get_accRole = function(childId)
  4375. {
  4376.    return this.master.ROLE_SYSTEM_PUSHBUTTON;
  4377. };
  4378. BUC.get_accName = function(childId)
  4379. {
  4380.    return this.master.getLabel();
  4381. };
  4382. BUC.get_accState = function(childId)
  4383. {
  4384.    if(this.pressOnce)
  4385.    {
  4386.       return this.master.STATE_SYSTEM_PRESSED;
  4387.    }
  4388.    return this.master.STATE_SYSTEM_DEFAULT;
  4389. };
  4390. BUC.get_accDefaultAction = function(childId)
  4391. {
  4392.    return "Press";
  4393. };
  4394. BUC.accDoDefaultAction = function(childId)
  4395. {
  4396.    this.master.onPress();
  4397.    this.master.onRelease();
  4398. };
  4399. delete FRB;
  4400. delete BUC;
  4401.