event.name

Type String
Event create
Revision Current Public Release (2017.3068)
Keywords composer, scene, create, event

Overview

For the create event, event.name is the string value "create". It can be accessed from the event listener for create events that are dispatched to 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:create( event )
    print( event.name )
end
scene:addEventListener( "create" )