I would like to use AS3 to automatically resize the browser to fullscreen so I can loose all the chrome. I have been experimenting a lot but have been unsuccessful.
Here's an example of the effect I would like: anasomnia.com
(there's a fullscreen icon in the bottom right of the browser to trigger the fullscreen)
I have tried this code, however I ran into trouble:
Actionscript Code:
addEventListener(Event.ENTER_FRAME,myFunction); function myFunction(event:Event){ stage.displayState=StageDisplayState.FULL_SCREEN; }
What happens is that when I test the file in flash CS5.5, the swf navigates fine, but no fullscreen effect occurs. When I export to Flash player 10.2, the file goes fullscreen but then it sticks on the frame where the action is located and the playback begins to flicker. If I create a projector and comment out the fullscreen code, and instead use the fullscreen option under VIEW, the fullscreen kicks in but then the playback fails to work properly. When I take the swf into a browser window, it doesn't respond to the fullscreen code.
I read a bit about how the embed tag in HTML needs new fullscreen parameters, however this didn't seem to make any difference.
I have learned that in order to have the fullscreen take effect, a user must initiate it, so I have successfully created the effect by attaching it to a mouse event. The problem I am having now is that the playback head sticks in fullscreen mode after playing the mc on frame two where a timerFinished function is supposed to move the playback forward to frame 3. The navigation works perfectly without fullscreen mode, however the playback sticks in fullscreen whether in a browser, stand alone projector, or just playing back in flashplayer 10.2. Here's my code if it helps to get a better sense of things (each frame has a stop action associated with it also). I sure hope to hear back from someone on this.....