Simple Text in Flex using ActionScript 3

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   applicationComplete="init()">

	<fx:Script>
		<![CDATA[
			import mx.controls.Text;
		
			private function init():void 		{			
				//Cretaing a Text in as3
					var simpleTxt:Text = new Text();		
					simpleTxt.horizontalCenter = 0; 		
					simpleTxt.verticalCenter = 0;			
					simpleTxt.text = "Hello World";
					
				//To display the text element
					this.addElement(simpleTxt);
			}
		]]>
	</fx:Script>
</s:Application>
Advertisements

About Ajeeth Boaz

I am a freelance photographer you can find my clicks @ www.ajeethboaz.com. I am a Developer by profession, I like sharing my experience through blogs you can find it @ http://blog.ajeethboaz.com/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: