On certain occasions you may need to flip the sprite you are using in your application.
There are two ways to flip a sprite. Let’s see how this can be done along X-direction

mySprite.flipX = 180;

where mySprite is the name of your sprite you want to flip.


CCFlipX *flipOnX = [CCFlipX actionWithFlipX:YES];
[mySprite runAction:flipOnX ];

where mySprite is the name of your sprite & flipOnX is the name of the CCFlipX action.

🙂 . You can try the Y-direction your own!


One Comment

  1. R yan March 19, 2012 at 1:40 pm

    How do I make a flip animation by the way


Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.