#include "std.mi"

Global Group   grpMain;
Global Group   grpButton;
Global Button  play;
Global Button  pause;

System.onScriptLoaded() {

	grpMain		= getScriptGroup();
        grpButton	= grpMain.findObject("PlayButton.Group");
        play		= grpButton.findObject("play");
        pause		= grpButton.findObject("pause");

        if (getStatus() == 1){

                play.hide();
        }
        else if (getStatus() == -1 || getStatus() == 0){

                pause.hide();
        }
}

system.onplay() {

        play.hide();
        pause.show();
}

system.onstop() {

        pause.hide();
        play.show();
}

system.onpause() {

        pause.hide();
        play.show();
}

system.onResume() {

        play.hide();
        pause.show();
}

