You are here: Home > tutorial>tutorial_coolmotion>Iris Effect
Iris Effect

此页面上的内容需要较新版本的 Adobe Flash Player。

获取 Adobe Flash Player

Iris Effect

Yet another of the many uses for Flash’s masks is the iris effect: mimicking the iris diaphragm of a camera by closing in and out of a scene with a black obscuring layer. We’ll just need a couple of layers and shapes to create this effect, so start off by creating a base layer with the shape/scene/image that you want to iris in/out on.

On a new layer above the scene, draw a circle using the Oval Tool. The color and size don’t matter, but make sure to hold down the Shift key while dragging your mouse to draw it, so that you get an actual circle and not an elongated ellipse.

Right click on the circle layer—this will be your mask—and select Mask to link it to the layer below. Then right click on the below layer choose Masked.

Extend your animation along your timeline by inserting key frames(depending on how long you want your effect to take to complete; remember that in a standard web animation, twelve frames equals one second, so three seconds would be thirty-six frames).

Unlock the layers so that you can edit them, select the shape on your mask layer, and use the Transform Panel to center it to the stage. (If you have common sense—which I don’t—you’ll actually do this before you extend your timeline, but since the animation is going to be enlarging anyway, I don’t bother centering it on the last frame.)

Click on the first frame, and use the Transform Panel to shrink the mask shape down to almost nothing. Make sure that you have the Constrain Size box checked, so that the proportions remain the same.

Tip: don’t set it to 0%; we’ll be using a shape tween on this, and if you set the size to 0% then there’s nothing there for Cool Motion to tween. It can’t detect any pixels to blend from one shape to the next.

Then click on the last frame, and use the Transform Panel to enlarge the mask shape until it covers the entire stage area and beyond. It will only allow you to enlarge by a certain percentage, though, so if you hit the limit just use the Reshape Tool to enlarge it further.

Then create motion tween in Layer 2 between frame 1 and frame 35.