event.name

Type String
Event destroy
Revision Release 2024.3703
Keywords composer, scene, destroy, event

Overview

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

Example

local composer = require( "composer" )
local scene = composer.newScene()

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