I managed to get it working using the current focal length key, I had the minimum and maximum set to the same amount on the camera so when I changed the value in the key it made no difference, I just changed the cameras minimum and maximum to incorporate the values needed in my shots and it is now working.
Thankyou