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

  • Home
  • SEARCH
  • 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 7541421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:53:15+00:00 2026-05-30T07:53:15+00:00

I am using cocos2d on my app. I am doing a transition to another

  • 0

I am using cocos2d on my app. I am doing a transition to another scene using

[[CCDirector sharedDirector] replaceScene: 
 [CCTransitionFadeDown transitionWithDuration:0.5f scene:otherScene]];

On the init part of this other scene, a menu is being built, using CCMenu. This is a full screen menu.

My problem is this: the transition happens to a black screen and then the menu appears. In other words, the transition is being done before the menu is rendered, so, I see an ugly black screen for 0.5 seconds and then, after the transition is done, I see the menu.

To make things clear imagine the first scene has a picture of a boat and the second scene a picture of a car. What I have now is the boat transitioning to black and then the car pops. I need the boat transition to the car.

how do I do that? thanks.

NOTE: I have found this guy with the same problem, but I have tried that solution without success.

  • 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-05-30T07:53:17+00:00Added an answer on May 30, 2026 at 7:53 am

    I have implemented a transition in my menu (same problem), call it ‘fadeInView’ by adding a black layer on top of everything in the init, with an opacity of 255, and in onEnter I run an action to fade the opacity to 0. as follows:

    -(id) init {
        self=[super init];
        if(self){
            // do your stuff
            blackShroudLayer_=[CCLayerColor layerWithColor:ccc4(0, 0, 0, 255) width:K_SCREEN_WIDTH height:K_SCREEN_HEIGHT];
            [self addChild:blackShroudLayer_ z:500];
        }  
        return self;
    }
    
    -(void) onEnter{
    
        // need to [super onEnter] first to that we are running 
    
        [super onEnter];
        id sh = [CCFadeTo actionWithDuration:K_FADE_TIME opacity:0];
        id seq = [CCSequence actions:sh,[CCCallFunc actionWithTarget:self selector:@selector(onUnshroudComplete)], nil];
        [blackShroudLayer_ runAction:seq];
    }
    
    -(void) onUnshroudComplete{
         [blackShroudLayer_ removeFromParentAndCleanup:YES];
    }
    

    the constants and blackShroudLayer_ are defined in the class .h file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to develop a iphone app by using cocos2d. I create a
I am doing my program in cocos2d. I am using NSDate to get the
In Cocos2d, I have read that [[[[CCDirector sharedDirector] openGLView] window] addSubview:someButton]; will add a
I'm making an accelerometer-based app using cocos2d, and I noticed that it's possible to
I am developing an iPhone app using cocos2d and box2d.In this app i require
I'm developing an app using cocos2d and box2d phisycs. I whant to make my
I'm using Box2D on my iPhone app using Cocos2D. I'm using mouse joint to
Hi all im working on an ipad app using cocos2d objective c and box2d.
I am writing an app for the iPhone using cocos2d where I have 4
I am writing an app for the iPhone using cocos2d where I have 4

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.