 			ConfigManager.disableOpen=new Boolean(false);
 			ConfigManager.disableSave=new Boolean(false);
 			addEventListener(KeyboardEvent.KEY_DOWN, processKey);
-//			mainPannel.name= "<a href=\'http://ncicb.nci.nih.gov/\'>NCI Center for Biomedical Informatics & Information Technology - Scientific Algorithm Service</a>";
-//			mainPannel.draw();
-			return;
-		}
-		
-//		override protected function createChildren():void
+			addEventListener(FlexEvent.CREATION_COMPLETE,onCreationComplete) ;
+			return;
+		}
+	
+		private function onCreationComplete(event : FlexEvent):void
+		{
+//			this.removeAllCh ildren();
+//			this.invalidateDisplayList();
+//			createCustomButtons();
+			mainPannel.name= "<a href=\'http://ncicb.nci.nih.gov/\'>NCI Center for Biomedical Informatics & Information Technology - Scientific Algorithm Service</a>";
+			var p1:XML =new XML("<math><mrow><mtext>default</mtext><mo selected='true'>&times;</mo><mtext>0123456789</mtext></mrow>" + "</math>")
+			mainPannel.setMathML(p1);
+		}
+		
+
+//		private function createCustomButtons() : void
 //		{
-//			Alert.show("before created by super", mainPannel+"");
 //			super.createChildren();
-//			Alert.show("created by super", mainPannel+"");
-//			mainPannel=null;
-//			while (this.numChildren>0)
+//			mainPannel = null;
+//			while (this.numChildren > 0)
 //			{
+//				
 //				this.removeChildAt(0);
 //			}
-//			var _loc_1:*=new MovieClip();
-//			var editorW:Number=800;
-//			var editorH:Number=500;
-//
-//			mainPannel = new FormulaPanel(_loc_1, 0,0,editorW, editorH, returnFocus);
+//			var _loc_1:* = new MovieClip();
+//			mainPannel = new EditorApp(_loc_1, 0, 0, _editorWidth, _editorHeight, returnFocus);
 //			mainPannel.draw();
-//			mainPannel.setMathML("..xx");
-//			Alert.show(mainPannel+"", mainPannel.getMathML());
-//			var _loc_2:*=new UIComponent();
+//			mainPannel.setMathML(_mathML);
+//			var _loc_2:* = new UIComponent();
 //			addChild(_loc_2);
-//			
-//			var _loc_3:*=new Timer(100,1);
-//			_loc_3.addEventListenr(TimerEvent.TIMER, redrawEditor);
+//			_loc_2.addChild(_loc_1);
+//			var _loc_3:* = new Timer(100, 1);
+//			_loc_3.addEventListener(TimerEvent.TIMER, redrawEditor);
 //			_loc_3.start();
 //			return;
-//		}
-		
+//		}// end function
+/**		
+		override protected function measure() : void
+		{
+			measuredHeight = editorHeight;
+			measuredMinHeight = editorHeight;
+			measuredWidth = editorWidth;
+			measuredMinWidth = editorWidth;
+			return;
+		}// end function
+		
+		public function get fontContext() : IFlexModuleFactory
+		{
+			return moduleFactory;
+		}
+		public function set fontContext(moduleFactory:IFlexModuleFactory) : void
+		{
+			this.moduleFactory = moduleFactory;
+			return;
+		}// end function
+
+		public function get listData() : BaseListData
+		{
+			return _listData;
+		}// end function
+		public function set listData(value:BaseListData) : void
+		{
+			_listData = value;
+			return;
+		}// end function
+
+		public function get mathML() : String
+		{
+			_mathML = mainPannel.getMathML();
+			return _mathML;
+		}// end function
+
+		public function set mathML(mathML:String) : void
+		{
+			_mathML = mathML;
+			if (mainPannel != null)
+			{
+				mainPannel.setMathML(_mathML);
+			}
+			return;
+		}// end function
+
+		public function get editorHeight() : Number
+		{
+			return _editorHeight;
+		}// end function
+
+		public function get editorWidth() : Number
+		{
+			return _editorWidth;
+		}// end function
+
+		public function set editorWidth(w:Number) : void
+		{
+			this._editorWidth = w;
+			width = w;
+			invalidateProperties();
+			invalidateSize();
+			invalidateDisplayList();
+			return;
+		}// end function
+
+		public function set editorHeight(h:Number) : void
+		{
+			this._editorHeight = h;
+			height = h;
+			invalidateProperties();
+			invalidateSize();
+			invalidateDisplayList();
+			return;
+		}
+*/	
 		//override private method
 		private function redrawEditor(event:TimerEvent):void
 		{

	
	import flash.display.MovieClip;
	import flash.events.KeyboardEvent;
	import flash.utils.Timer;
	
	import learnmath.mathml.components.MathMLEditor;
	import learnmath.mathml.formula.Constants;
	import learnmath.windows.ConfigManager;
	
	import mx.controls.Alert;
	import mx.core.IUIComponent;
	
	import flash.events.TimerEvent;

	public class FormulaEditor extends MathMLEditor 
	{
		public function FormulaEditor()
		{
			//duplicate MathMLEditor Constructor

			}
			return;
		}
/**	
		public function saveImageOnServer(type:String, compression:int, callbackName:Function) : void
		{
			mainPannel.saveImageOnServer(type, compression, callbackName);
			return;
		}// end function
		public function setConfiguration(key:String, value:String) : void
		{
			ConfigManager.setConfig(key, value);
			return;
		}// end function
		public function viewImageInBrowser(type:String, compression:int) : void
		{
			mainPannel.viewImageInBrowser(type, compression);
			return;
		}// end function
		public function processKey(event:KeyboardEvent) : void
		{
			if (mainPannel == null)
			{
				return;
			}
			mainPannel.processKey(event);
			return;
		}// end function

		public function returnFocus() : void
		{
			if (focusManager != null)
			{
				focusManager.setFocus(this);
			}
			return;
		}// end function
		
		public function getBase64Image(type:String, precission:int = 100) : String
		{
			return mainPannel.getBase64Image(type, precission);
		}// end function
 */
	}

}