而其内容文本框在AlertForm中的定义是:/**
* @private
* The internal AlertForm object that contains the text, icon, and buttons
* of the Alert control.
*/
mx_internal var alertForm:AlertForm;
ok,相信大家都知道该怎么做了,也就是在mx_internal命名空间下,把这个textfield提取出来,设置其htmltext即可,当然,你也可以进行其他的操作。/**
* The UITextField that displays the text of the Alert control.
*/
mx_internal var textField:IUITextField;
源码如下:
效果如下:var alert:Alert = Alert.show("", "提示");
var tf:IUITextField = alert.mx_internal::alertForm.mx_internal::textField;
tf.autoSize = TextFieldAutoSize.CENTER;
tf.htmlText = "<a href='http://www.asarea.me' target='_blank'><b><font color='#ffffff' size='13'>欢迎访问ASAREA</font></b></a>";