Differences between ActionScript and JavaScript
ActionScript is similar to the core JavaScript programming language. You don't need to know
JavaScript to use and learn ActionScript; however, if you know JavaScript, ActionScript will
seem familiar.
This manual does not attempt to teach general programming. There are many resources that
provide more information about general programming concepts and the JavaScript language.
•
The European Computers Manufacturers Association (ECMA) document ECMA-262 is
derived from JavaScript and serves as the international standard for the JavaScript language.
ActionScript is based on the ECMA-262 specification. For more information, see
international.org/publications/standards/Ecma-262.htm.
•
Netscape DevEdge Online has a JavaScript Developer Central site
developer.netscape.com/tech/javascript/index.html) that contains documentation and articles
useful for understanding ActionScript. The most valuable resource is the Core JavaScript Guide.
•
The Java Technology site has tutorials on object-oriented programming
docs/books/tutorial/java/index.html) that are targeted for the Java language but are useful for
understanding concepts that you can apply to ActionScript.
Some of the differences between ActionScript and JavaScript are described in the following list:
•
ActionScript does not support browser-specific objects such as Document, Window,
and Anchor.
•
ActionScript does not completely support all the JavaScript built-in objects.
•
ActionScript does not support some JavaScript syntax constructs, such as statement labels.
•
In ActionScript, the
•
ActionScript2.0 supports several features that are not in the ECMA-262 specification, such as
classes and strong typing. Many of these features are modeled after the ECMAScript 4 Draft
Proposal currently in development by ECMA TC39-TG1 (see
es4/index.html), the standards committee in charge of the evolution of the ECMA-262
specification.
•
ActionScript does not support regular expressions using the RegExp object. However,
Macromedia Central does support the RegExp object.
Unicode support for ActionScript
Macromedia Flex supports Unicode text encoding for ActionScript. This means that you can
include text in different languages in an ActionScript file. For example, you can include text in
English, Japanese, and French in the same file. For more information on Unicode support in Flex,
see "Using MXML" in Developing Flex Applications.
10
Chapter 1: ActionScript Basics
function can perform only variable references.
eval()
www.ecma-
(http://
(http://java.sun.com/
www.mozilla.org/js/language/
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers