Getting Xpos and Ypos from mysql into flash

hi,
Ive made a tool where you can add citys on a landmap. Simply by pressing on the map(where you would the city to be placed) and fill a lil bit off info(city name etc etc). All this info (xpos, ypos, cityname etc etc) would then be inserted in a mysql database with PHP. It all works.

Now the problem is extracting the info from the database and putting all the cities on the map. I can get it done with one city but cant figure it out how to do it if theres more then one in the database

The city is represented by a mc called DOT. So basiclly i tell the mc to get the x and y values from the database.:


$xoutput = "&xposMC="; ////var used in flash
$youtput = "&yposMC="; ////var used in flash
.....
.....
while($row=mysql_fetch_array($sql))

{
$xpos=$row["xpos"]; 
$ypos=$row["ypos"]; 
$citynam=$row["cityname"]; 

$xoutput.="echo $xpos";
$youtput.="echo $ypos";
}


Now with this code I give the BALL the x and y values

[COLOR=Sienna]onClipEvent (enterFrame) {
_x += xposMC;
_y += yposMC;
}[/COLOR]

Now my questions is: how to make a duplicate script for mc BALL that will take the x and y pos from the database and not the last x and y values every time. And if the php script im using aboe is correct

thnx