6 Replies Latest reply on Jun 3, 2007 1:43 AM by cyTeHuoP

    How to trace a loading CGI?

    cyTeHuoP
      I need to see when the perl script that I invoke has finished. Does anyone know some trick to do that?
        • 1. Re: How to trace a loading CGI?
          Gorka Ludlow Level 1
          If you're invoking it with either LoadVars or XML Objects you could use the respective sendAndLoad option and write down something in your cgi script for the flash movie to know it has finished.

          Cheers
          Gorka
          • 2. Re: How to trace a loading CGI?
            cyTeHuoP Level 1
            Thank you. However, I'm new to this cgi stuff and I'm not quite sure how I should do the sending back in perl. If it's not too much of a deal, could you give me a small example?
            • 3. Re: How to trace a loading CGI?
              Gorka Ludlow Level 1
              I don't work with perl, i use php, the only thing to do is write to the screen (there most be something like printf or echo, just google it) and let flash read it.
              Cheers
              Gorka
              • 4. Re: How to trace a loading CGI?
                cyTeHuoP Level 1
                I'm confused now. Doesn't all that I print in the .pl script go to the browser? I mean, with me it is always the case that when I execute a perl script or whatever URL, it just opens it in the browser, in the current or some other tab/window. Does this output go to flash too?
                • 5. Re: How to trace a loading CGI?
                  Gorka Ludlow Level 1
                  When you run a script with either LoadVars or XML Objects the script runs in the background. The running script is invisible for the user viewing the flash page, but if you print anything to the screen, as if where a regular .pl flash can read what you write (as if it were reading a text file).

                  Let me give you an example:

                  You have a Database with some data about anything.
                  Your flash movie can't connect directly to the database instead you call a perl script (or php, asp, jsp, etc) from flash, then the script connects to the database and outputs the information in a flash readable format so that your flash movie reads it and displays it to the user.
                  Cheers
                  Gorka
                  • 6. Re: How to trace a loading CGI?
                    cyTeHuoP Level 1
                    Thank you, I finally found my fault. The flash readable format is what I didn't think of. I always outputted html. I found a real simple example called echo in O'Reilly's book, in which I saw that one should use a different header for flash. It worked perfectly afterwards. Thanks for helping anyway :)