problem with animating the camera

I’m creating a game in which you can’t move the camera in realtime, but rather make it move in a predefined course whenever the player clicks on an arrow (sort of like in an on-rails shooter). What I set off to do was create an animation for each course I want my camera to move in. The first animation went perfect, the camera went from point a to point b and stayed there, but when I clicked on the next arrow, to move the camera to it’s next location, the camera did the animation but immediately went back to it’s starting position.
This is the code I’m using:

var myCamera: GameObject;
var animName: String;

function OnMouseDown() {
		myCamera.animation.Play(animName);
}

I tried to make it as generic as possible so I can use the same code on all the arrows, and just changing the animation name, so perhaps the problem is here.
Any help will be appreciated

Perhaps you had the animation set to be looping? In this case, I believe it is possible that the camera would return to its starting position as a final frame intended to create a seamless loop.

Well, if that’s what happened than I have no idea how I did it.
Any ideas?