小小菜鸟的web菜园子

web开发学习。好记性不如烂笔头。每天进步一点点!

导航

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的新东西太多了...学习...........

posted on 2008-10-16 18:24  『小小菜鸟』  阅读(1047)  评论(0编辑  收藏  举报