Flash is a very popular web technology. The question for many web users is how to code a Flash slideshow in an HTML file. Be warned! The code supplied by some applications is not standards compliant and may upset some browsers and raise accessibility issues.
The HTML Tag
The
How to Code a Flash Slideshow In An HTML File
The following code was suggested by a Flash authoring application that I used as suitable for embedding a Flash slide show entitled slide 3 in a web page:
<OBJECT classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000”
codebase=“https://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
ID=slide3 WIDTH=800 HEIGHT=480>
<EMBED src=“slide3.swf” loop=false quality=high
WIDTH=800 HEIGHT=480 TYPE=“application/x-shockwave-flash”
PLUGINSPAGE=“https://www.macromedia.com/shockwave/download/index.cgi?P1 _Prod_Version=ShockwaveFlash”>
This traditional coding was suggested because there is both an
The final Flash file can be viewed at https://www.avergo.at/vision/slide3.html .
However, this code generated no less than 51 errors when validated using the W3C compliance checker against modern XHTML standards.
Similarly, currently, the code for embedding a YouTube video is offered as:
How to Code a Flash Slideshow in an HTML File and maintain W3C compliance
A much leaner coding schema is needed to achieve compliance. The following code appears to do the job, maximising browser compatibility and compliance with XHTML Strict:
This coding removes the need for an
For a YouTube movie, the equivalent lean code looks like this:
<object type=“application/x-shockwave-flash” style=“width:425px; height:350px;”
data=“https://www.youtube.com/v/jV9YM3gNKOU">
Or if you want to test it, cut and paste the following complete HTML page:
<object type=“application/x-shockwave-flash” style=“width:425px; height:350px;”
data=“https://www.youtube.com/v/jV9YM3gNKOU">
These code routines have been tested with modern versions of Internet Explorer and Firefox, as well as validated using the W3C validator, and should ensure maximum compatibility and accessibility for your pages.