# If and and statements

**URL:** <https://forum.kirupa.com/t/if-and-and-statements/286357>\
**Category:** Uncategorized\
**Created:** [April 14, 2009, 1:09pm UTC](https://forum.kirupa.com/t/if-and-and-statements/286357 "2009-04-14T13:09:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bboybeatle](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bboybeatle](https://forum.kirupa.com/u/bboybeatle)\
**Post date:** [April 14, 2009, 1:09pm UTC](https://forum.kirupa.com/t/if-and-and-statements/286357/1 "2009-04-14T13:09:15Z")

</div>

![](http://forum.kirupa.com/uploads/kirupa/525/d5236136df0858f4.gif) **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
