Fullscreen browser in Flash

Flash has always supported the full screen mode (fullscreen) in both the stand-alone player to the projector. This mode is still fully supported and has not changed. Adobe has instead recently introduced the ability to activate the fullscreen directly in the films displayed in the browser. We have introduced a new and simple ActionScript function that works with both the stand-alone player that player with the browser. ed <embed> . To make the fullscreen fuzionante must also operate the HTML side, adding a new parameter allowFullScreen in TAG <object> and <embed> . Everything else is left to the internal engine of Flash.
This new feature has, however, certain restrictions you need to know, first of all, the use of the Flash Player version 9.0.28.0 or higher. In addition, in summary:

  • Browser must be installed on the version of the Player 9.0.28.0 or higher
  • e <embed> . The developer must add a new parameter allowFullScreen Tags in <object> and <embed> . This parameter is normally set to false and does not allow the fullscreen. To enable fullscreen must explicitly set it to true .
  • A Dialog Box will be displayed when you enter fullscreen mode and will tell you how to get out of that mode. This Box will be visible for a few seconds, after which disappear on its own.
  • The activation of the fullscreen in ActionScript can only occur in response to a mouse click or by pressing a button, any other mode will be ignored in ActionScript 2.0 and unleash an exception throw in ActionScript 3.0.
  • In fullscreen mode you can not use the keyboard. The end user can not enter or edit text. The only answer to the keyboard is given to the key combination used to exit fullscreen mode (pressing ESC )

ActionScript code

The code required to set the fullscreen is very simple and takes advantage of the object Stage discussed on this blog in StageExt Class: movies resizable in Flash :

1
"displayState" ] = "fullScreen" ; Stage ["displayState"] = "fullscreen";

Note: you could also write:

1
displayState = "fullScreen" ; Stage . displayState = "fullscreen";

The two ways are equivalent and permission from ActionScript is that the properties of an object as an array indexed keys. Use the key array eliminates the problems when compiling in previous versions of Flash.

HTML

The HTML code is disarming, just add the tag <object> :

1
"allowFullScreen" value = "true" / > < param name = "allowFullScreen" value = "true" />

and in the tag &lt;embed&gt; the attribute:

1
allowFullScreen = "true"

That is:

1
2
3
4
5
6
7
8
9
10
"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" < object classid = "clsid: d27cdb6e-AE6D-11cf-96B8-444553540000"
codebase = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab # version = 9,0,18,0"
height = "400" id = "fullscreen" align = "middle" > width = "600" height = "400" id = "fullscreen" align = "middle">
"allowFullScreen" value = "true" / > < param name = "allowFullScreen" value = "true" />
"movie" value = "fullscreen.swf" / > < param name = "movie" value = "fullscreen.swf" />
"bgcolor" value = "#333333" / > < param name = "bgcolor" value = "# 333333" />
allowFullScreen = "true" bgcolor = "#333333" width = "600" height = "400" <Embed src = "fullscreen.swf" allowFullScreen = "true" bgcolor = "# 333333" width = "600" height = "400"
align = "middle" type = "application/x-shockwave-flash" name = "fullscreen" align = "middle" type = "application / x-shockwave-flash"
> pluginspage = "http://www.macromedia.com/go/getflashplayer" />
</ object >

More information

See Exploring full-screen mode in Flash Player 9

2 comments to: ""

  1. December 9, 2007 upnews.it :

    undolog  »Blog Archive » Fullscreen Flash in the browser ...

    Flash has always supported the full screen mode (fullscreen) in both the stand-alone player to the projector. This mode is still fully supported and has not changed. Adobe has recently introduced instead of the possibly ...

  2. March 18, 2009 Rigoberto :

    exisitra form alguna de eliminar harassing cuadro que ese late aproximadamente 2 segundos en retirarse pienso que trabajar devieorn a little mas claro the aesthetic algunos I shall speak no pero el esque usurer no real common mensage el y no como sabra responders

    me gustaria saver eliminar este es posible cuadro

Leave a comment

TAG XHTML PERMITS: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> CODE ENTRY:
 <pre></pre> // blocco generico <code></code> // blocco generico [cc_actionscript][/cc_actionscript] // Actionscript [cc_actionscript3][/cc_actionscript3] // Actionscript 3 [cc_css][/cc_css] // CSS Style Sheet [cc_html][/cc_html] // HTML [cc_js][/cc_js] // Javascript [cc_objc][/cc_objc] // Objective-C [cc_php][/cc_objc] // PHP [cc_sql][/cc_sql] // SQL