Try this..
<?
$dbHost = "localhost";
$dbUser = "***";
$dbPass = "***";
$dbName = "***";
$link = @mysql_connect($dbHost, $dbUser, $dbPass) or die ("Unable to connect!");
mysql_select_db($dbName) or die ("Unable to select database!");
$SQLstr = "SELECT label, link FROM menu";
$res1 = mysql_query("SELECT label FROM menu") ;
$xml_str = "<?xml version\"1.0\" ?>";
$xml_str .= "<menu>";
while($rows = mysq_fetch_assoc($res1))
{
$xml_str .= '<item name="'.$rows['label'].'" link="'.$rows['link'].'">';
}
$xml_str .= "</menu>";
mysql_close($connection);
header("Content-Type: text/plain");
echo $xml_str;
?>
on the flash side use the XML object, for example;
var i = new XML();
i.ignoreWhite = true;
i.load("thescript.php");
i.onload = function()
{
_root.menuitems = new Array();
toplevel = this.firstchild;
for(count = 0; count < toplevel.childNodes.length; count++)
{
temp = toplevel.childNodes[count];
root.menuitems[count] = new Array();
root.menuitems[count]["label"] = temp.attributes["label"];
_root.menuitems[count]["link"] = temp.attributes["link"];
}
//Continue with the movie
}
Basically the php script return an XML document and then the actionscript side puts it into an array _root.menuitems;
so access the label for example, if you have a dynamic text box;
menutext.text = _root.menuitems[0]["label"];
Hope that helps