1

does anybody know/have some idea how to make a mask follow a line? Basically I have a drawing made with 1px line and I need to gradually mask this shape so it actually looks like it is being drawn. The thing is that I cannot just increase the width of the mask (it would simple draw a vertical line in one step which is not desired), it has to be a linear movement along the "guide" line, so the vertical line gets drawn in several steps. Doing this manually will/would be a major pain. This is what I am trying to achieve: Example of the drawing

Thanks a lot!

Fygo
  • 4,555
  • 6
  • 33
  • 47
  • One starting point would be to look at flood fill algorithms, as you're effectively animating a flood fill of the line. It will get more complicated if the line ever crosses itself, but that depends on how natural you need the result to be. – David Mear Feb 26 '13 at 05:03
  • Actually not the answer to your question, but I'd draw the line programmatically. – Teejay Feb 27 '13 at 09:44

1 Answers1

1

You have to do it manually. Though there are some shortcuts you can take:

  1. Create a Guide layer in Flash Pro.

  2. Copy a vector of your path to this guide layer.

  3. Create a new layer below it, put a circle on that layer at the start of the path and make a classic tween of that circle.

  4. Dock your circle layer under your guide layer and at the last frame of your tween move the circle to the end of the path. This will make the circle go along the path.

  5. Follow the animation and manually fill the covered parts.

  6. Put your guide, circle animation and following animation into a MovieClip and put it above your to be masked symbol and make its layer a mask.

Here's an example I made for you if I wasn't clear enough: http://db.tt/kvaaYaLA

Note that this method is only useful if you need a static animation, not for a dynamic one.

Gio
  • 1,954
  • 3
  • 22
  • 42