Archive for February 1st, 2006
XHTML strict validated flash code
February 1st, 2006
i put up a slideshow of the silver jewelry club photos i’ve saved. after i added the code given to me directly from slide.com, my site no longer validates with XHTML 1.0 strict rules. So I researched on valid flash embed code and found this nifty javascript trick for embedding flash.
The code given to me from the slide.com:
<embed src="http://widget.slide.com/widgets/slideticker.swf" quality="high" scale="noscale" salign="l" flashvars="site=widget.slide.com&channel=181375" wmode="transparent" bgcolor="#f5f5f5" width="205" height="97" name="flashticker" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>
The final code I put up that works & validates:
<div id="slideshow">If you don't see the slideshow, <a href="http://www.flickr.com/photos/68167759@N00/">click here.</a>.</div> <script type="text/javascript"> // <![CDATA[ var fo = new FlashObject("http://widget.slide.com/widgets/slideticker.swf?site=widget.slide.com&channel=181375", "flashticker", "205", "97", "6", "#ffffff"); fo.addVariable("wmode", "transparent"); fo.addVariable("quality", "high"); fo.addVariable("scale", "noscale"); fo.addVariable("salign", "l"); fo.addVariable("align", "middle"); fo.write("slideshow"); // ]]> </script>
given that I’ve properly uploaded flashobject.js and included in the header of my HTML with:
<script type="text/javascript" src="/js/flashobject.js"></script>

