Get scene name from enter/exit scene events?

It would be nice if we could get the current scene name on entering and exiting scene event.

Example:

[lua]

function scene:enterScene( event )

    local sceneName = event.sceneName

end

[/lua]

Usage example:

Analytics wrapper that measures time spent on scene could have enter and exit listeners and log time for specific scenes.

like this: http://docs.coronalabs.com/api/library/storyboard/getCurrentSceneName.html ?

Yes exactly, can do that instead, thanks.

Which scene does it actually return though? Do I need to wait until an enterScene event to grab this value, or is the ‘current’ scene the one you want to go to as soon as you call gotoScene() - IE at what point does the new scene replace the old one as the current scene?

If that makes any sense :slight_smile:

like this: http://docs.coronalabs.com/api/library/storyboard/getCurrentSceneName.html ?

Yes exactly, can do that instead, thanks.

Which scene does it actually return though? Do I need to wait until an enterScene event to grab this value, or is the ‘current’ scene the one you want to go to as soon as you call gotoScene() - IE at what point does the new scene replace the old one as the current scene?

If that makes any sense :slight_smile: