在我的项目中,我使用了下面的函数
public function createIconMenu():NativeMenu{
var iconMenu:NativeMenu = new NativeMenu();
iconMenu.addItem(new NativeMenuItem("", true));//Separator
if(NativeApplication.supportsSystemTrayIcon){
iconMenu.addItem(showCommand);
showCommand.addEventListener(Event.SELECT, onShowCommand);
iconMenu.addItem(new NativeMenuItem("", true));//Separator
var exitCommand: NativeMenuItem = iconMenu.addItem(new NativeMenuItem("Exit"));
exitCommand.addEventListener(Event.SELECT, exit);
}
return iconMenu;
}
public function exit(event:Event):void{
NativeApplication.nativeApplication.exit();
}但是在这个公共函数中,exit显示了类似1024的错误:覆盖一个没有标记为覆盖的函数。
我哪里写错了代码?你能给我解释一下吗?
发布于 2009-05-08 06:32:52
将exit函数重命名为其他名称。这与系统提供的、用户无法覆盖的全局命名空间中的另一个函数发生冲突。
发布于 2011-05-07 05:31:30
Reset.addEventListener(MouseEvent.CLICK,play);
函数播放(event:MouseEvent):void{ gotoAndPlay(1);}
我在这个简单的代码中遇到了同样的问题
https://stackoverflow.com/questions/838461
复制相似问题