API Reference

Notes

Libraries

ads.*

audio.*

audio.dispose()

audio.fade()

audio.fadeOut()

audio.findFreeChannel()

audio.freeChannels

audio.getDuration()

audio.getMaxVolume()

audio.getMinVolume()

audio.getVolume()

audio.isChannelActive()

audio.isChannelPaused()

audio.isChannelPlaying()

audio.loadSound()

audio.loadStream()

audio.pause()

audio.play()

audio.reserveChannels()

audio.reservedChannels

audio.resume()

audio.rewind()

audio.seek()

audio.setMaxVolume()

audio.setMinVolume()

audio.setVolume()

audio.stop()

audio.stopWithDelay()

audio.totalChannels

audio.unreservedFreeChannels

audio.unreservedUsedChannels

audio.usedChannels

composer.*

composer.getScene()

composer.getSceneName()

composer.getVariable()

composer.gotoScene()

composer.hideOverlay()

composer.isDebug

composer.loadScene()

composer.newScene()

composer.recycleAutomatically

composer.recycleOnLowMemory

composer.recycleOnSceneChange

composer.removeHidden()

composer.removeScene()

composer.setVariable()

composer.showOverlay()

composer.stage

crypto.*

crypto.digest()

crypto.hmac()

crypto.md4

crypto.md5

crypto.sha1

crypto.sha224

crypto.sha256

crypto.sha384

crypto.sha512

display.*

display.actualContentHeight

display.actualContentWidth

display.capture()

display.captureBounds()

display.captureScreen()

display.colorSample()

display.contentCenterX

display.contentCenterY

display.contentHeight

display.contentScaleX

display.contentScaleY

display.contentWidth

display.currentStage

display.fps

display.getCurrentStage()

display.getDefault()

display.getSafeAreaInsets()

display.imageSuffix

display.loadRemoteImage()

display.newCircle()

display.newContainer()

display.newEmbossedText()

display.newEmitter()

display.newGroup()

display.newImage()

display.newImageRect()

display.newLine()

display.newMesh()

display.newPolygon()

display.newRect()

display.newRoundedRect()

display.newSnapshot()

display.newSprite()

display.newText()

display.pixelHeight

display.pixelWidth

display.remove()

display.safeActualContentHeight

display.safeActualContentWidth

display.safeScreenOriginX

display.safeScreenOriginY

display.save()

display.screenOriginX

display.screenOriginY

display.setDefault()

display.setDrawMode()

display.setStatusBar()

display.statusBarHeight

display.topStatusBarContentHeight

display.viewableContentHeight

display.viewableContentWidth

easing.*

facebook.*

gameNetwork.*

(globals)

assert()

collectgarbage()

error()

getfenv()

getmetatable()

ipairs()

next()

pairs()

pcall()

print()

rawequal()

rawget()

rawset()

select()

setfenv()

setmetatable()

tonumber()

tostring()

type()

unpack()

graphics.*

graphics.defineEffect()

graphics.getFontMetrics()

graphics.newImageSheet()

graphics.newMask()

graphics.newOutline()

graphics.newTexture()

graphics.releaseTextures()

graphics.undefineEffect()

io.*

io.close()

io.flush()

io.input()

io.lines()

io.open()

io.output()

io.read()

io.tmpfile()

io.type()

io.write()

json.*

json.decode()

json.decodeFile()

json.encode()

json.prettify()

lfs.* (file system)

licensing.*

licensing.init()

licensing.verify()

math.*

math.abs()

math.acos()

math.asin()

math.atan()

math.atan2()

math.ceil()

math.cos()

math.cosh()

math.deg()

math.exp()

math.floor()

math.fmod()

math.frexp()

math.huge

math.inf

math.ldexp()

math.log()

math.log10()

math.max()

math.min()

math.modf()

math.pi

math.pow()

math.rad()

math.random()

math.randomseed()

math.round()

math.sin()

math.sinh()

math.sqrt()

math.tan()

math.tanh()

media.*

media.RemoteSource

media.capturePhoto()

media.captureVideo()

media.getSoundVolume()

media.hasSource()

media.newEventSound()

media.newRecording()

media.pauseSound()

media.playEventSound()

media.playSound()

media.playVideo()

media.save()

media.selectPhoto()

