Creating Shockwave Director HTML
Publishing Director movies
Publishing a movie compresses the data in the movie and saves it in a Shockwave format. Unlike a projector, a Shockwave movie does not have to be made for a particular platform. Any Shockwave movie will play on all compatible platforms, provided that users have installed the correct version of Shockwave in their web browser.
Creating a Shockwave movie can be achieved in 1 step:
1. With your Director movie open, save it and choose File
> Publish.
The above will create a shockwave version of the movie (convert it
to a dcr file) as well as create an html file that calls the dcr.
The html file and dcr are, by default, created in the same folder
as the original movie. The html code is based on the default Publish
settings. You can choose a template that inserts JavaScript and VBScript
Shockwave detection or choose no template at all.
To change the publish settings:
1. Choose File > Publish Settings.
The Publish Settings dialog box appears. On the Formats tab,
you can change the HTML Template used to create the html file.
Director saves the publish settings when you save your movie. Creating
a new movie will revert to the default Publish settings (shown below).
Clicking the Shockwave tab allows for additional shockwave
controls, including the ability to create stretchable shockwave movies
(however these will be more CPU intensive). The Compression tab allows you to apply JPEG and/or Shockwave Audio compression to
images and sound respectively.
Writing the HTML
To incorporate the Shockwave in a web page.
There are 2 tags for
calling a shockwave movie from HTML. These are the EMBED and OBJECT
tags. EMBED was the original Netscape Navigator tag. OBJECT allows
for ActiveX control (and thereby added functionality) supported by
Microsoft Internet Explorer. All Shockwave-compatible browsers support
EMBED; newer browsers support OBJECT. Both tags should be used to
ensure that a movie plays on as many compatible browsers as possible.
The text below outlines the HTML code you would use to call a Shockwave
movie. This should be typed into Notepad or some other text editor
and saved with the extension .htm or .html
This file is HTML. Start the "header" Browser's "banner" End the "header" Start the "body" (use a white background) Some text centered and bold Calling the shockwave called shock.dcr (explained below) End the "body" End the HTML document |
<HTML> |
- WIDTH and HEIGHT - values set to the dimensions of the stage. You can crop a Shockwave by making these dimensions smaller than the stage. Likewise, you can increase the "window" but this would be a waste of RAM
- SRC - value that points to the pathname of the shockwave movie. The above script requires shock.dcr to be in the same directory as the HTM file.
- TYPE - value that defines the shockwave object as a Director Shockwave, letting the browser know what plugin to use.
- PLUGINSPAGE - points to a URL where the plugin can be downloaded if not found.
To view the Shockwave in your browser, a Shockwave plugin must be
installed. To detect for the Shockwave plugin or ActiveX control,
JavaScript and/or VBScript is generally used. This is usually accompanied
with the NOEMBED tag is to call an alternative image or text
to replace the shockwave file. For example, the following calls for
an alternate image called alt_image.jpg:
<NOEMBED><IMG SRC="alt_image.jpg"
WIDTH=320 HEIGHT=240>
</NOEMBED>