Importing animations using a single model containing all animations

I have a single model containing all animations, not multiple model files.

And I have split all animations. Like figure

alt text

Next I set animations element is right? Like figure

alt text

I want to write a code like this, eg:

"wait" : start game with default/no any animations

"lurd" : continue pressing down "up" and "right" (if no continue pressing will return wait)

"up" : continue pressing down "up" (if no continue pressing will return "wait")

I can't find any information to reference. Resources in the network are using multiple model files.

How do I write the code?

And I have two files. The one is no animation, the other is have animations.

When done the code...Which I should put into?

Thank you very much!!!

There are code samples and an explaination of setting up wrap/playOnce transistions using layers at http://unity3d.com/support/documentation/Manual/Animation%20Scripting.html. For example, explains about setting wrapmode to Loop.

The code there works just for the "all animations in one long sequence" method. In other words, animation.Play("lurd") will pick out the Lurd frames just fine.

The rest is just getting the IFs written correctly.