Exporting Flash Movies

I l @ ve RuBoard

Every time you choose Control > Test Movie, Flash creates a .swf file in the same directory as the .fla file. So if you look in your FlashTFS folder, you'll see several .swf files, each of which was created when you tested a movie. This procedure is just one way to create a .swf file. Another way to create a .swf file, as well as files in several other formats, is to export your movie by using the Export Movie command. You can use this command to give the .swf file a name other than the name of the .fla file.

In this exercise, you are going to break the zoo movie into three separate movies: the base movie (Actions, Background, and Soundtrack layers), the home-page movie (Bitmap Mask, Main Page Bitmaps, and Welcome Text layers), and the overlay movie (Guide: Panda, Panda, Logo, and Frame layers ). You will then export two of those movies as .swf files.

You should start this exercise with zoo35.fla open from the previous exercise.

  1. Select frame 12 of the Bitmap Mask, Main Page Bitmaps, and Welcome Text layers, and choose Edit > Copy Frames. Create a new movie based on the Flash TFS Zoo Template, select frame 2 of the Contents layer in the new movie, and choose Edit > Paste Frames .

    graphics/11fig17.gif

    Select only frame 12 of the Bitmap Mask, Main Page Bitmaps, and Welcome Text layers. You can do this by clicking frame 12 of the Bitmap Mask layer, and then Shift-clicking frame 12 of the Welcome Text layer. Then choose Edit > Copy Frames to copy these frames from the timeline.

    You've created many new movies based on the Flash TFS Zoo Template throughout the course of this book, so this part should be easy for you. Just choose File > New From Template, and select the appropriate template. When the new movie appears, select frame 2 of the Contents layer. There's currently no keyframe in frame 2 of the Contents layer, but don't worry about that. When you choose Edit > Paste Frames, the frames you copied from zoo35.fla are pasted in frame 2. The Bitmap Mask layer is renamed Contentsyou can change the name back to Bitmap Mask if you want.

    NOTE

    If the Resolve Library Conflict dialog box opens, choose the "Replace existing items" option and click OK.

    graphics/11fig18.gif

  2. Insert a keyframe in frame 2 of the Actions layer and add a stop action to that frame. Set the Frame label for the keyframe in frame 2 of the Actions layer to rf.

    graphics/11fig19.gif

    graphics/11fig20.gif

    You are going to use the rf frame label in Lesson 12, when you learn how to make a preloader for your project. You can add the stop action by typing stop(); in the Actions panel.

    NOTE

    Make sure to add the stop action to frame 2 of the Actions layer, and not frame 1.

  3. Choose File > Export Movie. In the Export Movie dialog box, browse to the FlashTFS folder on your hard drive, type main.swf in the File Name (Windows) or Save As (Macintosh) text box, and click Save. Save the movie as main1.fla in the FlashTFS folder on your hard drive.

    graphics/11fig21.gif

    When you export the movie as a Flash Player movie, all the interactivity and sound in the movie are preserved. Notice that you can save the movie as several file types, including QuickTime, Animated GIF, and JPEG. Most of these file types will not preserve the interactivity and sound of your movie.

    Before the movie is exported, the Export Flash Player dialog box opens. You can leave all these settings at their defaults and click OK. You'll look at some of the export options later in this lesson and in Lesson 12, when you publish your finished site.

  4. Return to zoo35.fla and delete the Bitmap Mask, Main Page Bitmaps, and Welcome Text layers. Then delete frame 13 of every remaining layer.

    TIP

    Choose Window > zoo35.fla to return to that file.

    Since the contents of the Bitmap Mask, Main Page Bitmaps, and Welcome Text layers are now in main1.fla, you no longer need those layers in zoo35.fla. Just select all of the layers at once, and click the Delete Layer button at the bottom of the timeline.

    You also don't need frame 13 of every layer. This frame acted as a blank frame to demonstrate the use of the gotoAndStop action. But now it's no longer necessary, so you can remove it. Just drag the playhead to frame 13, and choose Insert > Remove Frames. That should remove only frame 13 from every layer in the movie. When you've completed this step, the timeline should look like the figure below.

    graphics/11fig22.gif

  5. Select the Guide: Panda, Panda, Logo, and Frame layers, and choose Edit > Cut Frames. Click the Delete Layer button at the bottom of the timeline.

    graphics/11fig23.gif

    You've already broken out the Bitmap Mask, Main Page Bitmaps, and Welcome Text layers into a separate home-page movie (main1.fla). Now you need to break the Guide: Panda, Panda, Logo, and Frame layers into another separate overlay movie. Select all these layers at onceyou can simply click the Guide: Panda layer and then Shift-click the Frame layer. Be sure to select the entire timeline for each layer, not just a single frame. Choose Edit > Cut Frames to remove the frames from this movie. Since the frames from these layers are gone, you should delete these layers before you move on to the next step.

  6. Create a new Flash movie based on the Flash TFS Zoo Template. Choose Insert > New Symbol. In the Symbol Properties dialog box, set the Name to Top Clip and the Behavior to Movie Clip. Click OK.

    graphics/11fig24.gif

    When you click OK, Flash enters symbol-editing mode for the new Top Clip movie clip. You are going to place the frames you cut in the last step inside this new symbol. Make sure it's a movie clip, because you're not going to add enough frames in the main timeline of the new movie to play every frame in the Top Clip symbol.

  7. Select frame 1 of the Layer 1 layer, and choose Edit > Paste Frames. Add a new layer, named Actions, and insert a keyframe in frame 12. Add a stop action to that keyframe.

    graphics/11fig25.gif

    When you paste the frames you cut from the zoo35.fla into the new Top Clip symbol, the layer names that corresponded with the layers in the zoo35.fla movie should appear in the Top Clip symbol.

    As you learned in Lesson 5, movie clips will loop continuously unless you use ActionScript to stop them. You don't want this animation to repeat endlessly, so add a new layer, named Actions, to the Top Clip movie clip. Select frame 12 of the new Actions layer, and choose Insert > Keyframe (F6). Select that frame, and add a stop action in the Actions panel. Since the Actions panel is in expert mode, you can just type stop(); in the Actions panel.

    graphics/11fig26.gif

  8. Choose Edit > Edit Document. Insert a keyframe in frame 2 of the Contents layer, and place an instance of the Top Clip symbol in that frame, centering it horizontally and vertically on the stage.

    graphics/11fig27.gif

    When you choose Edit > Edit Document, you'll be taken to the main timeline. You can also click the Scene 1 icon under the timeline to return to the main timeline. Once you're in the main timeline, select frame 2 of the Content layer, and insert a keyframe (Insert > Keyframe or F6). Open the Library panel and drag an instance of the Top Clip symbol onto the stage. Use the Align panel to center the instance of the Top Clip symbol horizontally and vertically on the stage.

    NOTE

    Make sure to select the To Stage button in the Align panel to center the Top Clip symbol.

  9. Add a keyframe to frame 2 of the Actions layer, and add a stop action. Label frame 2 rf. Repeat step 3 to export the movie as top.swf and save the movie as top1.fla.

    graphics/11fig28.gif

    This step is the same thing you did for the main1.fla movie in step 2 of this exercise. Make sure to select frame 2 of the Actions layer, and add a stop action in the Actions panel. You can do this by typing stop(); in the Actions panel. Then with frame 2 still selected, set the Frame label (in the Property inspector) to rf.

    When you're ready to export the movie, choose File > Export Movie. In the Export Movie dialog box, browse to the FlashTFS folder on your hard drive, and save the file as top.swf. When the Export Flash Player dialog box opens, leave the settings at their defaults and click OK.

  10. Return to zoo35.fla, and delete frames 2 through 11 of every layer. Save the file as zoo36.fla in the FlashTFS folder on your hard drive.

    graphics/11fig29.gif

    You can quickly return to zoo35.fla by choosing Window > zoo35.fla. After you delete frames 2 through 11 of every layer, the movie should have only two frames left.

I l @ ve RuBoard


Macromedia Flash MX. Training from the Source
Macromedia Flash MX: Training from the Source
ISBN: 0201794829
EAN: 2147483647
Year: 2002
Pages: 115
Authors: Chrissy Rey

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