AS3.0 Overview – Understanding the changes in AS3.0

Source: Internet
Author: User
Tags exception handling file upload range reference requires stringbuffer

With the introduction of some relevant data to as3.0, one might think that it is another language. Where is the fundamental change, and what is it? Now we need to relax a little bit. If you are familiar with as2.0, then it changes not very much, and even adds some commands you can use.

From our first glance as3.0, it's not a whole new language, its architecture is better than AS2.0, and you'll find it from FLASH8. Everything has its own class and neat subclasses. The inheritance of a class can seem complicated, but it's easy to understand.

Major changes:

1. There is no _global range, but you can create your own name by using "namespace" in advance public,private and internal.

2. int/uint. new data types to describe the non floating-point number, which allows Flash to sync with other program languages, and solves some of the problems that use Java and Amf/flash remoting headaches.

3. You cannot use the command play () or stop () on the timeline. MovieClip is not in the global range, you have to use its properties through Flash.display.MovieClip.

4. Normal standard expression-fast search operation string.

5. New simpler delegation (delegate)

6.-DOM3 Event Model--a new, but not well known, method for generating and manipulating event information.

7.-Display API List-images are subdivided according to new or more logical categories such as sprites sprites and shape shapes

8.-also do not need to specify depth depth values to the object. The depth management class is now automatically controlled (based on the API list) and built into Flash Player. The new method provides an action on the object z-order the z axis.

9.-final/protected keywords.--Prevent your class or function from being overwritten.

8.-new simple XML elements and attributes using E4X.

9.-argumenterror class.--Use this class to avoid errors that occur when a function invokes a parameter that is not conforming.

-package Key Lively-if you don't know what pagckage is, don't worry, you'll love it when you're doing big projects.

11.-is used in the bytearray of data input and output interfaces to provide methods and attributes to optimize read, write, and binary data.

Low Level-exception

Exception handling is a long way for flash developers, and if a number exceeds the new Int/unit data type, an error is displayed. Some are similar to Java. You have to figure out how to solve these problems, Otherwise, flash programs could collapse. If something is invalidated in AS1 and AS2, Flash Player may be very friendly to ignore, in FLASH8, you may have seen the new error ability by using file upload, It requires a series of events to display upload processes and cache errors. Using AS3, these are working in a low-level state

Exceptions can occur in several places, such as using As3.0, you need to see the recent usage of your memory, Memoryerror is a new exception, and when the memory address fails, it will display the error through the AVM2 virtual machine. Other exceptions are Eoferror, Illegaloperatinerror,ioerror,scripttimeouterror and Stackoverflowerror.
Think about the above, many of which are specific to other languages such as Java, you can see through the StringBuilder class, it comes from the Java class StringBuffer can allow us to easily manipulate characters. In the end, I must say the structure of the new AS3 class looks very good. Programmers with different backgrounds see flash and say I know how it is done, and I think we can say that ActionScript has passed, and its childhood has just come.

The new command

There may be more new commands, which have been found in some cases.

Sound (sound)
Leftpeak/rightpeak Property
The right channel amplitude of the current sound, from 0 to 1
Isbuffering:boolean [Read-only]
Returns the state of the outer buffer MP3
Soundbuffertime:uint
Number of seconds a sound is buffered before streaming playback

System (Systems)

vmversion:string [Read-only]
Version of the currently installed ActionScript virtual machine
Totalmemory:uint [Read-only]
Reports the amount of memory currently in use.
Http://livedocs.macromedia.com/labs/1/flex/langref/flash/system/System.html

Debugging (Debug)

Getclassbyname (name:string): Class
Returns a reference to the specified name class object
Describetype (value:object): XML
An XML object product that describes the method of ActionScript object parameters.
PS: It seems that As3.0 is not as big as the imagined changes, but first FLASH8, then FLEX2,AS3. 0,macroemdia's footsteps are moving faster.

Low Level-exception

Exception handling is a long way for flash developers, and if a number exceeds the new Int/unit data type, an error is displayed. Some are similar to Java. You have to figure out how to solve these problems, Otherwise, flash programs could collapse. If something is invalidated in AS1 and AS2, Flash Player may be very friendly to ignore, in FLASH8, you may have seen the new error ability by using file upload, It requires a series of events to display upload processes and cache errors. Using AS3, these are working in a low-level state

Exceptions can occur in several places, such as using As3.0, you need to see the recent usage of your memory, Memoryerror is a new exception, and when the memory address fails, it will display the error through the AVM2 virtual machine. Other exceptions are Eoferror, Illegaloperatinerror,ioerror,scripttimeouterror and Stackoverflowerror.
Think about the above, many of which are specific to other languages such as Java, you can see through the StringBuilder class, it comes from the Java class StringBuffer can allow us to easily manipulate characters. In the end, I must say the structure of the new AS3 class looks very good. Programmers with different backgrounds see flash and say I know how it is done, and I think we can say that ActionScript has passed, and its childhood has just come.

The new command

There may be more new commands, which have been found in some cases.
Sound (sound)
Leftpeak/rightpeak Property
The right channel amplitude of the current sound, from 0 to 1
Isbuffering:boolean [Read-only]
Returns the state of the outer buffer MP3
Soundbuffertime:uint
Number of seconds a sound is buffered before streaming playback
System (Systems)
vmversion:string [Read-only]
Version of the currently installed ActionScript virtual machine
Totalmemory:uint [Read-only]
Reports the amount of memory currently in use.
Http://livedocs.macromedia.com/labs/1/flex/langref/flash/system/System.html
Debugging (Debug)
Getclassbyname (name:string): Class
Returns a reference to the specified name class object
Describetype (value:object): XML
An XML object product that describes the method of ActionScript object parameters.
PS: It seems that As3.0 is not as big as the imagined changes, but first FLASH8, then FLEX2,AS3. 0,macroemdia's footsteps are moving faster.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.