Add icon to Alert dialog
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.controls.Alert;
[Embed(source="logo.png")]
private var sampleIcon:Class;
private function showAlert(event:Event):void {
var alert:Alert = Alert.show("test",
"Important Message",
Alert.OK,
this,
null,
sampleIcon);
}
</mx:Script>
<mx:Button id="button" label="Show Alert" click="showAlert(event)" />
</mx:Application>
Related examples in the same category