How to Loop Backgrounds in Flash

By eHow Computers Editor

Rate: (0 Ratings)

When you're animating characters or scenes in Flash, you may discover times when the background needs to move as well. This allows the character to appear to move over distances greater than the width of the frame. Creating a background as wide as the total animation space can be a pain unless you learn to loop simple backgrounds. You can get a lot of mileage out of a small graphic.

Instructions

Difficulty: Moderately Easy
Step1
Open your animation in Flash. Draw your background graphic on the bottom layer. Don't get complicated; a mountain horizon or a series of buildings or rooftops will do.
Step2
Select your background drawing and convert it to a symbol (F8). Make sure the symbol type is "Movie Clip." Double-click on your new movie clip to open an editing window that superimposes your background onto the movie stage.
Step3
Duplicate your background graphic. Choose "Flip Horizontal" from the Modify menu Transform submenu. Drag the copy so that its left edge is exactly aligned with the original's right edge. The two should match perfectly, but if they don't, modify both graphics until they tile seamlessly.
Step4
Group the two background objects (Command+G). Select any frame further down the layer timeline and add a keyframe (F6). You should now see two black circles (keyframes) with gray frames in between.
Step5
Make sure the layer is selected, and choose "Create Motion Tween" from the Timeline submenu of the Insert Menu. You should see an arrow connecting both key frames.
Step6
Drag the background in the last keyframe so that the far-right edge is only 10 or 12 pixels to the right of the right-stage edge. You don't want the graphic even with the edge or you will create a pause in the animation playback where two consecutive frames will appear exactly the same.
Step7
Return to the stage and play your animation back. Your background should loop seamlessly. If it seems to pause at the beginning of playback, reposition the background in the last keyframe until the play is smooth.

Tips & Warnings

  • If you're still having trouble getting your animation to loop exactly the way you want to, make sure both sides of your original background graphic mirror each other and not just one. Just as you aligned the original right edge with the new left edge after you flipped the background, drag the copy to the other side of the original and make sure the copy's right side mirrors the original's left side.
  • If you don't want to preview or play back with the offstage elements visible, add a mask to the top layer of the animation.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article: How to Loop Backgrounds in Flash

eHow Computers Editor

eHow Computers Editor

Category: Computers

Articles: See my other articles

Related Ads