As3 notes (1)

Source: Internet
Author: User
1. declare the variable VAR value1: Number; initialize var value2: Number = 17; number, basic data type of as3, bacis, built-in, primitive type2. constant const sales_tax_rate: Number = 0.07; 3. basic data type, bacis, built-in, primitivestringnumeric: Number, Int, uintboolean

In addition.

Arrayeg. [a, B, c] xmleg. vaR EMPLOYEE: xml = <node> <Name> root </Name> </node> 4. class (including attributes, methods, events) movieclip, video editing element textfield, dynamic text or input text field simplebutton, button date, date and time 5. three elements of event processing: source, event (type), response (function) function eventresponse (eventobject: eventtype): void {// Actions completed MED in reponsed to the evnet go here} eventsourece. addeventlistener (eventtype. event_name, eventresponse); 6. function function funcname (Param: type) {;} the function expression forgets that its functions can be nested, That is, another function can be declared internally. Unless reference to nested functions is passed to the external Code Otherwise, nested functions can only be used internally. 7. parameters of other basic data types include string, number, Int, uint, and Boolean. The default parameter format is the same as that of the C ++ function. You can use the arguments object to access the parameter arguments. callee, which can be used to implement recursive arguments. caller, that is, the reference of the current function... (rest), a variable length parameter. 8. functions also have attributes and methods. length, the number of parameters defined by the function arguments. length, number of parameters sent to the function 9.var I: int; for (I = 0; I <5; I ++) {}for (var I: String in myobj) {;}// random access, for each (VAR num in myobj) {;}// access the XML object without the attribute name

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.