Composer is a scene manager. If you want Composer to manage your scene, those display objects have to be added to the scene’s “view”.
Under the hood, the view is nothing more than a display.newGroup(). When you create the scene using:
local scene = composer.newScene()
It creates a new group named “view” and makes it part of the scene. i.e.:
scene.view
If you use local functions:
local function doSomething() local sceneGroup = scene.view ... end
If you use object functions:
function scene:doSomethingElse() local sceneGroup = self.view ... end
In the Composer event functions (create, show, hide, destroy), they are all of the “object function” model. With the colon operator (:), it passes an object named self to the function. So:
for object functions: sceneGroup = self.view = scene.view.
for local functions: sceneGroup = scene.view (no self available)
Anything you want to fade in and out must be in scene.view regardless of how you get it there:
sceneGroup:insert( object )
scene.view:insert( object ) – does the same thing as above.
I’m not sure what you mean by “How does it connect with each other??”
Rob
Rob