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

Programming HTML and JavaScript in AIR<br />

Loading JavaScript files from outside the application installation directory<br />

Adobe AIR 1.0 and later<br />

Loading script files from outside the application sandbox is not permitted. No security error is g<strong>en</strong>erated. All script<br />

files that run in the application sandbox must be installed in the application directory. To use external scripts in a page,<br />

you must map the page to a differ<strong>en</strong>t sandbox. See “Loading application cont<strong>en</strong>t into a non-application sandbox” on<br />

page 996.<br />

docum<strong>en</strong>t.write() and docum<strong>en</strong>t.writeln()<br />

Adobe AIR 1.0 and later<br />

Calls to docum<strong>en</strong>t.write() or docum<strong>en</strong>t.writeln() are ignored after the page load ev<strong>en</strong>t has be<strong>en</strong> handled. No<br />

security error is g<strong>en</strong>erated. As an alternative, you can load a new file, or replace the body of the docum<strong>en</strong>t using DOM<br />

manipulation techniques.<br />

Synchronous XMLHttpRequests before the load ev<strong>en</strong>t or during a load ev<strong>en</strong>t<br />

handler<br />

Adobe AIR 1.0 and later<br />

Synchronous XMLHttpRequests initiated before the page load ev<strong>en</strong>t or during a load ev<strong>en</strong>t handler do not return any<br />

cont<strong>en</strong>t. Asynchronous XMLHttpRequests can be initiated, but do not return until after the load ev<strong>en</strong>t. After the load<br />

ev<strong>en</strong>t has be<strong>en</strong> handled, synchronous XMLHttpRequests behave normally.<br />

Dynamically created script elem<strong>en</strong>ts<br />

Adobe AIR 1.0 and later<br />

Dynamically created script elem<strong>en</strong>ts, such as wh<strong>en</strong> created with innerHTML or docum<strong>en</strong>t.createElem<strong>en</strong>t()<br />

method are ignored.<br />

Accessing AIR API classes from JavaScript<br />

Adobe AIR 1.0 and later<br />

In addition to the standard and ext<strong>en</strong>ded elem<strong>en</strong>ts of Webkit, HTML and JavaScript code can access the host classes<br />

provided by the runtime. These classes let you access the advanced features that AIR provides, including:<br />

Access to the file system<br />

Use of local SQL databases<br />

Control of application and window m<strong>en</strong>us<br />

Access to sockets for networking<br />

Use of user-defined classes and objects<br />

Sound capabilities<br />

Last updated 6/6/2012<br />

984

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

Saved successfully!

Ooh no, something went wrong!