Tài liệu Building the ActionScript

Thảo luận trong 'Thiết Kế Web' bắt đầu bởi Thúy Viết Bài, 5/12/13.

  1. Thúy Viết Bài

    Thành viên vàng

    Bài viết:
    198,891
    Được thích:
    173
    Điểm thành tích:
    0
    Xu:
    0Xu
    The ActionScript that you’re going to build can be placed in one frame for your convenience,
    then called from any other Flash object as needed. You can place code containing individual
    pieces of logic within specific objects in your Flash movie if you wish (which is useful when
    you are working with a team of other developers who have their own pieces of code), but
    keeping all your code in one place is probably the best way to start learning how to program
    with Flash MX.
    Select Frame 1 of the actions layer before proceeding so that your code is easy to find, as
    shown in Figure 26-8.
    Listing 26-2 shows the complete ActionScript for this application. Enter Listing 26-2 exactly as
    shown in Frame 1 of the actions layer. (Most of it is case sensitive, so treat all of it that way
    to be safe.) Then we can discuss it in detail.
    These three include statements bring the ActionScript code from these script files into your
    script, so as you test and publish your Flash movie, the code from these external scripts isn’t
    left behind. Notice that include statements do not end in semicolons.
    NetDebug.as provides a very useful Flash debugger that you should absolutely love and rely
    on during Flash Remoting development. More on how to use it in the section “NetConnection
    Debugger.” This line of code should be removed before production deployment.
    NetServices.as provides extended Flash Remoting functionality and ease of use. Although
    it is technically not needed for Flash Remoting development per se, most developers we
    know use its extended methods as standard operating procedure (as do we).
    DataGlue.as provides data-binding routines for Flash UI components, such as the Choose
    Company combo box that you created in the section “Create the Company combo box,”
     

    Các file đính kèm:

Đang tải...