/***************************************************************************
* @author Maria A. Zamora
* @company Digitec Interactive Inc.
* @version 0.1
* @date 12/14/2010
*
* AboutCEE class for aboutFrame2 movie of the CEE application CS5 version
* of com.digitec.cee.AboutCEE
*
**************************************************************************/
package com.digitec.cee
{
import flash.display.MovieClip;
import flash.events.*;
import flash.text.*;
import flash.display.Sprite;
import flash.text.StyleSheet;
import flash.text.TextField;
import flash.display.Loader;
import flash.net.*;
import flash.text.TextFormat;
import flash.net.URLRequest;
import flash.system.Capabilities;
public class AboutCEE extends BaseCEE {
private var myFont:Font = new Font3();
private var versionField:TextField;
private var hwidth:Number=700;
private var hheight:Number=410;
private var position:Array=[44,93]
private var testLink:Object;
// PDF
public function AboutCEE()
{
super(MainConstants.XMLABOUT);
// getDrive();
setup();
}
/***********************************************************************
* FUNCTION: SETUP FRAME TEXT_FIELDS FROM XML
**********************************************************************/
override public function setFramesText(_xml:XML ):void
{
this.title_tf.text = _xml.xtitle; // maybe without the this.
this.version_tf.text = _xml.xversion;
var myFormat:TextFormat = new TextFormat();
myFormat.font = myFont.fontName;
myFormat.size = 12;
myFormat.color = 0x8DC269;
myFormat.bold = true;
versionField = new TextField();
versionField.defaultTextFormat = myFormat;
versionField.height = 17;
versionField.width = 50;
versionField.background = false;
versionField.border = false;
versionField.multiline = true;
versionField.wordWrap = true;
versionField.x = 415;
versionField.y = 581;
versionField.embedFonts=true;
versionField.text = _xml.xversion2;
addChild(versionField);
var myFormat2:TextFormat = new TextFormat();
myFormat2.font = myFont.fontName;
myFormat2.size = 18;
myFormat2.color = 0x000000;
myFormat2.bold = true;
this.about_tf.htmlText = _xml.xcaption1;
this.about_tf.addEventListener(TextEvent.LINK, linkEvent);
this.about_tf.defaultTextFormat = myFormat2;
this.about_tf.embedFonts=true;
this.register_tf.text = _xml.xregister;
}
private function linkEvent( txtEvt :TextEvent ):void
{
var functionArr:Array = HelperFunctions.extractFunctionName( txtEvt.text );
var functionName:String = functionArr[0];
var args:String = functionArr[1];
switch( functionName )
{
case "gotoWebPage" :
this.gotoWebPage(args);
break;
default :
trace("function not found");
}
}
private function gotoWebPage( str:String ):void
{
if(str!=null)
{
var request:URLRequest = new URLRequest(str);
navigateToURL(request, '_blank');
}
}
/***********************************************************************
* FUNCTIONS: SET UP ALL BUTTONS AND TEXTFIELDS
**********************************************************************/
private function setup():void
{
this.close_button.buttonMode = true;
this.close_button.mouseChildren = false;
this.close_button.useHandCursor = true;
this.close_button.addEventListener(MouseEvent.MOUSE_OVER, onCloseOver);
this.close_button.addEventListener(MouseEvent.MOUSE_OUT, onCloseOut);
this.close_button.addEventListener(MouseEvent.CLICK, onCloseClick);
this.nav_back_button.addEventListener(MouseEvent.MOUSE_OVER, onNavBackOver);
this.nav_back_button.addEventListener(MouseEvent.MOUSE_OUT, onNavBackOut);
this.nav_back_button.addEventListener(MouseEvent.CLICK, gotoLastFrm);
this.nav_home_button.addEventListener(MouseEvent.MOUSE_OVER, onNavHomeOver);
this.nav_home_button.addEventListener(MouseEvent.MOUSE_OUT, onNavHomeOut);
this.nav_home_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoHomeFrm);
this.nav_concepts_button.addEventListener(MouseEvent.MOUSE_OVER, onNavConceptsOver);
this.nav_concepts_button.addEventListener(MouseEvent.MOUSE_OUT, onNavConceptsOut);
this.nav_concepts_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoConceptsFrm);
this.nav_lessons_button.addEventListener(MouseEvent.MOUSE_OVER, onNavLessonsOver);
this.nav_lessons_button.addEventListener(MouseEvent.MOUSE_OUT, onNavLessonsOut);
this.nav_lessons_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoSearchFrm);
}
// /////////// html page //////////////////
/***********************************************************************
* FUNCTIONS: BUTTONS ROLL OVER & OUT
**********************************************************************/
private function onCloseOver(evt:MouseEvent):void
{
this.close_button.gotoAndStop(2);
}
private function onCloseOut(evt:MouseEvent):void
{
this.close_button.gotoAndStop(1);
}
private function onNavBackOver(evt:MouseEvent):void
{
this.back_icon_roll.gotoAndStop(2);
}
private function onNavBackOut(evt:MouseEvent):void
{
this.back_icon_roll.gotoAndStop(1);
}
private function onNavHomeOver(evt:MouseEvent):void
{
this.house_mc.gotoAndStop(2);
}
private function onNavHomeOut(evt:MouseEvent):void
{
this.house_mc.gotoAndStop(1);
}
private function onNavConceptsOver(evt:MouseEvent):void
{
this.nav_concepts_roll.gotoAndStop(2);
}
private function onNavConceptsOut(evt:MouseEvent):void
{
this.nav_concepts_roll.gotoAndStop(1);
}
private function onNavLessonsOver(evt:MouseEvent):void
{
this.nav_lessons_roll.gotoAndStop(2);
}
private function onNavLessonsOut(evt:MouseEvent):void
{
this.nav_lessons_roll.gotoAndStop(1);
}
} // Main class
} // end package