Director Tutorials

 

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>
<HEAD>
<TITLE>Shockwave Tutorial</TITLE>
</HEAD>
<BODY>
<BODY BGCOLOR ="white">
<H2><CENTER>This is Dean's Shockwave tutorial movie<BR> <I>Multimedia in Design - the best subject around</I>
</CENTER>
</H2>
<H2><BR>
<OBJECT CLASSID="clsid:166B1BCA-3F9C-11CF-8075-444553540000";
CODEBASE="http://download.macromedia.com/pub/shockwave/
cabs/director/sw.cab#version=8,5,1,0"
WIDTH="320" HEIGHT="240">
<PARAM NAME="SRC" VALUE="Shock.DCR">

<EMBED SRC="Shock.DCR" WIDTH=320 HEIGHT=240 TYPE="application/x-director" PLUGINSPAGE=
"http://www.macromedia.com/shockwave/download/">
</EMBED>

</OBJECT>
</BR>
</H2>
</BODY>
</HTML>

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>