display.currentStage

Type StageObject
Library display.*
Return value DisplayObject
Revision 2017.3060
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 )