I've implemented the 'ants' animation and the glow via single textures in
http://www.wowinterface.com/download...4-BABBars.html as using an animation was not possible.
Don't know if it helps, but it looks like this: (the textures are attached to this post)
Lua Code:
--adding textures for ants/glow
local tGlow = _G[Button:GetName().."Glow"] or Button:CreateTexture(Button:GetName().."Glow","OVERLAY")
tGlow:SetTexture("Interface\\AddOns\\BAB\\textures\\IconAlertGlow.tga")
tGlow:ClearAllPoints()
tGlow:SetPoint("TOPLEFT", Button, "TOPLEFT")
tGlow:SetPoint("BOTTOMRIGHT", Button, "BOTTOMRIGHT")
tGlow:SetDrawLayer("OVERLAY", 2)
tGlow:Hide()
local tAnts = _G[Button:GetName().."Ants"] or Button:CreateTexture(Button:GetName().."Ants","OVERLAY")
tAnts:SetTexture("Interface\\AddOns\\BAB\\textures\\IconAlertAnts1.tga")
tAnts:ClearAllPoints()
tAnts:SetPoint("TOPLEFT", Button, "TOPLEFT")
tAnts:SetPoint("BOTTOMRIGHT", Button, "BOTTOMRIGHT")
tAnts:SetDrawLayer("OVERLAY", 2)
tAnts:Hide()
--updating the ants if _G[Button:GetName().."Ants"] is visible
do
local f = CreateFrame("Frame", "BABMain", UIParent)
f:SetScript("OnUpdate", function(...)
for btni, btnv in pairs(Buttons) do
if _G[btnv:GetName().."Ants"] then
local tAnts = _G[btnv:GetName().."Ants"]
if tAnts:IsVisible() then
if not tAnts.Step then
tAnts.Step = 1
tAnts.StepTime = GetTime()
end
if GetTime() - tAnts.StepTime > 0.025 then
tAnts.Step = tAnts.Step + 1
if tAnts.Step > 22 then
tAnts.Step = 1
end
tAnts:SetTexture("Interface\\AddOns\\BAB\\textures\\IconAlertAnts"..tAnts.Step..".tga")
tAnts.StepTime = GetTime()
end
end
end
end
end)
end