0 Replies Latest reply on Jun 12, 2007 5:30 PM by scientifix

    Help with coding

    scientifix
      I am working on an appolo (AIR) project in Flex and typed this code:
      quote:


      <mx:script>
      <![CDATA
      import flash.filesystem.FileMode;
      import flash.filesystem.FileStream;
      import flash.filesytem.File;
      private function onClick():void
      {
      var desktop:File=File.desktopDirectory;
      var saveFile:desktop.resolve(filename.text);
      var fs:FileStream = new FileStream();
      fs.open(saveFile, FileMode.WRITE);
      fs.writeUTFBytes(inputField.text);
      fs.close();
      }
      ]]>
      </mx:script>



      It gives me this error message

      quote:


      Severity and Description Path Resource Location Creation Time Id
      The prefix "mx" for element "mx:script" is not bound.



      I don't get it. Can anyone help me?
      Thanks