What you want to do is pretty easy, here is how I do it:
In your flash file you enter the following:
var c = new LoadVars();
c.sendAndLoad("FileName.php",c,"POST");
c.onLoad = aFunction;
function aFunction(){
see below;
}
In your php file use this:
$hostname = " ";
$database = " ";
$username = " ";
$password = " ";
$sqlCon = mysql_pconnect($hostname, $username, $password)
mysql_select_db($database, $sqlCon);
$query_rsList = "SELECT ....";
$rsList = mysql_query($query_rsList, $sqlCon) or die(mysql_error());
$row_rsList = mysql_fetch_assoc($rsList);
$totalRows_rsList = mysql_num_rows($rsList);
print "&flashVariable=";
do {
print $row_rsList['mySQLField1'].",";
print $row_rsList['mySQLField2'].",";
print $row_rsList['mySQLField3']."|";
} while ($row_rsList = mysql_fetch_assoc($rsList));
mysql_free_result($rsList);
The flash file will load a variable that looks like this:
flashVariable=mySQLField1,mySQLField2,mySQLField3|
So the flash function above just needs to split the string into an array like:
records = c.flashVariable.split("|");
Then do whatever you need to with the records array. Hope this helps (and I hope it works)