Flylib.com

Books Software

 
 
 

What You Have Learned

I l @ ve RuBoard

What You Have Learned

In this lesson, you have:

  • Added a map and several component instances and learned how to use the ListBox UI component. (pages 282 “288)

  • Loaded variables from a data source on a server using the LoadVars object (pages 288 “299)

  • Displayed dynamic content in an instance of the ListBox component and a dynamic text box (pages 299 “304)

  • Learned how to use the ScrollBar component (pages 304 “313)

  • Used the setEnabled method to disable and enable a component instance (pages 314 “316)

  • Sent data from a Flash movie to a script on a server (pages 317 “326)

I l @ ve RuBoard
I l @ ve RuBoard

Lesson 10. Creating Printable Movies

You can use Flash's printing capabilities to allow users to print parts of your Flash site. For the ZooMX Web site, users might want to print a copy of the map so they'll know just where to go when they arrive at the zoo. Using the print action, you can easily give your site's visitors this capability.

You can use ActionScript to print portions of your Flash movie.

Chrissy Rey

graphics/10fig01.gif

WHAT YOU WILL LEARN

In this lesson, you will:

  • Print Flash content using the Flash Player's contextual menu

  • Disable the Print command in the Flash Player's contextual menu

  • Use the print and printAsBitmap actions to print a specific movie clip in Flash

  • Specify printable frames

  • Specify a print area

APPROXIMATE TIME

This lesson takes approximately 30 minutes to complete.

LESSON FILES

Media Files:

Lesson10/Assets/assets.fla

Starting Files:

Lesson10/Starting/map5.fla

Completed Project:

Lesson10/Completed/map8.fla

I l @ ve RuBoard
I l @ ve RuBoard

Printing from the Flash Player Contextual Menu

You can use the Print command in the Flash Player's contextual menu (called the shortcut menu in Windows) to print the contents of any Flash movie. This command only prints frames in the main movie's timeline and does not let you print any color effects. You can activate the Flash Player contextual menu by right-clicking (Windows) or Control-clicking (Macintosh) in the Flash movie.

  1. Open map5.fla from the FlashTFS folder.

    graphics/10fig02.gif

    You should have created map5.fla in Lesson 9. If you can't find the file in the FlashTFS folder on your hard drive, use the file in the Lesson 10/Starting folder on the CD-ROM. Open the file and save it in the FlashTFS folder on your hard drive before you continue.

  2. Choose Control > Test Movie.

    graphics/10fig03.gif

    You can only access the Flash Player contextual menu when the movie is playing in the Flash Player. When you choose Control > Test Movie, Flash exports a copy of the Flash movie and plays it back in the Flash Player. The Flash Player plays the movie in the Test Movie window.

  3. Right-click (Windows) or Control-click (Macintosh) in the movie. Choose Print from the contextual menu.

    graphics/10fig04.gif

    Take a look at some of the commands available in this menu. Choosing Print opens your system's default Print dialog box. The following figures illustrate the Print dialog boxes for Windows 2000, Mac OS 9.x, and Mac OS X.

    graphics/10fig05.gif

    graphics/10fig06.gif

    graphics/10fig07.gif

  4. When the Print dialog box opens, use the default settings to print the Flash movie.

    graphics/10fig08.gif

    Try to print the movie in color if you can.

    When you look at the printed movie, you should see the content on the main timeline of the movie. It probably doesn't look very good, and may be somewhat distorted on the page.

    Only one page should have printed, as you have only one frame in the main timeline of the movie. See what happens if you add another frame to the main timelinejust be sure to choose File > Revert before you continue to the next exercise.

    You don't have to save your file before you continue, as you haven't actually made any changes to the movie. Keep map5.fla open for the next exercise.

I l @ ve RuBoard