|
    |
|
|
Whats New in ActionScript 3.0
Core language features Action Script 3.0 has received some changes to its core language structure. These most likely means very little to you, however it means Action Script 3.0 is faster, smarter and more efficient. As you work through this book you will see these changes such as the way an object can listen for an action. Example: myButton.addEventListener(“click”, onClick); ECMAScript for XML (E4X) Action Script 3.0 implements ECMAScript for XML (E4X), recently standardized as ECMA-357. E4X offers a natural, fluent set of language constructs for manipulating XML. In contrast to traditional XML-parsing APIs, XML with E4X performs like a native data type of the language. E4X streamlines the development of applications that manipulate XML by drastically reducing the amount of code needed. Method closures In Action Script 2.0, method closures were not aware of the object instance they were called from, this led to unexpected behavior when the method closure was called. Action Script 3.0 method closures are aware of it object instance which eliminates the unexpected behavior. Namespaces Namespaces (public, private, protected) can have the name of the programmers choice and work as custom access specifiers. Namespaces use a Universal Resource Identifier (URI) to avoid collisions, and when working with E4X they are used to represent XML namespaces. New primitive types Action Script 2.0 has a single numeric type, Number, a double-precision, floating point number. Action Script 3.0 contains the int and uint types. The int type is a 32-bit signed integer that lets Action Script code take advantage of the fast integer math capabilities of the CPU. The int type is useful for loop counters and variables where integers are used. The uint type is an unsigned, 32-bit integer type that is useful for RGB color values, byte counts, and more. Run-time exception One of the biggest parts of Programming is trouble shooting. More often then not, the programmer will type a variable wrong and nothing will work. Therefore, a great part of a programming language’s acceptability is is capabilities at detecting errors. Simply put, Action Script 3.0 reports more errors then previous versions. This will help the program quickly find the problem spots and repair them. Run-time types In Action Script 2.0, type annotations were primarily a developer aid; at run time, all values were dynamically typed. In Action Script 3.0, type information is preserved at run time, and used for a number of purposes. Flash Player 9 performs run-time type checking, improving the system’s type safety. Type information is also used to represent variables in native machine representations, improving performance and reducing memory usage. Regular expressions Action Script 3.0 includes native support for regular expressions so that you can quickly search for and manipulate strings. Action Script 3.0 implements support for regular expressions as they are defined in the ECMAScript edition 3 language specification (ECMA-262). Sealed classes In Action Script 2.0, all classes were dynamic by default. Meaning you could change properties on any variable without errors. In Action Script 3.0 by default all classes are sealed. in a sealed class one cannot change the properties at will. At compile-time the properties are defined and are not to be changed. This improves memory usage and results in a stronger program. You can however, create a dynamic class with the key word dynamic. |
PLEASE VISIT THE CONTRIBUTOR'S WEBSITE
FrenchSquared
Website dedicated to Flash Tutorials
FrenchSquared.com
|
|
No reactions yet.
Please login or sign up to rate this intel.
Please login or sign up to add a comment.
The copyright for this content entitled "Whats New in ActionScript 3.0" has been specified by the contributor as:
All Rights Reserved
This content may not be copied, distributed or adapted by anyone under any circumstances.
|
 |
May, 2012
2008
January, February, March, April, May, June, July, August, September, October, November, December
2009
January, February, March, April, May, June, July, August, September, October, November, December
2010
January, February, March, April, May, June, July, August, September, October, November, December
2011
January, February, March, April, May, June, July, August, September, October, November, December
2012
January, February, March, April, May
|
|
Not a member yet?
Qondio is a powerful network for making it online. If you have a website to
promote, we can help.
Sign up and get in on the action.
|
|
Welcome to Qondio! Discover the awesome power this network can deliver by going to our About page. Or you could skip straight to the Sign Up form.
|
|