Playing Frames Backwards w/as

I’m making a new section tto my site and I’m adding a 3d object that rotates 1 way when you prees DOWN and the opposite when you press UP. I was made in Swift, so it is in frames. Basicly I want it so when the user presses down, it will play the frames normaly until it reaches a stop(); command and when down is pressed, it’ll play the frame backward until it reaches a stop(); command.