don't write your code in a while loop!
your code shurly looks like this:
function my_camera()
{
while(1) {
camera.pan = player.pan + 90;
}
}
------ but you have to write it outside a loop like this
function my_camera()
{
camera.pan = player.pan + 90;
while(1) {
.........
....
...
}
}
IF you move your entity in all 3 dimensions the code for the camera will be longer. But there are some tutorials in the aum magazine.
I hope this all help you to write the right code

CU
Marcel