Replace Document Background?!

I saw this on the G4TV web site.

They have a flash animation that scrolls through news titles, and when it gets to the next news title, the flash file calls a script and it changes the background on the document.

I have searched all through the internet and only came up with the “[color=blue]on[/color] ([color=blue]click[/color]){” function to call the script, i replaced it with “[color=blue]on[/color] ([color=blue]load[/color]){” but Flash doesn’t understand it. :tired:

So i was wondering if any-one knew the action script for the flash file, i don’t need the JavaScript because, well, it’s right here:


// called by Flash to change page background
function changeBackgroundImg(newBgImg){
var d = document;
var oBackgroundImg = d.getElementById("bg-custom");
if (d.getElementById)
{
oBackgroundImg.src = newBgImg;
}
}

It was located in an external Javascript document.

… But i want this to change the background when the document first loads. The file is only a few kb so it would change almost instantly on call so the image probably doesn’t need to be ‘pre-loaded’ along with the rest of the animation.

To understand this a lot clearer, check out the G4TV web site, and then you might be able to get what i mean… =)

I really need help with this… Please… :cowbell:
MAKEitLOUD