Nov 142011
 

Tip:

Quick tip to swap out the image of a sprite that has already been initialized with an image.

CCSprite *sprite = [CCSprite spriteWithSpriteFrameName@"oldImage.png"];
[sprite setDisplayFrame:[[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:@"newImage.png"]];
If you enjoyed this post, make sure you subscribe to my RSS feed!
 Posted by at 6:04 pm

  2 Responses to “Quick Tip: Swapping out CCSprite”

  1. Hi there! I just wanted to ask if you ever have any issues with hackers? My last blog (wordpress) was hacked and I ended up losing a few months of hard work due to no backup. Do you have any methods to prevent hackers? work from home uk http://ipanks.com/home-based-jobs-without-investment/

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>