0 Replies Latest reply on Dec 27, 2007 6:11 PM by notrem

    Flash to Flex

    notrem
      Can someone translate this Flash code into Flex code? I want to save text out a richtextbox id rte to a server. Then get the text back from the server and into the richtextbox. This is the Flash code:

      var textValue = "";

      function saveIt(eventObj:Object){

      textValue = "textValue=";
      textValue += rte.text;
      _root.loadVariables("save.php","POST");
      }

      function getIt(){
      _root.loadVariables("text/text.txt","POST");
      var display:Array = textValue.split("=");
      rte.text = display[1];
      }
      saveButton.addEventListener("click",saveIt);
      getButton.addEventListener("click",getIt);



      <mx:Button id="saveButton" x="97" y="231" label="Save"/>
      <mx:Button id="getButton" x="97" y="275" label="Open"/>

      Thanks,

      JL