Working playPause and addFrame buttons