I know the animation system, I don't know if there are any guides for it but I could provide you with an example. I honestly couldn't tell you how I picked it up myself.
I
believe the animations you're talking about are contained in
ActionBarFrame.xml, specifically under "ActionBarButtonSpellActivationAlert".
The "ants" used for the proc animation is actually just a
texture that's displayed one section at a time sort of like a flip-book.
First you should look at
AnimationGroups (specifically
CreateAnimation) and the
Animation widget.
I'll try and provide a basic example here..
Lua Code:
local f = CreateFrame("Frame", nil, UIParent)
f:SetWidth(32)
f:SetHeight(32)
f:SetPoint("CENTER")
local tx = f:CreateTexture(nil, "BACKGROUND")
tx:SetAllPoints()
tx:SetTexture("interface/icons/inv_mushroom_11")
f.anigroup = f:CreateAnimationGroup() -- Create our animation group
f.spin = f.anigroup:CreateAnimation("Rotation") -- Rotation animation
f.spin:SetOrder(1) -- Play it first, only matters with multiple animations
f.spin:SetDuration(0.8) -- Spin for 0.8 seconds
f.spin:SetDegrees(720) -- Total amount of rotation in degrees
f.scale = f.anigroup:CreateAnimation("Scale") -- Scale animation
f.scale:SetOrder(1) -- Play it at the same time
f.scale:SetDuration(1) -- Take 1 second
f.scale:SetScale(5,5) -- Scale width and height to 500%
f.fade = f.anigroup:CreateAnimation("Alpha") -- Alpha animation
f.fade:SetOrder(2) -- Play after the first group
f.fade:SetDuration(0.5) -- Take 0.5 seconds
f.fade:SetChange(-1) -- Reduce alpha by a factor of 1 (like f:SetAlpha(f:GetAlpha-1))
f.fade:SetEndDelay(0.5) -- Wait 0.5 seconds after finishing before continuing
f.anigroup:SetLooping("BOUNCE") -- Repeat forward and backwards
f.anigroup:Play() -- Start our animation group