/******************************************
 * @author Maria A. Zamora
 * @company Digitec Interactive Inc.
 * @version 0.1
 * @date 12/14/2010
 * 
 * This is the Main class for set all display objects 
 * of the CEE application interface
 * CS5 version of com.digitec.cee.CEEInterface
 *  
*******************************************/
package com.digitec.cee
{
	import flash.display.MovieClip;
	import flash.display.Stage;		
	import flash.display.Sprite;

	//import flash.display.Sprite;
	//import flash.events.*;
	
	public class CEEInterface// extends MovieClip
	{				 
		// private var currentframe:int;		
		 
		 public function CEEInterface()
		 {
			//super();
			///////////////////////////////////////////////visible = false;
			//CEEConnector.CEE_INTERFACE = this;
			//setupHome();
			//setupListeners();
		}
		/*
		private function setupHome():void
		{
			setBtnsVisibility(false, false, false, false, false, false, true);						
			title_tf.visible = false;						
			showMenuBtns(false, false, false, false);			//to avoid roll			
			showHomeBtns(true ,true);
			//setFrameText(1);
			//////////////////////addEventListener("menuClicked", handleMenu);			
			///////////////////////////_completeTimer = new Timer(1, 0);
			////////////////////////_completeTimer.addEventListener(TimerEvent.TIMER, timerHandler);
		}
		
		private function setupListeners():void
		{
			addEventListener(Event.ADDED_TO_STAGE, init);												
			nav_back_button.addEventListener(MouseEvent.MOUSE_OVER, onNavBackOver); //(frame 2, 3, 4, 5)
			nav_back_button.addEventListener(MouseEvent.MOUSE_OUT, onNavBackOut); //(frame 2, 3, 4, 5)
			nav_back_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoHomeFrm); //(frame 2, 3, 4, 5)

			nav_home_button.addEventListener(MouseEvent.MOUSE_OVER, onNavHomeOver); //(frame 2, 3, 4, 5)
			nav_home_button.addEventListener(MouseEvent.MOUSE_OUT, onNavHomeOut); //(frame 2, 3, 4, 5)
			nav_home_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoHomeFrm); //(frame 2, 3, 4, 5)

			nav_concepts_button.addEventListener(MouseEvent.MOUSE_OVER, onNavConceptsOver); //(frame 2, 3, 4, 5)
			nav_concepts_button.addEventListener(MouseEvent.MOUSE_OUT, onNavConceptsOut); //(frame 2, 3, 4, 5)
			nav_concepts_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoConceptsFrm); //(frame 2, 3, 4, 5)

			nav_lessons_button.addEventListener(MouseEvent.MOUSE_OVER, onNavLessonsOver); //(frame 2, 3, 4, 5)
			nav_lessons_button.addEventListener(MouseEvent.MOUSE_OUT, onNavLessonsOut); //(frame 2, 3, 4, 5)
			nav_lessons_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoSearchFrm); //(frame 2, 3, 4, 5)

			pagejump_btn_3.addEventListener(MouseEvent.MOUSE_DOWN, gotoLessonsFrm); //(frame 3)
		}
			
	*/
		/*******************************************************************
	 	* FUNCTION:  TO INITIALIZE APPLICATION
		*******************************************************************/
		//private function init(e:Event):void		
		public function setButtons():void
		{
			//removeEventListener(Event.ADDED_TO_STAGE, init);						
			///////////////////////////////////////////if (loaderInfo.parameters.suspendInfo) {	} else if (loaderInfo.parameters.learnerLanguage) {	}			
			/*
			concepts_button.buttonMode = true; //(frame 1)
			concepts_button.mouseChildren = false; //(frame 1)
			concepts_button.useHandCursor = true; //(frame 1)

			lessons_button.buttonMode = true; //(frame 1)
			lessons_button.mouseChildren = false; //(frame 1)
			lessons_button.useHandCursor = true; //(frame 1)

			register_button.buttonMode = true; //(frame 1)
			register_button.mouseChildren = false; //(frame 1)
			register_button.useHandCursor = true; //(frame 1)

			close_button.buttonMode = true; //(frame 1, 2, 3, 4, 5)
			close_button.mouseChildren = false; //(frame 1, 2, 3, 4, 5)
			close_button.useHandCursor = true; //(frame 1, 2, 3, 4, 5)	
		
			about_button.buttonMode = true; //(frame 1, 3, 4, 5)
			about_button.mouseChildren = false; //(frame 1, 3, 4, 5)
			about_button.useHandCursor = true; //(frame 1, 3, 4, 5)
		*/
			/* LISTENERS */	
			/*
			concepts_button.addEventListener(MouseEvent.MOUSE_OVER, onConceptsOver); //(frame 1)
			concepts_button.addEventListener(MouseEvent.MOUSE_OUT, onConceptsOut); //(frame 1)
			concepts_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoConceptsFrm); //(frame 1)

			lessons_button.addEventListener(MouseEvent.MOUSE_OVER, onLessonsOver); //(frame 1)
			lessons_button.addEventListener(MouseEvent.MOUSE_OUT, onLessonsOut); //(frame 1)
			lessons_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoSearchFrm); //(frame 1)
			//lessons_button.addEventListener(MouseEvent.CLICK, gotoSearchFrm); //(frame 1)

			register_button.addEventListener(MouseEvent.MOUSE_OVER, onRegisterOver); //(frame 1)
			register_button.addEventListener(MouseEvent.MOUSE_OUT, onRegisterOut); //(frame 1)

			close_button.addEventListener(MouseEvent.MOUSE_OVER, onCloseOver); //(frame 1, 2, 3, 4, 5)
			close_button.addEventListener(MouseEvent.MOUSE_OUT, onCloseOut); //(frame 1, 2, 3, 4, 5)

			about_button.addEventListener(MouseEvent.MOUSE_DOWN, gotoAboutFrm); //(frame 1, 3, 4, 5)			
			*/
				
			//loadXML();
		}
	
				
		/*******************************************************************
		 * FUNCTION: SETUP FRAME TEXT_FIELDS  FROM XML
		 *******************************************************************/
		
		public static function setFramesText( _xml:XML ):void
		//public static function setFramesText(mc:Sprite, _xml:XML ):void
		{
			/*
			mc.frm1_intro_tf.text = _xml.xframe1.xcaption[0];
			mc.frm1_title_tf.text =  _xml.xframe1.xtitle;
			mc.frm1_title2_tf.text =  _xml.xframe1.xtitle2;
			mc.frm1_copyright_tf.text =  _xml.xframe1.xtitle3;
			mc.frm1_version_tf.text = _xml.xframe1.xversion;
			mc.concepts_button.btntitle_tf.text =  _xml.xframe1.xbtnTitle1;
			mc.concepts_button.btn_tf.text =  _xml.xframe1.xbtntext1;
			mc.lessons_button.btntitle_tf.text =  _xml.xframe1.xbtnTitle2;
			mc.lessons_button.btn_tf.text =  _xml.xframe1.xbtntext2;
			*/
			frm1_intro_tf.text = _xml.xframe1.xcaption[0];
			frm1_title_tf.text =  _xml.xframe1.xtitle;
			frm1_title2_tf.text =  _xml.xframe1.xtitle2;
			frm1_copyright_tf.text =  _xml.xframe1.xtitle3;
			frm1_version_tf.text = _xml.xframe1.xversion;
			concepts_button.btntitle_tf.text =  _xml.xframe1.xbtnTitle1;
			concepts_button.btn_tf.text =  _xml.xframe1.xbtntext1;
			lessons_button.btntitle_tf.text =  _xml.xframe1.xbtnTitle2;
			lessons_button.btn_tf.text =  _xml.xframe1.xbtntext2;
		}
	
	
		/*******************************************************************
		 * FUNCTION: ENTER A NEW FRAME
		 *******************************************************************/
		// var container:Sprite = new Sprite();	
		/*
		private function menterFrame(event:Event):void
		{	
			currentframe = this.currentFrame;
			///////////////////////////////////////if
			////////////////////////////////var fsm:FrameScriptManager = new FrameScriptManager(myMC);
			///////////////////////////////////////////////trace("lbl1 is on frame: "+fsm.getFrameNumber("lbl1");
			///////////////////////////////////////////////////////fsm.setFrameScript("lbl1",myMethod);		
			//////////////////////////////////////////this.setTopPosition(objIntro);	//set instance under top position
			//////////////////////////////////////////////////////////////////////////////this.setTopPosition(container);	//set instance under top position
		}		
		/////////////////////////////////////////////////////////////////////container.addEventListener(Event.ENTER_FRAME, menterFrame);
		//stage.addEventListener(Event.ENTER_FRAME, menterFrame);	
	
		///////////////////////////////////////////////////////////////////////////this.addChild(container);
	*/
			
		/*******************************************************************
		 * FUNCTIONS:  BUTTONS ROLL OVER & OUT 
		  *******************************************************************/
		  /*
		private function onConceptsOver(evt:MouseEvent):void
		{
			concepts_button.gotoAndStop(2);
		}	
		private function onConceptsOut(evt:MouseEvent):void
		{
			//if(concepts_button.visible == true)
			//{
				concepts_button.gotoAndStop(1);
			//}
		}
		private function onLessonsOver(evt:MouseEvent):void
		{
			lessons_button.gotoAndStop(2);
		}	
		private function onLessonsOut(evt:MouseEvent):void
		{
			//if(lessons_button.visible == true)
			//{
				lessons_button.gotoAndStop(1);
			//}
			//test.text = "onLessonsOut";
		}
		private function onRegisterOver(evt:MouseEvent):void
		{
			register_button.gotoAndStop(2);
		}
		private function onRegisterOut(evt:MouseEvent):void
		{
			//if(register_button.visible == true)
			//{
				register_button.gotoAndStop(1);
			//}			
		}
		private function onCloseOver(evt:MouseEvent):void
		{
			close_button.gotoAndStop(2);
		}
		private function onCloseOut(evt:MouseEvent):void
		{
			//if(close_button.visible == true)
			//{
				close_button.gotoAndStop(1);
			//}						
		}
		private function onNavBackOver(evt:MouseEvent):void
		{
			//back_icon_roll.gotoAndStop(2);
		}
		private function onNavBackOut(evt:MouseEvent):void
		{
			//back_icon_roll.gotoAndStop(1);
		}
		private function onNavHomeOver(evt:MouseEvent):void
		{
			//house_mc.gotoAndStop(2);
		}
		private function onNavHomeOut(evt:MouseEvent):void
		{
			//house_mc.gotoAndStop(1);
		}
		private function onNavConceptsOver(evt:MouseEvent):void
		{
			//nav_concepts_roll.gotoAndStop(2);
		}
		private function onNavConceptsOut(evt:MouseEvent):void
		{
			//nav_concepts_roll.gotoAndStop(1);
		}
		private function onNavLessonsOver(evt:MouseEvent):void
		{
			//nav_lessons_roll.gotoAndStop(2);
		}
		private function onNavLessonsOut(evt:MouseEvent):void
		{
			//nav_lessons_roll.gotoAndStop(1);
		}

			*/
 
	} // Main class
 
} //end package







