home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / humour / trojanhorse.swf / scripts / frame_2 / DoAction.as < prev   
Text File  |  2007-03-20  |  7KB  |  197 lines

  1. function showList()
  2. {
  3.    netStream.close();
  4.    skin_mc.nextclip_mc._visible = false;
  5.    skin_mc.screenpause_mc._visible = false;
  6.    skin_mc.control_mc.dummy_btn._visible = false;
  7.    skin_mc.control_mc.playpos_mc.clip_mc._x = skin_mc.control_mc.statusbg_mc._x - skin_mc.control_mc.statusbg_mc._width;
  8.    skin_mc.control_mc.knob_mc._x = skin_mc.control_mc.statusbg_mc._x;
  9.    skin_mc.header_mc._visible = false;
  10.    skin_mc.control_mc.play_btn._visible = true;
  11.    skin_mc.control_mc.pause_btn._visible = false;
  12.    skin_mc.logo_mc.gotoAndStop(1);
  13.    skin_mc.sharenreply_mc._y = initSharebtnY;
  14.    if(playerVersion == "2" and Stage.displayState != "fullScreen")
  15.    {
  16.       clearList();
  17.       skin_mc.list_mc._visible = true;
  18.       var _loc1_ = 0;
  19.       while(_loc1_ <= maxList)
  20.       {
  21.          curClip = skin_mc.list_mc.attachMovie("list_mc","list_" + _loc1_,skin_mc.list_mc.getNextHighestDepth());
  22.          curClip._y = (curClip._height + gap) * _loc1_;
  23.          curClip._alpha = 0;
  24.          _loc1_ = _loc1_ + 1;
  25.       }
  26.       listArray = returnLists();
  27.       loadContents();
  28.       skin_mc.StageBg_mc._width = Stage.width;
  29.       skin_mc.StageBg_mc._height = Stage.height;
  30.       skin_mc.list_mc._x = (skin_mc.StageBg_mc._width - skin_mc.list_mc._width) / 2;
  31.       skin_mc.list_mc._y = (skin_mc.StageBg_mc._height + skin_mc.sharenreply_mc._height - skin_mc.control_mc._height - skin_mc.list_mc._height) / 2;
  32.    }
  33.    else
  34.    {
  35.       skin_mc.sharenreply_mc._y = skin_mc.StageBg_mc._height / 2 - skin_mc.sharenreply_mc._height;
  36.    }
  37.    showProcessing(bufferlabel,false);
  38. }
  39. function returnLists()
  40. {
  41.    var _loc2_ = new Array();
  42.    var _loc1_ = 0;
  43.    while(_loc1_ <= maxList)
  44.    {
  45.       listIndex < playListArray.length ? "" : (listIndex = 0);
  46.       _loc2_.push(playListArray[listIndex++]);
  47.       _loc1_ = _loc1_ + 1;
  48.    }
  49.    return _loc2_;
  50. }
  51. function loadContents()
  52. {
  53.    var _loc2_ = 0;
  54.    while(_loc2_ <= maxList)
  55.    {
  56.       var _loc4_ = new Array();
  57.       curClip = skin_mc.list_mc["list_" + _loc2_];
  58.       for(var _loc6_ in listArray[_loc2_])
  59.       {
  60.          if(playListDesc.length > 0)
  61.          {
  62.             var _loc3_ = 0;
  63.             while(_loc3_ < playListDesc.length)
  64.             {
  65.                if(_loc6_ == playListDesc[_loc3_].Name)
  66.                {
  67.                   if(listArray[_loc2_][_loc6_] != "")
  68.                   {
  69.                      _loc4_.push(playListDesc[_loc3_].Value + listArray[_loc2_][_loc6_]);
  70.                   }
  71.                }
  72.                _loc3_ = _loc3_ + 1;
  73.             }
  74.          }
  75.          else
  76.          {
  77.             _loc4_.push("Name: " + listArray[_loc2_].Name);
  78.             _loc4_.push("Rating: " + listArray[_loc2_].Rating);
  79.             _loc4_.push("Comments: " + listArray[_loc2_].Comments);
  80.             _loc4_.push("Author: " + listArray[_loc2_].Authour);
  81.          }
  82.       }
  83.       _loc4_.reverse();
  84.       skin_mc.list_mc["list_" + _loc2_].lists = new Array();
  85.       skin_mc.list_mc["list_" + _loc2_].lists = _loc4_;
  86.       skin_mc.list_mc["list_" + _loc2_].thumbs = listArray[_loc2_].Thumbnails;
  87.       skin_mc.list_mc["list_" + _loc2_].rates = listArray[_loc2_].Rating;
  88.       skin_mc.list_mc["list_" + _loc2_].targetUrl = listArray[_loc2_].url;
  89.       skin_mc.list_mc["list_" + _loc2_].targetWin = listArray[_loc2_].target;
  90.       if(themepresent)
  91.       {
  92.          var _loc5_ = 0;
  93.          while(_loc5_ < themesArray.length)
  94.          {
  95.             if(themesArray[_loc5_].name == "listholder")
  96.             {
  97.                applyRGB(skin_mc.list_mc["list_" + _loc2_].bg_mc,themesArray[_loc5_].color,themesArray[_loc5_].alpha);
  98.             }
  99.             _loc5_ = _loc5_ + 1;
  100.          }
  101.       }
  102.       skin_mc.list_mc["list_" + _loc2_].onEnterFrame = function()
  103.       {
  104.          this.showLables(this.lists);
  105.          loadThums(this.thumbs,this.clip);
  106.          delete this.onEnterFrame;
  107.          makeFadeOut(this,100,5);
  108.       };
  109.       _loc2_ = _loc2_ + 1;
  110.    }
  111. }
  112. function setListPosition()
  113. {
  114.    setLabels();
  115.    skin_mc.StageBg_mc._width = Stage.width;
  116.    skin_mc.StageBg_mc._height = Stage.height;
  117.    skin_mc.list_mc._x = (skin_mc.StageBg_mc._width - skin_mc.list_mc._width) / 2;
  118.    skin_mc.list_mc._y = (skin_mc.StageBg_mc._height - skin_mc.list_mc._height - skin_mc.control_mc._height) / 2;
  119.    maxList = Math.round((skin_mc.video_mc._height + skin_mc.control_mc._height) / skin_mc.listHeight) - 3;
  120.    if(playerStatus == "finished")
  121.    {
  122.       clearList();
  123.       showList();
  124.    }
  125. }
  126. function clearList()
  127. {
  128.    var _loc1_ = new classes.ag_removeMovie();
  129.    _loc1_.removeAll(skin_mc.list_mc);
  130. }
  131. function loadThums(thums, movi_mc)
  132. {
  133.    var _loc2_ = thums.split(",");
  134.    movi_mc.totalImages = _loc2_.length;
  135.    movi_mc.loadedcount = 0;
  136.    var _loc1_ = 0;
  137.    while(_loc1_ < _loc2_.length)
  138.    {
  139.       curMovie = movi_mc.createEmptyMovieClip("clip" + _loc1_,movi_mc.getNextHighestDepth());
  140.       var _loc4_ = new classes.ag_loadClip(_loc2_[_loc1_],curMovie,undefined,undefined,onLoaded);
  141.       _loc1_ = _loc1_ + 1;
  142.    }
  143. }
  144. function onLoaded(movObj)
  145. {
  146.    if(movObj.status == "success")
  147.    {
  148.       movObj.target_mc._width = movObj.target_mc._parent.base_mc._width;
  149.       movObj.target_mc._height = movObj.target_mc._parent.base_mc._height;
  150.       movObj.target_mc._x = movObj.target_mc._parent.base_mc._x;
  151.       movObj.target_mc._y = movObj.target_mc._parent.base_mc._y;
  152.       movObj.target_mc._parent.loadedcount = movObj.target_mc._parent.loadedcount + 1;
  153.       movObj.target_mc._visible = false;
  154.       if(movObj.target_mc._parent.loadedcount == movObj.target_mc._parent.totalImages)
  155.       {
  156.          if(movObj.target_mc._parent.totalImages != 1)
  157.          {
  158.             movObj.target_mc._parent._parent.animation.callInterval(6);
  159.          }
  160.          vid = movObj.target_mc._parent._parent._name.split("_")[1];
  161.          if(vid == maxList - 1 or vid == maxList - 1)
  162.          {
  163.             clearInterval(idVal);
  164.             showLeveler();
  165.          }
  166.          movObj.target_mc._visible = true;
  167.          movObj.target_mc._parent._parent.loading_mc._visible = false;
  168.       }
  169.    }
  170.    if(movObj.status == "error")
  171.    {
  172.       movObj.target_mc._parent.loadedcount = movObj.target_mc._parent.loadedcount + 1;
  173.    }
  174. }
  175. function showLeveler()
  176. {
  177.    skin_mc.backList_mc._visible = true;
  178.    skin_mc.frontList_mc._visible = true;
  179.    skin_mc.frontList_mc.paused = false;
  180.    skin_mc.frontList_mc.showLeveler(1,mc_holder.frontList_mc);
  181. }
  182. var listArray = new Array();
  183. var gap = 3;
  184. var gap = 3;
  185. var maxList = 3;
  186. var listIndex = 0;
  187. var initSharebtnY = skin_mc.sharenreply_mc._y;
  188. skin_mc.frontList_mc.listNext_btn.onRelease = function()
  189. {
  190.    showList();
  191. };
  192. skin_mc.backList_mc.listBack_btn.onRelease = function()
  193. {
  194.    listIndex -= 2;
  195.    showList();
  196. };
  197.