I am trying to load a variable into memory from a text file. I can read the data into a textbox, however I cannot read it into a variable. Here is my code below:
This loads into a textbox okay:
Now, these variables always turn out to be undefined if you run a trace on them:
My application is very simple: it has two layers and one frame for each layer. The above code is on its own layer. The other layer has some action script that needs the variables above to perform a calculation.
Any help is appreciated.
Thanks in Advance.
------------------------------------
There's no place like 127.0.0.1
------------------------------------
This loads into a textbox okay:
Code:
ConfigData = new LoadVars();
ConfigData.onLoad = function(){
myText_txt.text = this.eventYear + "\n" +
this.eventMonth + "\n" +
this.eventDay + "\n" +
this.eventHour + "\n" +
this.eventMin + "\n" +
this.eventSec + "\n" +
this.Ms;
};
ConfigData.load("DateConfig.txt");
Now, these variables always turn out to be undefined if you run a trace on them:
Code:
ConfigData = new LoadVars();
ConfigData.onLoad = function(){
_global.eventYear = this.eventYear;
_global.eventMonth = this.eventMonth;
_global.eventDay = this.eventDay;
_global.eventHour = this.eventHour;
_global.eventMin = this.eventMin;
_global.eventSec = this.eventSec;
_global.eventMs = this.eventMs;
};
ConfigData.load("DateConfig.txt");
My application is very simple: it has two layers and one frame for each layer. The above code is on its own layer. The other layer has some action script that needs the variables above to perform a calculation.
Any help is appreciated.
Thanks in Advance.
------------------------------------
There's no place like 127.0.0.1
------------------------------------