I would like to know how to do something like this:
local t={}
for i=1, 10 do
table.insert(t, display.newImage("myImage.png")
end
local function setImageColor()
for i=1, 10 do
t[i]:setFillColor(255, 0, 0)
end
end
setImageColor()
I’ve noticed that it will work if you put up in the setting up of the ‘t’ table ‘t[i]:setFillColor(255, 0, 0)’ but it won’t work in the function. How would I get it to work in the function? [import]uid: 147322 topic_id: 28342 reply_id: 328342[/import]
[import]uid: 52491 topic_id: 28342 reply_id: 114589[/import]