21Jul

Label Component

No comments

The Label Component is described as: A Label component displays one or more lines of plain or HTML-formatted text that can be formatted for alignment and size.

package
{
	import flash.display.MovieClip;
	import flash.text.TextFieldAutoSize;
	import fl.controls.Label;

	public class LabelComponent extends MovieClip
	{

		public function LabelComponent()
		{
			var myStr:String = "This is a test of the Label Component - This is a test of the Label Component";
			var myLbl:Label = new Label();

			myLbl.move(10,10);
			myLbl.width = stage.stageWidth;
			myLbl.height = stage.stageHeight;
			myLbl.text = myStr;
			myLbl.autoSize = TextFieldAutoSize.LEFT;
			addChild(myLbl);
		}
	}
}

Share/Save/Bookmark

Monday, July 21st, 2008 at 12:43 pm and is filed under Actionscript 3, Flash Components. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply