eHow launches Android app: Get the best of eHow on the go.

How To

How to Create a Dazzling Sunset in Flash

Contributor
By eHow Contributing Writer
(2 Ratings)

One of the coolest effects you can animate in Flash is the setting sun. Use the animation on Web pages or just as part of your own little movie. By using the gradient and Shape Tween features in Flash, you can make a beautiful, multihued sunset.

Difficulty: Moderately Challenging
Instructions
  1. Step 1

    Create a new Flash document with at least three layers. You will need separate layers for the sky, sun and horizon. You can add additional layers and characters, but they aren't necessary to the sunset itself.

  2. Step 2

    Add a rectangle with a pale-blue-to-white gradient (linear or radial will be fine). If you use the rectangle vector tool, break it apart (Command+B). Convert the sky to a graphic symbol (F8). Add a horizon object to the top layer; a mountain silhouette will do just fine.

  3. Step 3

    Draw a circle on the middle layer colored with a four-color radial gradient (break it apart if you used the ellipse vector tool). Set the center stop to bright yellow with 100 percent alpha, the second stop to a dull yellow, the third and fourth stops to white with an alpha of 50 and 0 respectively. Drag the left three stops toward the center and the final (white) stop to the far right of the gradient line. Convert the sun to a graphic symbol.

  4. Step 4

    Add a motion guide to the sun layer to run from the top to the bottom of the stage (a curved guide will make the motion more realistic). Select the sun, and place the symbol's crosshair directly on top of the motion guide. Select frame 15 in all three layers and add a new keyframe (F6). Select the timeline before the in the sun and sky layers, and this time choose the "Create Motion Tween" command from the Insert submenu of the Timeline menu to connect the key frames with arrows.

  5. Step 5

    Double-click on the sun to edit it in a new window. Click inside frame 15 on the symbol timeline (or any frame further down) and add a keyframe (F6). Select the timeline, and this time choose "Create Shape Tween." Click on the sun in the final frame and change the left three color stops to sunset colors (orange to purple or pink to white). Adjust the sliders to redistribute the color diffusion.

  6. Step 6

    Return to the main scene and double-click on the sky symbol to edit it. Create a new keyframe in frame 15, and add a Shape Tween to the layer timeline. Change the gradient in the final frame to a deep sunset sky (purple to magenta). You can add color stops to increase the color range.

  7. Step 7

    Go back the main timeline. Select the sun object in the final keyframe, and drag the sun from its starting point to underneath the horizon (make sure the crosshair remains directly over the motion path). Select the sky object in the final keyframe and set its tint to 70 percent using the Properties palette color menu. When you play back the animation, the sun will follow the motion path, and the sky will darken.

Tips & Warnings
  • You can finish the animation with your sun offstage and the bottom of the stage as your horizon line, but you will need to mask the entire animation. Otherwise, the Flash Player will show the sun even when it's off the stage.
  • Animate clouds to add to the sunset effect. Use the alpha property so the changing sun colors will show through.
  • Don't convert your sun to a movie clip symbol, or the same display will play over and over again in the timeline.
  • The sun must be a bitmap object to animate the gradient with the Stop Tween command. Create it with a vector tool and break it apart, or use a large round brush.
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics