rotation of pinball flipper

I am new to this and thought I would try my hand at pinball to help develop my knowledge but I can not get the flipper to move. (its been a steep cleaning curve but fun and frustrating at times)

I have set up a revolute joint in init function:
leftflip = new Box2D.Dynamics.Joints.b2RevoluteJointDef();
leftflip.Initialize(lflip, lflipball, lflipball.GetWorldCenter());
leftflip.upperAngle = 0.6;
leftflip.lowerAngle = -0.6;
leftflip.enableLimit = true;
leftflip.maxMotorTorque = 700.0;
leftflip.motorSpeed = 0;
leftflip.enableMotor = true;
leftflipper = physics.world.CreateJoint(leftflip);

I have tested the joint and it does move when things bounce off of it but I can not make it move when I want it to move using:

leftflipper.SetMotorSpeed = flipl; (located in the gameloop function)

flipl is a variable that would contain a value to rotate the paddle up or down depending on the keypress, the key press is being sense but the flipper does not move.

Can someone help me be a happy camper again and advice on what I am doing wrong....
What language is this? I'm guessing Javascript? SetMotorSpeed should be a function, so instead of assigning a value to it, you would call it like:

leftflipper.SetMotorSpeed( flipl );

Perhaps this is what you actually meant, in which case the only other thing I could think of is that maybe the flipper is too heavy to be budged by that torque. Make the max torque value really really high, and see if it has any effect.
Sorry, yes this is javascript

I have tried "leftflipper.SetMotorSpeed( flipl );" in the game loop as you have suggested but I get the following error message:

Uncaught TypeError: Object #<b2RevoluteJointDef> has no method 'SetMotorSpeed'

any ideas...
The joint def is only used to set up the joint, after that you should use the joint itself. In your code you have:

leftflipper = physics.world.CreateJoint(leftflip);

So the variable 'leftflipper' should be the joint itself, not the def. I have no idea how it could later become a b2RevoluteJointDef, maybe your variables are getting mixed up somewhere (would not surprise me given the similarity of naming 🙂
OK, left me amend the names to avoid confusion:

leftflip = new Box2D.Dynamics.Joints.b2RevoluteJointDef();
leftflip.Initialize(paddle, pivot, pivot.GetWorldCenter());
leftflip.upperAngle = 0.6;
leftflip.lowerAngle = -0.6;
leftflip.enableLimit = true;
leftflip.maxMotorTorque = 300.0;
leftflip.motorSpeed = 0;
leftflip.enableMotor = true;
physics.world.CreateJoint(leftflip);

pivot = static dot to fix the paddle to
paddle = dynamic object that rotates around the pivot

so you are saying that i need to use
leftflip.SetMotorSpeed( speedvariable );

to amend the speed, unfortunately I can not get this to work. this produces the error still of:
Uncaught TypeError: Object #<b2RevoluteJointDef> has no method 'SetMotorSpeed'
No, because leftflip is the def, so I am saying exactly the opposite. After you create the joint, you don't use the def for anything. How about calling things xxxDef and xxxJoint, to keep everybody sane...

leftflipDef = new Box2D.Dynamics.Joints.b2RevoluteJointDef();
leftflipDef.Initialize(paddle, pivot, pivot.GetWorldCenter());
leftflipDef.upperAngle = 0.6;
leftflipDef.lowerAngle = -0.6;
... etc etc
leftflipJoint = physics.world.CreateJoint(leftflipDef);

Now, forget about leftflipDef, you don't need it any more.

// ... later
leftflipJoint.SetMotorSpeed( speedvariable );

Original thread: https://box2d.org/forum/viewtopic.php?t=9244