When expiring buffs flash, Blizzard doesn't use any animation functions, they just change the alpha every frame. Here's the complete math behind it if you want to try matching it with animations or just use it:
Lua Code:
function BuffFrame_OnUpdate(self, elapsed)
if ( self.BuffFrameUpdateTime > 0 ) then
self.BuffFrameUpdateTime = self.BuffFrameUpdateTime - elapsed
else
self.BuffFrameUpdateTime = self.BuffFrameUpdateTime + 0.2
end
self.BuffFrameFlashTime = self.BuffFrameFlashTime - elapsed
if ( self.BuffFrameFlashTime < 0 ) then
local overtime = -self.BuffFrameFlashTime
if ( self.BuffFrameFlashState == 0 ) then
self.BuffFrameFlashState = 1
self.BuffFrameFlashTime = 0.75
else
self.BuffFrameFlashState = 0
self.BuffFrameFlashTime = 0.75
end
if ( overtime < self.BuffFrameFlashTime ) then
self.BuffFrameFlashTime = self.BuffFrameFlashTime - overtime
end
end
if ( self.BuffFrameFlashState == 1 ) then
self.BuffAlphaValue = (0.75 - self.BuffFrameFlashTime) / 0.75
else
self.BuffAlphaValue = self.BuffFrameFlashTime / 0.75
end
self.BuffAlphaValue = (self.BuffAlphaValue * (1 - 0.3)) + 0.3
end
Then they use AuraButton#:SetAlpha(BuffFrame.BuffAlphaValue) in the individual OnUpdate functions for each icon if timeLeft < 31 seconds, which means all expiring buffs pulse in sync with each other.