Macworld Masterclass: Animating Masks in Flash

Animating masks in Flash offers amazing cinematic effects when used with stills. Since Adobe Flash CS4, Adobe has rewritten the motion tween aspect and added the Motion Editor panel. By using the enhanced Motion Editor to add additional eases (acceleration and decelleration) to the animation, you can add fluid movement. By animating one strip many times – moving across from left to right at various speeds and accelerations to gradually show more of the underlying image – you get a transition that is reminiscent of a cinematic title sequence. Compounding the strips then reveals the whole image for display. For variety, a couple of moving squares were used in our example, as opposed to strips, which bring the animation to its end.

By

Animating masks in Flash offers amazing cinematic effects when used with stills. Since Adobe Flash CS4, Adobe has rewritten the motion tween aspect and added the Motion Editor panel. By using the enhanced Motion Editor to add additional eases (acceleration and decelleration) to the animation, you can add fluid movement. By animating one strip many times – moving across from left to right at various speeds and accelerations to gradually show more of the underlying image – you get a transition that is reminiscent of a cinematic title sequence. Compounding the strips then reveals the whole image for display. For variety, a couple of moving squares were used in our example, as opposed to strips, which bring the animation to its end.

  • 01 1. Preparing image
  • 02 2. Import image
  • 03 3. Create Mask
  • 04 4. Animation guides
  • 05 5. First animation
  • 06 6. Second strip
  • 07 7. Strip three
  • 08 8. Strip four
  • 09 9. Repositioning
  • 10 10. Step and repeat
  • 11 11. Box animation
  • 12 12. Placing the Mask
  • 13 13. Testing the Mask
  • 14 14. Final touches
  • 15 15. Stop
  • More stories
Next Prev

1. Preparing image

Open the photo you wish to use in Photoshop CS5 or any image editor and crop it to the dimensions of the stage of your animation. The animation here used the default dimensions of 550 pixels by 400 pixels. This example will work with any dimensions necessary.

Next »

Next Prev 01

Open the photo you wish to use in Photoshop CS5 or any image editor and crop it to the dimensions of the stage of your animation. The animation here used the default dimensions of 550 pixels by 400 pixels. This example will work with any dimensions necessary.

 

Step 2 of 15: 2. Import image

Import the cropped image into Flash by using File > Import > Import to Stage. Rename the layer as ‘Masked Photograph’, place the image and position it accurately on to the stage by setting the position of the image to x:0, y:0 in the Properties panel.

 

Step 3 of 15: 3. Create Mask

Create a new symbol, go to Insert > New Symbol and choose MovieClip. Name the MovieClip as Mask. Draw a square using any colour and no stroke. So that we can see the underlying image while creating the movements, pick a 50% Alpha for the colour.

 

Step 4 of 15: 4. Animation guides

Each strip of animations will have their own layer. We’ll create all our animations inside a MovieClip. Create another symbol, this time a graphic and name it Moving Mask. Place two horizontal guides, one at x:0 and the other at x:550, and 2 vertical guides one at y:0 and the other at y:400 for the boundaries.

 

Step 5 of 15: 5. First animation

Place the Mask MovieClip into the Moving Mask Symbol and stretch it vertically so that it is more than 400 pixels. Place it on the left side of the left margin. Right-click and create a motion tween. On the last frame (24), place the strip on the left side of the right margin. Next, stretch the animation to 100 frames.

 

Step 6 of 15: 6. Second strip

Create a new layer and repeat the process as in step 5. This time, vary the width of the strip and its starting position. For the finishing position, line it up to the left side of the first strip’s ending position, so that both strips converge, and stop at the 100th frame.

 

Step 7 of 15: 7. Strip three

Create a third layer and another strip. We created a very thin strip and animated left to right as the previous two. For variation, an ease was added via the Motion Editor. Select the frames in the timeline for layer three, then go to Motion Editor, add an ease of Stop and Start (Fast) then apply it to the X,Y movement.

 

Step 8 of 15: 8. Strip four

Create a fourth layer. Instead of starting from frame one, start at frame 20. At frame 20, create a Keyframe by pressing F6 or going to Insert > Timeline > Insert Keyframe, then place the Mask. For variation, create a wide strip and animate it until 100 using the motion tween.

 

Step 9 of 15: 9. Repositioning

To further customise the fourth strip, halfway through the animation reposition the rectangle to an alternate location and also reposition it somewhere towards the end of the animation. This will place two diamonds (property keyframes) on your motion timeline showing that custom positions were set.

 

Step 10 of 15: 10. Step and repeat

Repeat for layers 5, 6 and 7, adding the Mask, and animating. Vary the animations by changing the width of the MovieClip, adding eases through the Motion Editor and changing the values of the eases. Also, change the starting position and the beginning of the keyframes for variety.

 

Step 11 of 15: 11. Box animation

For Layer 8, place a square-shaped Mask MovieClip on to the top left side of the stage boundaries in the symbol Moving Mask. As before, set the animation from outside of the stage boundaries defined by the guides to within the stage boundaries. Repeat for Layer 9 but the square travels north this time.

 

Step 12 of 15: 12. Placing the Mask

Go back to Scene 1. Create a layer called Mask and place the Moving Mask Graphic Symbol on to that layer. Position it correctly by setting the co-ordinates of the object to x:0,y:0. Extend the frames of the Mask and Image layers to 100 frames to match the animation of the Moving Mask.

 

Step 13 of 15: 13. Testing the Mask

In the properties of the Moving Mask object set the Blending to Layer. Right-click the Mask layer and choose Mask. That should set it as a Mask and set the layer beneath it (Image) to Masked and change its icon. Test by pressing C-Enter and you will see your animation take place.

 

Step 14 of 15: 14. Final touches

We want the image to stay still for a while after the animation of the Mask has completed. Create another layer and call it Still Image. Place the image on that layer and position it on the bottom layer. Move the beginning keyframe to 101 and place static frames until 135.

 

Step 15 of 15: 15. Stop

When testing the animation, it loops when it gets to the end. To force the animation to stop and stay still when it gets to the end, you can add a stop command. Open the code snippets Panel, choose Timeline Navigation > Stop at this Frame. The Flash animation will stop at the frame where you insert this code.

Elsewhere on IDG sites
Hands-on: Samsung Galaxy Note 8 review

Hands-on: Samsung Galaxy Note 8 review

Be inspired by powerful National Theatre posters from the past 50 years

Be inspired by powerful National Theatre posters from the past 50 years

How to use the new Photos, Notes and Safari features in macOS High Sierra

How to use the new Photos, Notes and Safari features in macOS High Sierra

Galaxy Note 8 : design, caractéristiques techniques, date de sortie

Galaxy Note 8 : design, caractéristiques techniques, date de sortie