hi, lingoists
hmm, let me see if i can explain...
i'm using getNetText and netTextResult with two purposes: a text to be
exhibited on a field, and a second one to act like a behaviour with the
"do" comand, attached to a button. for that, the user must be connected,
but if he isn't, there's a default text to be displayed, and the button
will only beep. if the user is not connected, netTextResult(gNetTextoInfo
) and netTextResult(gNetID) return empty strings, ok; when he connects,
both return what's on the txt files on the server, ok too; BUT, once
they're not empty anymore, i can't change them using the same check process
to determine when director should check if the texts are available.
anyway, the question is: how can i refresh both netTextResult from time to
time, say 5 to 5 minutes?
tia
the movie script:
--**************
global gNetTextoInfo,gNetID
on startMovie
gNetTextoInfo = ""
tryAgain
end
on tryAgain
gNetID = ""
gNetID = getNetText("http://www.alternex.com.br/~quixada/brasil.txt")
gNetTextoInfo = ""
gNetTextoInfo =
getNetText("http://www.alternex.com.br/~quixada/botaoacesso.txt")
end
--**************
the button script:
--**************
property pTempo
on getPropertyDescriptionList
lista = [#pTempo:[#format:#integer,#default:1,#coment:"Time to try
again, in minutes:"]]
return lista
end
on mouseUp me
if (netDone(gNetTextoInfo) = TRUE) and (netError(gNetTextoInfo) = "OK") then
do netTextResult(gNetTextoInfo)
else
beep
end if
end
on enterFrame me
if the timer > pTempo * 60 * 60 then
tryAgain
end if
end
--**************
the frame script:
--**************
global gNetID
property pTempo
on getPropertyDescriptionList
lista = [#pTempo:[#format:#integer,#default:1,#coment:"Time to try
again, in minutes:"]]
return lista
end
on beginSprite me
startTimer
end
on exitFrame me
if (netDone(gNetID) = TRUE) and (netError(gNetID) = "OK") then
member("Display Text").text = netTextResult(gNetID)
else
member("Display Text").text = member("Default text").text
end if
if the timer > pTempo * 60 * 60 then
tryAgain
end if
if the timer > (pTempo * 60 * 60) + 100 then
startTimer
end if
go to the frame
end
[]'s
Quixadá
web site - http://www.alternex.com.br/~quixada
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]