Instead of re-inventing the wheel this is the document I used to get data for my flash variables
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
The File ‘data.txt’ contains
If using more than one variable use the & (Ampersign) for example
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.