You have the
loop object command inside your loop, you don't need to call it every time like that, it just restarts the animation from the first frame.
You also seem to have a problem with which frames your trying to play.
I'm also sure u don't need to declare variables (i.e
x as float) mid loop either, just once at the beginning, before the loop.
Indent your code as well, to make it neater and easier to read, and don't forget to comment stuff so people can tell what bits sposed to do what. (This is good practice in case you ever leave a project and come back to it later)
and please use code tags
Good effort tho
Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@