Implementing charts using XML/SWF Charts. Read the notes ↓
- Challenge 1
- Challenge 2
Notes
Maani provides a HTML snippet to embed its Flash movies. Unfortunately, this code prevents the page from validating. To get around this I used Drew McLellan’s Flash satay technique, minus the hack that re-enables streaming in IE/Windows (since the movies are quite small).
The Flash satay method removes a lot of the suggested markup, including:
- the
classidattribute in theobjectelement (replaced withtype="application/x-shockwave-flash") - the
codebaseattribute in theobjectelement (not replaced) - the
embedelement (since it is not part of the specification)
McLellan also recommends including replacement content as a child of the object element, so I made some JPEG versions of the charts in their current state, and added them via an img beneath the last param tag in each object. Accurate alt text in the image tags provides real data values for accessibility. The image also links to Adobe’s “get Flash” page.
I’m also using the default Dreamweaver CS3 script as a fix for the active content problem in Internet Explorer, which is adequate, but not ideal. If I do another version of this page I’ll try Bobby van der Sluis’s Unobtrusive Flash Object script, which addresses the active content control, and—conveniently, I think—kills Flash when JavaScript is disabled.
But for now, this page uses conforming HTML5, the body component of which should validate as W3C-compliant (X)HTML, depending on the Doctype specified.
February 23, 2008.