devsoft
devsoft

Reputation: 269

send xml from php to flash as variable

I have a flash file where I can pass xml from file :

  1. script type="text/javascript">

  2. var flashvars = {};

  3. flashvars.xmlSource = "XML.xml";
    ...

  4. /script>

Can I send xml from php in varible to flash example:

$xml = "?xml version="1.0 ...";

  1. script type="text/javascript">
  2. var flashvars = {};
  3. flashvars.xmlSource = ?php echo $xml; ?>; ...
  4. /script>

thank you

Upvotes: 1

Views: 602

Answers (1)

Stefan H Singer
Stefan H Singer

Reputation: 5504

Do like in your first example, but let XML.xml actually be a PHP file that echoes out the XML content. (Or call it xml.php and pass that as the xml filename)

Upvotes: 1

Related Questions