Loading random backgrounds in Flash 5

I’ve read the tutorial for loading a random background using Flash MX but can’t see how to make this work in Flash 5, can someone help me out with the actionscript?

If anyone knows of any other ways to do the same thing I’d also appreciate knowing them!

Cheers

James