1 Reply Latest reply on Nov 5, 2008 8:26 PM by Mitek17

    How to end HTTPService's communication to server

    2009 Matt Level 1
      I have a simply Label.mxml file that reads a message from a message.php file on the server and display it.
      After the message is shown, the browser keeps display "Transferring data from www.XYZ.com..." on the status bar at the lower left corner of the browser. I think I should see "Done". Anything is wrong in my code:

      Label.mxml:
      ---------------
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      layout="horizontal" creationComplete="loadMessage()" width="1079.4" height="855.9" >

      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="842" height="38" >
      <mx:Script> <![CDATA[
      public function loadMessage():void {
      messageRequest.send();
      }
      ]]> </mx:Script>

      <mx:Label id="message" text="{messageRequest.lastResult.message}" height="20" y="10" width="221" x="10"/>
      </mx:Canvas>
      <mx:HTTPService id="messageRequest" url=" http://www.XYZ.com/message.php" useProxy="false" method="POST" />
      </mx:Application>

      message.php:
      --------------------
      <?php
      $message = "My Message";
      $Return = "<message>".$message."</message>";
      print($Return);
      ?>