-
Is there a way to use loadVariables and get expressions rather than literal strings?
-
Yeah, I'm having problems with this as well, loading a variable from an external text file:-
value=1
brings it into Flash as value="1"
-
bah
I cannot understand why Flash does it by default. To me it seems a lot easier to define the variables as expressions by default, since putting " " around a variable in the text file defines it as a string very easily.
-
ahah!
Just after writing my last post I found a roundabout way of making the string into a number. Calling the variable value=1 from the text file info.txt, the newNumber command can be used to make it into a numerical expression. Ignoring the loading time, here's the overall code you need to get the variable out of the text file as a number.
Code:
loadVariables ("info.txt", _root);
truevalue = newNumber ( value );
If anyone has a way of putting the variables into the text file in such a way that Flash will automatically make it into an expression when loaded from the text file, it would be appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|