Scott my friend, this thing is driving me crazy!
I am doing exactly what you are suggested but my list in the device comes always the same.
math.randomseed = ( os.time() )
math.random()
myList = { “alex.jpg”,“eric.jpg”,“marina.jpg”}
function selectRandom()
local rand=math.random(#myList)
local tFile = myList[rand]
local background = display.newImage(tFile, 0, 0)
table.remove(myList,rand)
end
selectRandom()
everything works fine in the simulator but, when I run it in the device for the first time, it keeps showing the same list. For example, if the first time it built the random list as {1,2,1}, meaning {alex, marina, eric}, if i leave the app and run it again, “alex” will appear first, then “marina”, then “Eric” - it never refresh the random list.
Alex
[import]uid: 4883 topic_id: 924 reply_id: 2516[/import]
