Graphics Programs Reference
In-Depth Information
Note, however, that the _x position of a movie clip is the location of its registration point.
By construction, the registration point is located at the middle of the movie clip, which is
at a location half the width of the movie clip away. Thus, in this case, the value of xmax is
xmax = pano_mc._width/2
as provided in line 4 of the script. A similar analysis when the movie clip is aligned on
the right shows that
xmin = Stage.width - pano_mc._width/2
or alternatively,
xmin = Stage.width - xmax
Step 10: Find the panorama jump point for panning left
What we want to do next is to be able to pan the image continuously rather than stop-
ping at the edges of the background. The next few steps will enable us to carry this out.
Let's consider the image at xmax (i.e., pano_mc._x = xmax ) as shown in Figure 8.12.
By construction, pano_mc holds two copies of the entire panorama. We can see that
if we suddenly shift the image left from xmax back to a location half the width of the
panorama away, the image will look exactly the same on the Stage to the viewer. This
is the key to continuous movement. The image will move to the right until it reaches
xmax , then suddenly jump to its identical spot in the other half of the clip where there
is room to continue moving to the right (Figure 8.13).
Figure 8.13 The same view as the maximum position for the panorama
Search WWH ::




Custom Search