From: Locknar on
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.


From: Sean Wilson on
Read the docs for getNetText() and/or postNetText(). Also
<http://www.shocknet.org.uk/index.asp>
From: Locknar on
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(a)macromedia.com> escribi� en el mensaje de
noticias news:g99kvf$i7i$1(a)forums.macromedia.com...
> Read the docs for getNetText() and/or postNetText(). Also
> <http://www.shocknet.org.uk/index.asp>

From: Sean Wilson on
> 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.
From: Locknar on
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(a)macromedia.com> escribi� en el mensaje de
noticias news:g9eu5n$8rt$1(a)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.

 |  Next  |  Last
Pages: 1 2
Prev: Director 11 DCR not loading
Next: Create Mask