i am having this problem try to use the cocos2d CCScrollLayer
I have added the CCScrollLayer classes to my scene, and having this 3 problems: 1. it is not get touches 2.it puts the backgrounds (landscape) one on each other, like this: page1 is in place,but page2 is in top of half screen,so i see half page1 half page2. 3. the dotes in the buttom that show on which page i am right now- can i eliminate them,or move them to other place ?
thanks a lot.
code:
CGSize screenSize = [CCDirector sharedDirector].winSize;
// PAGE 1
CCLayer *page1 = [[CCLayer alloc] init];
BACK.position=ccp(screenSize.width/2 ,screenSize.height/2);
[page1 addChild:BACK];
// PAGE 2
CCLayer *page2 = [[CCLayer alloc] init];
BACK1.position=ccp(screenSize.width/2,screenSize.height/2);
[page2 addChild:BACK1];
// PAGE 3
CCLayer *page3 = [[CCLayer alloc] init];
BACK1.position=ccp(screenSize.width/2,screenSize.height/2);
[page3 addChild:BACK2];
CCScrollLayer *scroller = [[CCScrollLayer alloc] initWithLayers:[NSMutableArray arrayWithObjects: page1,page2, nil] widthOffset: 230];
// finally add the scroller to your scene
[self addChild:scroller];
and the source of the classes: