Cool Flash Masking Effect

Download the tutorial files: Cool Effect with Masking.zip (111 kb)

In this tutorial, we are going to add a nice effect like the one below. This effect works particularly well industrial and robotic images as well as objects with curves and fluid lines.

Setting up the Movie

image 1

Open up Flash and set up your document properties. Set the dimensions to the exact dimensions of the image you are going to use and use a frame rate of around 20-30 fps. I find that a higher number of frames over a higher frame rate results in smoother animations.

Timeline Setup

image 2

Create 2 layers "image" and "fx" in your timeline. Import your image into the "image" layer. Set the image position to x: 0, y: 0, that is aligned to the top left corner. Lock the layer so it will not get in the way later.

Note: Do not resize or do anything in Flash to the imported image as that will distort the image. Do any editing in Photoshop or any other external editor. Go to the Library (F11) and double-click the image/bitmap symbol and uncheck the "Allow smoothing" option. This disables any extra and unnecessary anti-aliasing in Flash which will slow down the movie and possibly distort the image.

Drawing the Mask

image 3

Using Flash's drawing tools, create outlines of shapes around areas of highlight (brighter colors). Example: metallic parts, shiny surfaces, cables and tubes. I have used just the Line and Oval tool. Fill in the outlines and you will end up with the correct shapes (see below).

image 4

image 5

Select the Eraser tool and set the Eraser Options to "Erase Lines". Erase the lines from the shapes so that you are left with only the fills.

Select everything on the "fx" layer but clicking the layer in the timeline. Group (CTRL+G) the shapes and convert the grouped shapes into a Movieclip symbol (F8) as shown below. Name it "mc_fx" and set the registration point to top-left.

image 6

Making the Effect

Double-click the "mc_fx" instance on the stage to go into Symbol Editing Mode. You should see a layer called "Layer 1" containing the shapes you have created. Rename the layer to "mask" and create another layer below it and name it "light".

image 7

While you are still on the "light" layer, create a strokeless reactangle which is 135pixels by 120pixels in dimension. Select the fill and turn it into a Liner Gradient using the Color Mixer (Shift + F9) with the following settings. Both ends have an alpha value of 0% and for the middle 100%. Use the Fill Transform tool to rotate the fill so it looks like the picture below.

image 8

image 9

Group the gradient and turn it into a Graphic symbol (F8). Name it "g_light". Now set the position of "g_light" to x: 0, y: 265. Create a keyframe (F6) on "light" layer at frame 50 and on that keyframe, set the position of "g_light" to x: 0, y: -120. Insert frames (F5) at frame 50 for "mask" layer. See below.

image 10

Right-click the first keyframe on "light" layer and Create Motion Tween. Select frame 25, the middle frame and convert it into a keyframe by pressing F6. Set the Easing value of frame 1 to -100 and frame 25 to 100.

image 11

Select the "mask" layer, right-click on it and select "Mask" from the context menu to convert it into a layer mask.

Test Movie (CTRL + Enter) to see the completed effect.


Close    To Top
  • Prev Article-Flash:
  • Next Article-Flash:
  • Now: Tutorial for Web and Software Design > Flash > Basic > Flash Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction