Instead of re-inventing the wheel this is the document I used to get data for my flash variables
http://www.smartwebby.com/flash/external_data.asp
Basically using the “loadvariables” command you can read any file containing properly formated text, and just match up the variable with the variable in the text file, for example
loadVariables("http://192.168.0.101/data.txt",this);
The File ‘data.txt’ contains
name=1
If using more than one variable use the & (Ampersign) for example
name=1&address=somewhere&city=Kissimmee&state=FL
Presto…
Since my main database is SQL, I would have liked to read that data directly but unless you use Coldfussion and other goodies you not able to get data directly, but what you can do is have a backend page such as PHP,ASP or something else which does the query for you.
Advertisements
[…] Flash:Loading Variables from files into FlashInstead of re-inventing the wheel this is the document I used to get data for my flash variables http://www.smartwebby.com/flash/external_data.asp Basically using the “loadvariables” command you can read any file containing properly … […]
BTW, you may bang you head if for some reason you can only generate Flash scripts in Firefox and not IE. The reason being the IE caches everything. So when you send the same loadvars command twice it wont load the second time in ie!.
Once you bring it down the Cache in IE minimum like 8mb it works fine! Sorry there is no way to disable it