Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您知道当您右键单击场景并弹出一堆选项时吗?您如何禁用快退和快进选项(以防用户意外按下这些选项之一),因为它搞砸了我的整个 Flash 游戏。
您可以使用禁用大多数上下文菜单
stage.showDefaultContextMenu = false;
不过,这仍然会留下“设置”和“关于”部分
有一个技巧可以通过捕捉舞台上的右键单击事件来完全删除右键菜单,不知道它是否仍然适用于当前的 Flash 播放器版本:
stage.addEventListener(MouseEvent.RIGHT_CLICK, doNothing); private function doNothing(e:MouseEvent):void { //do nothing... }