Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Creative Suite

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

Creating Print Buttons

Each of the poster movie clips is now prepared, so the next task is to create scripted buttons that the user will click to execute the print action. Each button will also check to ensure that printing capabilities are available in the version of Flash Player being used to display the movie.

  1. Open the Library, locate the Invisible Button symbol, and drag three instances of it onto the Buttons layer. Position each instance over one of the poster symbols. (see Figure 6).

  2. Figure 6 Place three instances of the Invisible Button symbol on the Buttons layer of the poster images.

  3. Click the first button, and then open the Actions panel. Insert the code for printing the poster.

  4. 	on (release) {
    		if ($player != "") {
    			print ("PosterOne", "bframe");
    		}
    }

    When the user releases the mouse over this button, the print action is triggered. But first, the if action is used to make sure that Flash Player is capable of printing. By coincidence, the first version of Flash Player to include the $player variable was also the first version to support printing. So, as long as the value of $player is not equal to nothing, it is okay to execute the print command.

    Fast forward to the print action arguments, and you see that Poster One is the object to be printed. bframe specifies that the frame contents are to be used to define the bounding box or printable area.

    NOTE

    bframe is the most commonly used bounding box setting, but there are two others: bmovie and bmax. bmovie is used for printing frames on the main timelines, where the stage is used as the bounding area. bmax, on the other hand, is most useful for printing animated frames in succession. With bmax, all the frames on the timeline are looked at to determine the maximum bounding box for all. This ensures that each successive page looks correct relative to the others.

  5. Select the second button, and then insert the printing code with the Actions panel (see Figure 7).

  6. on (release) {
    		if ($player != "") {
    			print ("PosterTwo", "bframe");
    		}
    }

    Figure 7 Apply the code that instigates the printing process to the Invisible Button instance that is over the Poster One movie clip.

  7. Repeat Step 3 for the third Invisible Button instance, specifying Poster Three as the print target value

  • + Share This
  • 🔖 Save To Your Account