Printing from the Flash Player


Users with Flash Player version 4.0.25 (Windows), 4.0.20 (Macintosh), or later can use the Print command in the Flash pop-up menu to print the contents of any Flash movie. This command is rather limitedit prints frames in the main movie's timeline only and does not let you print any color effects. In addition, the Print command works only if you have not disabled the Flash pop-up menu, which is normally opened by right-clicking (Windows) or Control-clicking (Macintosh) the Flash movie in either the browser or the Standalone player.

Exercise 24.1 Printing from the Flash Player

Before you start to do any fancy printing, take a few minutes to play around with the Print command from the Flash Player pop-up menu.

  1. Open print_player.fla from the Chapter_24/Assets folder on the CD. This movie contains five frames in the Content layer on the main timeline.

  2. Move the playhead through each of the five frames to see the contents of the movie. (See Figure 24.1.)

    Figure 24.1. The movie contains five frames in the Content layer.

    graphics/24fig01.gif

  3. Choose Control > Test Movie from the main menu to test the movie as an SWF.

  4. Right-click (Windows) or Control-click (Macintosh) the movie. Select the Print command from the pop-up menu. (See Figure 24.2.)

    Figure 24.2. Select Print from the pop-up menu.

    graphics/24fig02.gif

  5. After your system's standard Print dialog box opens, use the default settings to print the Flash movie as you would any other document. If at all possible, print your movie to a color printer.

    The movie should print in five pagesone page for each frame in the main timeline.

Because printing from the Flash Player is so limited, you might want to disable this functionality in your movie altogether. If you decide that you do not want to let users print a movie through the Print command in the Flash Player pop-up menu, label a frame in the main timeline !#p. This dims the Print command in the Flash Player pop-up menu and disables any Print actions that target the movie. You need only place the !#p label in the main timeline once to disable printing for the entire movie.

Exercise 24.2 Disabling the Print Command in the Flash Player Pop-Up Menu

You're going to learn how to add ActionScript-based printing in just a bit. If you don't want users to be able to print any part of your movie without using ActionScript-based printing, you need to disable the Print command from the Flash Player pop-up menu.

  1. In print_action.fla, select frame 1 of the Actions/Labels layer. Use the Frame panel to set the label of this frame to !#p. (See Figure 24.3.)

    Figure 24.3. Set the label of the frame to !#p.

    graphics/24fig03.gif

  2. Choose Control > Test Movie. After the SWF opens in Test Movie mode, right-click or Control-click it. The Print command should be disabled.

Note

You can disable Flash Player's Print command by disabling the whole pop-up menu in Publish Settings (File > Publish Settings). This removes not only the Print command, but also the other pop-up menu commands, such as Zoom In, Zoom Out, and Quality. You need only select the HTML tab in Publish Settings and deselect the Display Menu option to disable the Flash Player pop-up menu.




Inside Flash
Inside Flash MX (2nd Edition) (Inside (New Riders))
ISBN: 0735712549
EAN: 2147483647
Year: 2005
Pages: 257
Authors: Jody Keating

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