If and and statements

if and and statements
ok so what im doing is making a little face selector where you choose skin tone hair expression and clothing. Iv got it all coded but i have one little problem

some of the hairs are bigger than some of the hats.

All of the different hairstyles are on one movie clip. all the hats/outfits are on another etc…

i want to write some code that will tell it for example if you have the afro selected but you also have a hat selected then it puts the hair movie clip to the ‘afrowithhat’ frame

heres the code i’ve written…

if((bodymc==3)and(hairmc==3))
{
hairmc.gotoAndStop(6);
}

so thats saying if bodymc is on frame 3 which has a hat on, and hairmc is on frame 3, which is a large hair, itll change the frame of the hair mc to its equivelant that fits under the hat.

My code didnt work . can anyone see why?

Thanks in advance