摘要:
运行结果如图:源代码:<?xml version="1.0" encoding="utf-8"?><mx:Container xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="{ShowWidth}" height="{ShowHei 阅读全文
摘要:
实现代码如下:var UI:UIComponent=new UIComponent();nWidth=40;nHeight=40;var DrawPic:Sprite=new Sprite();DrawPic.graphics.clear();DrawPic.graphics.beginFill(0xffffff);DrawPic.graphics.drawRect(0,0,nWidth,nHeight);DrawPic.graphics.endFill();//添加输出文本var txtTemp : TextField= new TextField();txtTemp.autoSize = 阅读全文