The Use of Time in Flash
Số trang: 2
Loại file: pdf
Dung lượng: 17.67 KB
Lượt xem: 3
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Một lớp học dựng sẵn trong Flash, hữu ích cho tương tác phụ thuộc vào ngày tháng, ngày, tháng và năm. getTimer (). Một chức năng Flash đặc biệt hữu ích cho việc đo qua của thời gian trong mili giây. Frames. Đại diện đơn vị thời gian có liên quan đến hoạt hình, âm thanh, và tương tác khác về thời hạn. Frames cung cấp cách thức phổ biến nhất của việc đo thời gian trôi qua trong Flash. Sự chuyển động của một khung hình kế tiếp (hoặc trước đó) khung đại diện cho sự chuyển động của...
Nội dung trích xuất từ tài liệu:
The Use of Time in Flash < Day Day Up >The Use of Time in FlashFlash uses several techniques to measure the passage of time in projects. The followingare the most common strategies: • Date class. A prebuilt class in Flash, useful for interactivity that depends on dates, days, months, and years. • getTimer(). A special Flash function useful for measuring the passage of time in milliseconds. • Frames. Representing divisions of time as they relate to animation, sounds, and other interactivity on timelines. Frames provide the most common way of measuring the passage of time in Flash. The movement of one frame to the next (or previous) frame represents the movement of time in a project, either forward or backward. As the timeline moves forward, a progression of events occurs—a streaming sound plays, for example, or a character moves across the stage.After you understand these elements, youll be able to make your projects do thefollowing: • Play forward or backward, depending on user interaction • React based on the current date, time, or frame number • Display percentage-based information and download statusTheres also a special ActionScript tool—setInterval()—that allows a function to becalled at a regular specified interval (measured in milliseconds). Consider the followingexample:function rotateClip() { myMovieClip_mc._rotation += 10;}setInterval(rotateClip, 1500);The first three lines of the script define the function that will be used. Next, thesetInterval() action is set up to call the rotateClip() function every 1.5 seconds (1,000milliseconds equals 1 second).If you want to pass arguments to the called function, simply add them to the setInterval()action:setInterval (updateMessageFunction, 20000, Hello, arg2, arg3)A setInterval() action can be turned on and off by assigning a variable name, as in thefollowing example:var myInterval:Object = setInterval(rotateClip, 1500);This example assigns the name myInterval to the setInterval() action. To remove thefunctionality of the setInterval() action, use the following syntax:clearInterval(myInterval);Using the syntax shown, you can initiate the setInterval() action at any time, calling anyfunction. < Day Day Up >
Nội dung trích xuất từ tài liệu:
The Use of Time in Flash < Day Day Up >The Use of Time in FlashFlash uses several techniques to measure the passage of time in projects. The followingare the most common strategies: • Date class. A prebuilt class in Flash, useful for interactivity that depends on dates, days, months, and years. • getTimer(). A special Flash function useful for measuring the passage of time in milliseconds. • Frames. Representing divisions of time as they relate to animation, sounds, and other interactivity on timelines. Frames provide the most common way of measuring the passage of time in Flash. The movement of one frame to the next (or previous) frame represents the movement of time in a project, either forward or backward. As the timeline moves forward, a progression of events occurs—a streaming sound plays, for example, or a character moves across the stage.After you understand these elements, youll be able to make your projects do thefollowing: • Play forward or backward, depending on user interaction • React based on the current date, time, or frame number • Display percentage-based information and download statusTheres also a special ActionScript tool—setInterval()—that allows a function to becalled at a regular specified interval (measured in milliseconds). Consider the followingexample:function rotateClip() { myMovieClip_mc._rotation += 10;}setInterval(rotateClip, 1500);The first three lines of the script define the function that will be used. Next, thesetInterval() action is set up to call the rotateClip() function every 1.5 seconds (1,000milliseconds equals 1 second).If you want to pass arguments to the called function, simply add them to the setInterval()action:setInterval (updateMessageFunction, 20000, Hello, arg2, arg3)A setInterval() action can be turned on and off by assigning a variable name, as in thefollowing example:var myInterval:Object = setInterval(rotateClip, 1500);This example assigns the name myInterval to the setInterval() action. To remove thefunctionality of the setInterval() action, use the following syntax:clearInterval(myInterval);Using the syntax shown, you can initiate the setInterval() action at any time, calling anyfunction. < Day Day Up >
Tìm kiếm theo từ khóa liên quan:
máy tính mạng máy tính internet phần mềm ứng dụng lập trình SQL HTML sever web XMLTài liệu có liên quan:
-
Giáo án Tin học lớp 9 (Trọn bộ cả năm)
149 trang 299 0 0 -
Giáo trình Hệ thống mạng máy tính CCNA (Tập 4): Phần 2
102 trang 299 0 0 -
Bài giảng: Lịch sử phát triển hệ thống mạng
118 trang 283 0 0 -
Ngân hàng câu hỏi trắc nghiệm môn mạng máy tính
99 trang 279 1 0 -
47 trang 250 4 0
-
Đề cương chi tiết học phần Thiết kế và cài đặt mạng
3 trang 247 0 0 -
80 trang 239 0 0
-
6 trang 230 0 0
-
Giáo trình môn học/mô đun: Mạng máy tính (Ngành/nghề: Quản trị mạng máy tính) - Phần 1
68 trang 227 0 0 -
122 trang 223 0 0