修饰警告弹框

Posted on 2013-08-02 10:19  诸葛小北  阅读(175)  评论(0编辑  收藏  举报
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" 
               applicationComplete="init()" >
    <fx:Script>
        <![CDATA[
            import mx.controls.Alert;
            import mx.events.CloseEvent;
            [Embed(source="assets/warning.gif")]
            [Bindable]
            protected var _iconWarning:Class;
            
            protected function init():void{
             var alert:Alert;
             Alert.buttonWidth = 150;
             Alert.okLabel = "Disneyland";
             Alert.yesLabel = "Kennedy Space Port";
             Alert.noLabel = "Six Flags";
             Alert.cancelLabel ="mARINE World";
             alert = Alert.show("你今天想去哪里","Destination",Alert.OK|Alert.YES|Alert.NO|Alert.CANCEL,this,onAlertClose,_iconWarning,Alert.YES);
             alert.height = 150;
             alert.width = 750;
             Alert.okLabel = "oK";
             Alert.yesLabel = "YES";
             Alert.noLabel = "NO";
             Alert.cancelLabel = "Canccel";
                 
            }
            
            protected function onAlertClose(event:CloseEvent):void{
            }
        ]]>
    </fx:Script>
</s:Application>
View Code

Copyright © 2024 诸葛小北
Powered by .NET 8.0 on Kubernetes