Many SWFs, One HTML

I have always had it in the back of my head that it would be so handy to have one HTML file that could display and SWF file that you pass it. Very dynamic, I know. This concept came to necessity when I realized that WordPress’s upload feature automatically lower cases all your file names which obviously breaks the associations between the html, swf, and and .js embed files you might have (ActiveContent or what not). So i went ahead and built one.

The final result is here:

Doesn’t look like much, right? Well the good stuff is there, trust me. You just have to pass it a couple parameters like the path of the SWF, and the height and width. So a final URL would look like this:

It may look long, but most of that is just the path to the SWF file. Go ahead and play around with changing the height and width. If you want it to be the size of your browser window just change “percent=false” to “percent=true”.