TAILIEUCHUNG - Flash Builder 4 and Flex 4 Bible- P4

Flash Builder 4 and Flex 4 Bible- P4: When Macromedia first released Flash MX in 2002, the product was branded as the new way to build Rich Internet Applications (known by the acronym RIA). The term was invented at Macromedia to describe a new class of applications that would offer the benefits of being connected to the Internet, including access to various types of Web-based services, but would solve many of the nagging issues that had been inherent in browser-based applications since the mid-1990s | Chapter 4 Understanding the Anatomy of a Flex Application Any code in the external file is compiled as part of the MXML file and the ActionScript class it represents but is executed after objects declared in MXML are instantiated so you can access these objects in your ActionScript code. Because the external file isn t in XML format you don t need to embed the Script element or the CDATA block inside the file to protect the code. Follow these steps to create an external ActionScript file 1. Choose File C- New ActionScript File from the Flash Builder menu. Don t select ActionScript Class that s a different sort of file I ll describe in a later chapter. 2. In the New ActionScript File dialog box select the folder in which you want to create the file. External ActionScript files can go anywhere in the project source-code root folder because you ll explicitly refer to the file s location when you link to it from an MXML file. I usually place the file in the same folder as the MXML file it s linked to. 3. Enter the name of the file. It should have a file extension of .as but the rest of the filename is up to you. For an application named the matching external ActionScript file would be . 4. Click Finish to create the file. Note Notice that in this usage the external ActionScript filename starts with a lowercase character. This doesn t have any technical effect on the code but it s a way of indicating that it s a simple file containing ActionScript code as opposed to an ActionScript class which by object-oriented programming conventions has an initial uppercase character . After the file has been created you link to it from the MXML file with the fx Script element and add a source property pointing to the external file. The application in Listing embeds its ActionScript code in an fx Script tag set. Caution Any particular fx Script element can contain nested ActionScript or use the source property to link to an external ActionScript file

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.