I have a server that generates a different image every time a request to a URL is made.
I simply want to pull the image, and once received perform the pull again. Effectively creating a constantly updating image.
I created a function that requests the image. I call this function again once I have received a successful download, or at least I thought I was calling it. No errors are generated.
I get my first image, but that is it.
[code]
local function networkListener( event )
if ( event.isError ) then
print ( “Network error - download failed” )
else
myImage = display.newImage( “test.jpg”, system.TemporaryDirectory, 60, 40 )
getimage()
end
print ( "RESPONSE: " … event.response )
end
function getimage ()
network.download( “http://www.mysite.com:8000/image.jpg”, “GET”, networkListener, “test.jpg”, system.TemporaryDirectory )
end
network.download( “http://www.mysite.com:8000/image.jpg”, “GET”, networkListener, “test.jpg”, system.TemporaryDirectory )
[/code] [import]uid: 74957 topic_id: 26630 reply_id: 326630[/import]