I have a button in an overlay, I want the button call a function in the parent scene of the current overlay but without hiding it. I have seen the example of how to call a function in the parent scene but I only call “parent” function since scene events…
I answer my self:
In parent scene(‘mysceneparent’) I add the function:
function scene:createObject(type) print("create object "..type) end
and in the overlay scene, in the event of the button I add:
composer.getScene( 'mysceneparent' ):createObject('one')
Good job on the self answer, and the exact right solution.
I answer my self:
In parent scene(‘mysceneparent’) I add the function:
function scene:createObject(type) print("create object "..type) end
and in the overlay scene, in the event of the button I add:
composer.getScene( 'mysceneparent' ):createObject('one')
Good job on the self answer, and the exact right solution.