home *** CD-ROM | disk | FTP | other *** search
- class application.contents.ClientContent extends MovieClip implements application.models.IContent
- {
- var scrollBar;
- var configObj;
- var systemObj;
- var dataObj;
- var internalContent;
- var loadingManager;
- var externalContent;
- var instCounter;
- var nav;
- var headline;
- var registrationBlind;
- var disclaimScroll;
- var mask;
- var rateScreen;
- function ClientContent()
- {
- super();
- }
- function build(mc, dataObj, systemObj, configObj)
- {
- this.scrollBar = null;
- this.configObj = configObj;
- this.systemObj = systemObj;
- this.dataObj = dataObj;
- this.internalContent = mc;
- var _loc2_ = application.core.ContentManager.getInstance();
- var _loc7_ = _loc2_.getActiveMain();
- var _loc5_ = _loc2_.getActiveSub();
- var _loc3_ = _loc2_.getIface();
- application.core.FocusManager.getInstance().reset();
- application.core.FocusManager.getInstance().setContent(this);
- _loc3_.coBrandHolder.coBrand.hide();
- this.loadingManager = _loc2_.getLoadingManager();
- this.externalContent = this.internalContent.createEmptyMovieClip("externalContent",this.instCounter);
- this.instCounter = this.instCounter + 1;
- var _loc4_ = dataObj.client.contentList[_loc5_].site;
- var _loc6_ = this.externalContent;
- this.loadingManager.addListener(this);
- this.loadingManager.load(_loc4_,_loc6_,"onInitialLoad");
- }
- function remove()
- {
- this.nav.removeMovieClip();
- this.headline.removeMovieClip();
- this.registrationBlind.removeMovieClip();
- this.externalContent.removeMovieClip();
- this.scrollBar.removeMovieClip();
- }
- function update(state, activeMain, activeSub)
- {
- this.registrationBlind.hideBackButton();
- this.disclaimScroll.removeMovieClip();
- var _loc2_ = application.core.ContentManager.getInstance();
- _loc2_.setActiveMain(activeMain);
- _loc2_.setActiveSub(activeSub);
- var _loc5_ = _loc2_.getIface();
- var _loc3_ = this.dataObj.client.contentList[activeSub].site;
- var _loc4_ = this.externalContent;
- this.loadingManager.addListener(this);
- this.loadingManager.load(_loc3_,_loc4_,"onLoad");
- }
- function getPreviousContent()
- {
- var _loc2_ = application.core.ContentManager.getInstance();
- _loc2_.getPreviousContent();
- var _loc4_ = _loc2_.getActiveMain();
- var _loc5_ = _loc2_.getActiveSub();
- if(_loc4_ != null)
- {
- var _loc3_ = this.dataObj.client.contentList[_loc5_].site;
- var _loc6_ = this.externalContent;
- this.loadingManager.addListener(this);
- this.loadingManager.load(_loc3_,_loc6_,"onLoadPrevious");
- }
- else
- {
- this.remove();
- _loc2_.showContent(2,null,null);
- }
- }
- function getNextContent()
- {
- var _loc2_ = application.core.ContentManager.getInstance();
- _loc2_.getNextContent();
- var _loc4_ = _loc2_.getActiveMain();
- var _loc5_ = _loc2_.getActiveSub();
- if(_loc4_ != null)
- {
- var _loc3_ = this.dataObj.client.contentList[_loc5_].site;
- var _loc6_ = this.externalContent;
- this.loadingManager.addListener(this);
- this.loadingManager.load(_loc3_,_loc6_,"onLoad");
- }
- else
- {
- this.remove();
- _loc2_.showContent(2,null,null);
- }
- }
- function onInitialLoad()
- {
- this.loadingManager.removeListener(this);
- this.externalContent.gotoAndStop(1);
- var _loc4_ = application.core.ContentManager.getInstance();
- var _loc6_ = _loc4_.getActiveMain();
- var _loc2_ = _loc4_.getActiveSub();
- var _loc3_ = _loc4_.getIface();
- Object.registerClass("dummy",application.screens.TreeSubNavigation);
- this.nav = application.screens.TreeSubNavigation(this.internalContent.attachMovie("dummy","subnav",this.instCounter));
- this.instCounter = this.instCounter + 1;
- this.nav._x = int(_loc3_.contentHolder._x + 2);
- this.nav._y = int(_loc3_.contentHolder._y + 3);
- this.nav.setSystemProvider(this.systemObj);
- this.nav.setConfigProvider(this.configObj);
- this.nav.setDataObj(this.dataObj);
- this.nav.setAciveContent(_loc6_,_loc2_);
- this.nav.setContainer(this);
- this.nav.build();
- this.nav.update(_loc2_);
- Object.registerClass("dummy",application.screens.HeadlineScreen);
- this.headline = application.screens.HeadlineScreen(this.internalContent.attachMovie("dummy","headline" + this.instCounter,this.instCounter));
- this.instCounter = this.instCounter + 1;
- this.headline.setDataObj(this.dataObj);
- this.headline.setConfigProvider(this.configObj);
- this.headline.setAciveContent(_loc6_,_loc2_);
- this.headline.setContainer(this);
- this.headline.build();
- this.headline.update(_loc2_);
- Object.registerClass("registrationBlind",application.screens.RegistrationBlindScreen);
- this.registrationBlind = application.screens.RegistrationBlindScreen(this.internalContent.attachMovie("registrationBlind","registrationBlind" + this.instCounter,this.instCounter));
- this.instCounter = this.instCounter + 1;
- this.registrationBlind.setSystemProvider(this.systemObj);
- this.registrationBlind.setConfigProvider(this.configObj);
- this.registrationBlind.setDataObj(this.dataObj);
- this.registrationBlind._x = 192;
- this.registrationBlind._y = 375 - this.registrationBlind._height;
- this.registrationBlind.setContainer(this);
- this.registrationBlind.build();
- _loc3_.contentBackground.gotoAndStop(3);
- var _loc5_ = 302 - this.registrationBlind._height;
- var _loc7_ = this.registrationBlind._width - 17;
- if(this.externalContent._height > _loc5_)
- {
- this.buildScrollbar(_loc7_,_loc5_);
- }
- else if(this.mask != null)
- {
- this.mask.removeMovieClip();
- this.mask = null;
- this.scrollBar.removeMovieClip();
- this.scrollBar = null;
- }
- }
- function onLoad()
- {
- this.loadingManager.removeListener(this);
- this.externalContent.gotoAndStop(1);
- this.externalContent._y = 0;
- var _loc4_ = application.core.ContentManager.getInstance();
- var _loc6_ = _loc4_.getActiveMain();
- var _loc2_ = _loc4_.getActiveSub();
- this.nav.update(_loc2_);
- this.headline.update(_loc2_);
- var _loc3_ = 302 - this.registrationBlind._height;
- var _loc5_ = this.registrationBlind._width - 17;
- if(this.externalContent._height > _loc3_)
- {
- this.buildScrollbar(_loc5_,_loc3_);
- }
- else
- {
- this.removeScrollbar();
- }
- if(this.dataObj.client.contentList[_loc2_].isRateScreen)
- {
- if(this.rateScreen != null)
- {
- this.rateScreen.removeMovieClip();
- }
- Object.registerClass("dummy",application.screens.RateScreen);
- this.rateScreen = application.screens.RateScreen(this.internalContent.attachMovie("dummy","rateScreen" + this.instCounter,this.instCounter));
- this.instCounter = this.instCounter + 1;
- this.rateScreen._x = 193;
- this.rateScreen._y = 73;
- this.rateScreen.setActiveSub(_loc2_);
- this.rateScreen.setDataObj(this.dataObj);
- this.rateScreen.setContentMC(this.externalContent);
- this.registrationBlind.setRateScreen(this.rateScreen);
- this.rateScreen.setContainer(this);
- this.rateScreen.build();
- this.removeScrollbar();
- }
- else if(this.rateScreen != null)
- {
- this.rateScreen.removeMovieClip();
- this.rateScreen = null;
- }
- }
- function onChangeRateContent(isSubcontent)
- {
- if(isSubcontent == true)
- {
- this.disclaimScroll.removeMovieClip();
- this.rateScreen.disable();
- this.registrationBlind.showBackButton();
- }
- else
- {
- this.rateScreen.enable();
- this.registrationBlind.hideBackButton();
- }
- var _loc2_ = 302 - this.registrationBlind._height;
- var _loc3_ = this.registrationBlind._width - 17;
- if(this.externalContent._height > _loc2_)
- {
- this.buildScrollbar(_loc3_,_loc2_);
- }
- else
- {
- this.removeScrollbar();
- }
- }
- function showDisclaimScroll(tf)
- {
- Object.registerClass("disclaimScroll",application.screens.DisclaimScrollScreen);
- this.disclaimScroll = application.screens.DisclaimScrollScreen(this.internalContent.attachMovie("disclaimScroll","disclaimScroll" + this.instCounter,this.instCounter));
- this.instCounter = this.instCounter + 1;
- this.disclaimScroll.setConfigProvider(this.configObj);
- this.disclaimScroll.setTextField(tf);
- this.disclaimScroll.setContainer(this);
- this.disclaimScroll.build();
- }
- function openRegistration()
- {
- application.core.ContentManager.getInstance().openRegistration();
- }
- function buildScrollbar(viewWidth, viewHeight)
- {
- if(this.scrollBar == null)
- {
- var _loc3_ = viewWidth;
- var _loc2_ = viewHeight;
- var _loc6_ = this.registrationBlind._x;
- var _loc5_ = this.nav._y;
- this.mask = this.internalContent.createEmptyMovieClip("mask" + this.instCounter,this.instCounter);
- this.instCounter = this.instCounter + 1;
- this.mask.clear();
- this.mask.beginFill(0,0);
- this.mask.moveTo(0,0);
- this.mask.lineTo(0,_loc2_);
- this.mask.lineTo(_loc3_,_loc2_);
- this.mask.lineTo(_loc3_,0);
- this.mask.lineTo(0,0);
- this.mask.endFill();
- this.mask._x = int(_loc6_);
- this.mask._y = int(_loc5_);
- this.externalContent.setMask(this.mask);
- Object.registerClass("dummy",application.screens.ScrollBarScreen);
- this.scrollBar = application.screens.ScrollBarScreen(this.internalContent.attachMovie("dummy","scrollBar" + this.instCounter,this.instCounter));
- this.instCounter = this.instCounter + 1;
- this.scrollBar.setContent(this.externalContent,viewHeight);
- }
- else
- {
- this.scrollBar.setContent(this.externalContent,viewHeight);
- this.externalContent.setMask(this.mask);
- }
- }
- function removeScrollbar()
- {
- this.mask.clear();
- this.mask.removeMovieClip();
- this.scrollBar.removeMovieClip();
- this.scrollBar = null;
- }
- function openInstaller()
- {
- }
- function openSoftware(id)
- {
- }
- function showInfo(id)
- {
- }
- function updateView(height, showBlind, id)
- {
- }
- function getScrollBar()
- {
- return this.scrollBar;
- }
- function getMask()
- {
- return this.mask;
- }
- }
-