event.frame

Type Number
Event enterFrame
Revision Release 2024.3703
Keywords enterframe, frame
See also Runtime:getFrameID()

Overview

An ID unique to the current frame of the application accessible by an enterFrame event listener function (which is called on every frame, until the event listener is removed).

Example

local function printCurrentFrameID( event )
    print ( "Current frame ID: " .. tostring(event.frame) )
end 
Runtime:addEventListener( "enterFrame", printCurrentFrameID )