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.
How do I use a mask to reveal a line [make it grow longer]?
Moderators: Víctor Paredes, Belgarath, slowtiger
- Lost Marble
- Site Admin
- Posts: 2354
- Joined: Tue Aug 03, 2004 6:02 pm
- Location: Scotts Valley, California, USA
- Contact:
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).
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!
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!


Oops -- is this supposed to render to SWF? Hope so.
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!]
[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!]
-
- Posts: 8
- Joined: Wed Jun 01, 2005 6:51 pm
masks
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.
- Lost Marble
- Site Admin
- Posts: 2354
- Joined: Tue Aug 03, 2004 6:02 pm
- Location: Scotts Valley, California, USA
- Contact:
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.
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.