event.name

Type String
Event show
Revision Release 2022.3683
Keywords composer, scene, show, event

Overview

For the show event, event.name is the string value "show". It can be accessed from the event listener for show events that are dispatched to [scene][api.type.scene] objects.

Example

--------------------------
-- From "scene1.lua"
--------------------------
composer.gotoScene( "scene2", { effect="fade", time=800 } )

--------------------------
-- In "scene2.lua"
--------------------------
local composer = require( "composer" )
local scene = composer.newScene()

function scene:show( event )
    print( event.name )
end
scene:addEventListener( "show" )