TAILIEUCHUNG - Z-Sorting Movie Clip Instances

trường hợp thay đổi độ sâu của trường movie clip được gọi là z-phân loại. Bức thư z được sử dụng trong tên vì thay đổi độ sâu cho ảnh hưởng của một chiều thứ ba trong Flash: z (thêm vào x và y). Bạn có thể sử dụng duplicateMovieClip () hoặc attachMovie () để thiết lập độ sâu của trường movie khi bạn tạo chúng, hoặc bạn có thể thay đổi độ sâu tự động bằng cách sử dụng swapDepths () phương thức của lớp Movie Clip. Với swapDepths (), bạn có thể trao đổi chiều sâu của hai. | Z-Sorting Movie Clip Instances Changing the depth of movie clip instances is known as z-sorting. The letter z is used in the name because changing the depth gives the effect of a third dimension in Flash z in addition to x and y . You can use duplicateMovieClip or attachMovie to set the depth of movie clip instances when you create them or you can change the depth dynamically using the swapDepths method of the Movie Clip class. With swapDepths you can exchange the depth of any two movie clip instances or move an instance to a specified depth. Here s the syntax for swapping the depths of two movie clip instances movieclip2_mc If movieClip2_mc is above movieClip1_mc this script swaps their depths causing movieClip1_mc to appear above movieClip2_mc. Here s the syntax for sending any movie clip instance even one created using duplicateMovieClip or attachMovie to a specific depth anyDepth The anyDepth parameter is an integer. The swapDepths method is easy to use and can add a nice effect to applications and games. There are two more Movie Clip class methods that can assist you with z-sorting getDepth and getNextHighestDepth . The getDepth method returns the numeric depth of a movie clip. For example var mc_depth Number The getNextHighestDepth method returns the highest unused depth that has no other depths above it filled. For example imagine that you had a movie clip with an instance name of holder_mc and you attached a movie clip at depth 2050 inside it. This ActionScript var nextDepth Number creates a variable named nextDepth with a value of 2051. These methods both new in ActionScript make managing the depth of dynamically added instances much simpler than before. In this exercise you ll make the two windows in the drawing application draggable use swapDepths to bring the window of interest to the top of the stack and add actions to some of the buttons. 1. Open .

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.