TAILIEUCHUNG - Flash CS5 THE MISSING MANUAL phần 8

Chọn một hoặc nhiều của các tùy chọn xuất bản sau: • Kích thước (Rộng / Cao). Nói với Flash lớn như thế nào bạn muốn các file GIF được, bằng pixel. Các tùy chọn này chỉ nếu bạn chưa bật bộ phim "trận đấu" (xem dưới đây). • trận đấu bộ phim. Nói với Flash để tạo ra một hình ảnh GIF kích thước giống như | Timeline Stop and Go Using Actionscript to Start a Timeline As you saw in the previous steps the stop command stops an animation nicely. But what about getting that Bearcat rolling again You stopped the animation by putting the stop statement in the frame where you wanted to stop but putting a play statement in the following frame as logical as it sounds will do you no good. The Flash Player will never reach the next frame it s stopped. So you have a couple of choices depending on what you want to trigger the starting and stopping. If you want your audience to control it then you can give them clickable buttons or controls. If you want the animation to resume on its own then a TimerEvent is the best tool in your toolbox. You can add a TimerEvent to the same frame where the stop happened as shown in Figure 15-5. When the timer is complete it can trigger a play statement for both the main timeline and the stutzBearcat movie clip. Modify the code on Frame 25 of the actions layer to read as follows 1 stop 2 3 4 var carTimer new Timer 400 1 5 6 7 timerCompleteListener 8 9 function timerCompleteListener evt TimerEvent void 10 11 play 12 13 Frame icon Actions layer Frame 25 Figure 15-5 The tab at the bottom of the Actions panel provides details about the location of the code shown. In this case the code resides on the 25th frame of the actions layer. The first two lines were already in the code. Line 4 creates a new timer called carTimer. The first number in parentheses 400 sets the timer to wait a little less than half a second 400 thousandths of a second . The second number 1 sets the timer to run once. Line 5 starts the timer. The remainder of the code sets up the event handler. 500 Flash CS5 The Missing Manual Organizing Your Animation Line 7 registers the event listener to run the function timerCompleteListener when the timer runs out. For more details on events and

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.