TAILIEUCHUNG - Creating and Referencing Global Elements

Việc tạo và tham chiếu toàn cầu không có yếu tố phủ nhận rằng, ngay cả với một sự hiểu biết triệt để các đường dẫn mục tiêu, đôi khi khó khăn để theo dõi họ, đặc biệt là khi bạn có thời hạn trong vòng thời hạn trong vòng thời hạn. | Creating and Referencing Global Elements There s no denying that even with a thorough understanding of target paths it s sometimes hard to keep track of them especially when you have timelines within timelines within timelines. As you might imagine target paths can become quite long. To help simplify things ActionScript provides access to a global object. As a global element this special Flash object exists apart from any specific timeline and is omnipotent in relation to your Flash project you can reference it from any timeline without a target path and take advantage of its power to reference other timelines and the variables functions and other dynamic elements they contain. Let s take a look at how you create a global element and how you convert an element with a target path into a global element. Creating a global element such as a variable is as simple as this hello Because this variable is now a global element you can reference it from any timeline by its name myVariable or myVariable You can also use the global identifier to create global functions see Lesson 5 Using Functions function actions. To call the function from any timeline use its name myFunction The same syntax is used to create instances of objects see Lesson 4 Using Object Classes new Date You can easily convert an element with a target path such as a movie clip instance so that it can be referenced globally that is without a path. For example suppose a movie clip instance in your project has a target path of . If you want to make it easier to reference this instance you give it a global address To control that instance you simply reference its global address from any timeline Is there a benefit to using a global element It s a matter of preference as well as what a given

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.