murphDOG
05-11-2001, 07:36 PM
Hi Gang, I am trying to load variables from a text file and soon I will be trying to pull from a db like in Jesse's Tutorial on pulling from a db. (http://www.actionscripts.org/tutorials/intermediate/loadVariables_script_interaction/index.shtml)
Anyway back to the question
1. Does the loadVariablesNum() need to be in a on "event"() to fuction correctly?
What I am trying to do is load my var's on the second frame then show them on frame 3 for rest of the movie, but what happens is I have to run through the entire movie then replay it and then my var's will display
code for frame 2
loadVariablesNum ("test.txt", 0);
var_output1 = var1+" "+var2;
var_output1 = String(var_output1);
if (var_output1.length == 0) {
gotoAndPlay (1);
} else if (var_output1.length == 1) {
gotoAndPlay (3);
}
With the above code I belive that I am checking to see if the var's are loaded and if not do a loop and keep checking
untill they load
well my movie loads and plays frame 3 but no var's erver show up untill I run the movie again
Thanks
murphDOG
Anyway back to the question
1. Does the loadVariablesNum() need to be in a on "event"() to fuction correctly?
What I am trying to do is load my var's on the second frame then show them on frame 3 for rest of the movie, but what happens is I have to run through the entire movie then replay it and then my var's will display
code for frame 2
loadVariablesNum ("test.txt", 0);
var_output1 = var1+" "+var2;
var_output1 = String(var_output1);
if (var_output1.length == 0) {
gotoAndPlay (1);
} else if (var_output1.length == 1) {
gotoAndPlay (3);
}
With the above code I belive that I am checking to see if the var's are loaded and if not do a loop and keep checking
untill they load
well my movie loads and plays frame 3 but no var's erver show up untill I run the movie again
Thanks
murphDOG