media.selectVideo()

media.setSoundVolume()

media.show()

media.stopSound()

native.*

native.canShowPopup()

native.cancelAlert()

native.cancelWebPopup()

native.getFontNames()

native.getProperty()

native.getSync()

native.newFont()

native.newMapView()

native.newTextBox()

native.newTextField()

native.newVideo()

native.newWebView()

native.requestExit()

native.setActivityIndicator()

native.setKeyboardFocus()

native.setProperty()

native.setSync()

native.showAlert()

native.showPopup()

native.showWebPopup()

native.systemFont

native.systemFontBold

network.*

network.canDetectNetworkStatusChanges

network.cancel()

network.download()

network.request()

network.setStatusListener()

network.upload()

os.*

os.clock()

os.date()

os.difftime()

os.execute()

os.exit()

os.remove()

os.rename()

os.time()

package.*

package.loaded

package.loaders

requirXe()

physics.*

physics.addBody()

physics.engineVersion

physics.fromMKS()

physics.getAverageCollisionPositions()

physics.getDebugErrorsEnabled()

physics.getGravity()

physics.getMKS()

physics.getReportCollisionsInContentCoordinates()

physics.getTimeScale()

physics.newJoint()

physics.newParticleSystem()

physics.pause()

physics.queryRegion()

physics.rayCast()

physics.reflectRay()

physics.removeBody()

physics.setAverageCollisionPositions()

physics.setContinuous()

physics.setDebugErrorsEnabled()

physics.setDrawMode()

physics.setGravity()

physics.setMKS()

physics.setPositionIterations()

physics.setReportCollisionsInContentCoordinates()

physics.setScale()

physics.setTimeScale()

physics.setTimeStep()

physics.setVelocityIterations()

physics.start()

physics.stop()

physics.toMKS()

socket.*

sqlite3.* (database)

store.* (Apple IAP)

store.canLoadProducts

store.canMakePurchases

productList

event.invalidProducts

event.name

event.products

storeTransaction

event.name

event.transaction

store.finishTransaction()

store.init()

store.isActive

store.loadProducts()

store.purchase()

store.restore()

store.target

string.*

string.byte()

string.char()

string.ends()

string.find()

string.format()

string.gmatch()

string.gsub()

string.len()

string.lower()

string.match()

string.rep()

string.reverse()

string.starts()

string.sub()

string.upper()

system.*

system.ApplicationSupportDirectory

system.CachesDirectory

system.DocumentsDirectory

system.ResourceDirectory

system.TemporaryDirectory

system.activate()

system.canOpenURL()

system.cancelNotification()

system.deactivate()

system.deletePreferences()

system.getIdleTimer()

system.getInfo()

system.getInputDevices()

system.getPreference()

system.getTimer()

system.hasEventSource()

system.newEventDispatcher()

system.openURL()

system.orientation

system.pathForFile()

system.scheduleNotification()

system.setAccelerometerInterval()

system.setGyroscopeInterval()

system.setIdleTimer()

system.setLocationAccuracy()

system.setLocationThreshold()

system.setPreferences()

system.setTapDelay()

system.vibrate()

table.* (array)

table.concat()

table.copy()

table.indexOf()

table.insert()

table.maxn()

table.remove()

table.sort()

timer.*

timer.allowInterationsWithinFrame

timer.cancel()

timer.cancelAll()

timer.pause()

timer.pauseAll()

timer.performWithDelay()

timer.resume()

timer.resumeAll()

transition.*

transition.blink()

transition.cancel()

transition.cancelAll()

transition.dissolve()

transition.fadeIn()

transition.fadeOut()

transition.from()

transition.ignoreEmptyReference

transition.loop()

transition.moveBy()

transition.moveTo()

transition.pause()

transition.pauseAll()

transition.resume()

transition.resumeAll()

transition.scaleBy()

transition.scaleTo()

transition.to()

widget.*

widget.newButton()

widget.newPickerWheel()

widget.newProgressView()

widget.newScrollView()

widget.newSegmentedControl()

widget.newSlider()

widget.newSpinner()

widget.newStepper()

widget.newSwitch()

widget.newTabBar()

widget.newTableView()

widget.setTheme()

Events

accelerometer

event.deltaTime

event.device

event.isShake

event.name

event.xGravity

event.xInstant

event.xRaw

event.yGravity

event.yInstant

event.yRaw

event.zGravity

event.zInstant

event.zRaw

audio

event.channel

event.completed

event.handle

event.name

event.phase

axis

event.axis

event.device

event.name

event.normalizedValue

event.rawValue

collision

event.contact

event.element1

event.element2

event.name

event.object1

event.object2

event.other

event.otherElement

event.phase

event.selfElement

event.target

event.x

event.y

colorSample

event.a

event.b

event.g

event.name

event.r

event.x

event.y

completion

event.action

event.completed

event.duration

event.fileSize

event.name

event.target

event.url

enterFrame

event.frame

event.name

event.time

finalize

event.name

event.target

gameNetwork

event.data

event.errorCode

event.errorMessage

event.localPlayerScore

event.name

event.provider

event.type

gyroscope

event.deltaTime

event.name

event.xRotation

event.yRotation

event.zRotation

heading (compass)

event.geographic

event.magnetic

event.name

inputDeviceStatus

event.connectionStateChanged

event.device

event.name

event.reconfigured

key

event.descriptor

event.device

event.isAltDown

event.isCommandDown

event.isCtrlDown

event.isShiftDown

event.keyName

event.name

event.nativeKeyCode

event.phase

lateUpdate

event.name

event.time

licensing

event.errorType

event.expiration

event.isError

event.isVerified

event.name

event.provider

event.response

location (GPS)

event.accuracy

event.altitude

event.direction

event.errorCode

event.errorMessage

event.latitude

event.longitude

event.name

event.speed

event.time

mapAddress

event.city

event.cityDetail

event.country

event.countryCode

event.errorMessage

event.isError

event.name

event.postalCode

event.region

event.regionDetail

event.street

event.streetDetail

mapLocation

event.errorMessage

event.isError

event.latitude

event.longitude

event.name

event.request

event.type

mapMarker

event.latitude

event.longitude

event.markerId

memoryWarning

event.name

mouse

event.isAltDown

event.isCommandDown

event.isCtrlDown

event.isMiddleButtonDown

event.isPrimaryButtonDown

event.isSecondaryButtonDown

event.isShiftDown

event.name

event.scrollX

event.scrollY

event.time

event.type

event.x

event.y

networkRequest

event.bytesEstimated

event.bytesTransferred

event.isError

event.name

event.phase

event.requestId

event.response

event.responseHeaders

event.responseType

event.status

event.url

networkStatus

event.address

event.isConnectionOnDemand

event.isConnectionRequired

event.isInteractionRequired

event.isReachable

event.isReachableViaCellular

event.isReachableViaWiFi

event.name

notification

event.alert

event.applicationState

event.badge

event.custom

event.name

event.sound

event.type

orientation

event.delta

event.name

event.type

particleCollision

event.a

event.b

event.element

event.g

event.name

event.normalX

event.normalY

event.object

event.particleSystem

event.phase

event.r

event.x

event.y

popup

event.name

event.type

postCollision

event.contact

event.element1

event.element2

event.force

event.friction

event.name

event.object1

event.object2

event.other

event.otherElement

event.selfElement

event.target

event.x

event.y

preCollision

event.contact

event.element1

event.element2

event.name

event.object1

event.object2

event.other

event.otherElement

event.selfElement

event.target

event.x

event.y

relativeTouch

event.id

event.name

event.phase

event.tapCount

event.time

event.x

event.y

resize

event.name

scene

create

event.name

event.params

destroy

event.name

hide

event.name

event.parent

event.phase

show

event.name

event.params

event.parent

event.phase

sprite

event.name

event.phase

event.sprite

event.target

system

event.commandLineArgs

event.commandLineDir

event.name

event.type

event.url

tap

event.name

event.numTaps

event.x

event.y

timer

event.count

event.name

event.source

event.time

touch

event.id

event.name

event.phase

event.pressure

event.target

event.time

event.x

event.xStart

event.y

event.yStart

unhandledError

event.errorMessage

event.stackTrace

urlRequest

event.errorCode

event.errorMessage

event.name

event.type

event.url

userInput

event.newCharacters

event.numDeleted

event.oldText

event.phase

event.startPosition

event.target

event.text

video

event.name

event.phase

windowState

event.name

event.phase

Types

Array

BitmapPaint

fill.rotation

fill.scaleX

fill.scaleY

fill.x

fill.y

Body

object.angularDamping

object.angularVelocity

object:applyAngularImpulse()

object:applyForce()

object:applyLinearImpulse()

object:applyTorque()

object.bodyType

object:getLinearVelocity()

object:getMassLocalCenter()

object:getMassWorldCenter()

object.gravityScale

object.isAwake

object.isBodyActive

object.isBullet

object.isFixedRotation

object.isSensor

object.isSleepingAllowed

object.linearDamping

object.mass

object:resetMassData()

object:setLinearVelocity()

Boolean

ButtonWidget

object:getLabel()

object:setEnabled()

object:setLabel()

CirclePath

CompositePaint

Constant

CoronaClass

CoronaLibrary

object:getCurrentProvider()

object.name

object.publisherId

object.revision

object:setCurrentProvider()

object.version

CoronaPrototype

object:initialize()

object:instanceOf()

object:isClass()

object:isRoot()

object:new()

object:newClass()

object:setExtension()

CoronaProvider

DisplayObject

object.alpha

object.anchorX

object.anchorY

object.blendMode

object.contentBounds

object.contentHeight

object:contentToLocal()

object.contentWidth

object._defined

object.height

object.isHitTestMasked

object.isHitTestable

object.isVisible

object._lastChange

object:localToContent()

object.maskRotation

object.maskScaleX

object.maskScaleY

object.maskX

object.maskY

object.parent

object._properties

object:removeSelf()

object:rotate()

object.rotation

object:scale()

object:setMask()

object:toBack()

object:toFront()

object:translate()

object.width

object.x

object.xScale

object.y

object.yScale

EmitterObject

EmitterObject:pause()

EmitterObject:start()

EmitterObject:stop()

Event

EventDispatcher

object:addEventListener()

object:dispatchEvent()

object:removeEventListener()

File

object:close()

object:flush()

object:lines()

object:read()

object:seek()

object:setvbuf()

object:write()

Function

GameNetwork

gameNetwork.match

gameNetwork.outcome

gameNetwork.participant

gameNetwork.status

GradientPaint

GroupObject

object.anchorChildren

object:insert()

object.numChildren

object:remove()

ImageSheet

ImageSheetPaint

fill.frame

InputAxis

object.accuracy

object.descriptor

object.maxValue

object.minValue

object.number

object.type

InputDevice

object.MFiProfile

object.allowsRotation

object.androidDeviceId

object.canVibrate

object.connectionState

object.descriptor

object.displayName

object.driver

object:getAxes()

object.isConnected

object.permanentId

object.playerNumber

object.productName

object.reportsAbsoluteDpadValues

object.type

object:vibrate()

Joint

object.dampingRatio

object.frequency

object:getAnchorA()

object:getAnchorB()

object:getGroundAnchorA()

object:getGroundAnchorB()

object:getLimits()

object:getLocalAnchorA()

object:getLocalAnchorB()

object:getLocalAxisA()

object:getReactionForce()

object:getRotationLimits()

object:getTarget()

object.isActive

object.isCollideConnected

object.isLimitEnabled

object.isMotorEnabled

object.joint1

object.joint2

object.jointAngle

object.jointSpeed

object.jointTranslation

object.length

object.length1

object.length2

object.limitState

object.maxForce

object.maxLength

object.maxMotorForce

object.maxMotorTorque

object.maxTorque

object.motorForce

object.motorSpeed

object.motorTorque

object.ratio

object.reactionTorque

object.referenceAngle

object:removeSelf()

object:setLimits()

object:setRotationLimits()

object:setTarget()

object.springDampingRatio

object.springFrequency

Library

LineObject

object.anchorSegments

object:append()

Listener

Map

object:addMarker()

object:getAddressLocation()

object:getUserLocation()

object.isLocationVisible

object.isScrollEnabled

object.isZoomEnabled

object.mapType

object:nearestAddress()

object:removeAllMarkers()

object:removeMarker()

object:requestLocation()

object:setCenter()

object:setRegion()

Mask

NativeDisplayObject

object:getNativeProperty()

object:setNativeProperty()

Number

Object

Paint

fill.a

