How to change flipbook after keypress "x"

hi im developing small size 2D platform game. i have problem for shooting

i want to change flipbook after press “x” key and return before flipbook after 3secs. i tried something but i didn’t success :confused: