cocos2d Transition Issues – ” undeclared (first use in this function)

Just a short post. I was trying to get a simple transition working using some code similar to below this:

[[Director sharedDirector] replaceScene:[RotoZoomTransition transitionWithDuration:1.0 scene:[PlayScene node]]];

Oddly enough I was getting an error:

'RotoZoomTransition' undeclared (first use in this function)

Although it was really quite obvious, I didn’t see the issue and on searching the net I didn’t find much. Eventually I clicked that I was just not reading the error very carefully. Looking at transitions.h I quickly realized the names of the classes were now different.

The transition classes were renamed:
Old <–> New
CCXXXTransition <–> CCTransitionXXX
CCFadeTransition <–> CCTransitionFade

Just figured I would put it out there for anyone else who is missing the obvious 😉 For more information have a look here:

4 Replies to “cocos2d Transition Issues – ” undeclared (first use in this function)”

  1. Wow! thanks a bunch! I was going nuts trying to figure out why every example (including the examples on cocos2d’s webiste) werent working.

    1. 😉 Yeah, I was in the same boat, was driving me up the wall. There Is a lot of renaming in this version it seems (v0.99.5-beta3), so something to keep an eye out for.

  2. Thank you very much for your post. It helped me a lot when porting my code to Cocos 0.99.5 version.

  3. OMG Thanks so much!!!

    I was freaking out because I did’t know what was happening! Though it was a bug! Guess not. Thanks!

Comments are closed.