updated 27 sept 2002 | brown | green | blue | grey
daryl croke
research diary
edim 2002

Week 15:

Testing audio narration on Browsers

Using minimal <object> tag.

<object data="../assests/flash/help.swf" id="myMovie" width="193" height="50" type="application/x-shockwave-flash">
</object>

If flash 6 player not installed SWF does not render.

Netscape 4.7 mac
Key Commands [All] except exit buttons "q"
Mouse Buttons [All] except exit button
Tab Buttons [All] except exit button

Javascript: focus() method does not work on this browsers no way to escape flash movie.

Netscape 6.2 mac
Key Commands [All]
Mouse Buttons [All]
Tab Buttons [All]

Works well!

Netscape 6.2 PC
Key Commands *
Mouse Buttons [All]
Tab Buttons *

* tab and key commands do not work until focus is draw to movie

revise <object code>!

Internet Explore 5 mac
Key Commands [All]
Mouse Buttons [All]
Tab Buttons [All]

Works well!

Internet Explore 5 PC
Does not render with <object> tag require <embed> tag as well.

Failed!

One of the aims of this project is cross platform useability. It has to work on a PC using the most widely used browser, Internet Explorer. For flash movies to render on IE the <embed> tag has to be included. However including the <embed> will mean it is not a valid XHTML document.

Below is an example of the code that Macromedia uses to embed a flash movie into a web page.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="160" height="80">
<param name=movie value="preload.swf">
<param name=quality value=high>
<embed src="preload.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="160" height="80">
</embed>
</object>

The code contains a couple a "nasties" like demanded that uses have the latest version of the flash player.

pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash

The Australia Human Rights and Equal Opportunity Commission have explicitly cited this code as creating useability problems.

It should be possible to embed a flash movie using the stripped down code below.

<object classid="mymovie" width="160" height="80">
<param name=movie value="preload.swf">
<embed src="preload.swf" quality=high type="application/x-shockwave-flash" width="160" height="80">
</embed>
</object>

However the <embed> tag is not part of the XHMTL 1.0. A work around might be to wrap the <object…><embed>…</embed> </object> code inside of !CDATA[ data tags.

This method was necessary to include cold fusion tags inside version 3 pages

<script type="text">
<![CDATA[
<cfquery name ="aural" datasource="dcroke_db">
SELECT * FROM table1 WHERE street='aural'
</cfquery>
]]>
</script>

The whole flash movie embedding code could possible work and be valid if treated in the same way.

<script type="text">
<![CDATA[
<object classid="mymovie" width="160" height="80">
<param name=movie value="preload.swf">
<embed src="preload.swf" quality=high type="application/x-shockwave-flash" width="160" height="80">
</embed>
</object>
]]>
</script>

This solution did not work. Using javascript to render the movie was attempted.

<script type="text/javascript">
document.write('<object id="mymovie" width="193" height="50">');
document.write('<embed src="../assests/flash/help.swf" width="193" height="50" > ');
document.write('</embed>');
document.write('</object>');
</script>

This solution rendered the movie but was still not valid to XHML standards. Exporting the code to a separate javascript file and calling that file proved successful.

flash_help.js file

document.write('<object id="mymovie" width="193" height="50">');
document.write('<embed src="../assests/flash/help.swf" width="193" height="50" > ');
document.write('</embed>');
document.write('</object>');

Calling the file within the document.

<script type="text/javascript" src="../scripts/help_flash.js"></script>

This solution validated to XHTML standards. So you able to include flash movie that plays on a PC and Mac into a XHMTL document by using javascript.

 

week 16