Setting Offline Generator options

The Offline Generator has several options (command-line switches) that modify the default operation of the program:

-help Displays descriptions of Generator options.
-swf <filename.swf> creates a Flash movie for output.
-gif <filename.gif> creates a GIF image for output.
-png <filename.png> creates a PNG image for output.
-qtm <filename.mov> creates a QuickTime 4.0 movie for output.
-jpg <filename.jpg> creates a JPEG image for output.
-txt <filename.txt> creates a text file from all the text within the movie.
-smap <filename.map> creates a server-side image map.
-cmap <filename.map> creates a client-side image map.
-cmapname <name> sets the client-side image map tag name.
-xwin32 <filename.exe> creates a Win32 projector.
-xmacppc <filename.hqx> creates a Mac PPC projector.
-debug <1|2|3> specifies the level of detail you'd like displayed in the log file. 1 displays only errors in the log file; 2 displays errors and warnings; 3 displays errors, warnings, and all data sources. You can specify the name of the log file using the -log option.
-log <filename.txt> specifies the log file name.
-param <name> <value> specifies a named parameter.


 
Creating Flash movies

To generate a Flash movie, use the -swf option. The following command creates the Flash movie, movie.swf, from the template, movie.swt:

generate -swf movie.swf movie.swt

To send to standard output, which is useful when using CGI scripts, use the following command:

generate -swf - movie.swt

The second hyphen (-) indicates that the movie should be written not to file but to standard output.


 
Creating GIF, JPEG, PNG, or QuickTime files

To create a GIF, JPEG, PNG, or QuickTime file, use the following syntax:

generate -xxx movie.xxx movie.swt

where xxx is the file extension (.gif, .jpg, .png, .mov).


 
Creating text in movies

If you want to collect all the text in a movie, you can create a text file. Later, you can read this file as you would any text file. For example, you can place the text as a comment in an HTML file. The comment can reference the movie from which the text came; then you can create search engines that index the text.

To create a text file containing the text in a movie, use the -txt option. The following command creates text:

generate -txt movie.txt movie.swt


 
Creating image maps

You can create client- and server-side image maps with the Offline Generator. A client-side image map is interpreted by the client browser and is included in the HTML that contains the GIF image. A server-side image map stays on the server; it is processed on the server using a special CGI script.

To create a server-side image map, use the -smap option. For example, the following command creates a server-side image map, movie.map, from movie.swt:

generate -smap movie.map movie.swt

To create a client-side image map, you must use both the -cmap and the -cmapname options. The -cmap option outputs a client-side image map; the -cmapname option sets the client-side image map tag name. When you create a client-side image map, you must specify an image map tag name. The following example creates a client-side image map, movie.map, with the tagname, mapname, from movie.swt:

generate -cmap movie.map -cmapname mapname movie.swt

You must include client-side image maps manually in the HTML code or process them with server-side includes.


 
Creating projectors

You can create projectors for a variety of platforms, allowing users to double-click the movie to play it without Flash or any extensions.

To create a projector, use one of the following options:

-xwin32 <filename.exe> creates a Win32 projector.
-xmacppc <filename.hqx> creates a Mac PPC projector.

For example, the following command creates a projector for Windows 32-bit systems:

generate -xwin32 movie.exe movie.swt


 
Creating multiple files from a single call

You can generate multiple file types from a single call to Generator. For example, the following command creates both a Flash movie and a GIF file.

generate -swf movie.swf -gif movie.gif movie.swt


 
Specifying parameters

You can pass variables to a template using parameters with the -param option. For example, the following command passes String1 as the value for the var1 variable:

generate -swf Blimp.swf Blimp.swt -param var1 String1


 
Setting the debug message level

Generator displays messages as it processes template files. These messages list errors, warnings, and data sources encountered as the template is processed. You can specify the level of detail you'd like to track during processing.

To specify the level of detail contained in the log file, use the -debug option to specify up to three levels of detail:

1 logs all errors.
2 logs all errors and warnings.
3 logs all errors, warnings, and data sources.

The following command creates the Flash movie, movie.swf, from movie.swt and displays all errors, warnings, and data sources encountered by Generator when the template was processed.

generate -swf movie.swf -debug 3 movie.swt


 
Creating a log file

You can create a log file containing information about how the template was processed. To create the log file, use the -log option.

The following command creates from movie.swt the Flash movie, movie.swf, and the log file, logfile.txt. The log file contains all errors, warnings, and data sources encountered by Generator when the template was processed.

generate -swf movie.swf -log logfile.txt -debug 3 movie.swt


 
Referencing generated content from a Web page

The output from the Offline Generator is a standard Flash player movie, GIF, JPEG, or PNG file. Therefore, the <OBJECT>, <EMBED>, or <IMG> tags used to reference the content are no different from tags used to reference standard Flash player movie files or GIF images.