6 Replies Latest reply on Sep 2, 2008 5:24 AM by Newsgroup_User

    ASP and Adobe Director 11

    Level 7
      Hi again.
      Does anybody knows if it is possible to call an ASP page from a Director
      movie and set the results into the .dcr?
      It would be samething similar to the LoadVariables in ActionScript.
      I'm getting problems with remote access to the data base and I think this
      could be a solution.

      Thank you and regards.


        • 1. Re: ASP and Adobe Director 11
          Level 7
          Read the docs for getNetText() and/or postNetText(). Also
          < http://www.shocknet.org.uk/index.asp>
          • 2. Re: ASP and Adobe Director 11
            Level 7
            Thank you for your answer Sean
            It's a good reference page, but I'm still having problems and I can't find a
            solution.
            I use the following to connect with an ASP page:
            -- +++++++++++++++++++++++++++++++++
            infoList = ["pregunta_numero":pregunta_numero,
            "pregunta_concello":pregunta_concello]
            netID = postNetText(" http://www.mydomainname.es/myaspfile.asp",infoList)
            -- +++++++++++++++++++++++++++++++++

            The ASP file works perfectly if I call it from the URL and I asign directly
            the values. It returns a string like this:
            -- +++++++++++++++++++++++++++++++++
            #preguntaweb:¿This is the question?#respuesta1:first
            answer#respuesta2:second answer#respuesta3:third answer
            -- +++++++++++++++++++++++++++++++++

            But I have two problems.
            In first place, I can't obtain anything from my postNetText.

            When I use:
            -- +++++++++++++++++++++++++++++++++
            aString = netTextResult(netID)
            -- +++++++++++++++++++++++++++++++++

            I get aString = "" and netDone(netID)=0

            That means that the "myaspfile.asp" has not being executed

            The second problem is what to do with the returned result from the ASP? (in
            case I solve the first problem, of course ;-)
            How can I put each value in his variable?

            This is really simple in Flash but I've never done it in Director and I
            don't find any information about this.

            Thanks again.


            "Sean Wilson" <webforumsuser@macromedia.com> escribió en el mensaje de
            noticias news:g99kvf$i7i$1@forums.macromedia.com...
            > Read the docs for getNetText() and/or postNetText(). Also
            > < http://www.shocknet.org.uk/index.asp>

            • 3. Re: ASP and Adobe Director 11
              Level 7
              > I get aString = "" and netDone(netID)=0
              >
              > That means that the "myaspfile.asp" has not being executed

              No it doesn't. It means the postNetText() call hasn't finished yet. Both
              it and the GET equivalent are asynchronous operations, meaning you have
              to wait (by looping on a frame, using a timeout object or the actorList)
              for it to finish before accessing any results.
              • 4. Re: ASP and Adobe Director 11
                Level 7
                Well, we've gotten it!!!
                The problem was not to wait but the way of waiting.
                I had made a loop like this:

                --+++++++++++++++++++++++++++++++++
                repeat while netDone(netID)=0 then
                nothing
                end repeat
                --+++++++++++++++++++++++++++++++++

                but I only obtained an infinite loop. My workmate solved it by using a
                simple: _movie.go(_movie.frame)

                Thank you very much Sean.

                Regards from Spain.




                "Sean Wilson" <webforumsuser@macromedia.com> escribió en el mensaje de
                noticias news:g9eu5n$8rt$1@forums.macromedia.com...
                >> I get aString = "" and netDone(netID)=0
                >>
                >> That means that the "myaspfile.asp" has not being executed
                >
                > No it doesn't. It means the postNetText() call hasn't finished yet. Both
                > it and the GET equivalent are asynchronous operations, meaning you have to
                > wait (by looping on a frame, using a timeout object or the actorList) for
                > it to finish before accessing any results.

                • 5. Re: ASP and Adobe Director 11
                  Level 7
                  It is not good practice to lock your movie in a repeat. No other scripts
                  can execute while this loop is executing. You are better off checking
                  the status of netDone in an exitFrame handler or using a timer object.

                  Locknar wrote:
                  > Well, we've gotten it!!!
                  > The problem was not to wait but the way of waiting.
                  > I had made a loop like this:
                  >
                  > --+++++++++++++++++++++++++++++++++
                  > repeat while netDone(netID)=0 then
                  > nothing
                  > end repeat
                  > --+++++++++++++++++++++++++++++++++
                  >
                  > but I only obtained an infinite loop. My workmate solved it by using a
                  > simple: _movie.go(_movie.frame)
                  >
                  > Thank you very much Sean.
                  >
                  > Regards from Spain.
                  >
                  >
                  >
                  >
                  > "Sean Wilson" <webforumsuser@macromedia.com> escribió en el mensaje de
                  > noticias news:g9eu5n$8rt$1@forums.macromedia.com...
                  >>> I get aString = "" and netDone(netID)=0
                  >>>
                  >>> That means that the "myaspfile.asp" has not being executed
                  >>
                  >> No it doesn't. It means the postNetText() call hasn't finished yet.
                  >> Both it and the GET equivalent are asynchronous operations, meaning
                  >> you have to wait (by looping on a frame, using a timeout object or the
                  >> actorList) for it to finish before accessing any results.
                  >
                  • 6. Re: ASP and Adobe Director 11
                    Level 7
                    I've really learned the lesson Dave.
                    Thank you very much.

                    Un saludo.

                    "Dave C" <no@no.com> escribió en el mensaje de noticias
                    news:g9h4f8$klv$1@forums.macromedia.com...
                    > It is not good practice to lock your movie in a repeat. No other scripts
                    > can execute while this loop is executing. You are better off checking the
                    > status of netDone in an exitFrame handler or using a timer object.
                    >
                    > Locknar wrote:
                    >> Well, we've gotten it!!!
                    >> The problem was not to wait but the way of waiting.
                    >> I had made a loop like this:
                    >>
                    >> --+++++++++++++++++++++++++++++++++
                    >> repeat while netDone(netID)=0 then
                    >> nothing
                    >> end repeat
                    >> --+++++++++++++++++++++++++++++++++
                    >>
                    >> but I only obtained an infinite loop. My workmate solved it by using a
                    >> simple: _movie.go(_movie.frame)
                    >>
                    >> Thank you very much Sean.
                    >>
                    >> Regards from Spain.
                    >>
                    >>
                    >>
                    >>
                    >> "Sean Wilson" <webforumsuser@macromedia.com> escribió en el mensaje de
                    >> noticias news:g9eu5n$8rt$1@forums.macromedia.com...
                    >>>> I get aString = "" and netDone(netID)=0
                    >>>>
                    >>>> That means that the "myaspfile.asp" has not being executed
                    >>>
                    >>> No it doesn't. It means the postNetText() call hasn't finished yet. Both
                    >>> it and the GET equivalent are asynchronous operations, meaning you have
                    >>> to wait (by looping on a frame, using a timeout object or the actorList)
                    >>> for it to finish before accessing any results.
                    >>