TAILIEUCHUNG - Loading MP3s Dynamically

MP3 tải động các MP3 là ở khắp mọi nơi những ngày này-một phổ biến mà có thể được quy cho thực tế là họ cung cấp một cách chấp nhận được của việc cung cấp âm thanh (đặc biệt là âm nhạc) trên Web trong một thế giới lowbandwidth. Mặc dù MP3 nhỏ gọn hơn nhiều so với tiêu chuẩn, noncompressed tập tin âm thanh | Loading MP3s Dynamically MP3s are everywhere these days a popularity that can be attributed to the fact that they provide an acceptable way of delivering audio especially music over the Web in a low-bandwidth world. Although MP3s are much more compact than standard noncompressed audio files a single MP3 of any length let alone several MP3s can still balloon a movie s file size to an unacceptable level. Flash helps to alleviate this problem by providing the capability to dynamically load MP3 files into movies. As you ll soon see loading an external MP3 into our project is a bit different from loading an external movie or JPG but almost as easy. If you want to load an MP3 into Flash the first thing you need to do is create a place where you can load the file. This requires a Sound object var myFavMP3 Sound new Sound After you ve created a Sound object simply use the loadSound method to load an external MP3 into that object true This script loads the external MP3 file named into the myFavMP3 Sound object. After the MP3 has been loaded you can control volume panning and other characteristics see Lesson 17 Scripting for Sound . Notice that the loadSound method has two parameters. The first parameter identifies the path to the external MP3 the other parameter determines whether the loaded file will be streamed true or considered an event sound false . If this parameter is set to true the externally loaded file begins playing as soon as a sufficient amount of the file has been downloaded. If set to false the start method must be invoked before the file will play NOTE If the file is loaded as an event sound it won t play even if you invoke the start method until the complete file has been downloaded. In this exercise we ll make it possible for each loaded image in the slideshow to have an associated music track that s loaded externally. 1. Open . We ll simply add some script to Frame 1 of this file

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.