Is this a hard question? All I need to do is check and see if the url is good (valid) or bad (404) in my RSG VideoScene.brs file.
Can I use some of this Function?
Function check(thisurl) as string
request = CreateObject("roUrlTransfer")
port = CreateObject("roMessagePort")
request.SetMessagePort(port)
request.SetUrl(thisurl)
if (request.AsyncGetToString())
while (true)
msg = wait(0, port)
if (type(msg) = "roUrlEvent")
code = msg.GetResponseCode()
if (code = 200)
print"good"
return "good"
elseif (code =400 or code=404)
print("image not found")
return "bad"
else
print"error"; code
return "generic bad code"
endif
else if (event = invalid)
request.AsyncCancel()
endif
end while
endif
return invalid
End Function