Thursday, July 21, 2005
Macromedia Flex Dialog Icons
Recently working with PopUp Dialog Requestors in Flex, I noticed there is no standard set of icons to go along with the Halo theme that Flex defaults to. So what does any aspiring artist do? I created my own. Here they are for your use in any non-commercial project. If you use them, I'd appreciate an email letting me know. If you want to use them for a commercial project, contact me first.
There are two sets, one with shadows and one without. Right click the image you want and select Save Image As... to save the images to your hard drive. An example of using the images follows the images.
| Type | With Shadow | Without Shadow | Examples |
|---|---|---|---|
| Warning | ![]() ![]() |
||
| Information | |||
| Question | |||
| Critical |
dialog.mxml
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Script>
<![CDATA[
[Embed(source="question_icon.jpg")]
var iconQuestion:String;
function openAlert():Void {
mx.core.Application.alert("Make a choice", "Alert", mx.controls.Alert.OK | mx.controls.Alert.CANCEL, mx.utils.Delegate.create(this, this.alertHandler), mx.controls.Alert.OK, iconQuestion );
}
function alertHandler(event):Void {
if (event.detail==mx.controls.Alert.OK) {
lblResults.text="You clicked Ok."
} else if (event.detail==mx.controls.Alert.CANCEL) {
lblResults.text="You clicked Cancel."
}
}
]]>
</mx:Script>
<mx:Button label="Click Me" click="openAlert()" />
<mx:Label id="lblResults" />
</mx:Application>



