Fighting game

hey y’all, i need some help with actionscript, im making a game for a site and i need to kno… well, how do u make one punch button, but when ur facing the other way it punches that way…

i think i need and if(frame=27) for example, but i dunno the code for the if frame is code

all help is appreciated, thx