im gets an EXC_BAD_ACCESS error on this line.
[(CCMenuItemSprite *) [profileSelectionMenu getChildByTag: 333] setNormalImage: normalSprite3];
Basically, I'm just trying to change the normal CCMenuItemSprite image. normalSprite3 and selectedSprte3 are CCSprite. and I removed the properties to save them, but it still always crashes on the above line. Is there an easier way to do what I'm trying to accomplish? basically, set the button to switch? and it changes the image every time you press
normalSprite3 =[CCSprite spriteWithFile:@"main_menu_button.png"];
selectedSprite3 =[CCSprite spriteWithFile:@"main_menu_button_select.png"];
profile3MenuItem = [CCMenuItemImage itemFromNormalSprite:normalSprite3 selectedSprite:selectedSprite3
target:self
selector:@selector(P3:)];
[profile3MenuItem setTag:333];
[(CCMenuItemSprite*)[profileSelectionMenu getChildByTag:333] setNormalImage:normalSprite3];
Thanks for any help G
source
share