Group objects are not displayed

When I’m creating a scene, do this:

Function scene:create (event)

Local sceneGroup = self.view

Bgimage = create.image (“scene/Load/loadbg.png”, display.contentCenterX, display.contentCenterY, display.actualContentWidth, display.actualContentHeight)

SceneGroup:insert (bgimage)

End

Of these sceneGroup:insert (bgimage) when I do not add bgimage in the self.view  ,bgimage can be displayed, when I joined the bgimage after the self.view ,bgimage he disappeared, but what is the situation?

Please format your code :slight_smile:

Why do not  you use display.newImage() to create a image? I don’t know create.image function.

The image creation is no problem, I was the other function package to create a picture, focusing on why I put the image object creation after the addition of self, view group will disappear??

Is that your actual code? 

If so, you are using sceneGroup  (lower-case ‘s’) to link to scene.view and then SceneGroup to insert (capital ‘S’).

Likewise with Bgimage and bgimage.

This problem I found the reason, reason is that I create a button function returns the set of objects, then I add it to self.view when he was removed from the previous group, so it disappeared, there are multiple group objects cannot, my original concept is a set of nested groups, seems to be looking for other the method can achieve the desired effect I

Please format your code :slight_smile:

Why do not  you use display.newImage() to create a image? I don’t know create.image function.

The image creation is no problem, I was the other function package to create a picture, focusing on why I put the image object creation after the addition of self, view group will disappear??

Is that your actual code? 

If so, you are using sceneGroup  (lower-case ‘s’) to link to scene.view and then SceneGroup to insert (capital ‘S’).

Likewise with Bgimage and bgimage.

This problem I found the reason, reason is that I create a button function returns the set of objects, then I add it to self.view when he was removed from the previous group, so it disappeared, there are multiple group objects cannot, my original concept is a set of nested groups, seems to be looking for other the method can achieve the desired effect I