Mc button doing a dance

Okay, all I’m trying to do is have my toggle play/pause mc button stay on the “triangular” play icon when it’s pressed and go back to the “II” icon when pressed again.

So far I’ve gotten the button to work. But I can’t get the visual states to stay. When I click it the triangle shows up, but just doesn’t stay down.

Am I supposed to apply actionscript inside the button? Or does the script applied to the button on the timeline? The code I have now, thanks o someone on this forum, is:

on (release) {
if (isPlaying) {
this.stop();
isPlaying = false;
}else{
this.play();
isPlaying = true;
}

}

do I need to apply this anywhere:

onClipEvent(load){
gotoAndStop(2);
}