How can I Load Variables with my preloader

Hi all,

I have a Calendar Events project in which I have to integrate Flash with PHP and MySQL. Before my movie loads there is a preloader in the beginning. When the preloading is over there comes 3 buttons on the main stage. One of them links to Calendar. Now when I click on Calendar the ‘LoadVars’ script begins which collects info from the database and puts it in an array for Flash which finally shows events in the Calendar. Now this part takes a hell of time to load which is very irritating. I would like to fetch the info for the Calendar when the preloader of the movie is going on so when then complete movie is loaded, this part is also completed with that and when the user clicks on the Calendar the Calendar shows up quickly. I hope you people got my scenario. The bottom line is that I want load the variables with my starting movie preloader. Here is the code which I am using:

 
tellTarget (_root) {
 cal.stop();
 eventDates = new LoadVars();
 eventDates.load("getEvents.txt");
 totalBytes = eventDates.getBytesTotal()
 eventDates.onData = function(values) {
  if (values == undefined) {
   eventDates.load("getEvents.txt");
  } else {
   checkPlay();
   _root.eventsCollection = new Array();
   _root.eventsCollection = values.split("~");
  }
 };
 //
 recursiveEvents = new LoadVars();
 recursiveEvents.load("getEvents1.txt");
 //_root.loadVariables("getEvents.txt");
 recursiveEvents.onData = function(values) {
  if (values == undefined) {
   recursiveEvents.load("getEvents1.txt");
  } else {
   checkPlay();
   _root.recEventsCollection = new Array();
   _root.recEventsCollection = values.split("~");
  }
 };
}
i = 0;
function checkPlay() {
 i++;
 if (i == 2) {
  play();
 }
}

Hope to get some help.

Regards,
Xeeschan