Multimedia Blog

Research, Design & Reflection


Embedding a swf & validating your HTML

After reading Will's post and checking out his links, I tested some of the described methods. Below is a list of the files that should be in your folder and an example of a working, valid script for embedding a swf. This is mostly for my own reference but hope it helps someone out.

1. Your HTML file
2. Your SWF
3. swfobject.js (download this file from here)



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Testing SWF Object</title>

<script type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<div id="flashbanner">
<script type="text/javascript">
var so = new SWFObject('fd.swf','mpl','80','80','9');
so.addParam('allowfullscreen','true');
so. addParam('flashvars','file=playlist.xml&autostart=true');
so.write('flashbanner');
</script>
</div>

</body>
</html>


0 Responses to “Embedding a swf & validating your HTML”

Post a Comment



© 2006 Multimedia Blog