Your variables in the textfield will each contain a newline when loaded into flash. To prevent this, keep them all on one line or do this
&client=B. Atman&
&address=500 West Batcave Road&
&city=Gotham&
&state=NY&
&zip=99412&
Your using MX so make use of the LoadVars object. This will let you load your variables into this one object and be able to access them from that.
Because you are LOADing variables in from an external source, the variables wont be loaded right away meaning you will NOT be able to access them directly after you call the variable loading command. You’ll have to wait a little while until they’re fully loaded into Flash. A LoadVars object helps us here with its onload. Heres an example:
This makes a loadVars instance called “identity” where the variables of the text file are loaded (from the load command) when loaded, the onLoad function is called and all those variables are put into the business variable in that format you specified. Now, assuming you have a dynamic textfield on the stage (pre-centered) with a VAR set to be business, it will then correctly display the name and address appropriately once the variables have successfully loaded into flash.
Extremely sweet…worked like a charm. I’ve got to send you a cookie. Ok, where exactly did my thinking turn south on this one? I was about to try to load them all into an array and try that, but…I’m babbling. Thanks again…I’m not worthy, etc.
ditch the html tags in the loaded variables. Thats unnecessary. You can add them in flash. str = “<i>" + a + "</i>”;
the only way of getting out of not using the & at the end is by either putting all the variables on one line (as I mentioned before) or stripping the
and \r tags off (removing them from) the variables once they are loaded into flash.