How to Create a Scrolling Background With Flash 8
In the world of computer animation, a scrolling background is the simplest, easiest method to use for side-scrolling or top-scrolling games or other animations. With Flash you can set a repeating pattern to be almost as long as you want it to be and then have the same image repeat over and over again seamlessly as it scrolls across the stage. The image you choose as your scrolling background should have a pattern that repeats seamlessly from one end to the other.
Instructions
-
-
1
Import the image into Flash 8 by selecting "File" then "Import to Stage" from the menu.
-
2
Resize the Flash stage to be as large as you want your final movie to be by changing the stage properties in the Properties Inspector.
-
-
3
Resize your image to completely cover the stage. The best way to do this is by manually typing in the numbers in the Properties Inspector. Select your image, and in the Properties Inspector, where the W, H, X, and Y indicators are, type in the appropriate numbers and put the image at the 0,0 coordinates of the stage. For example, if the stage were 500 wide by 200 tall, select the image on the stage, then, in the Properties Inspector, type 500 (hit the TAB key), type 200 (hit the TAB key), hit 0, (hit the TAB key) then type 0 again.
-
4
Holding down the "Ctrl" key, click and drag your image in order to create a duplicate of it. Drag it off the stage to the right and align it perfectly with the right edge of the original image. In the example above, you could use the Properties Inspector to make this a little easier by typing in the X and Y coordinates for this duplicate image to be 500 and 0.
-
5
Hold down the shift key to select both images, then press "F8" on your keyboard to turn them into a single movie clip symbol. Name the file whatever you want.
-
6
In the time-line, right click on frame 40 and choose "Insert Keyframe." Now drag your image across the screen from right to left until the second, or duplicate, image is lined up with the stage. Again, the Properties Inspector will make this easy. Continuing with the example, if the two images together are 1,000 pixels wide, in the Properties Inspector you would make the X and Y positions -500 and 0, respectively. You will want to make it around -490 in order to avoid a slight stutter effect.
-
7
In the gray space between your two keyframes on the layers panel, right-click and choose "create motion tween."
-
8
Test your movie by pressing "/Ctrl+Enter."
-
1
Tips & Warnings
Play around with the final position in the motion tween in order to get the smoothest possible transition from the end of the movie to the beginning. If -490 doesn't work, try -495.
You can speed up the scrolling effect by shortening the length of your tween (hold down Shift+F5 in order to remove frames from a selected layer), or by increasing the frames per second of your movie.