fill.b

fill.blendEquation

fill.blendMode

fill.effect

fill.g

fill.r

ParticleSystem

object:applyForce()

object:applyLinearImpulse()

object:createGroup()

object:createParticle()

object:destroyParticles()

object.imageRadius

object.particleCount

object.particleDamping

object.particleDensity

object.particleDestructionByAge

object.particleGravityScale

object.particleMass

object.particleMaxCount

object.particlePaused

object.particleRadius

object.particleStrictContactCheck

object:queryRegion()

object:rayCast()

Path

path.textureBounds

path.textureVertices

path.type

PhysicsContact

PhysicsContact.bounce

PhysicsContact.friction

PhysicsContact.isEnabled

PhysicsContact.isTouching

PickerWheelWidget

object:getValues()

object:selectValue()

ProgressViewWidget

object:getProgress()

object:resizeView()

object:setProgress()

Recording

object:getSampleRate()

object:isRecording()

object:setSampleRate()

object:startRecording()

object:stopRecording()

RectPath

RoundedRectPath

Runtime

Runtime:getFrameID()

Runtime:getFrameStartTime()

Runtime:hasEventSource()

Runtime:hideErrorAlerts()

Scene

ScrollViewWidget

object:getContentPosition()

object:getView()

object:scrollTo()

object:scrollToPosition()

object:setIsLocked()

object:setScrollHeight()

object:setScrollWidth()

object:setSize()

object:takeFocus()

SegmentedControlWidget

object.segmentLabel

object.segmentNumber

object:setActiveSegment()

ShapeObject

object.fill

object.fillVertexCount

object.path

object:setFillColor()

object:setFillVertexColor()

object:setStrokeColor()

object:setStrokeVertexColor()

object.stroke

object.strokeVertexCount

object.strokeWidth

SliderWidget

object:setValue()

object.value

SnapshotObject

object.canvas

object.canvasMode

object.clearColor

object.group

object:invalidate()

object.textureFilter

object.textureWrapX

object.textureWrapY

SpinnerWidget

object:start()

object:stop()

SpriteObject

object.frame

object.isPlaying

object.numFrames

object:pause()

object:play()

object.sequence

object:setFrame()

object:setSequence()

object.timeScale

object:useFrameForAnchors()

StageObject

StageObject:setFocus()

StepperWidget

object:getValue()

object.maximumValue

object.minimumValue

object:setValue()

object.value

String

SwitchWidget

object.isOn

object:setState()

TabBarWidget

object:setSelected()

Table

TableViewWidget

object:deleteAllRows()

object:deleteRow()

object:deleteRows()

object:getContentPosition()

object:getNumRows()

object:getRowAtIndex()

object:insertRow()

object:reloadData()

object:scrollToIndex()

object:scrollToY()

object:setIsLocked()

TextBox

object.align

object.font

object:getSelection()

object.hasBackground

object.isEditable

object.isFontSizeScaled

object.placeholder

object:setReturnKey()

object:setSelection()

object:setTextColor()

object.size

object.text

TextField

object.align

object.autocorrectionType

object.clearButtonMode

object.font

object:getSelection()

object.hasBackground

object.inputType

object.isFontSizeScaled

object.isSecure

object.placeholder

object:resizeFontToFitHeight()

object:resizeHeightToFitFont()

object:setReturnKey()

object:setSelection()

object:setTextColor()

object.size

object.spellCheckingType

object.text

TextObject

object.baselineOffset

object:setEmbossColor()

object.size

object.text

TextureResource

texture.baseDir

texture.filename

texture:releaseSelf()

texture.type

TextureResourceBitmap

texture:preload()

texture.wrapX

texture.wrapY

TextureResourceCanvas

texture.anchorX

texture.anchorY

texture.cache

texture:draw()

texture.height

texture:invalidate()

texture.pixelHeight

texture.pixelWidth

texture:setBackground()

texture.width

TextureResourceExternal

texture.height

texture:invalidate()

texture.width

Userdata

Video

object.currentTime

object.isMuted

object:load()

object:pause()

object:play()

object:seek()

object.totalTime

WebView

object:back()

object.canGoBack

object.canGoForward

object:deleteCookies()

object:forward()

object.hasBackground

object:reload()

object:request()

object:stop()