Page 1 of 1

How do I use a mask to reveal a line [make it grow longer]?

Posted: Tue Jun 07, 2005 10:16 pm
by mooncaine
I'm using Moho to animate some line graphs for a teaching project.

I have drawn a few of the squiggly lines on the graph, and now I'd like to animate a mask so that the lines are revealed, as if they were being drawn from left to right.

I am looking at the tutorials that came with Moho, and I don't see how to do this.

I've got 3 lines, each in a vector layer, and I've got a square shape in a vector layer that is on top of all the other layers.

I searched this forum for "mask" but found nothing. I am sure this is a question that has been asked before, so, if you could direct me to an answer, I'd be grateful.

Posted: Tue Jun 07, 2005 11:34 pm
by Regul8R
check out your moho folder on your c:\ (or wherever you installed)
the sample animations and techniques have sample maskings for you to use and examine. check them out to see how their composed up. then try out your own using a similar layout.

jay b

Posted: Tue Jun 07, 2005 11:42 pm
by Lost Marble
Something like this?

http://www.lostmarble.com/misc/graph.moho

For a simple masking effetc like this, put the layer(s) you want masked all together in a group layer. The lowest layer in the group will be the mask. Animate the mask to expose the parts you want in the order you want. Then, turn on the mask settings ("Hide all" for the group, and "Add to mask, but keep invivisble" for the animated rectangle).

Wow, thanks!

Posted: Wed Jun 08, 2005 6:12 am
by mooncaine
Thanks so much! The thing that was confusing me was the stacking order. I never imagined the mask would be the lowest layer in the group. I appreciate the help!

:D

Oops -- is this supposed to render to SWF? Hope so.

Posted: Wed Jun 08, 2005 5:41 pm
by mooncaine
Now that I'm back in the office and trying your sample project, I find that the masking effect does not appear when I export to SWF. Is masking not available to Flash export? Perhaps I'm missing some preference setting, or doing something wrong. What I want is for a graph very much much like yours, with animated mask, to be exported as an SWF that I can use within a larger SWF authored in Flash MX [Macintosh].

[Never mind; I just found the Help page that lists Layer Masking as something that can't be exported to Flash. That's too bad for me, because I was hoping for that. I'll have to do it in Flash. Thanks anyway!]

masks

Posted: Wed Jun 08, 2005 6:33 pm
by Riskmandel
Can't you just export the Moho file as a Quicktime movie, import into flash, then export as a flash movie with the masking intact...?...that should work.

Posted: Wed Jun 08, 2005 10:46 pm
by Lost Marble
True, layer masking does not work with Flash. However, that's just one approach to this problem. Here's a Flash-compatible solution:

http://www.lostmarble.com/misc/layer_trail_graph.moho

To create this animation, I first animated the layer translation of "Layer 1", using the Translate Layer tool. (If you select Layer 1 and activate the Translate Layer tool, you will see the path that layer takes.) Be sure to set the interpolation for the layer translation to Linear if you want sharp corners on your graph.

Then, set the line width and color you want to use in the Style window and run the Layer Trail script (Scripts->Layer Effects->Layer Trail). This script creates an animated line that follows the path of the current layer. Useful for graphs, animated writing, etc. The script will create a new layer containing the actual line.