beautypg.com

Document.as3strictmode, Document.as3warningsmode – Adobe Extending Flash Professional CS5 User Manual

Page 97

background image

75

EXTENDING FLASH PROFESSIONAL

Document object

Last updated 5/2/2011

document.as3StrictMode

Availability
Flash CS3 Professional.

Usage

document.as3StrictMode

Description
Property; a Boolean value that specifies whether the ActionScript 3.0 compiler should compile with the Strict Mode
option turned on (

true

) or off (

false

). Strict Mode causes warnings to be reported as errors, which means that

compilation will not succeed if those errors exist. The default value is

true

.

Example
The following example turns off the Strict Mode compiler option.

var myDocument = fl.getDocumentDOM();

fl.outputPanel.trace("Strict Mode value before modification is " + myDocument.as3StrictMode);

myDocument.as3StrictMode = false;

fl.outputPanel.trace("Strict Mode value after modification is " + myDocument.as3StrictMode);

See also

document.as3WarningsMode

document.as3WarningsMode

Availability
Flash CS3 Professional.

Usage

document.as3WarningsMode

Description
Property; a Boolean value that specifies whether the ActionScript 3.0 compiler should compile with the Warnings
Mode option turned on (

true

) or off (

false

). Warnings Mode causes extra warnings to be reported that are useful for

discovering incompatibilities when updating ActionScript 2.0 code to ActionScript 3.0. The default value is

true

.

Example
The following example turns off the Warnings Mode compiler option.

var myDocument = fl.getDocumentDOM();

fl.outputPanel.trace("Warnings Mode value before modification is " +

myDocument.as3WarningsMode);

myDocument.as3WarningsMode = false;

fl.outputPanel.trace("Warnings Mode value after modification is " +

myDocument.as3WarningsMode);

This manual is related to the following products: