1. #1
    Deleted

    [Lua]: Creating an AnimationGroup to be inherited

    Hi,

    I want to create an animation group like this:

    Code:
    f.fadeOut = f:CreateAnimationGroup(nil, "MY_FadeOutTemplate");
    where f is a Frame. However I get this Lua error:

    :CreateAnimationGroup(): Couldn't find inherited node "MY_FadeOutTemplate"

    My XML file looks like this:

    Code:
    <Ui xmlns="http://www.blizzard.com/wow/ui/">
    	<AnimationGroup name="MY_FadeOutTemplate">
    		<Alpha change="-1" duration="0.3" />
    		<Translation offsetX="0" offsetY="10" duration="0.3" />
    		<Scripts>
    			<OnPlay>
    				print("play")
    			</OnPlay>
    			<OnFinished>
    				self:GetParent():Hide();									
    			</OnFinished>
    		</Scripts>
    	</AnimationGroup>
    </Ui>
    It never plays when it is triggered to do so (the execution is not the problem. I simply use f.fadeOut:Play()). I didn't think AnimationGroup's support the "virtual" attribute but I tried that anyway and that didn't work.

    Can anyone help me out?
    Thanks!

    EDIT: http://wowprogramming.com/docs/widge...AnimationGroup

    Shows: animationGroup = Region:CreateAnimationGroup(["name" [, "inheritsFrom"]])

    so it can inherit from something but I don't know if AnimationGroup's can be inherited, and if so how?

    - - - Updated - - -

    EDIT: I think this is a Blizzard bug as AnimationGroup's do not seem to be able to be inherited even though there is an argument for it!

    I would still love to hear an explanation BUT..

    I got around this by creating a virtual Frame containing the animation group and inheriting that instead with the CreateFrame function but I don't understand how the CreateAnimationGroup's "inheritsFrom" parameter works because as far as I know you cannot inherit an AnimationGroup directly and have never seen anyone ever attempt to use this parameter like I have tried to do. Also there are no examples to learn from
    Last edited by mmoc2c0e080e79; 2015-06-24 at 04:52 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •