Scene effect transition dowsn't work for my object

Hello,
I am exploring the empty scene project, but when I add my own object the transition doesn’t work for it. Button and labels fade-in, but my object (picture) is instantly there:
 

........ function scene:show( event )     local sceneGroup = self.view     local phase = event.phase     if phase == "will" then         local background = display.newImageRect( "background.png", 360, 570 )         background.x = display.contentCenterX         background.y = display.contentCenterY local title = self:getObjectByName( "Title" )         title.x = display.contentWidth / 2         title.y = display.contentHeight / 2         title.size = display.contentWidth / 10         local goToScene3Btn = self:getObjectByName( "GoToScene3Btn" )         goToScene3Btn.x = display.contentWidth - 95         goToScene3Btn.y = display.contentHeight - 35         local goToScene3Text = self:getObjectByName( "GoToScene3Text" )         goToScene3Text.x = display.contentWidth - 92         goToScene3Text.y = display.contentHeight - 35     elseif phase == "did" then .......  

 
My object is background. In addition - it is on top of everything, no matter is the first object. 

Please assist :slight_smile:

P.S. I inserted everything in “code”, but looks like half of it is outside (maybe because I paste it later)

After you have created the object you need to insert it into the scene group.

sceneGroup:insert( object )

Now it load it with fade, but over other objects.

And why other objects are not inserted (at least not manually with similar lines)?

I am trying to understand what is the difference between my object and default objects in the scene like the button. 

Thanks

It boils down to when they are created and which display group they are inserted into.

I personally normally create the background in the scene:create function and before any other graphical items.

Have a read of this, it may help…

https://docs.coronalabs.com/guide/media/displayObjects/index.html#hierarchy

P.S. I inserted everything in “code”, but looks like half of it is outside (maybe because I paste it later)

After you have created the object you need to insert it into the scene group.

sceneGroup:insert( object )

Now it load it with fade, but over other objects.

And why other objects are not inserted (at least not manually with similar lines)?

I am trying to understand what is the difference between my object and default objects in the scene like the button. 

Thanks

It boils down to when they are created and which display group they are inserted into.

I personally normally create the background in the scene:create function and before any other graphical items.

Have a read of this, it may help…

https://docs.coronalabs.com/guide/media/displayObjects/index.html#hierarchy