Hi @roaminggamer thanks for the reply.
Here's my problem, I have a Scrollview that shows many items to chose from, created onCreate. I run through the table onShow and insert the proper downloaded images into it. I remove the scene completely onHide.
This is a simplified code of what I am doing. And if a user exists this scene and enters it quick enough. The images from the first entrance, after checking it's the correct scene, will display the images downloaded from the first entrance.
-- Create the widget
local scrollView = require('widget').newScrollView(
top = 100,
left = 10,
width = 300,
height = 400,
scrollWidth = 600,
scrollHeight = 800,
local function Create_One( _url, _Card_Y )
local CARD = display.newGroup()
local function Remote_Image_Listener( event )
local rightScene = false
if(composer.getSceneName("current") == "scenes.Event_Details")then
rightScene = true
if(event.status == 200) and rightScene then
event.target.anchorY = 0
event.target.anchorX = 1
event.target.width = 300
event.target.height = 200
CARD:insert( event.target )
print("Remote Image Download Canceled")
local F1_Image = display.loadRemoteImage( _url, "GET", Remote_Image_Listener, fileName, system.DocumentsDirectory, ScrollView.width/2 , Card_Y )
local Card_Y = 150
for i=1,300 do
Card_Y = Card_Y + 250
local Card = Create_One_Card( IMAGE_URL, Card_Y)
ScrollView:insert( Card )
I would really like it if I could send more params so I could check the image relevance alongside the correct scene.
Mor from Mars Team