5 Replies Latest reply on Nov 23, 2009 1:51 AM by Bogdan Manate

    Best way to load a php file

    al7iss Level 1

      Hi, in my flex application I need to load some php files and get the results from these files. I have been using HTTPService and it works just fine. But, now I need to load a php file, get the result and stay in the same function where the file was loaded.

       

      for instance:

       

      var php:HTTPService=new HTTPService();

      php.url="server.com/file.php";

      php.send()

      Alert.show(String(php.lastResult));

       

      But this of course won't work because send()  sends you to the event handler but I need to stay in the same function.

       

      Is urlloader better for this case and how to use it please if yes .

       

      Thanks