Wednesday, August 11, 2010

Day- first action scrip 3.0

This janury was expecting a call form a comapany to work on the development of flex, now that its over 5 months, which i did not get but it increase my intrest to know more about the flex, since then i was planning to learn the action script, being designer it a challange to meet the best results and be alwasys with state of the art technology , so lets get rolling with as 3.0.


Its object oriented programming language, which helps flash to gain capabilities , its best usage is rich internet application development, ActionScript 3.0 is based on ECMAScript, the international standardized programming language for scripting. ActionScript 3.0 is compliant with the ECMAScript Language Specification, Third Edition (ECMA-262). It also contains functionality based on ongoing work on ECMAScript Edition 4, occurring within the ECMA standards body. ActionScript is executed by the ActionScript Virtual Machine (AVM) built into the Flash Player. It all started with avm1 and now we are with avm2. Which help to develop action script 3.0, and now ActionScript 3.0 code executes up to 10 times faster than legacy ActionScript code. The Flex product family, including the new Eclipse-based Flex Builder 2 IDE, will be the first product line to access the new capabilities of ActionScript 3.0.


ActionScript 3.0 is designed to address the following goals:
  • • Safety: The language supports type safety so developers can write unambiguous, easily maintainable code.
  • • Simplicity: The language is intuitive enough for developers to be able to read and write programs without constantly consulting a reference manual.
  • • Performance: The language enables developers to write complex programs that perform efficiently and responsively.
  • • Compatibility: The language provides a short backward and forward compatibility path and a significant overlap with industry standards. ActionScript 3.0 is a dialect of ECMAScript which formalizes the features of ActionScript 2.0, adds the capabilities of ECMAScript for XML (E4X), and unifies the language into a coherent whole.
Feauture of action script 3.0

ActionScript 3.0 consists of two parts:
The core language : 
The core language defines the basic building blocks of the programming language, such as statements, expressions, conditions, loops, and types.
Flash Player API. :

The Flash Player API is made up of classes that represent and provide access to Flash Player–specific functionality

    ECMAScript for XML (E4X) transforms XML into a native data type, dramatically simplifying XML processing. The new Display List API makes working with visual objects far more straightforward and consistent. The standardized DOM event model cements the way those objects talk and respond to each other at runtime. These are only a few of the many new capabilities of ActionScript 3.0.

    Runtime exceptions
    ActionScript 3.0 introduces a variety of runtime exceptions for common error conditions, improving the debugging experience and enabling applications that handle errors robustly. Runtime errors can provide stack traces annotated with source file and line number information, helping to pinpoint errors quickly.

    In ActionScript 2.0, type annotations were primarily an aid for developers; at runtime, all values were dynamically typed.
    In ActionScript 3.0, type information is preserved at runtime and utilized for a number of purposes. Flash Player performs runtime 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.

    Sealed classes
    A class that has only fiexed set of property that will be defined at runtime additional properties can’t be added at runtime . No internal hash table is required for each instance of object, Dyanamic classes can also be formed with the usage of Dyanmic key word.

    Method closures
    Event handling is simplified in ActionScript 3.0 thanks to method closures, which provide built-in event delegation. Which is an upgrade to 2.0 version were ,a closure would not remember what object instance it was extracted from, leading to unexpected behavior when the closure was invoked. Now the method closure will automatically remember its original object instance. Now, one can simply write:
    myButton.addEventListener("click", someMethod);

    ActionScript 3.0 features a full implementation of ECMAScript for XML (E4X), recently standardized as ECMA-357. E4X offers a natural, fluent set of language constructs for manipulating XML. Unlike traditional XML parsing APIs, E4X makes XML feel 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.
    Read more about the E4X specification (PDF, 1.8 MB)

    Regular expressions
    ActionScript 3.0 includes native support for regular expressions so you can quickly search for and manipulate strings. ActionScript 3.0 implements the regular expressions defined in the ECMAScript Language Specification (ECMA-262).
    Namespaces
    Namespaces are an innovative new mechanism for controlling visibility of declarations. Similar to the traditional access specifiers used to control visibility of declarations (public, private, protected), namespaces are essentially custom access specifiers, which can have names of your choosing. The Flex framework, for example, uses an mx_internal namespace for its internal data. Namespaces are outfitted with a Universal Resource Identifier (URI) to avoid collisions, and are also used to represent XML namespaces when working with E4X.

    New primitive types
    ActionScript 2.0 had a single numeric type, Number, a double-precision floating point number. One welcome addition to ActionScript 3.0 is the new int type—a 32-bit signed integer that lets ActionScript code take advantage of the fast integer math capabilities of the CPU. The int type is great for loop counters and almost anywhere a decimal point isn't needed. Another new type is uint, an unsigned 32-bit integer type similar to int.

    Where to go from here- day 2

    No comments:

    Post a Comment