<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" backgroundColor="#FFFFFF" backgroundGradientColors="#FFFFFF,#FFFFFF" viewSourceURL="srcview/index.html"> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.core.mx_internal; use namespace mx_internal; private function handleRegularAlertClick():void { var link:String = 'http://axelscript.com'; var text:String = "Thanks for ordering your product, use this link to view the pdf: " + link; Alert.show( text ); } private function handleHTMLTextAlertClick():void { var link:String = 'http://axelscript.com'; var text:String = "Thanks for ordering your product, <u><a href='" + link + "' target='_blank'>click here </a></u>" + "to view the pdf"; var a:Alert = Alert.show(text); a.mx_internal::alertForm.mx_internal::textField.htmlText = text; } ]]> </mx:Script> <mx:HBox> <mx:Button label="use a reg alert" click="handleRegularAlertClick()" /> <mx:Label text="click this and show an alert with a regular link as text" /> </mx:HBox> <mx:HBox> <mx:Button label="use a html text alert" click="handleHTMLTextAlertClick()" /> <mx:Label text="click this and show an alert with a clickable link" /> </mx:HBox> </mx:Application>