Recipe 4.13. Copying Animations


Problem

You want to copy an animation, or content in contiguous layers and/or frames, to a different timeline.

Solution

Use Edit Copy Frames.

Discussion

Like most applications, Flash enables you to copy the contents of your files and paste them into other documents or other parts of the same document. The Clipboard works for copying individual elements, but copying a timeline segment is not an individual element. For example, imagine you've created an animation on the main timeline and realize that you need to move that animation into a movie clip. The standard Copy and Paste commands won't work.

Fortunately, Flash has commands that enable you to copy and paste frames, including spans of contiguous frames across layers. To use it, drag to select the frames you want to copy in the timeline, and choose Edit Copy Frames.

To facilitate dragging to select frames in the timeline, be sure that Edit Preferences General Span Based Selection is toggled off.


Open the destination timeline, which may be that of a symbol, or the main timeline of a different file. Select at least one frame, and choose Edit Paste Frames. Flash pastes the frames, following these rules:

  • Frames are inserted at the active frame.

    • If only one frame in the destination timeline is selected, that frame is replaced with the first frame of the copied frames. All subsequent copied frames are inserted after the selected frame of the destination timeline, and all frames that initially followed the selected frame are pushed behind the newly pasted frames. Thus, if the original destination timeline has 10 frames, and 10 frames are pasted in with the first frame selected, the resulting timeline has 19 frames.

    • If multiple frames are selected, they are replaced with the same number of copied frames. Thus, to ensure that the destination timeline has the same number of frames before and after you paste in the copied frames, select the same number of frames in the destination timeline that you copied from the source timeline.

  • Layers are inserted in a manner similar to frames. That is, if you select frames in one layer of the destination timeline and paste frames from multiple layers, Flash inserts the bottom layer of the copied frames into the selected layer of the destination timeline, and it inserts new layers to hold all higher layers. Newly created layers do not retain their names, and are called Layer 2, Layer 3, and so on. To maintain the same number of layers after copying frames, select frames across the same number of layers in the destination timeline as the number of layers in the copied frames.

  • Symbols' instances maintain their status. If you copy frames with instances into a movie without the parent symbol, the parent symbol for each instance is copied into the destination movie's library.

See Also

Recipe 4.12




Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

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