Flash and XML examples.

Posting has been light for the last week or so, not because I’m upset about being referred to as part of the ornery print brigade which would have my print colleagues in the department wetting themselves with laughter, but because it’s been pretty busy work wise.

I’ve been up to my neck in video training for print journalists and my teaching load crept up as a seminar timetable was swung in my general direction. Still, both gave me opportunity to spend time with interesting people, with interesting insights.

Whilst I’ve been away from the posting pages of the blog I have been keeping an eye on things including the frankly baffling debate about using tripods on the Newspaper video list and other great stuff that I will pick up on this week.

One thing I have been messing with, which I thought I would share, is some flash work I have been doing. My online students have been playing with flash, to good effect. I had made some templates for them to use, only to realise a few hours in that they were using FlashMX and I was working on 8. Oh, well.

So rather then let the files sit and do nought I thought I’d share for people to mess with.

The flash blocks
It’s simple stuff. A few swf files that read an XML file to display content. You load up the XML file with the story and the links to media and the display does the rest. The aim was to generate a number of blocks that could be reused, rather than have a new swf for every bit of content.

So far there is a text block, a text and image block and a video block. I do have a slideshow block as well but it uses a shareware piece of flash to drive the slideshow so I’m not distributing that. Let me know if you want details.

Each individual block can be called with a variable that points to the xml – text_player.swf?file=text_content will open the text player and load the contents of a file called text_content.xml. You can change the look and feel of each block by editing the FLA file and republishing it. I think that I have commented them in enough detail and there is nothing tricky in there.

In action

Flash blocks example

This example uses a ‘wrapper’ swf to call each block.

I’m know there are lots of ways of doing this stuff better, and the load times don’t break any records, but if people want something to bash around with as a starting block they are pretty solid.

You can download the swf’s, fla’s and media files in Stuffit format. (right-click and save the link)
Let me know if you get any use out of them at all.

4 Replies to “Flash and XML examples.”

  1. I do have a slideshow block as well but it uses a shareware piece of flash to drive the slideshow so I’m not distributing that. Let me know if you want details.
    –> yes I could use it 😉

    I want to make a (part of a) site that is xml driven:
    – a submenu based on the xml
    –> click on an item and it loads
    – some text in text different square’s
    – a slideshow
    – for each photo I want to ‘create’ a number (eg slideshow has 5 foto’s so 1,2,3,4,5 are generated as btn’s) – I click on the number and the proper photo opens

    I hope that your examples can help me out as I have no experience (yet) with xml … OHOOOOOOOOH

Leave a Reply