rgerrets
12-30-2001, 10:06 PM
Hi all,
Probably a silly question, but in Flash 5 how do I load variables from an external file? I exported my variables to a file (CTRL-O in Actions menu) and put in my last frame the following:
stop ();
loadVariablesNum ("8085script.as", 0, "");
My export file (8085script.as), which is in the same directory as the SWF file, looks like this:
stop ();
setProperty ("timer", _visible, "0");
if (_root.year == "aerosmith") {
loadMovieNum ("years/1980.swf", 2);
loadMovieNum ("bandscrollers/aerosmith.swf", 1);
loadVariables ("bandtxt/8085/aerosmith1980.txt", "_root.text_box");
loadVariables ("bandlinks/aerosmith.txt", "_root.MENU.link_box");
}
if (_root.year == "direstraits") {
loadMovieNum ("years/1980.swf", 2);
loadMovieNum ("bandscrollers/direstraits.swf", 1);
loadVariables ("bandtxt/8085/direstraits1980.txt", "_root.text_box");
}
......
(and a lot more variables follow, but this is to give an idea of the variables I am using)
Could someone please explain to me what I am doing wrong?
I could really use some help because I have great difficulty finalising my flash file now.
Thanks in advance.
Probably a silly question, but in Flash 5 how do I load variables from an external file? I exported my variables to a file (CTRL-O in Actions menu) and put in my last frame the following:
stop ();
loadVariablesNum ("8085script.as", 0, "");
My export file (8085script.as), which is in the same directory as the SWF file, looks like this:
stop ();
setProperty ("timer", _visible, "0");
if (_root.year == "aerosmith") {
loadMovieNum ("years/1980.swf", 2);
loadMovieNum ("bandscrollers/aerosmith.swf", 1);
loadVariables ("bandtxt/8085/aerosmith1980.txt", "_root.text_box");
loadVariables ("bandlinks/aerosmith.txt", "_root.MENU.link_box");
}
if (_root.year == "direstraits") {
loadMovieNum ("years/1980.swf", 2);
loadMovieNum ("bandscrollers/direstraits.swf", 1);
loadVariables ("bandtxt/8085/direstraits1980.txt", "_root.text_box");
}
......
(and a lot more variables follow, but this is to give an idea of the variables I am using)
Could someone please explain to me what I am doing wrong?
I could really use some help because I have great difficulty finalising my flash file now.
Thanks in advance.