您当前的位置: 首页 > 

Jave.Lin

暂无认证

  • 6浏览

    0关注

    704博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

AS3 Label ---- 显示标签

Jave.Lin 发布时间:2012-03-22 13:48:11 ,浏览量:6

package
{
	import flash.filters.GlowFilter;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	/**
	 * 显示标签,习惯了C#的输入文本框的名称:Label
	 * @author Jave.Lin
	 */
	public class Label extends TextField
	{
		public function get currentWidth():Number
		{
			return getBounds(this).width;
		}
		
		public function get currentHeight():Number
		{
			return getBounds(this).height;
		}
		
		public function Label($text:String="")
		{
			super();
			mouseEnabled=false;
			defaultTextFormat = new TextFormat("Verdana", 10, 0xffffff);
			autoSize = TextFieldAutoSize.LEFT;
			selectable = false;
			//描边
			filters=[new GlowFilter(0,1,2,2,6)];
			text=$text;
		}
	}
}
关注
打赏
1664331872
查看更多评论
立即登录/注册

微信扫码登录

0.0555s