Probably stupid button problem

i created a button out of a still gif with a transparent part, but the transparent part is still in the button. what can i do to get the transparent part as not part of the button? i’ve tried masking, but it’s probably not the right object.