FULL_SCREEN_INTERACTIVE mode: the “Allow” button click is passed to the application

后端 未结 2 404
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-06 06:54

In an AS3 game (using Flex 4.10.0) I would like to allow players to chat, even when they are in fullscreen mode.

So I am using the following ActionScript code (the <

2条回答
  •  天涯浪人
    2021-01-06 07:43

    Found one workaround.

    Allow and Cancel buttons are not the parts of the application, so when you hover one of those buttons you receive rollOut event for application.

    
    


    Inside event handler you can disable mouse events for child objects. Don't disable for application as you won't get rollOver event after that.

    private function application_rollOutHandler(event:MouseEvent):void
    {
        this.mouseChildren = false;
    }
    
    private function application_rollOverHandler(event:MouseEvent):void
    {
        this.mouseChildren = true;
    }
    

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题