I am trying to scale a background sprite (which uses a larger size image resource) to a lower size but unable to do that.
I am doing it as follows :
CCSprite *splashSprite =CCSprite::spriteWithFile("splashscreen.jpg");
splashSprite->setPosition(ccp(240, 150));
splashSprite->setScale(0.5f);
But sprite remains its original size. No change. Please help.
you can do this way . it works
CCSprite* splashSprite= CCSprite::create("splashscreen.png");
splashSprite->setPosition(ccp(240, 150));
splashSprite->setScale(0.5f);
this->addChild(splashSprite, 0);