The script is put inside a root link that is the swivel bar, the mesh door is the second link in the linkset.
The function is called as:
llSetKeyframedMotion(lKeyFramesOpening, [ KFM_DATA, KFM_ROTATION, KFM_MODE, KFM_FORWARD ]);
Where lKeyFramesOpening is a list generated like so:
// Rotation for most keyframes
rotation rRotation = llEuler2Rot(<0.0, 0.0, 15.0> * DEG_TO_RAD);
// First keyframe
lKeyFramesOpening += [ llEuler2Rot(<0.0, 0.0, 15.0> * DEG_TO_RAD), 3.0 ];
// Generating in-between keyframes
integer i = 1;
for(; i < 5; i++)
{
lKeyFramesOpening += [ rRotation, i * .2 ];
}
// Ending keyframe
lKeyFramesOpening += [ llEuler2Rot(<0.0, 0.0, 15.0> * DEG_TO_RAD), 0.6 ];
Object and full script can be sent upon request. See comments in the thread here for more info.