• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using the Print Action

Instead of using the limited Print command, you can use a more controllable printing option: the Print action. With it, you can specify not only which timeline you want to print, but also the print area. You even can use color effects, including transparency, when you print your Flash content.

Exercise 24.3 Adding the Print Action

Now it’s time to add your first Print action! It’s pretty painless, but watch out for all the options you have available.

1.
Open print_action.fla from the Chapter_24/Assets folder and save it to your hard drive. This file has one frame in each of the six layers (see Figure 24.4):

Figure 24.4. The file has six layers: Actions/Labels, Printable Content, Overlay, Button, Input Text, and Background.


  • Actions/Labels, Printable Content, Overlay, and Button. These layers are currently empty because you will be adding content to each.

  • Input Text. This layer contains an input text box with a variable name of text. You can select this text box and look at its properties in the Text Options panel (Window > Panels > Text Options).

  • Background. This layer contains the background for your movie (the Background Graphic movie clip). It is locked so that you don’t accidentally alter it.

2.
Select frame 1 of the Overlay layer and drag an instance of the Overlay movie clip from the Library onto the Stage. Use the Info panel to position this instance at X: 0 and Y: 0. Lock the Overlay layer so that you don’t change it accidentally in the next step.

3.
Select frame 1 of the Button layer and drag an instance of the Print Button symbol from the Library onto the Stage. Use the Info panel (Window > Panels > Info) to position this button at X: 135 and Y: 305.

4.
With the instance of the Print button selected, open the Actions panel. Make sure the Actions panel is set to Normal mode. Double-click the Print action in the Actions category in the Toolbox list. Leave all the default settings for the Print action for now. The following ActionScript should appear in the Actions list for this button:

on (release) {
    printNum (0, "bmovie"); 
} 

5.
Save your movie and choose Control > Test Movie. After the SWF opens in Test Movie mode, click the Print button. Your computer’s Print dialog box opens. Accept the defaults and print the movie. (See Figure 24.5.) If at all possible, print the movie on a color printer.

Figure 24.5. After the computer’s Print dialog box opens, accept the defaults and print the movie.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint