Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to ask that I have a player in my game. I may walk. I have a image which has five different frames for walk and two frames for standing position. I want to ask that how can I change the images on runtime depending on the player state? I have loaded the image in tiledtextureregion. Also player can walk in forward and backward direction as well. How to use the same image strip for walking back and forth? I am new to andengine.

share|improve this question
up vote 4 down vote accepted

You can flip the texture like so: myTextureRegion.setFlippedHorizontal(true);

or by using the sprite

mySprite.setFlippedHorizontal(true); // set false to flip it back

Have you looked at AnimatedSprite class? AnimatedSpriteClass

You could google for examples. It's in the API

share|improve this answer
Yes. It you are right. It worked. Thanks... – Khawar Raza Aug 10 '12 at 11:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.