Animation scripting

Hi, I'm thinking of making a combo animation in 3ds max and having 2 or three different animations in one. That way all I have to do is tell it to play that part of the animation. The only problem is I dont know how to script that.

How would I say

if(idleState)
{
 animation.Play(frames 0-25);
 Loop back to frame 0 after 25 is done;
}

The proper way?

Thank you!

I figured it out (with help) but I'm using the modelName@AnimationName technique. I now have another (related) question: if I have this:

 Object@idle
Object@walk
Object@fly

In my project, and another animation-less "Object" and I put that in my scene, in the script attached to that, would I say

animation.Play(idle);
animation.Play(walk);

Etc.? If not, how is that scripted?

split the combined animation into named pieces you can refer to in your script.

Unity Manual > User Guide > Asset Import and Creation > Animations