View Single Post
01-25-12, 09:18 PM   #13
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You don't actually need to specify a type for the animation:
lua Code:
  1. local timer = frame:CreateAnimationGroup()
  2.  
  3. local timerAnim = timerGroup:CreateAnimation()
  4. timerAnim:SetDuration(60) -- how often you want it to finish
  5.  
  6. timer:SetScript("OnFinished", function(self, requested)
  7.     -- requested = true if you used timer:Stop(), false if it finished naturally
  8.  
  9.     -- do stuff here
  10.  
  11.     self:Play() -- start it over again
  12. end)
  13.  
  14. timer:Play()
  Reply With Quote