In addition to what @roaminggamer said, there are two other ways you might want to consider:
composer.setVariable( key, value )
value = composer.getVariable( key )
These will store data in the composer object itself. This is one way to share values in between scenes.
The other method involves the overlay scene’s ability to access it’s parent. In the four scene events functions, they receive a table that we call event. One of the members of that able is event.parent. This is the parent scene’s scene object.
In your parent scene you can do:
local myObjectToFill = -- whatever you need to do setup your display object function scene.fillObject( red, green, blue, alpha ) myObjectToFill:setFillColor( red, green, blue, alpha ) end
Then in your overlay scene:
local parentScene = nil ... -- somewhere later in your code parentScene.setFillColor( 0.5, 0.2, 0.9 ) ... function scene:create( event ) local sceneGroup = self.view parentScene = event.parent ... end
You have a lot of flexibility in this area.
Rob