*Originally posted by flex *
**Also if you’re using MX - why don’t you use loadVars() **
Neither makes a diference, and I really need to be able trace the value that I am reading in, as until I am sure it is being assign to my var, I cannot do a string compare.
Try this - the fla has nothing but a dynamic text box with the var set as _level1.test.
In the first frame I use
loadVariablesNum(“test.txt”, 1);
to load a variable called test from a text file called test.txt.
Make sure the fla and the text file are in the same folder and test the movie - you should see that it displays the loaded variable.
Check your swf and text file are in the same folder.
Check that you are using _level1.variable name for the variable.
And check that all the variables are actually loaded before you call them.
Got the string comparison going between the Radio Buttons passed (cheers for that Flex) and the value I am loading into the dyn text fields from the data file.
but I thought there was a reason that you wanted to use loadVarsNum, as the disadvantage of loading to a level is you have to refer to the level. Loading into an mc is the preferred method.
Just wanted to add that I think the problem was you were calling the variables before they were loaded. With loadVariablesNum you have to manually use code to check if the variables are loaded before you can use them, but with MX you can use the
onClipEvent (data) which checks to see if the data has been loaded before it’s safe to use it.
EDIT: And the game fla - I did it in request of cybergold, but I get people asking me to help, and then no response so I think I’m going to concentrate on my own projects more - but it wouldn’t be fair to put the fla up because although the coding is mine - the graphics are his. But I am working on another game - for which I put a post in the design forum for a designer - and maybe I’ll put the fla of that on my site. There are already some game fla’s you can download.
*Originally posted by flex *
**I was going to sugges loading the variables with
mcname.loadVariables();
but I thought there was a reason that you wanted to use loadVarsNum, as the disadvantage of loading to a level is you have to refer to the level. Loading into an mc is the preferred method.