Flylib.com

Books Software

 
 
 

Online versus Offline


Online versus Offline

You'll hear a lot about online versus offline generation of Generator templates. So what's the difference? When you are using Generator templates online, the server is creating a new file every time someone browses to the HTML page in which the template is embedded. If you have Generator 2 Enterprise Edition, you can set up caching features to save wear and tear on your server. However, if you are using Generator Developer Edition, a new file is created for every request of the template. The important distinction here is that the file did not exist prior to the request for it.

Online generation is a Web server extension. It enables dynamic combinations of text, graphics, and sound into rich media. When a browser requests a Generator template from the Web server, the Web server passes the request to Generator by way of an instance of a Java servlet. Data is acquired from the data sources. The template and data are passed to the C++ code, which merges them and builds the image.

If your data does not need to be updated in real time, you can run your templates offline to create Flash Player movies, GIFs, JPEGs, and so on and manually replace the files on the server only when there are changes to the data.

Offline generation can be done in two different ways. Flash 5 includes a version of the Generator server. Every time you publish a Generator template from the Flash authoring environment, you are invoking an offline generation.

Offline generation also can be done at the command-line level if you have the Generator server extensions installed. Instead of sending a file back to a browser, offline generation creates a physical file in the format requested and saves it to a hard drive.


Summary

Together, Generator and Flash are extraordinarily powerful. The predefined Generator objects can be used to quickly build movies in Flash that would be difficult or cumbersome to build otherwise . Bear in mind that you don't have to be running Generator server to take advantage of much of the power of Generator. If you need to be able to generate customized graphics on the fly, Generator Enterprise Edition is for you. If you're looking just for an easy way to build tickers, charts , scrolling lists, and so on, you can put the Generator templates to work for you. Remember that you're creating Flash movies (or GIFs, or JPEGs, or whatever you choose in the Publish Settings dialog box) every time you publish your template. You have the power ”use it!

In Chapter 28, you get the chance to see how you can use a Generator/Flash/middleware approach to connect a Generator template to a database in real time to produce dynamic, on-the-fly graphics and media.

In the meantime, it's time to step away from Generator and take a look at some of the tricks of the trade when it comes to importing artwork into Flash.


Part II: Building Blocks/Animation and Sound

Part II Building Blocks/Animation and Sound

 

5 Importing, Using, and Optimizing Graphics

 

6 Tips for Using the Library

 

7 Creating Cool Effects with Text

 

8 Making the Transition

 

9 Masking Effects

 

10 Animation Techniques

 

11 Faking Video in Flash

 

12 Creating 3-D Effects in Flash

 

13 Using Sound in Flash


Chapter 5. Importing, Using, and Optimizing Graphics

graphics/chic01.gif

You aren't limited to using only the graphics you create in Flash in your movies; you also can import a wide variety of graphic formats. Table 5.1 lists the standard file types you can import for both the Windows and Macintosh platforms.

Table 5.1. Standard File Types of Flash 5 Imports

Format File

Extension

Platform

Adobe Illustrator 6.0 or earlier

.eps, .ai

Both

AutoCad DXF

.dxf

Both

FreeHand

.fh7 “.fh9

Both

FutureSplash

.spl

Both

GIF and animated GIF

.gif

Both

JPEG

.jpg

Both

PNG

.png

Both

Flash Player

.swf

Both

Bitmap

.bmp

Windows

Enhanced Windows Metafile

.emf

Windows

PICT

.pct, pic

Macintosh

If you have QuickTime 4 (http://www.quicktime.com/) or later installed, you also can import the formats in Table 5.2 for either platform.

Table 5.2. Formats Flash 5 Imports with QuickTime Installed

Format File

Extension

Platform

MacPaint

.pntg

Both

Photoshop

.psd

Both

PICT (for Windows as bitmap)

.pct, pic

Both

QuickTime Image

.qtif

Both

QuickTime Movie

.mov

Both

Silicon Graphics

.sai

Both

TGA

.tfg

Both

TIFF

.tiff, .tif

Both

That's a lot of potential formats to work with. No matter what type of graphics you use in a Flash movie, you need to understand how to optimize your graphics to keep your file size low and your playback fast.

In this chapter, you'll take a look at the following:

  • Optimizing bitmaps for use in Flash. You learn the tips and tricks that help you make the best use of bitmaps in Flash.

  • Converting bitmaps to vector graphics. Sometimes, you can keep your file size small by converting bitmaps to vector graphics. You learn what types of bitmaps lend themselves to this type of treatment.

  • Monitoring memory and CPU usage. When you start combining bitmap and vector graphics, you need to pay special attention to how your movie is affecting memory and CPU usage. You learn how to monitor your CPU usage and modify your files to improve performance.

  • Importing vector graphics from other programs. Learn how to import SWF files that are created in third-party programs.

  • Importing artwork from Adobe Illustrator and Macromedia FreeHand. Illustrator and FreeHand both produce vector graphics that you easily can import into Flash. You learn the ins and outs of importing graphics from these two programs.

  • Using the Bandwidth Profiler and Size Report. Learn how the Bandwidth Profiler and Size Report can help you pin down potential trouble spots in the playback of your movie.

You begin by taking a look at how you can optimize bitmaps for use in Flash.