Cutting and Pasting Between Layers

I l @ ve RuBoard

Cutting and Pasting Between Layers

Flash allows you to create and place graphics only on the active layer of a movie. But you can copy, cut, or delete elements from any visible, unlocked layer. You can select items on several layers, cut them, and then paste them all into a single layer. Or you can cut items individually from one layer and redistribute them to separate layers.

To paste across layers:

  1. Create a document that contains several layers.

  2. Place at least one element on all but one layer.

    Make a document with five layers, for example. Put a triangle on one layer, an oval on another, a circle on a third, a star on a fourth, and leave the fifth layer empty. To make the items easier to work with, group each one.

  3. Name each layer according to its contents.

    Adding the names Star, Circle, Triangle, and so on makes it easier to remember which layer contains which items. It also makes it easier for you to see what's going on as you practice moving items across layers in this exercise.

  4. On the Stage, select the star.

    Notice that Flash highlights the star's layer in the Timeline.

  5. From the Edit menu, choose Copy.

  6. In the Timeline, select the empty layer.

  7. From the Edit menu, choose Paste.

    Flash pastes the copy of the star in the empty layer, in the middle of the window (Figure 5.29). Now you can move the star to a new position, if you want.

    Figure 5.29. Copying a shape from one layer to another involves selecting the shape (top), copying it, selecting the target layer, and then pasting the copy there. The Paste command (middle) positions the pasted shape in the center of the window (bottom).

    graphics/05fig29.gif

To use the Paste in Place command across layers:

  1. Using the same document as in the preceding exercise, select the triangle.

  2. Using the techniques that you learned in Chapter 3, add the oval and the circle to your selection.

  3. From the Edit menu, choose Cut. Flash removes the three selected shapes (Figure 5.30).

    Figure 5.30. The first step in consolidating items from several layers on a single new layer involves selecting all the items and cutting them. Later, you'll paste them into the new active layer.

    graphics/05fig30.gif

  4. In the Timeline, select the empty layer.

    Two Ways to Paste

    Flash offers two pasting modes: Paste and Paste in Place. Paste puts elements in the center of the Flash window. Paste in Place puts an element at the same x and y coordinates it had when you cut or copied it. Paste in Place is useful for preserving the precise relationships of all elements in a scene as you move items from one layer to another.

  5. From the Edit menu, choose Paste in Place (Figure 5.31).

    Figure 5.31. Choose Edit > Paste in Place to paste items back into their original positions, but on a new layer.

    graphics/05fig31.gif

    Flash pastes all three shapes back into their original locations on the Stage but on a different layer (Figure 5.32). Try hiding the empty layer temporarily; you should no longer see those three objects.

    Figure 5.32. The Paste in Place command positions the pasted items in the new layer. Each shape occupies the same coordinates it had on its former layer, but now all the shapes are together in the new layer. Hide the new layer to make sure that you did move the elements from their old layers.

    graphics/05fig32.gif

graphics/01icon02.gif Tips

  • You've already learned that selecting an object on the Stage causes Flash to select that object's layer in the Timeline. As you move objects between layers, it helps to know that selections work the other way around, too. When you select a layer in the Timeline, Flash selects all the elements for that layer on the Stage.

  • The process of cutting elements and using the Paste in Place command is, obviously, time-consuming , because you have to keep selecting new layers as you place the elements. To automate the process, use the Distribute to Layers command (see "Distributing Graphic Elements to Layers" later in this chapter).


Where Do Pasted Objects Go?

A Flash document can have only one layer active at a time. Any new shapes you create wind up on the currently selected or active layer. The same is true of placing copies of shapes or instances of symbols; if you copy and paste an element, Flash pastes the copy on the active layer. When you drag a symbol instance from the Library window, it winds up on the active layer.

I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net