HTML Text in a Flex Alert box

A quick and easy way to render HTML text with the body of a Flex Alert box. There is no API to set the htmlText property of the Alert text field, but you can access it using the mx_internal namespace.

 
var title:String ="HTML Alert!"; 
var htmlBody:String = "This is my HTML message with <b>Bold</b> text and <br/> HTML formatting <b/>"; 
 var alert:Alert = Alert.show(str,  htmlBody);  // now target the Alert text field (after we have opened it) and set the HTML text property	
 
use namespace mx.core.mx_internal; 
IUITextField(alert.alertForm.textField).htmlText = htmlBody;