TAILIEUCHUNG - Reacting to Dynamically Loaded MP3s

Phản ứng với động các Loaded MP3 Bạn muốn kích hoạt một bộ các hành động để thực hiện khi một âm thanh đã hoàn tất chơi? Bạn muốn biết thời gian của âm thanh (chơi dài) hoặc hiện tại vị trí (phát lại vị trí)? | Reacting to Dynamically Loaded MP3s Want to trigger a set of actions to execute when a sound has finished playing Want to know a sound s duration play length or current position playback position Flash provides you with precisely this type of dynamic control when using loaded MP3s or even internally attached sounds . NOTE Lesson 17 Scripting for Sound discussed many of the ways that you can control sounds dynamically. It s often useful to know when a sound will finish playing. Consider a presentation in which the next screen of info should be displayed only after the voiceover has finished explaining the current screen. Or a music jukebox that automatically loads the next song when the current one has finished playing. You can easily achieve this type of functionality by using the onSoundComplete event handler function actions go here. Using this syntax you would define a series of actions to be triggered when the sound in the Sound object finishes playing. The Sound class also provides two other events onLoad and onID3 which we ll discuss in the next exercise. NOTE A Sound object must exist in your movie before you can define an onSoundComplete event handler to it. If you delete or re-create the Sound object you must redefine the onSoundComplete event. In other words you can t attach an event to an object that doesn t exist and after an object has been deleted or re-created the attached event ceases to exist as well. Every Sound object has a duration property representing the sound s length in milli seconds . Accessing this property s value is accomplished in the following manner var soundDuration Number This script sets the value of soundDuration to the duration of the sound currently in the referenced Sound object. If the sound is seconds long the value of soundDuration is set to 5500 1 000 x . This property exists for loaded sounds as well as sounds attached to the Sound object by using attachSound .

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.