Sprite Animation Basics - using AnimatedSprite

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mydoghasworms
:warning: Old Version Published before Godot 3 was released.

I am new to Godot and trying to learn how to use AnimatedSprite.

I have gone through the step-by-step tutorial that shows the use of AnimationPlayer (http://docs.godotengine.org/en/stable/tutorials/step_by_step/animations.html).

I have also used the following tutorial that shows using a script on an AnimatedSprite to cycle through the images: Godot Engine Tutorial Part 9-Sprite Animation – GameFromScratch.com

Then, while editing the animation frames, I also noticed that there are settings for creating animations where you can specify the speed, which led me to believe that this could possibly be an automatic thing (see screenshot). However, this by itself seems to do nothing when playing the scene.

Which of these approaches is the correct / default / simplest?

enter image description here

:bust_in_silhouette: Reply From: mydoghasworms

Never mind. I have just found what I was looking for.

In the Inspector tab on the AnimatedSprite, there is a property called “Playing”. When set, this causes the animation to flow. And I see now that there is a property called “Animation” which specifies the current animation being played, so you can obviously switch it with code, which is brilliant!

enter image description here