MySQL --> PHP --> XML --> FLASH

  • frons
  • Born
  • Born
  • frons
  • Posts: 3
  • Loc: Ancona, ITALY

Post 3+ Months Ago

Hello everyone, I've wrote 1 php page that transforms a normal query to a db into a standard xml file, ready to be forwarded to a Flash file.

The PHP code works because it generates the right layout, I have so a problem in the final visualization of the Flash movie.

It's composed by a single list component (inst. name: theList) in a level, and the following AS code in the other:

Code: [ Select ]
var theXML:XML = new XML();
theXML.ignoreWhite = true;

theXML.onLoad = function() {
    var nodes = this.firstChild.childNodes;
    for (i=0; i<nodes.lenght; i++) {
        theList.addItem(nodes[i].firstChild.nodeValue, i);

  1. var theXML:XML = new XML();
  2. theXML.ignoreWhite = true;
  3. theXML.onLoad = function() {
  4.     var nodes = this.firstChild.childNodes;
  5.     for (i=0; i<nodes.lenght; i++) {
  6.         theList.addItem(nodes[i].firstChild.nodeValue, i);
  7.     }
  8. }
  9. theXML.load("http://www.address_where_is_located_the_php_file.php");

The list component remain unfilled with the data... what's wrong with this?
Please help me :?
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1825
  • Loc: In the Great White North

Post 3+ Months Ago

Code: [ Select ]
var nodes = this.firstChild.childNodes;

should be
Code: [ Select ]
var nodes = theXML.firstChild.childNodes;

In this instance I believe that the "this" refers to the callback object and not the actual xml.

Try tracing "nodes" after you create it to make sure your really getting the xml you expect.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 7 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.