Passing vars from php so flash could read certain xml

Hi!
Shortly: I have existing sql db(gallery), php file which echo (that)db’s data into xml form readable by flash movie.
Now I try :cool: to transform this project to something more dynamic “thing”, but…
Let me refresh actions:

  1. Flash movie is located in php file. [success]
  2. I call url of that file with ?vars. [success]
  3. that php file reads vars and send them to flash through embed code. [success]
  4. Now I put that variable (within actionscript) with rest of file I want flash to read () [success]
  5. Flash movie post message “xml is loaded” [success]
  6. Reading nodes >> undefined [unable]

I changed embed code in php page where flash is located; into this:

<?PHP
$naziv = $_GET["naz"];
?>
<div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="628" height="628">
  <param name="movie" value="galerija.swf? <? echo "var1=$naziv"; ?>" />
  <param name="quality" value="high" />
  <embed src="galerija.swf?<? echo "var1=?naz=$naziv"; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="628" height="628"></embed>
</object>

This code need to get vars from URL and pass it to flash.
This seems ok, because I get vars in flash. I create dynamic text field which is used for display of that variable.
PHP file that creates xml file got also line used for getting vars from URL so file can know whitch table to read when flash try to open that file with ?variable.


$tablica = $_GET["naz"];
.
.
$query = 'SELECT * FROM $tablica';

This is flash code:



var link = "slike.php"+var1
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(link);
status_bar.text = link;
[COLOR="Red"]{rest of code for reading xml nodes}[/COLOR]

Flash code for determine whether xml file is loaded or not tells that file is loaded, but i can get flash to read nodes.

[COLOR=“Red”]HELP![/COLOR] :genius: