Second way is calling javasctipt functions from this article https://davidwalsh.name/fullscreen.
In this case browser goes to fullscreen mode, but instead my application I see black screen.
I don’t have a solution yet but as for the other way, which element are you using to request the full screen? Did you try passing the canvas element which holds the OpenFL? Or the div#openfl-content?
I’ve had trouble with the HTML5 target updating its display before. What happens if you move an element slightly, directly after entering full screen? Like mysprite.x += 1;
As you use FlashDevelop, what’s the build command in the output panel, it might be that FlashDevelop uses webgl key to compile.
My advice is to type& run the command in the console directly, to make sure that what you enter is what you actually get.
When I try exit from fullscreen, I press ‘Esc’, but there is no event KeyboardEvent.KEY_DOWN. And I can’t track the moment of exit from fullscreen by pressed ‘Esc’ button.
For the record, this is Haxe’s documentation, so it doesn’t necessarily apply to OpenFL. The main point of OpenFL is to take Flash-only features and make them work on other platforms.
That said, OpenFL hasn’t finished implementing all of Flash’s features, and stage.displayState seems to be one of the unfinished features.