Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-22-11, 03:13 PM   #1
Rugguggla
A Murloc Raider
Join Date: Dec 2011
Posts: 4
Showing a picture :S

Hi guys!

Ive googled lots of examples on how to create a Frame that contains a texture in xml, then calling it for when i want it to be shown in the lua.

Im using Addon Studio and got the mp3 files to play, but at the same time i want to show a picture for about 5 seconds.

Heres my xml:
Code:
<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
	<Texture name="Texture1" file="Interface\AddOns\Consuela\consuela.png">
		<Size>
			<AbsDimension x="127" y="136" />
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset x="567" y="-3" />
			</Anchor>
		</Anchors>
	</Texture>
</Ui>
And heres the lua:
Code:
local frame = CreateFrame("FRAME", "combatAddonFrame");
frame:RegisterEvent("PLAYER_REGEN_DISABLED");
local function eventHandler(self, event, ...)
 	PlaySoundFile("Interface\\AddOns\\Consuela\\comeget.mp3");
end
frame:SetScript("OnEvent", eventHandler);

local frame = CreateFrame("FRAME", "deathAddonFrame");
frame:RegisterEvent("PLAYER_DEAD");
local function eventHandler(self, event, ...)
 	PlaySoundFile("Interface\\AddOns\\Consuela\\pledge.mp3");
end
frame:SetScript("OnEvent", eventHandler);
Ive tried to call the Texture1:Show() which should show the texture defined in the xml file?

Any tips?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Showing a picture :S


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off