stopallsounds(); set(VM,1);
set(plugin[sound_on].visible,false);
set(plugin[sound_off].visible,true);
playsound(sound1,mp3filetoplay.mp3,1,set(plugin[sound_on].visible,true);set(plugin[sound_off].visible,false);set(plugin[sound_on].onhover,showtext(Play sound));set(plugin[sound_on].onclick,playsound1();); tween(plugin[slider_bg].alpha,0,0.2,null, set(plugin[slider_bg].visible,false);););
mul(alphaa,get(style[button].alpha),2); div(alphab,get(style[button].alpha),1.5); set(plugin[slider_grip].alpha,get(alphaa)); div(alphac,get(alphaa),3);
set(plugin[slider_bg].align,get(style[button].align)); set(plugin[slider_bg].edge,get(plugin[sound_off].edge)); set(plugin[slider_bg].zorder,get(style[button].zorder));
add(Bx,get(style[button].x),get(style[button].width)); add(Sx,Bx,5); set(plugin[slider_bg].x,get(Sx)); set(plugin[slider_bg].y,get(style[button].y)); mul(Sw,get(style[button].width),5); set(plugin[slider_bg].width,get(Sw)); set(plugin[slider_bg].height,get(style[button].height));
mul(Gx,get(plugin[slider_bg].width),0.89); set(plugin[slider_grip].x,get(Gx));
set(plugin[sound_on].visible,false); set(plugin[sound_off].visible,true); resumesound(sound1); tween(soundinterface.volume,get(VM),1,easeInQuint);
set(plugin[sound_off].visible,false); set(plugin[slider_bg].visible,false); set(plugin[sound_on].visible,true); set(plugin[sound_on].onhover,showtext(Resume sound)); set(plugin[sound_on].onclick,resumesound1();); tween(soundinterface.volume,0,1,easeOutQuint, pausesound(sound1) );
set(plugin[slider_grip].alpha,get(alphac));
set(plugin[slider_grip].onhover,showtext(-,invisiblestyle));
set(plugin[slider_grip].backup_align, get(plugin[slider_grip].align));
set(plugin[slider_grip].backup_edge, get(plugin[slider_grip].edge));
plugin[slider_grip].changeorigin(lefttop,lefttop);
sub(mouse_x_offset, plugin[slider_grip].x, mouse.x);
sub(mouse_y_offset, plugin[slider_grip].y, mouse.y);
set(image_dragging,true);
dragslider();
set(image_dragging, false); set(plugin[slider_grip].alpha,get(alphaa)); set(plugin[slider_grip].onhover,);
if(image_dragging,
add(xpos, mouse.x, mouse_x_offset);
mul(xmax, plugin[slider_bg].width,0.9);
if(xpos LT 0, set(xpos,0));
if(xpos GT xmax, copy(xpos,xmax));
copy(plugin[slider_grip].x, xpos);
div(VM, xpos, xmax);
setvolume(get(VM));
if(VM == 0, set(plugin[sound_off].crop,0|0|50|80););
if(VM GT 0.15, set(plugin[sound_off].crop,50|0|50|80););
if(VM GT 0.4, set(plugin[sound_off].crop,100|0|50|80););
if(VM GT 0.7, set(plugin[sound_off].crop,150|0|50|80););
delayedcall(0.01, dragslider() );
,
plugin[slider_grip].changeorigin(get(plugin[slider_grip].backup_align), get(plugin[slider_grip].backup_edge));
);
set(soundinterface.volume,%1)