| Ultrashock Tutorials > Flash5 > Printing in Flash5 | ||||
|
||||
| Printing in Flash5 | ||||
|
The Print feature Do you ever get annoyed by the low quality print-outs from the web? Well, Flash 5 is here to change that. When making printable content in Flash 5, you have total control over layout, typography, vector and bitmap graphics. And there is no unwanted content added by the browser. There are three ways to print. Initially, you can select the File menu, and choose Print. This will printout as usual the HTML document, treating any present Flash movies as though they were images. The quality is low, and the browser adds date and URL to the print-out. The two other ways to print, were introduced with the Flash Player v. 4.0.2x. Any user with that, or a higher version plug-in installed, can print Flash pages using the Right-click menu (Ctrl click on Mac), or a print button added by the developer. You can make a button that will print out documents several pages long - with contents that are not visible on-line. You can even create banner ads that will print several full pages, or even a ticket with an electronically readable barcode. For offline presentations, the Flash 5 Projector also supports printing (Flash4 projector does not). To control what the user is allowed to print, how the output is prepared, and all other print features, is what this tutorial is about. Developing printable Flash content The Print feature can be divided into three main headlines.
Frames designated for print
As the developer, you can control which
frames are, and are not printable.
If no frames are labelled "#P",
all frames are printable. If one or more frames are labelled "#P",
those labelled frames are printable. Don't worry about the duplicate
label error message you may get when you export.
The print action Flash 5 has a built-in action called Print.
When this action is applied either as a
frame action, or a button action, it spawns the printing
dialog when run. Let's go through the options for the action.
1. Print
Here, you select whether Flash should send vector (PostScript) information or bitmap information to the printer. The default setting is "As vectors", which gives the best quality and fastest print. Due to PostScript limitations, however, vector printing doesn't support transparency effects. If you need transparency effects
on your print-out, then you need to select "As bitmap".
2. Location
The Flash print command can only print one timeline at the time. That means, either the main movie, a loaded movie, or a movie clip. The default setting is "Level 0", which is your main movie (first loaded .swf file). If you need to print a loaded movie, then specify the level that movie is loaded in, for instance "Level 1". You can also print the contents of a specific movie clip. For that to work, you need to name the instance of the movie clip, and select "Target", and then write in the instance name of your movie clip as value.
3. Bounding
The bounding box is probably the most important issue in Flash printing. It concerns which area of the screen should be printed, and how much margin print-outs will have. Movie Selecting Movie as bounding box, will enable you to draw a box in any color, and have that box be your bounding box. To do this, you need to label a frame "#b", and draw the box in that frame. Only the first occurance of this label will be used for the active timeline.
Any printable content in the timeline, will then be scaled to the size of that box when printed. Frame
Selecting "Frame" as bounding box will scale each object in each printable frame to the largest possible printable area. Max
Selecting "Max" as bounding box will let the output area consist of all the printable frames. This is good for printing out animations, as the objects animated will be consistent in size relative to eachother, whilst still utilizing the maximum possible print area. Note: Selecting "Max" or "Frame", will override any "#b" label you may have. Disabling Print Graying the print button
To gray the right click option, "Print", you need to label a frame "!#P".
You need only one of these labels in a timeline, to disable printing for that timeline. Disabling the rightclick menu To disable the right-click menu, you need to enter the Publish Settings for the movie in question. This is done by selecting "File > Publish Settings", or simply pressing Ctrl + Shift + F12. Select the tab, "HTML", and uncheck the check box called "Display Menu".
Printing limitations As mentioned, Flash Player printing is limited to version 4.0.2x and later. If Flash Printing is not possible, any print action run, will display a blank browser popup window. You may want to detect the Player Version. This is done using the "$version" string, that was introduced with Flash 4. As Flash Printing prints vector graphics
using PostScript, it requires a bit of computer power. This makes printing
a bit slow on older computers (below 100Mhz).
Extending the Print feature With the Print feature introduced, the possibilities for extending Flash are close to endless. For instance, you can use Flash printing for:
Voilá. |
||||
|
©2001 Ultrashock.com Inc.
- All rights reserved
|