home *** CD-ROM | disk | FTP | other *** search
- class application.screens.HeadlineScreen extends application.screens.AbstractScreen implements application.models.IScreen
- {
- var data;
- var state;
- var format;
- var isSpecial;
- var activeMain;
- var activeSub;
- var dataObj;
- var tf;
- var configObj;
- var rootMC;
- function HeadlineScreen()
- {
- super();
- this.data = null;
- this.state = null;
- this.format = new TextFormat();
- this.format.align = "left";
- this.format.color = 14811252;
- this.format.font = "Tele-Antiqua";
- this.format.leading = 2;
- this.format.size = 32;
- }
- function setAciveContent(activeMain, activeSub)
- {
- this.isSpecial = false;
- this.activeMain = activeMain;
- this.activeSub = activeSub;
- if(activeMain <= 3)
- {
- this.data = this.dataObj.content[activeMain];
- this.state = 2;
- }
- else if(activeMain == 4)
- {
- this.data = this.dataObj.benefit;
- this.state = 3;
- }
- else if(activeMain == 5)
- {
- this.data = this.dataObj.tonline;
- this.state = 3;
- }
- else if(activeMain == 6)
- {
- this.data = this.dataObj.client;
- this.state = 3;
- }
- else if(activeMain == 7)
- {
- this.data = this.dataObj.install;
- this.state = 3;
- }
- else if(activeMain == 8)
- {
- this.data = this.dataObj.software;
- this.state = 4;
- }
- else if(activeMain == 9)
- {
- this.data = this.dataObj.imprint;
- this.state = 3;
- }
- else if(activeMain == 11)
- {
- this.data = this.dataObj.help;
- this.state = 4;
- }
- this.hitArea.onDisable();
- }
- function showText(s)
- {
- this.tf.text = s;
- this.tf.setTextFormat(this.format);
- this.hitArea.clear();
- this.hitArea.beginFill(100,0);
- this.hitArea.moveTo(this.tf._x,this.tf._y + 6);
- this.hitArea.lineTo(this.tf._x,this.tf._y + 6 + this.tf._height - 10);
- this.hitArea.lineTo(this.tf._x + this.tf._width,this.tf._y + 6 + this.tf._height - 10);
- this.hitArea.lineTo(this.tf._x + this.tf._width,this.tf._y + 6);
- this.hitArea.lineTo(this.tf._x,this.tf._y + 6);
- this.hitArea.endFill();
- this.createFocusRec(this.hitArea,this.tf._width,this.tf._height - 10,this.tf._x,this.tf._y + 6);
- if(s == this.configObj.textList.helpContent)
- {
- this.hitArea.onEnable();
- this.isSpecial = true;
- }
- else
- {
- this.hitArea.onDisable();
- this.isSpecial = false;
- }
- }
- function update(activeSub)
- {
- var _loc2_ = null;
- _loc2_ = this.data.contentList;
- if(_loc2_[0].site != null)
- {
- if(activeSub != 0)
- {
- this.hitArea.onEnable();
- }
- else
- {
- this.hitArea.onDisable();
- }
- }
- else if(activeSub >= 2)
- {
- this.hitArea.onEnable();
- }
- else
- {
- this.hitArea.onDisable();
- }
- }
- function build()
- {
- this.hitArea = this.createEmptyMovieClip("hitArea",1);
- this.createTextField("tf",2,20,10,500,30);
- this.tf.autoSize = true;
- this.tf.embedFonts = true;
- this.tf.multiline = false;
- this.tf.selectable = false;
- this.tf.text = this.data.headline;
- this.tf.setTextFormat(this.format);
- this.hitArea.clear();
- this.hitArea.beginFill(100,0);
- this.hitArea.moveTo(this.tf._x,this.tf._y + 6);
- this.hitArea.lineTo(this.tf._x,this.tf._y + 6 + this.tf._height - 14);
- this.hitArea.lineTo(this.tf._x + this.tf._width,this.tf._y + 6 + this.tf._height - 14);
- this.hitArea.lineTo(this.tf._x + this.tf._width,this.tf._y + 6);
- this.hitArea.lineTo(this.tf._x,this.tf._y + 6);
- this.hitArea.endFill();
- this.buildButton(this.hitArea);
- this.createFocusRec(this.hitArea,this.hitArea._width,this.hitArea._height,this.tf._x,this.tf._y + 6);
- application.core.FocusManager.getInstance().registerButton(this.hitArea,8);
- }
- function onButtonRollOver(mc)
- {
- }
- function onButtonRollOut(mc)
- {
- }
- function onButtonPress(mc)
- {
- }
- function onButtonRelease(mc)
- {
- if(!this.isSpecial)
- {
- var _loc2_ = null;
- _loc2_ = this.data.contentList;
- if(_loc2_[0].site != null)
- {
- this.rootMC.update(this.state,this.activeMain,0);
- }
- else
- {
- this.rootMC.update(this.state,this.activeMain,1);
- }
- }
- else
- {
- this.rootMC.getNextContent();
- }
- }
- function onButtonDisable(mc)
- {
- }
- function onButtonEnable(mc)
- {
- }
- function onButtonReleaseOutside(mc)
- {
- }
- }
-