title: Cocos2dx : How to stop CCFollow moving the ParallaxNode and making background black
body: <p>I am trying to follow my heroSprite using CCFollow, but there are two erratic behaviors that are happening . </p>
  
  <p>I am making the camera follow my sprite as follows :</p>
  
  <blockquote>
    <p>startSprite = CCSprite::createWithSpriteFrameName("santa_001.png"); 
    startSprite->setPosition(ccp (size.width / 5 , size.height / 2 ));
    this->addChild(startSprite,1);
    <strong>this->runAction(CCFollow::create(heroSprite, CCRectMake(0, 0, size.width, size.height * 2)));</strong></p>
  </blockquote>
  
  <p>Now, what happens is : </p>
  
  <p><strong>a) The background Parallax Node consisting of different sprites and moving at different speed are also moving in "upward" direction when the heroSprite jumps upward. I want to keep this sprites at their original position and not move upward with the heroSprite. How do I do that ?</strong></p>
  
  <blockquote>
    <p>voidNode = CCParallaxNodeExtras::node();</p>
    
    <p>voidNode->addChild(pSpriteGrass, 2, ccp(3.0f,0), ccp(0,
    size.height/10 - 50) );<br>
    voidNode->addChild(pSpriteGrass02, 3,
    ccp(3.0f,0), ccp(size.width - 10 , size.height/10 - 50) );
      voidNode->addChild(pSprite, 1, ccp(1.0f,0), ccp(0, size.height/10 -
    50) );    voidNode->addChild(pSprite02, 0, ccp(1.0f,0), ccp(size.width -
    10, size.height/10 - 50) );</p>
    
    <p>voidNode->addChild(pSpriteSky02, 0, ccp(0.6f,0), ccp(0, size.height
    /2 + 75) );   voidNode->addChild(pSpriteSky, 1, ccp(0.6f,0),
    ccp(size.width, size.height /2 + 75) );</p>
    
    <p>voidNode->addChild(pSpriteStars, 2, ccp(2.0f,0), ccp(0, size.height -
    110) );   voidNode->addChild(pSpriteStars02, 3, ccp(2.0f,0),
    ccp(size.width - 10, size.height - 110) );</p>
    
    <p>voidNode->addChild(pSpriteClouds, 4, ccp(1.2f,0), ccp(0, size.height
    - 110) );     voidNode->addChild(pSpriteClouds02, 5, ccp(1.2f,0), ccp(size.width - 10, size.height - 110) );</p>
    
    <p>CCActionInterval* go = CCMoveBy::create(25, ccp(-1000,0) );
        CCSequence* seq = CCSequence::create(go, NULL);
        voidNode->runAction( (CCRepeatForever::create(seq) ));</p>
  
  <pre><code>this-&gt;addChild( voidNode, 0 );
  </code></pre>
  </blockquote>
  
  <p><strong>b) When the hero moves upward, the screen which is initialized with white color turns black for sometime when the heroSprite is jumping. When it comes down the screen becomes white again. How do I make the upward portion of the screen white as well ?</strong></p>
  
  <blockquote>
    <p>CC_BREAK_IF(! CCLayerColor::initWithColor( <strong>ccc4(255,255,255,255)</strong> ) );</p>
  </blockquote>
  
  <p>Any suggestions or pointers would be helpful . Thanks</p>
  
  <hr>
  
  <p><strong>UPDATE FOR PART B :</strong></p>
  
  <p><strong>Through "Smugbit Studios" suggestion, I changed</strong> </p>
  
  <blockquote>
    <p><strong>initWithColor:ccc4(255,255,255,255);</strong></p>
  </blockquote>
  
  <p><strong>to</strong> </p>
  
  <blockquote>
    <p><strong>initWithColor(ccc4(255, 255, 255, 255), size.width, size.height * 2);</strong></p>
  </blockquote>
  
  <p><strong>and it solves my problem . I am still looking to solve answer part a .</strong></p>