@PartTimeCoder.... see what I was saying earlier? People will jump to forums and chatrooms with their questions instead of making the slightest effort to search for an answer themselves
@kebang... Look at your code. You are creating two sprites. You can't expect them to act as one sprite with different frames. There are commands, in the online help, which are going to take care of this for you. You can either animate them with AGK's own commands, or you can do like I do and code your own animation routine so you have more control over things. Both are completely valid. But you have to be willing to read some documentation and do some experiments by yourself at some point. In the last few days you've been posting daily about super basic things that you fully understand once we point you to the online help doc. I mean come on my man, you don't need us to point you at the help file every time
But in the interest of not being a total arse like I usually am...
What you want to do is have all your animation frames in a single image. It's what's usually referred to as an animation strip. Let's say your sprite is 50 pixels wide by 50 pixels high and has 5 frames of animation. You can just create a 250 pixels x 50 pixels image and store each frame of the animation next to one another. That way you can do this:
MyImage = LoadImage("MyAnimFile,png")
MySprite = CreateSprite(MyImage)
SetSpriteAnimation(MySprite, 50, 50, 5)
That will load your animation strip image. Then it will create a sprite with it. Then it will give you how big is each frame, and how many of them there are. In this case, 50x50, and 5 frames.
You can then set that sprite's animation frame using SetSpriteFrame(MySprite, FRAMENUMBER)
-----------------------------------------------------------------------------
We all got a chicken duck woman thing waiting for us