Jpg preloader help with tutorial

Hi, I have a site (which is nearly finished!) which uses buttons to load external jpeg images into an empty movie clip. I found a preloader tutorial that would suit me perfectly, but I am having trouble getting it to work. It should be simple - a small amount of code attached to a container mc that activates a text % preloader each time an image is loaded.

The tutorial is at http://www.flashscript.biz/utilities/preloader/jpg_preloader.html.

I have created a very simple test fla to try & get this working.
I have attached the following code to the container mc:


onClipEvent(enterFrame){ 
       if(this._url != _root._url && !this._url.loaded) { 
       var kilobytes = Math.ceil(this.getBytesTotal()/1024); 
       var percentLoaded = Math.ceil((this.getBytesLoaded()/this.getBytesTotal()) * 100); 
       _root.message.html=true; 
       _root.message.htmlText = "loading " + percentLoaded + " % of " + kilobytes + " k"; 
       if(this.getBytesLoaded()>= this.getBytesTotal() ){ 
          loaded = true; 
          _root.message.htmlText = "Ready"; 
       } 
    } 
 }

The button itself has the following code:


 on (press) { 
 _root.container.loadMovie("testimage4.jpg"); 
 }

I have named the instances of the container and the preloader “container” and “message” respectively.

I also have the following code in the actionscript layer for that frame:


myData = new LoadVars();
myData.onLoad = function(){
foliocaption.htmlText = this.caption;
};

(This is for the text files I would be loading in the original fla. Actionscript for the buttons would normally look something like the code below, to load the image, the text and make the print1 button display a “down” state.)


 on (press) { 
  _root.container.loadMovie("testimage4.jpg"); 
        _root.myData.load("print1_caption.txt");
        _root.n1_print.gotoAndStop(3);
        _root.n2_print.gotoAndStop(1);
        _root.n3_print.gotoAndStop(1);
}

The fla file (Flash MX) for my test movie is available at http://www.delphinus.net.au/preloader.html. At the moment, I have “per%” typed into the message mc which I know is wrong… I’ve tried many different variations to try & get it working. The testimage4.jpg is quite large so I could see if there was any preloader action… (The image is a bit strange as I had to keep changing the test image to get around the proxy server cache.)

The reason I really want to get this preloader working is because I do not have an “onload = function” component on the buttons themselves - and most external jpg preloaders need this. (This was the only way I could get it all working.)

I am new to actionscript & apologise if I’ve missed something very basic. Any help is greatly appreciated!