A/D or ←/→ walk, and Space swings the sword. Break the barrels!
This demo shows how animations can run a character by themselves. The knight has three animated images: standing, walking, and attacking. Triggers on the walking image play a footstep on the two frames where a foot lands, and one on the attacking image checks for a hit on the frame where the sword is level. The attacking image's onComplete goes back to the standing image when the swing is over, and the explosion's onComplete removes it when it has played. The torches share one animated image, but each starts at a random frame (randomizeStartFrame), so they don't flicker in step.
See Triggers in the manual.