Adobe Flash

Create a motion tween with an alpha setting

In this section, you will create a tween of the alpha value of the shadow graphic that appears under the eight ball. Because the changes in the shadow should match the speed and timing of the bouncing eight ball, you will use the same easing curve you created in the previous section.

Create the tween of the alpha value for the shadow

  1. In the Timeline, select Frame 61 of the layer called Shadow.

  2. Select Insert > Timeline > Keyframe.

  3. Drag the playhead to Frame 1.

  4. Click outside the Stage to deselect all selections.

  5. Click the shadow movie clip on the Stage.

  6. In the Property inspector, select Alpha from the Color menu.

  7. Drag the Alpha slider down until the value is 25%. You have now set the alpha value to 25% in Frame 1 and 100% in Frame 61.

    Setting the alpha value of the Shadow movie clip on the Stage to 25%

    [View full size image]

  8. In the Timeline, click the layer named Ball to select the frames in that layer.

  9. In the Property inspector, click Edit next to the Ease slider.

  10. In the Custom Ease In / Ease Out dialog box, press Control-C (Windows) or Command-C (Macintosh) to copy the easing curve you applied to the ball tween.

  11. Click Cancel to dismiss the dialog box.

  12. In the Timeline, click the layer named Shadow to select all the frames in that layer.

  13. In the Property inspector, select Motion from the Tween menu.

  14. Click Edit next to the Ease slider.

  15. In the Custom Ease In / Ease Out dialog box, press Control+V (Windows) or Command+V (Macintosh) to paste the easing curve from the ball tween.

  16. Click Play in the dialog box to preview the animation on the Stage.

    By applying the same curve to the Shadow tween, you have made the transparency of the shadow animate according to the proximity of the ball. This way the shadow appears to become darker as the ball approaches the surface and lighter as the ball bounces away from the surface.

  17. Click OK to close the dialog box.

  18. Select File > Save to save your FLA file.

Test the application

At any point during authoring, you can test how your application plays as a SWF file. Because this tutorial contains no animation or interactivity, the file will look the same in test mode as it does in authoring mode.

  1. Select File > Save to save your FLA file.

  2. Select Control > Test Movie.

  3. When you finish viewing the application, close the SWF file by clicking the close box in the test window.

You have now completed a successful complex animation using the custom easing controls in Flash. By using these controls while tweening the various properties of objects on the Stage, you can create a wide range of complex motions and interesting visual effects.

by BrainBellupdated
Advertisement: