UIHANDLER OnFinished

From Warcraft Wiki
Jump to navigation Jump to search

The OnFinished handler is called when an Animation or AnimationGroup is finished.

Arguments

self
the Animation or AnimationGroup that finished
requested
true if the Animation or AnimationGroup finished because of a call to self:Finish(), false otherwise

Example

local fadeout = myFrame:CreateAnimationGroup()
local anim = fadeout:CreateAnimation("Alpha")
anim:SetDuration(.5)
anim:SetChange(-myFrame:GetAlpha())
anim:SetOrder(1)
fadeout:SetScript("OnFinished", function() myFrame:Hide() end)