I use the cache to store the pictures, but every time it will run the mistake below:
CCSpriteFrameCache* cache = CCSpriteFrameCache::sharedSpriteFrameCache();
CCArray animFrames = CCArray::arrayWithCapacity;
char str[64] = ;
for
{
sprintf;
CCSpriteFrame frame = cache~~>spriteFrameByName; // why the frame is NULL? it seems spriteFrameByName does not work
animFrames~~>addObject(frame);
}
I have searched and it seems no guys have this problem?
mistake.png (10.1 KB)