I am trying to draw one sprite from atlas.. I created with Zwoptex the atlas and the plist file. put the two files in the assest folder..
In the code I create new GameScene class
and try to load it..
//Return the ShareFrameCache object.
CCSpriteFrameCache frameCache = CCSpriteFrameCache.sharedSpriteFrameCache();
//Loading the list of frames from the list file.
frameCache.addSpriteFrames("level1.plist");
//Testing and see if I can load one frame to a sprite
CCSprite sprite = CCSprite.sprite("Screen_01_0029_BG_01-0.png");
//Set the position of the frame to the middle of the screen
sprite.setPosition(CGPoint.ccp(winSize.width/2,winSize.height/2));
//add the sprite as child so it can be seen on the phone.
addChild(sprite,0);
In the debugger I am getting these errors:
04-28 12:45:31.662: WARN/System.err(1147): java.io.FileNotFoundException: level1.png 04-28 12:45:32.642: WARN/System.err(1147): java.io.FileNotFoundException: Screen_01_0029_BG_01-0.png 04-28 12:45:32.622: ERROR/CCSpriteFrameCache(1147): Unsupported Zwoptex plist file format.
Screen_01_0029_BG_01-0.png refers to one of the frames in the level1.png atlas...
Thoughts ?
ER