Play and Pause button [video player], need help!

I have a problem with building a video player.
I managed to create the slider, forward and backward buttons, but I have a problem with the play and pause buttons.

I want it to work this way, the default should be the pause button because the movie will play automatically. If the user drag the slider or hit the back/forward button the movie will stop and the button will change to play symbol again… then if the play button is hit, the movie will play again and it will change into the pause button again.

click here to download the file

feel free to modify the script.

Thank you so much