I am using the following code to switch from Helloworld Scene to levelmenu scene.
NSString *st=[NSString stringWithFormat:@"levelmenu"]; CCTransitionFade *trans=[CCTransitionFade transitionWithDuration:0 scene:[NSClassFromString(st) scene]]; NSLog(@" before replaceScene"); [[CCDirector sharedDirector] replaceScene:trans]; NSLog(@" after replaceScene");
I have put an NSlog in levelmenu init also, But I am getting the console output as.....
2011-03-29 10:16:24.307 testProject[6574:207] init levelmenu 2011-03-29 10:16:24.787 testProject[6574:207] before replaceScene 2011-03-29 10:16:24.787 testProject[6574:207] after replaceScene 2011-03-29 10:16:24.860 testProject[6574:207] dealloc
Can we change the order of calling above sequence, i.e after calling dealloc of menu init of levelmenu should be called.