Animations and sprite changes

How would one set a different sprite for different actions the character is doing, and how would I best be able to specify those various actions in code. Ie jumping

How would I set multiple animations to one action and have them stop properly

Example code much appreciated

@Dezmo Do a forum search for sprite sheets.

@Dezmo If you want, you can look at my program in this forum, lemmings, it’s made entirely with sprites

And for more than you ever wanted to know, I’m up to 255 articles about building a dungeon crawl program: https://ronjeffries.com/categories/dungeon/