1 Reply Latest reply on Nov 9, 2006 12:26 AM by rohai

    how to check if the data from asp is ready?


      my script sends the vars to asp, which creates new xml. In flash a new swf opens and loads the new xml. But here's the problem. The second swf doesn't receive the data. I assume that the xml in not ready when the swf loads. How can I check to see if the data is ready to load into flash? It's working if I only target an asp page with "fixed querystring" - I don't send it to asp, it's defined on the asp page - but when sending a query, it's not working.THX for your help
        • 1. Re: how to check if the data from asp is ready?
          rohai Level 1
          hmmm....here's the script that opens the second swf.

          program = function(){
          movie = this.swf;
          id = this.query;
          var recievedProgram = new LoadVars();
          var sendProgram = new LoadVars();
          sendProgram.scene = movie;
          sendProgram.programID = id;
          home_mc._visible = false;
          main_mc._visible = true;
          mcLoader.loadClip("program.swf", main_mc);

          And here's the script in program.swf.

          var my_xml = new XML();
          my_xml.ignoreWhite = true;
          my_xml.onData = function() {
          trace("XML packet loaded.");

          my_xml.onLoad = function(success){
          if (success){
          var program = my_xml.firstChild;
          program_content.text = program.firstChild.nodeValue;
          my_xml.load("actions1.asp"+(_url.indexOf("file")==0?"":"?timestamp="+escape(new Date().toString())));

          If I use onData function, I get undefiend. Please help, it's now day 2