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 />

Security<br />

To <strong>en</strong>able full-scre<strong>en</strong> mode, in the and tags in the HTML page that contains a refer<strong>en</strong>ce to the SWF<br />

file, add the allowFullScre<strong>en</strong> parameter, with its value set to "true" (the default value is "false"), as shown in the<br />

following example:<br />

<br />

<br />

<br />

<br />

<br />

<br />

An HTML page may also use a script to g<strong>en</strong>erate SWF-embedding tags. You must alter the script so that it inserts the<br />

proper allowFullScre<strong>en</strong> settings. HTML pages g<strong>en</strong>erated by Flash Professional and Flash Builder use the<br />

AC_FL_RunCont<strong>en</strong>t() function to embed refer<strong>en</strong>ces to SWF files, and you need to add the allowFullScre<strong>en</strong><br />

parameter settings, as in the following:<br />

AC_FL_RunCont<strong>en</strong>t( ... "allowFullScre<strong>en</strong>", "true", ...)<br />

The ActionScript that initiates full-scre<strong>en</strong> mode can be called only in response to a mouse ev<strong>en</strong>t or keyboard ev<strong>en</strong>t. If<br />

it is called in other situations, Flash Player throws an exception.<br />

A message appears wh<strong>en</strong> the cont<strong>en</strong>t <strong>en</strong>ters full-scre<strong>en</strong> mode, instructing the user how to exit and return to normal<br />

mode. The message appears for a few seconds and th<strong>en</strong> fades out.<br />

For cont<strong>en</strong>t that is running in a browser, keyboard usage is restricted in full-scre<strong>en</strong> mode. In Flash Player 9, only<br />

keyboard shortcuts that return the application to normal mode, such as pressing the Escape key, are supported. Users<br />

can’t <strong>en</strong>ter text in text fields or navigate around the scre<strong>en</strong>. In Flash Player 10 and later, certain non-printing keys<br />

(specifically the arrow keys, space, and Tab key) are supported. However, text input is still prohibited.<br />

Full-scre<strong>en</strong> mode is always permitted in the stand-alone player or in a projector file. Also, keyboard usage (including<br />

text input) is fully supported in those <strong>en</strong>vironm<strong>en</strong>ts.<br />

Calling the displayState property of a Stage object throws an exception for any caller that is not in the same security<br />

sandbox as the Stage owner (the main SWF file). For more information, see “Stage security” on page 1052.<br />

Administrators can disable full-scre<strong>en</strong> mode for SWF files running in browsers by setting FullScre<strong>en</strong>Disable = 1<br />

in the mms.cfg file. For details, see “Administrator controls” on page 1037.<br />

In a browser, a SWF file must be contained in an HTML page to allow full-scre<strong>en</strong> mode.<br />

Full-scre<strong>en</strong> interactive mode security<br />

Flash Player 11.3 and later, Adobe AIR 1.0 and later<br />

Flash Player 11.3 and later support full-scre<strong>en</strong> interactive mode, in which cont<strong>en</strong>t running in Flash Player can fill the<br />

<strong>en</strong>tire scre<strong>en</strong> and accept text input. To <strong>en</strong>ter full-scre<strong>en</strong> interactive mode, the displayState property of the Stage is<br />

set to the StageDisplayState.FULL_SCREEN_INTERACTIVE constant. For more information, see “Working with<br />

full-scre<strong>en</strong> mode” on page 167.<br />

Last updated 6/6/2012<br />

1047

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

Saved successfully!

Ooh no, something went wrong!