Hi all im getting a EXC_BAD_ACCESS error on this line.
[(CCMenuItemSprite*)[profileSelectionMenu getChildByTag:333] setNormalImage:normalSprite3];
Basically im just trying to change the normal image of a CCMenuItemSprite. normalSprite3 and selectedSprte3 are both CCSprite. and i set the properties off them to retain but it still always crashing on the above line. Is there an easier way to do what im trying to accomplish? basically set the button to be a toggle button? and it changes image everytime it is pressed
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