0
votes

What's the best way to go about embedding a shockwave file in HTML5?

I've been using the following for some time:

<object width="100%" height="100%" classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.adobe.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0">
    <param name="src" value="shocwave/file.dcr" />
    <embed src="shocwave/file.dcr" width="100%" height="100%" type="application/x-director" />
</object>

but it appears to have stopped working so I presume something is now outdated?

If you try the codebase link direct then it just displays an error, could this be the issue? http://download.adobe.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0

It's proving quite tricky to find documentation on embedding shockwave files though.

2
Have you tried it with a different <!doctype> to see if that worked? Maybe something else is the problem.user2428118
@user1419007 It doesn't work in html4 either, if you try and access the url in the codebase (download.adobe.com/pub/shockwave/cabs/director/…) then it's not found ..Dan
Did you check what Content-Type is configured for .cdr files? (You can capture requests using tools such as Fiddler and Live HTTP Headers to check this.) If it shows something like text/plain for your .cdr, the problem is with the configuration of your server.user2428118

2 Answers

1
votes

How to embed shockwave in html5

The object tag has been modified in HTML5 and this is now the correct way to embed shockwave files:

<object data="shockwave/file.dcr" type="application/x-director" width="100" height="100"></object>

Reference: http://www.w3schools.com/TAGS/tag_object.asp

1
votes

It seems that Adobe Shockwave has reached it's technical "End of Life" - although there are still new NPAPI drivers ("Shockwave for Director"), those are of little use in current browsers (Firefox, Chrome, MS Edge) because they don't support these plugins anymore (see e.g. this forum thread). There won't be a driver for current browsers.

The only possibility is to use older browsers (Firefox ESR and the current Seamonkey 2.49 are built using older Firefox code, and I successfully tried MSIE 11), but definitely Shockwave is not to be used for new projects anymore.