Type Event Revision Release 2024.3703 Keywords enterFrame, runtime See also Basic Interactivity and Event Detection (guide)
"enterFrame"
events occur at the config.lua
. They are only dispatched to the global Runtime object.
local myListener = function( event ) print( "Listener called with event of type " .. event.name ) end Runtime:addEventListener( "enterFrame", myListener )
local function printCurrentFrameID( event ) print ( "Current frame ID: " .. tostring(event.frame) ) end Runtime:addEventListener( "enterFrame", printCurrentFrameID )
local function printTimeSinceStart( event ) print ( tostring(event.time/1000) .. " seconds since app started." ) end Runtime:addEventListener( "enterFrame", printTimeSinceStart )