Newer
Older
CEE_VE50 / com / digitec / cee / Category.as
@cwolsen cwolsen on 23 Aug 2019 3 KB Ckeaning up commented out code.
/*******************************************************************************
 * @author Maria A. Zamora
 * @company Digitec Interactive Inc.
 * @version 0.1
 * @date 12/14/2010
 * 
 * Category class for conceptsFrame3 movie of the CEE application CS5 version of
 * com.digitec.cee.Category
 ******************************************************************************/
package com.digitec.cee
{
	
	public class Category 
	{				 								
		private var catId:int;
		private var catName:String;
		private var concept_Count:int = 0;
		private var is_Active:Boolean;
		private var catConcepts_arr:Array;
		private var base_Y:Number;
		
		public function Category(id:int, catname:String, basey:Number, conceptcount:int)
		 {			
		 	catId = id;
			catName = catname;												
			base_Y = basey;
			catConcepts_arr = new Array();
			concept_Count = conceptcount;
		}							
		
		/***********************************************************************
		 * SET FUNCTIONS
		 **********************************************************************/				
		public function set isActive( active:Boolean ):void{ is_Active = active; }		
		
		public function set conceptCount( count:int ):void	{ concept_Count =count; }				
		
		/***********************************************************************
		 * GET FUNCTIONS
		 **********************************************************************/				
		public function get isActive():Boolean{ return is_Active; }
			
		public function get categoryID():int{ return catId; }
		
		public function get categoryName():String	{ return catName; }				
		
		public function get conceptCount():int	{ return concept_Count; }				
		
		public function get baseY():Number	{	return base_Y; 	}		
		

		public function get conceptArray():Array { return catConcepts_arr; }		
		
		
		/***********************************************************************
		 * FUNCTION: PUSH CONCEPTS ITEMS IN THE CONCEPT ARRAY OF THE SPECIFIC
		 * CATEGORY
		 **********************************************************************/				
		public function insertConceptToArray( item:ConceptItem ):void
		{			
			catConcepts_arr.push(item);
			conceptCount = catConcepts_arr.length;			
		}
				
		/***********************************************************************
		 * FUNCTION: SET CONCEPTS FROM XML
		 **********************************************************************/
		public function setConcepts(_xml:XML ):void
		{						
			/*
			 * // populate the categories //for (var j=0; j<conceptList_mc.catList.length;
			 * j++) { for (var j=0; j<catList.length; j++) { var theCategory =
			 * conceptList_mc["cat" + j + "_mc"]; //theCategory.hideConcepts =
			 * conceptList_mc.hideConcepts; //theCategory.showConcepts =
			 * conceptList_mc.showConcepts; theCategory.myCat = j;
			 * theCategory.baseY = theCategory.y; theCategory.catName_txt.text =
			 * catList[j];//theCategory.catName_txt.text =
			 * conceptList_mc.catList[j]; var cList:Array = new Array(); cList =
			 * getConceptsByCategory(j); // get concept list for a category
			 * theCategory.col1_mc.col_txt.htmlText = "";
			 * theCategory.col2_mc.col_txt.htmlText = "";
			 * this.hideConcepts(j);//theCategory.hideConcepts();
			 * theCategory.conceptCount_txt.text = cList.length + " concepts";
			 * for (var i=0; i<cList.length; i++) { var theField; if (i<Math.ceil(cList.length/2)) {
			 * theField = theCategory.col1_mc.col_txt; } else { theField =
			 * theCategory.col2_mc.col_txt; } theField.htmlText += "<p><a
			 * href=\"asfunction:appRoot.showConcept," + cList[i].id + "\">" +
			 * cList[i].name + "</a></p>\n"; } theCategory.listHeight =
			 * Math.ceil(cList.length/2);
			 * 
			 * //theCategory.cat_btn.onRelease = function() {
			 * this._parent._parent.selectCategory(this._parent.myCat); } }
			 */
		}							
 
	} // Main class
 
} // end package