12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 29 ■ Widget <strong>Reference</strong> 1239animation = AnimationGroup:CreateAnimation(“animationType“ [,i“name“ [, “inheritsFrom“]])Arguments:animationType—Type <strong>of</strong> Animation object to be created (see widgets hierarchy<strong>for</strong> available subtypes) (string)name (optional)—Global name to use <strong>for</strong> the new animation (string)inheritsFrom (optional)—A template from which to inherit (string)Returns:Finishanimation—The newly created animation (animation)Causes animations within the group to complete <strong>and</strong> stop.AnimationGroup:Finish()If the group is playing, animations will continue until the current loop cycle iscomplete be<strong>for</strong>e stopping. For example, in a group which manages a repeatingfade-out-fade-in animation, the associated object will continue to fadecompletely back in, instead <strong>of</strong> the animation stopping <strong>and</strong> the object instantlyswitching from partial opacity to full opacity instantly. Does nothing if thisgroup is not playing.To instantly stop an animation, see AnimationGroup:Stop().GetAnimationsReturns a list <strong>of</strong> animations belonging to the group.... = AnimationGroup:GetAnimations()Returns:...—A list <strong>of</strong> Animation objects belonging to the animation group(list)GetDurationReturns the duration <strong>of</strong> a single loop cycle <strong>for</strong> the group, as determined by itschild animations.duration = AnimationGroup:GetDuration()Total duration is based on the durations, delays <strong>and</strong> order <strong>of</strong> child animations;see example <strong>for</strong> details.Returns:duration—Total duration <strong>of</strong> all child animations (in seconds)(number)Example:-- contains two animations which are implicitly ordered, so-- group duration is the sum <strong>of</strong> the animation durations: 1.6 sec

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!