Code Animation Length?

Hello Unity3D.I have a question about my animations?Is there a way for me to code my animation length instead of using the clamp range method?For example,I have an animation that is only 7 frames but everytime i import an animation unity3D insist of making them 150 frames.But the animation is only 7 is there a way that i can code the animation to only be 7 frames?

So are you trying to stop the animation in a certain time? If so, you can use this:

var walk : Animation;
function Start  () {
    yield WaitForSeconds (7);    
    animation.Stop("walk");
}