NinePatch n1 = new NinePatch(new Texture(
     Gdx.files.internal("pla.png")), 14, 14, 18, 18);
   slider = new Slider(0, min, 1f,
     new SliderStyle(n1, new TextureRegion(new Texture(Gdx.files
       .internal("btn_blue.png")), 0, 0, 100, 96)));
   slider.width = min;
   slider.setValueChangedListener(new ValueChangedListener() {
    
    @Override
    public void changed(Slider arg0, float arg1) {
    if(!sliderFinished&&slider.width==(int)arg1){
     sliderFinished=true;
     actvity.tg.setScreen(actvity.gs);
    }
     
    }
   });
   stage.addActor(slider);