13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Display programming<br />

AC_FL_RunCont<strong>en</strong>t(<br />

...<br />

'allowFullScre<strong>en</strong>','true',<br />

...<br />

); //<strong>en</strong>d AC code<br />

This does not apply to SWF files running in the stand-alone Flash Player.<br />

Note: If you set the Window Mode (wmode in the HTML) to Opaque Windowless (opaque) or Transpar<strong>en</strong>t Windowless<br />

(transpar<strong>en</strong>t), the full-scre<strong>en</strong> window is always opaque<br />

There are also security-related restrictions for using full-scre<strong>en</strong> mode with Flash Player in a browser. These restrictions<br />

are described in “Security” on page 1031.<br />

Enabling full-scre<strong>en</strong> interactive mode in Flash Player 11.3 and higher<br />

Flash Player 11.3 and higher support full-scre<strong>en</strong> interactive mode, which <strong>en</strong>ables full support for all keyboard keys<br />

(except for Esc, which exits full-scre<strong>en</strong> interactive mode). Full-scre<strong>en</strong> interactive mode is useful for gaming (for<br />

example, to <strong>en</strong>able chat in a multi-player game or WASD keyboard controls in a first-person shooter game.)<br />

To <strong>en</strong>able full-scre<strong>en</strong> interactive mode for a SWF file embedded in an HTML page, the HTML code to embed Flash<br />

Player must include a param tag and embed attribute with the name allowFullScre<strong>en</strong>Interactive and value true,<br />

like this:<br />

<br />

...<br />

<br />

<br />

<br />

In the Flash authoring tool, select File -> Publish Settings and in the Publish Settings dialog box, on the HTML tab,<br />

select the Flash Only - Allow Full Scre<strong>en</strong> Interactive template.<br />

In Flash Builder and Flex, <strong>en</strong>sure that the HTML templates include and tags that support full<br />

scre<strong>en</strong> interactive mode.<br />

If you are using JavaScript in a web page to g<strong>en</strong>erate the SWF-embedding tags, you must alter the JavaScript to add the<br />

allowFullScre<strong>en</strong>Interactive param tag and attribute. For example, if your HTML page uses the<br />

AC_FL_RunCont<strong>en</strong>t() function (which is used in HTML pages g<strong>en</strong>erated by Flash Professional and Flash Builder),<br />

you should add the allowFullScre<strong>en</strong>Interactive parameter to that function call as follows:<br />

AC_FL_RunCont<strong>en</strong>t(<br />

...<br />

'allowFullScre<strong>en</strong>Interactive','true',<br />

...<br />

); //<strong>en</strong>d AC code<br />

This does not apply to SWF files running in the stand-alone Flash Player.<br />

Full scre<strong>en</strong> stage size and scaling<br />

The Stage.fullScre<strong>en</strong>Height and Stage.fullScre<strong>en</strong>Width properties return the height and the width of the<br />

monitor that’s used wh<strong>en</strong> going to full-scre<strong>en</strong> size, if that state is <strong>en</strong>tered immediately. These values can be incorrect<br />

if the user has the opportunity to move the browser from one monitor to another after you retrieve these values but<br />

before <strong>en</strong>tering full-scre<strong>en</strong> mode. If you retrieve these values in the same ev<strong>en</strong>t handler where you set the<br />

Stage.displayState property to StageDisplayState.FULL_SCREEN, the values are correct.For users with multiple<br />

Last updated 6/6/2012<br />

168

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!