Graphics Programs Reference
In-Depth Information
not visible, open it (Window > Library). Click and drag the motorBoat movie clip sym-
bol to the boat layer. Save and test your movie. Choose Control > Test Movie to see the
finished results.
Figure 4.13 Finished parallax scrolling
Exercise Summary
This exercise deals with internal events. The user doesn't interact with the file. The
internal event occurs every time this file enters a frame ( onEnterFrame ). Even though
there is only one frame in the Timeline, Flash constantly leaves and re-enters it.
The MovieClip property that is being changed is the horizontal position on the Stage.
This is referred to as _x . The vertical position is referred to as _y . Every time Flash
enters the frame, the _x property is reduced by a certain value. This will cause the
graphic to move to the left. Adding to the _x property will make the graphic move to
the right. Since the goal is to create continuous movement, a condition was added that
checks another MovieClip property, _width . If the horizontal movement of the movie
clip instance reaches a point that is less than or equal to its width, the instance resets
its horizontal position to align with the left edge of the Stage.
The next exercise creates parallax scrolling that is under user control. The external
events caused by the user will create the scrolling movement. Let's take a look.
Search WWH ::




Custom Search