El código que he puesto es :
stop();
var d:Number = 0;
var r:Number=0;
this.gancho.onPress= function(){
gancho.onEnterFrame= function(){
this.startDrag(true,346.4,222.3,(346.4+150),222.3);
embolo10._x= gancho._x-108.4;
d =gancho._x-346.4;
muelle._width=50+d;
muelle._x=124+d/2;
}
}
this.gancho.onRelease= function(){
gancho.onEnterFrame= function(){
this.stopDrag();
}
}
this.gancho.onRollOut= function(){
gancho.onEnterFrame= function(){
this.stopDrag();
}
}
this.onEnterFrame= function(){
r= Math.round((embolo10._x-237)*10)/10;
trace(r);
if(respuesta==r){
resul="correcto";
}else{
resul="incorrecto";
}
}