http://stackoverflow.com/questions/10456040/how-to-swap-the-sprite-in-the-ccsprite-object-in-cocos2d-x


if(containsTouchLocation(pTouch)){

CCSprite* pScroll2 = (CCSprite*)(this->getChildByTag(105));

if( pScroll2 ){

CCIcon* icon = ((CCIcon*)pScroll2->getChildByTag(100));

if( icon ){

icon->setTexture(this->getTexture());

}

}

}

Posted by Нуеоп