hi , i have a movie with a volume knob as a master volume , and it works good for one version , but not in the final version …
when the user clicks the lower right of the knob , it will " jump " to that position , bypassing the user’s “drag” and therefore making it very jerky and unprofessional .
i have this code , i was wondering ifanyone could help me so that only “drags” are recognized ? :
Action script :
/*
set maximum rotation of the knob.
read initial volume of sound and set corresponding position of knob.
/
onClipEvent(load){
//maximum angle of rotation for the knob
maxRotAngle = 120;
//read the initial volume & set the position of the knob
this.rotbutton._rotation = (2_root.s.getVolume() - 100)maxRotAngle/100;
//read the initial pan and set the position of the knob
//this.rotbutton._rotation = _root.s.getPan() * maxRotAngle/100;
}
/
set the volume depending on the position of the knob
use forumla to convert _rotation into volume or pan range
/
onClipEvent(enterFrame){
if (rotbutton.dorotate) {
_root.s.setVolume(Math.floor((100+this.rotbutton._rotation/maxRotAngle100)/2));
//_root.s.setPan(Math.floor((this.rotbutton._rotation/maxRotAngle*100)));
}
//update readouts…
_root.sovolume = _root.s.getVolume();
_root.dialangle = this.rotbutton._rotation;
}