
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
989
Appendix D
APPENDIX D
Differences from ECMA-262
and JavaScript
Naturally, this book focuses on the intricacies of ActionScript, but if you own
O’Reilly’s well-known JavaScript: The Definitive Guide, you’ll notice that the refer-
ence section of the two books share many similarities.
Although ActionScript, like JavaScript, is based on the ECMA-262 standard, certain
differences were necessitated by the constraints of Player size and backward compati-
bility. If you’re porting code from JavaScript, JScript, or another ECMA-262–based
language, you’ll find Table D-1 valuable. It summarizes the intentional differences
between ECMA-262, JavaScript, and ActionScript (for Flash 5 and later). Likewise, if
you’re porting ActionScript to another language, you’ll be better able to avoid the
pitfalls caused by ActionScript’s deviation from the ECMA-262 standard.
Table D-1 reflects the intentional differences between Flash ActionScript and the
ECMA-262 standard. It does not reflect any bugs that may exist in its attempted
implementation of the standard. Furthermore, Table D-1 reflects ActionScript’s
behavior when the
#strict pragma is not being used. (The undocumented, unsup-
ported
#strict pragma was intended to enhance ActionScript’s conformance with
the ECMA-262 standard. However, the
#strict pragma ...