Files
Basalt/docs/docs1_6/objects/Animation/onStart.md
Robert Jelic d4c72514ef Docs 1.6
Accidentally uploaded outdated 1.6 docs
2023-05-01 16:28:46 +02:00

471 B

onStart

onStart(self)
This is a event which gets fired as soon as the animation is started.

local basalt = require("Basalt")

local mainFrame = basalt.createFrame()
local testButton = mainFrame:addButton("buttonToAnimate")
local aAnimation = mainFrame:addAnimation():setObject(testButton):changeTextColor({colors.red, colors.yellow, colors.green}, 2)
aAnimation:onStart(function()
    basalt.debug("The animation is started")
end)

aAnimation:play()