Embedding a Flash Image Using HTML

You can generate a FLASH PopChart image using the @_FLASH server command. For example, the following HTTP request will generate a FLASH PopChart image:

http://localhost:2001/?@_FILEexamples/apfiles/bar.pcxml@_FLASH

Flash images can be embedded into web pages using an <object> tag for Microsoft Internet Explorer browsers, and an <embed> tag for Netscape® browsers. You can use the @_FLASH server command to instruct PopChart Server to generate a Flash image.

The code below demonstrates how you can embed a Flash image. Note that by embedding the <embed> tag within the <object> tag, the code makes sure that the image will display correctly on both Microsoft Internet Explorer and Netscape.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" width="600" height="400">
<param name="MOVIE" value="http://localhost:2001/?@_FILEexamples/apfiles/bar.pcxml@_HEIGHT400@_WIDTH600@_FLASH">
<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="600" height="400" src="http://localhost:2001/?@_FILEexamples/apfiles/bar.pcxml@_HEIGHT400@_WIDTH600@_FLASH">
</embed></object>

You could also implement Best Image Fallback (i.e., an alternate image if the browser is incapable of downloading the Flash plug-in) to a GIF or PNG image by embedding an <img> tag within the <embed> tag. Refer to "URL Encoding" in Chapter 11 of the PopChart Server User Guide for more information on embedding an image in the <img> tag.

Note: For reasons that should be apparent, it is much more convenient to embed a FLASH image with the PopChart Embedder.