Search code examples
iosanimationcocos2d-iphoneccsprite

Fade through image in CCSprite?


Is it possible to fade through the images in a CCSprite? Currently I only know its possible to fade through objects in Cocos2D but I wasn't sure if this was possible or not. Is there any way to do this?

Thanks!


Solution

  • Well, you can use CCFadeOut to remove your current image, while, at the same time, create your new sprite at the same position with opacity 0, and make it fade in with CCFadeIn. If you do it at the same time, you should get a nice effect.