Air:给Ari程序添加系统托盘图标和图标的右键功能.

                        if(NativeApplication.supportsSystemTrayIcon){
                var sysTray:SystemTrayIcon = NativeApplication.nativeApplication.icon as SystemTrayIcon;
                sysTray.tooltip = "WordUp";
                iconMenu.addItem(new NativeMenuItem("",true)); //separator
                var exitCommand:NativeMenuItem = 
                    iconMenu.addItem(new NativeMenuItem("Exit WordUp"));
                exitCommand.addEventListener(Event.SELECT,function(event:Event):void{
                    NativeApplication.nativeApplication.exit();
                });
                sysTray.menu = iconMenu;
            }
            if(NativeApplication.supportsDockIcon){
                DockIcon(NativeApplication.nativeApplication.icon).menu = iconMenu;
            }

 

 

不多解释,帮助里对各类解释的很清楚...AIR的新东西太多了...学习...........

你可能感兴趣的:(AIR)