TAILIEUCHUNG - Controlling the Playback Speed and Direction of a Timeline

Thông thường, một thời gian đóng phim trong một hướng về phía trước với tốc độ do nhà fps (khung hình / giây) thiết lập trong hộp thoại Properties Movie. Tuy nhiên, bạn có thể kiểm soát sự chỉ đạo, trong đó thời gian di chuyển cũng như tốc độ của nó bằng cách sử dụng ActionScript. Trong thực tế, bằng cách kết hợp các yếu tố kịch bản (mà điều khiển hướng) với các sự kiện onEnterFrame, bạn có thể giành quyền kiểm soát tuyệt vời hơn thời gian của dự án. | Controlling the Playback Speed and Direction of a Timeline Normally a movie s timeline plays in a forward direction at a pace dictated by the fps frames per second setting in the Movie Properties dialog box. However you can control the direction in which the timeline moves as well as its speed by using ActionScript. In fact by combining scripting elements which control direction with the onEnterFrame event you can gain incredible control over the project s timeline. The first two scripting elements we ll discuss are the nextFrame and prevFrame methods of the MovieClip class. You use these methods to move a timeline to the next or previous frame by employing the following syntax function or function By assigning these event handlers to buttons you can create navigation controls that automatically advance or rewind a timeline one frame at a time with each click of the button. Even more powerful is a timeline s _currentframe property a read-only property its value represents the frame number at which the playhead currently resides. For example if the main movie is being played the following script places the numerical value of the playhead s current frame position into a variable named whereAreWe var whereAreWe Number You can also use this property in conjunction with a conditional statement to determine when the playhead is within a specific range of frames and make it act accordingly function if 50 100 Perform these actions In this script the actions within the conditional statement are executed only when the playhead on the main timeline is between Frames 50 and 100. Using the _currentframe property in conjunction with a gotoAndPlay action allows you to control the direction as well as the pace in which the timeline moves. In the following example the playhead on the main timeline advances 10 .

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.