« Home « Kết quả tìm kiếm

Controlling a Movie on a Level


Tóm tắt Xem thử

- 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.
- The white rectangle on the stage is a movie clip instance named bannerBack_mc.
- 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.
- We'll place a two-line script on Frame 1 so that as soon as the banner.
- _x = _level0.bannerBack_mc._x;.
- _y = _level0.bannerBack_mc._y;.
- 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..
- If you wait 10 seconds, a different banner may load, also at the proper location in relation to bannerBack_mc..
- The banner movie loaded into Level 1 can easily be controlled from this movie as well.
- bannerBack_mc._visible = !bannerBack_mc._visible;.
- This step creates a toggling functionality that makes both the banner movie loaded into Level 1 and the bannerBack_mc movie clip instance either visible or.
- Wait 10 seconds for the banner to change.
- The button continues to work because it's set up to control the movie loaded into Level 1 rather than a particular banner movie..
- For example, if a movie at www.derekfranklin.com/derekMovie.swf is being played and contains an action to load a movie located at.
- www.electrotank.com/jobeMovie.swf into Level 5, these two movies initially won't be able to exchange data via ActionScript because they were loaded from different domains.
- In this scenario, if derekMovie.swf contains the following setting (placed on Frame 1):.
- then jobeMovie.swf (loaded from electrotank.com) will have access to the data in derekMovie.swf..
- If jobeMovie.swf contains this setting:.
- then derekMovie.swf (loaded from derekfranklin.com) will have access to the data.
- in jobeMovie.swf.

Xem thử không khả dụng, vui lòng xem tại trang nguồn
hoặc xem Tóm tắt