Please guide me for below script.
on mouseUp me
myurl="www.its-solution.com/sample.txt" --// this is the file that i want
to place text name mytext
mytext=["ooi"]
netID = postNetText(myurl,mytext)
put netError(netID)
put netTextResult(netID)
if netDone(netID) then
member("text").text = netTextResult(netID)
end if
end
unfortunately the netError is "1" and refer to the possible error codes means
Occurs when the local path points to a directory which doesn't exist
Any idea. Thanks Thanks
Next, is that you should preface your web address with "http:\\"
Third is that the net operation is asynchronous. It will not retrieve
the text immediately, so when you have the "if netDone (netID) then"
line, it will ALWAYS evaluate to false. It will never be done by the
time you are doing it. You should put that bit into a different handler
that is constantly being monitored.
Like this:
--snip--
property pNetID
on mouseUp me
myurl="http://www.its-solution.com/sample.txt"
pNetID = getNetText(myurl)
put netError(pNetID)
put netTextResult(pNetID)
end
on enterFrame me
if netDone(pNetID) then
member("text").text = netTextResult(pNetID)
end if
end
--snip--
my intention is to over write the TEXT in the file name
"http://www.its-solution.com/sample.txt". postNetText.
I have no problem to retrieve the TEXT in
"http://www.its-solution.com/sample.txt" by using getNetText.
also mean i want to post the string text "abc12345" into the file
"http://www.its-solution.com/sample.txt". But my postNetText not working.
Please advice. Thanks
If you want an xtra that can manage FTP access, I would rather recommend
ShockFiler - much better support and on-going development.
[/q]
I see where is the problem.
You do not understand getNetText and postNetText methods.
getNetText means "execute" php or other script using method GET
postNetText means the same but using method POST
get doesn't mean "read" and
post doesn't mean "send".
If You want to write some data to file on external server you should use php
script which will handle the file.