Play/Pause Button

I need to create a play/pause button that plays the timeline when clicked, then when clicked again, pauses the timeline. I’ve tried using a boolean variable to no success as well as an interger. (If var==5, then)

I’ve googled it and can’t find anything for AS3.
Thanks!