You have to make sure that the variables have been loaded before you attempt to get their values, that’s why you get [font=courier new]undefined[/font].
If you use the [font=courier new]MovieClip.loadVariables()[/font] method, the [font=courier new]MovieClip.onData[/font] event handler will be triggered once that the new data has been received. Example:
this.onData = function() {
trace("Data has been received!");
};
this.loadVariables("file");
The variable probably hasn’t finished loading yet…look up “loadVars” in the help that came with flash, then you will be able to use
myVariable.onLoad = function(){
trace(myVariable);
}