Better to go the route of doing Spine2D animations then leverage a real game engine like Godot or Unity and load the animations there.
But then you're essentially back to "traditional game development" which is very different from what you could do with Macromedia's Flash back in the day.