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

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
mooncaine
Posts: 206
Joined: Wed May 04, 2005 9:31 pm
Location: atlanta, ga, usa

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

Post 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.
Regul8R
Posts: 62
Joined: Thu Jan 06, 2005 11:44 pm

Post 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
Blessings for you, but none for me....
User avatar
Lost Marble
Site Admin
Posts: 2354
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post 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).
User avatar
mooncaine
Posts: 206
Joined: Wed May 04, 2005 9:31 pm
Location: atlanta, ga, usa

Wow, thanks!

Post 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
User avatar
mooncaine
Posts: 206
Joined: Wed May 04, 2005 9:31 pm
Location: atlanta, ga, usa

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

Post 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!]
Riskmandel
Posts: 8
Joined: Wed Jun 01, 2005 6:51 pm

masks

Post 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.
User avatar
Lost Marble
Site Admin
Posts: 2354
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post 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.
Post Reply