Hello

I'm trying to work with PHP from inside flash.

I'm working through books and tutorials. I have the EXACT same code on the file then on the book and tutorial. However, it just doest work.
What is the best way to test whether server is capable of handling php from flash or whether the version of flash i'm using (mx) is capable of handling wha tI want it to do.

    Flash is just another client side method of getting user input into php, no different than html really. Someone else was here the other day though and couldn't get some flash / php tutorials working. It turned out that the tutorials where failry old, and assumed register_globals was switched on (which it no longer is by default) in php.

    Could you post some of the php code? This could be the same issue and is easily fixed.

      I am just trying to test the system to see if flash would work, i have a file called date.php, which was originally just to generate today's date, but i made it into an xml thing instead

      <?PHP

      $line[]="one";
      $line[]="two";
      $line[]="three";

      echo "<?xml version=\"1.0\"?>\n";
      echo "<products>\n";

      while(list($each) = each($line)){
      echo "<item>" . $line[$each] . "</item>\n";
      }

      echo "</products>\n";

      ?>

      then, in flash I have:
      theList reffers to an object i have in flash that is to be populated with the xml

      var theXML:XML = new XML();
      theXML.ignoreWhite = true;

      theXML.onLoad = function(){
      var nodes = this.firstChild.childNodes;
      for (i=0;i<nodes.length;i++){
      thList.addItem(nodes.firstChild.nodeValue,i);
      }
      }
      theXML.load("date.php");


      this code give me a blank result

        8 days later

        If you're having a hard time using the timelines of the Flash authoring tool to create Flash applications, then you should check out Flex Builder. Flex Builder is an Eclipse based IDE used to build applications that get delivered via the Flash player (you're still building Flash files, just using a different tool to build them).

        Most developers find it much easier to use Flex builder to build applications than the Flash authoring tool.

        You can download Flex Builder Beta for free from http://labs.adobe.com/ Once the beta is over, the tool will be available for less than $1000 US, and an SDK, which will allow you to compile Flex applications, will be available for free (so, if you don't need the IDE, then you can create Flex apps for free).

        You can read some tutorials on connecting to PHP with Flex from my blog at http://blogs.adobe.com/mikepotter/

        Mike

        Mike Potter
        Adobe Open Source Evangelist

          Write a Reply...