for example
if(_root.bob.hitTest(_root.square)){
if(_root.bob.happy){
//if true do this
}else{
// if not do this
}
}