home *** CD-ROM | disk | FTP | other *** search
/ T-Online 6 / T-Online.iso / Animation / content / intro / intro.swf / scripts / __Packages / application / contents / InprintContent.as < prev    next >
Encoding:
Text File  |  2005-10-20  |  5.6 KB  |  171 lines

  1. class application.contents.InprintContent extends MovieClip implements application.models.IContent
  2. {
  3.    var scrollBar;
  4.    var configObj;
  5.    var systemObj;
  6.    var dataObj;
  7.    var internalContent;
  8.    var loadingManager;
  9.    var externalContent;
  10.    var instCounter;
  11.    var nav;
  12.    var headline;
  13.    var mask;
  14.    function InprintContent()
  15.    {
  16.       super();
  17.    }
  18.    function build(mc, dataObj, systemObj, configObj)
  19.    {
  20.       this.scrollBar = null;
  21.       this.configObj = configObj;
  22.       this.systemObj = systemObj;
  23.       this.dataObj = dataObj;
  24.       this.internalContent = mc;
  25.       var _loc2_ = application.core.ContentManager.getInstance();
  26.       var _loc7_ = _loc2_.getActiveMain();
  27.       var _loc5_ = _loc2_.getActiveSub();
  28.       var _loc3_ = _loc2_.getIface();
  29.       application.core.FocusManager.getInstance().reset();
  30.       application.core.FocusManager.getInstance().setContent(this);
  31.       _loc3_.coBrandHolder.coBrand.hide();
  32.       this.loadingManager = _loc2_.getLoadingManager();
  33.       this.externalContent = this.internalContent.createEmptyMovieClip("externalContent",this.instCounter);
  34.       this.instCounter = this.instCounter + 1;
  35.       var _loc4_ = dataObj.imprint.contentList[_loc5_].site;
  36.       var _loc6_ = this.externalContent;
  37.       this.loadingManager.addListener(this);
  38.       this.loadingManager.load(_loc4_,_loc6_,"onInitialLoad");
  39.    }
  40.    function remove()
  41.    {
  42.       this.nav.removeMovieClip();
  43.       this.headline.removeMovieClip();
  44.       this.externalContent.removeMovieClip();
  45.       this.scrollBar.removeMovieClip();
  46.       this.mask.removeMovieClip();
  47.    }
  48.    function update(state, activeMain, activeSub)
  49.    {
  50.    }
  51.    function getPreviousContent()
  52.    {
  53.    }
  54.    function getNextContent()
  55.    {
  56.    }
  57.    function onInitialLoad()
  58.    {
  59.       this.loadingManager.removeListener(this);
  60.       this.externalContent.gotoAndStop(1);
  61.       var _loc4_ = application.core.ContentManager.getInstance();
  62.       var _loc6_ = _loc4_.getActiveMain();
  63.       var _loc2_ = _loc4_.getActiveSub();
  64.       var _loc3_ = _loc4_.getIface();
  65.       Object.registerClass("dummy",application.screens.HorizontalSubNavigation);
  66.       this.nav = application.screens.HorizontalSubNavigation(this.internalContent.attachMovie("dummy","subnav",this.instCounter));
  67.       this.instCounter = this.instCounter + 1;
  68.       this.nav._x = int(_loc3_.contentHolder._x + 2);
  69.       this.nav._y = int(_loc3_.contentHolder._y - 2);
  70.       this.nav.setSystemProvider(this.systemObj);
  71.       this.nav.setConfigProvider(this.configObj);
  72.       this.nav.setDataObj(this.dataObj);
  73.       this.nav.setAciveContent(_loc6_,_loc2_);
  74.       this.nav.setContainer(this);
  75.       this.nav.build();
  76.       this.nav.update(_loc2_);
  77.       Object.registerClass("dummy",application.screens.HeadlineScreen);
  78.       this.headline = application.screens.HeadlineScreen(this.internalContent.attachMovie("dummy","headline" + this.instCounter,this.instCounter));
  79.       this.instCounter = this.instCounter + 1;
  80.       this.headline.setDataObj(this.dataObj);
  81.       this.headline.setConfigProvider(this.configObj);
  82.       this.headline.setAciveContent(_loc6_,_loc2_);
  83.       this.headline.setContainer(this);
  84.       this.headline.build();
  85.       this.headline.update(_loc2_);
  86.       _loc3_.contentBackground.gotoAndStop(2);
  87.       var _loc5_ = 271;
  88.       var _loc7_ = 699;
  89.       if(this.externalContent._height > _loc5_)
  90.       {
  91.          this.buildScrollbar(_loc7_,_loc5_);
  92.       }
  93.       else if(this.mask != null)
  94.       {
  95.          this.mask.removeMovieClip();
  96.          this.mask = null;
  97.          this.scrollBar.removeMovieClip();
  98.          this.scrollBar = null;
  99.       }
  100.    }
  101.    function onChangeRateContent(isSubcontent)
  102.    {
  103.    }
  104.    function showDisclaimScroll(tf)
  105.    {
  106.    }
  107.    function openRegistration()
  108.    {
  109.    }
  110.    function buildScrollbar(viewWidth, viewHeight)
  111.    {
  112.       if(this.scrollBar == null)
  113.       {
  114.          var _loc3_ = viewWidth;
  115.          var _loc2_ = viewHeight;
  116.          var _loc6_ = 20;
  117.          var _loc5_ = 104;
  118.          this.mask = this.internalContent.createEmptyMovieClip("mask" + this.instCounter,this.instCounter);
  119.          this.instCounter = this.instCounter + 1;
  120.          this.mask.clear();
  121.          this.mask.beginFill(0,0);
  122.          this.mask.moveTo(0,0);
  123.          this.mask.lineTo(0,_loc2_);
  124.          this.mask.lineTo(_loc3_,_loc2_);
  125.          this.mask.lineTo(_loc3_,0);
  126.          this.mask.lineTo(0,0);
  127.          this.mask.endFill();
  128.          this.mask._x = int(_loc6_);
  129.          this.mask._y = int(_loc5_);
  130.          this.externalContent.setMask(this.mask);
  131.          Object.registerClass("dummy",application.screens.ScrollBarScreen);
  132.          this.scrollBar = application.screens.ScrollBarScreen(this.internalContent.attachMovie("dummy","scrollBar" + this.instCounter,this.instCounter));
  133.          this.instCounter = this.instCounter + 1;
  134.          this.scrollBar.setContent(this.externalContent,viewHeight);
  135.          this.scrollBar._y += 31;
  136.       }
  137.       else
  138.       {
  139.          this.scrollBar.setContent(this.externalContent,viewHeight);
  140.          this.externalContent.setMask(this.mask);
  141.       }
  142.    }
  143.    function removeScrollbar()
  144.    {
  145.       this.mask.clear();
  146.       this.mask.removeMovieClip();
  147.       this.scrollBar.removeMovieClip();
  148.       this.scrollBar = null;
  149.    }
  150.    function openInstaller()
  151.    {
  152.    }
  153.    function openSoftware(id)
  154.    {
  155.    }
  156.    function showInfo(id)
  157.    {
  158.    }
  159.    function updateView(height, showBlind, id)
  160.    {
  161.    }
  162.    function getScrollBar()
  163.    {
  164.       return this.scrollBar;
  165.    }
  166.    function getMask()
  167.    {
  168.       return this.mask;
  169.    }
  170. }
  171.