View Single Post
Unread 10-05-08, 08:35 AM   #29
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Originally Posted by Caellian View Post
One question, i would like to have my experience bar to show but only when i mouseover it.
end[/code]
I don't know the code for your .Experience, so I'm just assuming it's a frame. The following will make it appear/disappear when you hover it:
Code:
self.Experience:SetScript('OnEnter', function(self) self:SetAlpha(1) end)
self.Experience:SetScript('OnLeave', function(self) self:SetAlpha(0) end)
You will have to use the OnEnter/OnLeave handler on the frame if you want it to show/hide when you enter the unit frame as a whole however. The above will only work for when you hover the position for the actual frame. You should also use :Hide/:Show in that case, and not :SetAlpha.
haste is offline