I would like to fade a texture in, and then out, like a splash - I did it a while ago but cannot remember how. Doesn't have something to do with animation?
Please advise.
I added the Lua below for reference, I am really unsure how to get this to fade in/out. (edit)
Lua Code:
local addonName, addonData = ...
local InstallerLogo = CreateFrame("Frame", addonName.."ILogo", UIParent);
InstallerLogo.texture = InstallerLogo:CreateTexture(nil, "HIGH");
InstallerLogo.texture:SetTexture("Interface\\Addons\\PawsUI\\Art\\Splash.tga");
InstallerLogo.texture:SetAllPoints();
InstallerLogo:RegisterEvent("PLAYER_ENTERING_WORLD");
InstallerLogo:SetScript("OnEvent", function(self,event,...)
self:SetSize(850, 480);
self:SetPoint("CENTER");
end)
InstallerLogo:SetMovable(true)
InstallerLogo:EnableMouse(true)
InstallerLogo:RegisterForDrag("LeftButton")
InstallerLogo:SetScript("OnDragStart", InstallerLogo.StartMoving)
InstallerLogo:SetScript("OnDragStop", InstallerLogo.StopMovingOrSizing)
-----------------------------------------------------
InstallerLogo.animation = InstallerLogo:CreateAnimationGroup()
local a1 = InstallerLogo.animation:CreateAnimation("Alpha")
a1:SetFromAlpha(0)
a1:SetDuration(1)
a1:SetToAlpha(1)
InstallerLogo.animation:SetToFinalAlpha(true)
This makes the Logo not visible but does not fade. Perhaps it does fade but is immediate?