TAILIEUCHUNG - Loading JPGs Dynamically

Loading JPGs động các Bây giờ bạn đã học được làm thế nào để tải một bộ phim bên ngoài vào một dự án, quá trình tự động tải một JPG nên dễ nó gần giống như của tải một SWF bên ngoài. Như thể hiện trong tập thể dục trước đó, các loadMovie () tải một hành động SWF bên ngoài vào mục tiêu. Bạn sẽ sử dụng cùng một hành động để nạp một bên ngoài JPG, nhưng với twist một. | Loading JPGs Dynamically Now that you ve learned how to load an external movie into a project the process of dynamically loading a JPG should be easy it s almost identical to that of loading an external SWF. As demonstrated in the preceding exercise the loadMovie action loads an external SWF into a target. You ll use the same action to load an external JPG but with a twist. Look at the following syntax loadMovie myBitmapjpg myClip_mc This loadMovie action identifies a JPG as the external asset to load. Here is loaded into the myClip_mc target. After a JPG is loaded into a movie in this fashion Flash sees it as a movie clip instance which means that you can control it via ActionScript rotating resizing or making it transparent as with any other clip. In this exercise we ll build slideshow functionality into our project to demonstrate how we can load JPGs into a target on an as-needed basis. 1. Open . We ll continue working with this file from the preceding exercise. Note the empty movie clip instance on the Placeholder layer the small white circle in the panel graphic s upper-left corner . Called placeholder_mc this is the movie clip instance into which our external JPGs will be loaded. Also note the text field with the name title_txt at the top of the panel we ll use that in our exercise as well. Before we begin scripting let s review the contents of the directory containing our externally loaded assets. 2. Using your operating system s directory-exploring application navigate to the Lesson18 Assets directory and locate the image files named and . Each of these images is 378 pixels wide by 178 pixels high the size at which the image will be loaded into the receiving movie. After the images are loaded however Flash will recognize them as movie clip instances and can thus resize and transform them in any number of ways as we ll demonstrate in the next exercise. NOTE Only standard JPG files are .

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.