I'd suggest creating a movieclip, and creating an animation inside it. Click on the first frame of your new animation line, and give it a frame name, for our explanation, i'll use "Standing".
double click the Flash area so it returns to the main frame, and it should show your movieclip sprite in it's initial frame.
Click on your sprite and you can use script like this to control it a little better.
onClipEvent (enterFrame) {
stop();
if(Key.isDown(Key.RIGHT)){
nextFrame();
if(Key.isDown(Key.RIGHT) == false){
gotoAndStop("Standing");
}
If it is something like a run animation, or something you need to loop several times with out copy pasting frames and having it end on you if it runs out before you release the key. Find the frame with the animation where the run would start, give it a frame name, something like "Run1". Then go to the last frame of your run animation, and go to Actions for that frame.
enter
gotoAndStop("Run1")
If that made sense and you did it properly, the sprite will play through each frame, looping appropriately, and then return to the initial frame when the Right key is released.
North America
Europe, Middle East and Africa
Asia Pacific