The simplest ideas are always the best. I did a project a few months back with the very talented Paul Lloyd of FourTwo.net. We built a little Flash carousel component in AS3 for a corporate client. And it came out pretty well.
The data that runs it all came from a remotely hosted XML, so rather than use a fixed set of cards, a whole new application could be created just by pointing it at another XML. Which is what I have done here – making some of my blog posts look pretty.
Now here’s the cool bit – if instead of using a fixed URL I tell the swf file to read the path to the XML from the QueryString, it becomes reusable by anyone. Even you. Here’s an example:
This is the url of the carousel: http://actionscripter.co.uk/projects/carousel/
Create a new XML, and upload it somewhere, eg.
… then give the URL of the new XML to the carousel …
… and, wahay, we have a slick looking carousel showcasing a selection from my portfolio.
The structure of the XML should be self explanatory, so feel free to try it. Except when you try it with your own URL it doesn’t work. Why is that?
There’s one more thing you need: you have to give permission for the Flash file to use data from your domain. Flash Player has very tight security features, and won’t let swfs grab data from other domains, unless that domain has said it’s okay by putting a crossdomain.xml file on the top level. This applies both to the URL of the XML and the URLs of any images specified inside that XML. For more info, see here. The crossdomain.xml I used for the example above is here, if you copy this and put it at the top level of the domain where you placed your XML/images it should do the trick.