display.currentStage

Type StageObject
Library display.*
Return value DisplayObject
Revision Release 2022.3683
Keywords group, stage, screen
See also display.getCurrentStage()
Group Programming (guide)

Overview

A reference to the current stage object, which is the root group for all display objects and groups. Currently, Corona has a single stage instance, so this function always returns a reference to the same object.

Example

local count = display.currentStage.numChildren
print( "Number of objects on the screen = " .. count )