Preloader for variables?

Hi,

Can anyone point me to a good tutorial to create a preloader for variables? For example, I am using the loadVariables function and I want to create a preloader for the information it is gathering. I would assume it would be something like:

data = new loadVariables();
data.loadVariables(‘variable.php’,‘data’,‘GET’);
percenttotal = data.getBytesTotal;
percentloaded = data.getBytesLoaded;
etc, etc,.

But i’m not 100% sure.

Thanks!
Mat