This is a utility to use to ease the pain of going fullscreen in complicated applications. It is a static class that allows you to call goFullScreen() (with an optional parameter of background color) and exitFullScreen(). After calling goFullScreen() you can statically call addChild() and removeChild() just as if it was a UIComponent. The addChild method also allows you to pass optional parameters which will center horizontally or vertically, stretch proportionally, and set anchor point, to allow you to position the children through the fullscreen canvas. This effectively lets you completely build a new view expressly for use within fullscreen. When you call exitFullScreen, or press the escape key, the utility cleans up any children that have been added to it, and puts them back where they had been previously, maintaining all of their properties.
This utility can be especially advantageous with video players where the fullscreen version is much stripped down from the embedded version, since it lets you selectively add items to the fullscreen canvas, then puts them back for you automatically when you exit full screen.
Here is the source
and
Here is the demo which shows you how you can change the background color of your full-screen container and shows how you can selectively add items to it.
Feel free to use it
Thanks again and feel free to leave comments
Eric
