How to Create a Sunrise in Flash

By eHow Computers Editor

Rate: (1 Ratings)

Animators know a number of ways to transition from one scene to the next, but what if you want to transition between times? By using the Shape Tween feature and a few additional techniques, you can make the sun rise in Flash.

Instructions

Difficulty: Moderate
Step1
Open a new Flash document. Create at least three layers: one for your sky, one for the sun and one for your horizon line.
Step2
Create your sky on the bottom layer. Cover the stage with the rectangle tool, and add a pale-blue-to-white gradient (linear or radial will be fine). Convert the background to a graphic symbol (F8). Create your horizon on the top layer; it can be mountains, a lawn or a simple rectangle.
Step3
Draw a circle with a four-color radial gradient on the middle layer. The center color stop should be bright yellow with 100 percent alpha, the second stop should have a little orange, the third and fourth stops should be white, with the fourth stop's alpha set to 0. Drag all four stops to the center of the gradient line so that the gradient fades to nothing abruptly.
Step4
Convert the gradient to a graphic symbol. Move it underneath the horizon to hide it. Add a motion guide to the sun layer to control the direction of the sunrise. Double-click on the sun to edit it.
Step5
Select the sun object, and break it into a bitmap (Command+B) so that you can animate the gradient. Click in a frame that is 15 to 20 frames down the timeline to add a keyframe (F6). Click anywhere in the timeline before the final keyframe and choose "Create Shape Tween" from the Timeline menu Insert submenu (you will see an arrow connecting the two keyframes). Click on the sun in the final frame and drag the last (white) color stop all the way to the right to diffuse the gradient.
Step6
Return to the main scene and select frame 15 in all layers. Add a new keyframe (all layers should show the keyframe if you had them selected at the same time). Select the timeline before the final keyframes in the sun and sky layers, and this time use the "Create Motion Tween" command.
Step7
Drag the sun from its starting point to the end of the motion path. Make sure the reference point (a crosshair) is directly on the path in the first and last frames. Select the sky object in the final frame and set its tint to 70 percent (if you don't see the color options on the Properties palette, you have the layer selected, not the object itself). When you play back the animation, the sun will follow the motion path, and the sky will lighten as it ascends.

Tips & Warnings

  • You can begin 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 in its offstage position.
  • Don't convert your sun to a movie clip symbol, or the same display will play over and over again in the timeline.

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 Create a Sunrise in Flash

eHow Computers Editor

eHow Computers Editor

Category: Computers

Articles: See my other articles

Related Ads