Hi Prof,

i been exploring the codes here for embedding the "blue object" into another vernier calipers applet.

i am puzzled how u make the blue object push the right internal jaw on both move together.

i can't locate the code for that "behavior".

chance to advise? thanks!

reference your codes under fixed constraints:
[code]if(ox < oxmin+w/2)ox=oxmin+w/2;
else if(ox > x+w)ox=x+w;

if(oy>oymax)oy=oymax;


if(topone){
if(x-x1>b)x=x1+b+0.2;
px[2]=px[1]=x0+2*a+b;
px[3]=px[4]=x0+a+b;
}

xdmin = ox+d+w/2;
if(oy > oymin && x < xdmin) x=xdmin;
if(x < x1)x=x1;
else if(x > x2)x = x2;



value=(x-x1)/ratio-0.05;
[/code]





and the blue object has no code ON DRAG;

how is "the blue object push the right internal jaw on both move together" done?