Hi,
I have tried searching the forums for an answer but I can’t seem to find what Im looking for…
I have a composer scene which has three elements on the screen which each use it own display object. for example I have:
local grpHeader = display.newGroup()
local grpGame = display.newGroup()
local grpFooter = display.newGroup()
from scene:create I populate each group with various images, touch events etc group by group, e.g.
local createGrpHeader = function()
… create stuff
end
local createGrpGame = function()
… create stuff
end
finally, I add the groups to self.view
Now what I want to do is to ‘reset’ the grpGame group and re-call my createGrpGame function to re-draw everything. I tried to do createGrpGame:removeSelf but that didnt work.
Do I need to loop through all the children of grpGame and call removeself on those?
what is the best approach for what I am doing?
many thanks