Download image and insert in display group?

Is there any way to download an image ( either by network.download or display.loadRemoteImage ) and then add that to a container or a display group?

I’m trying to use a downloaded image in an overlay and because I can’t add it to the overlay’s screen group, it remains after the overlay has been hidden.

Any thoughts would be appreciated.

I believe loadRemoteImage returns a display object in its event.target so you can simply say something along the lines of…

local remoteImage = nil

local function remoteImageCallback(event)

     remoteImage = event.target

end

OR

local myDisplayGroup = display.newGroup()

local function remoteImageCallback(event)

     myDisplayGroup:insert(event.target)

end

Or any combination there of :slight_smile:

I believe loadRemoteImage returns a display object in its event.target so you can simply say something along the lines of…

local remoteImage = nil

local function remoteImageCallback(event)

     remoteImage = event.target

end

OR

local myDisplayGroup = display.newGroup()

local function remoteImageCallback(event)

     myDisplayGroup:insert(event.target)

end

Or any combination there of :slight_smile: