3 Replies Latest reply on Jul 9, 2006 9:35 AM by Newsgroup_User

    aaarrrrgggghhhhhh

    samdl1
      var my_xml:XML = new XML(xmlstring);
      var myLoginReply_xml:XML = new XML();

      myLoginReply_xml.ignoreWhite = true;
      myLoginReply_xml.onHTTPStatus = function(httpStatus:Number) {
      showAlert("onhs loaded");
      this.httpStatus = httpStatus;
      if(httpStatus < 100) {
      showAlert("flashError");
      }
      else if(httpStatus < 200) {
      showAlert("informational");
      }
      else if(httpStatus < 300) {
      showAlert("successful");
      }
      else if(httpStatus < 400) {
      showAlert("redirection");
      }
      else if(httpStatus < 500) {
      showAlert("clientError");
      }
      else if(httpStatus < 600) {
      showAlert("serverError");
      }
      }

      myLoginReply_xml.onLoad = function(success:Boolean){
      showAlert("onload called");
      if (success) {
      showAlert("onload success");
      var messages:String = this.childNodes[0].childNodes[1].childNodes[0].nodeValue;
      showAlert("sam" + messages);
      if(this.childNodes[0].childNodes[0].childNodes[0].nodeValue == "true"){
      XMLStatus = true;
      }
      else {
      XMLStatus = false;
      }
      } else {
      showAlert("Operation unsuccessful EC:1009");
      }
      };

      my_xml.sendAndLoad(xmlFullPath, myLoginReply_xml);


      httpstatus isnt called, niether is onLoad

      showAlert is a function just to popup an alert component with the specified string - none of them popup

      please can anyone see where the problem is?

      Sam
        • 1. Re: aaarrrrgggghhhhhh
          Craig Grummitt Level 3
          i pasted your above code into a flash file, set the variable xmlFullPath to a path to an xml file, set up a function showAlert to trace what it receives, and i received the responses:

          onload called
          onload success
          samundefined

          i then tried what would happen if the path was set to undefined and i still received a response. are you sure you don't have problems with your showAlert function?
          • 2. Re: aaarrrrgggghhhhhh
            samdl1 Level 1
            thankyou for the reply

            the showAlert function is definately fine..it calls no problem when the function this code belongs to is called and in other places too...

            its actually quite weird because it just kinda stopped working without really changing much code...

            I changed it to send and _blank so i could see the response and it was absolutely fine too - sometimes i hate flash

            Sam
            • 3. Re: aaarrrrgggghhhhhh
              Level 7
              You can eliminate the showAlert being the problem, with trace statements. If
              they are working and the showAlert is not, then you do have an issue with
              showAlert.

              As well if you are testing outside the IDE, then you should use a simple
              dynamic TextField for tracing.

              Be sure any Flash ui components are exported in time for use.

              --
              Lon Hosford
              www.lonhosford.com
              Flash, Actionscript and Flash Media Server examples:
              http://flashexamples.hosfordusa.com
              May many happy bits flow your way!
              "samdl1" <webforumsuser@macromedia.com> wrote in message
              news:e8r6vh$7ik$1@forums.macromedia.com...
              > thankyou for the reply
              >
              > the showAlert function is definately fine..it calls no problem when the
              > function this code belongs to is called and in other places too...
              >
              > its actually quite weird because it just kinda stopped working without
              > really
              > changing much code...
              >
              > I changed it to send and _blank so i could see the response and it was
              > absolutely fine too - sometimes i hate flash
              >
              > Sam
              >