Hi JonPM
Yes, i added all the display objects to the scenes group.
Some of my display object are divided into different display groups and i have a function to add all the groups to the scenes group
function setupDisplay (sceneGroup)
sceneGroup:insert (boxDisplay);
sceneGroup:insert (frontBoxDisplay);
sceneGroup:insert (ballGroup);
sceneGroup:insert (textDisplay);
sceneGroup:insert (redBoxBallCoun);
sceneGroup:insert (blueBoxBallCoun);
sceneGroup:insert (greenBoxBallCoun);
sceneGroup:insert (yellowBoxBallCoun);
frontBoxDisplay:toFront();
return sceneGroup
end
I also have a function to clear al the display groups, just to make sure.
for example
function clearGameDisplay ()
for i=ballGroup.numChildren,1,-1 do
display.remove( ballGroup[i] ) ; ballGroup[i] = nil
end
for i=textDisplay.numChildren,1,-1 do
display.remove( textDisplay[i] ) ; textDisplay[i] = nil
end
for i=redBoxBallCoun.numChildren,1,-1 do
display.remove( redBoxBallCoun[i] ) ; redBoxBallCoun[i] = nil
end
for i=blueBoxBallCoun.numChildren,1,-1 do
display.remove( blueBoxBallCoun[i] ) ; blueBoxBallCoun[i] = nil
end
for i=greenBoxBallCoun.numChildren,1,-1 do
display.remove( greenBoxBallCoun[i] ) ; greenBoxBallCoun[i] = nil
end
for i=yellowBoxBallCoun.numChildren,1,-1 do
display.remove( yellowBoxBallCoun[i] ) ; yellowBoxBallCoun[i] = nil
end
end
function clearBoxDisplay ()
for i=frontBoxDisplay.numChildren,1,-1 do
display.remove(frontBoxDisplay[i] ) ; frontBoxDisplay[i] = nil
end
for i=boxDisplay.numChildren,1,-1 do
display.remove( boxDisplay[i] ) ; boxDisplay[i] = nil
end
end
regards,
Guy