I had an exciting weekend of writing a wonderful ‘webcast’ system. Although it worked fine over the LAN, I found I had a problem when I uploaded it to the internet. The problem as a little weird. The system work by loading a bunch of images then used a version of 1pixelout‘s mp3 flash player to play the audio. The problem I had was that half the images were loading, then the flash started loading. A user would then have to wait until the mp3 had finished playing before the final images were loaded.

I searched high and low on the net to see if there was a magical way to control the loading order. In the end I found this really elegant solution to load the flash as the last item.

In your style sheet, give the style you want to appear last: display: none;Then in the body tag change the display to block using onload:document.getElementById('audio').style.display = 'block';"

I’ve tested this in Firefox and IE on both Linux and Windows and it seem to work perfectly.