Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7738369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:14:47+00:00 2026-06-01T08:14:47+00:00

i am having this problem try to use the cocos2d CCScrollLayer I have added

  • 0

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:

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T08:14:48+00:00Added an answer on June 1, 2026 at 8:14 am

    Answers to your three questions:

    1. Put a breakpoint in CCScrollLayer’s ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event to make sure it isn’t receiving touches.
    2. CCScrollLayer overlaps the layers intentionally. If you want just one layer on the screen at a time, increase the scrollWidth_ property’s value of CCScrollLayer. Otherwise, you’re going to have to shrink your background images so they don’t overlap.
    3. I suggest editing the CCScrollLayer class to remove or move the dots.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having this problem and I reached a deadlock, I would try anything I've
I'm having this problem, same as ever, but never try to find the right
So i'm having this problem. I have two tables (Oracle), one is called Destination
Hey dudes.i am having this problem while symlinking. I have successfully deployed a ruby
I keep on having these same two problems. I have been trying to use
I have been having this problem in IE. I have two divs which I
I am having difficulty to explain this problem, but I will try anyway. I
So I searched and couldn't find anyone else having this problem: When I try
I'm having a really difficult time debugging this problem. Whenever I try to establish
I have been having this problem wherein my threads stop execution and go into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.