TAILIEUCHUNG - Controlling a Movie on a Level

Đơn giản và đơn giản. Nó cũng dễ dàng để đặt một hành động trên Frame 1 của một bộ phim được nạp để nó có một số hành động ngay lập tức sau khi tải. Chúng tôi sẽ xem xét cả hai phương pháp tiếp cận trong việc thực hiện sau đây, trong đó chúng tôi sẽ kịch bản phim banner của chúng tôi để định vị mình một cách chính xác khi bốc hàng, cũng như tạo ra một banner On / Off nút. 1. Mở . Chúng tôi sẽ tiếp tục làm việc với tập tin này. | Controlling a Movie on a Level You can control a movie loaded into a level from another timeline or from within the movie itself. The target path to a movie loaded into a level is simply its level number. For example if you ve loaded a movie into level 5 you would use the following syntax to make it rotate from any other timeline currently in the player window 45 Straightforward and simple. It s also easy to place an action on Frame 1 of a loaded movie so that it takes some action immediately upon loading. We ll look at both approaches in the following exercise in which we ll script our banner movies to reposition themselves correctly upon loading as well as create a banner On Off button. 1. Open . We ll continue working with this file from the preceding exercise. The white rectangle on the stage is a movie clip instance named bannerBack_mc. The location of this instance s registration point upper-left corner of the instance will be pivotal in a script that repositions the banner movies when they re loaded into Level 1. Because this repositioning script will reside within the banner movies we need to open the banner movie s authoring files. 2. Choose File Open. Navigate to the Lesson18 Assets folder locate the file named and open it in Flash. This simple animated movie is made up of five layers the top of which is named Actions. We ll place a two-line script on Frame 1 so that as soon as the banner movie is loaded the script is executed. 3. With the Actions panel open select Frame 1 of the Actions layer and add the following script 4. 5. _x 6. 7. _y 8. These two lines of script set the x and y properties of this movie to match the x and y properties of the bannerBack_mc movie clip instance on Level 0. This technique causes the banner movie to load exactly on top of the bannerBack_mc instance even if bannerBack_mc is eventually moved from its current location. 4. Add

Đã 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.