Announcement

Collapse
No announcement yet.

mute btn

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mute btn

    I use the below script for my mute button. when i turn mute on, sound is off, but when i try to turn it off again, only the image changes and sound is still off...

    ???

    PHP Code:
    MuteBtn.onLeftButtonUp(int xint y) {
        if (!
    Muted) { //If it isn't muted, mute it now
        //gets current volume, then sets volume to 0
            
    MuteBtn.setxmlparam("image","player.Mute.active");
            
    VolumeLevel System.getVolume();
            
    System.setVolume(0);
            
    Muted 1;
        } else { 
    //unmute
        //set volume to the value saved before
            
    MuteBtn.setxmlparam("image","player.Mute.off");
            
    System.setVolume(VolumeLevel);
            
    Muted 0;
        } 

  • #2
    um try first replacing:

    System.setVolume(VolumeLevel);

    with:

    System.setVolume(255);

    see if it does change the volume. if it does, then the VolumeLevel variable is the problem.

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