Enemy Attack Troubles {Flash 8 Preferably}

I am currently making a game, similar to StreetFighter, where enemies will come on from the side and you fight them. Now i have the character movement and attacks fully scripted, and have made an enemy, and i make it move towards the character using:

onClipEvent(load){
movethy = 7;
scale = _xscale;
}
onClipEvent(enterFrame){
if(this._x < _root.character._x and !this.hitTest(_root.character)){
this._x += movethy;
this.gotoAndStop(2);
this._xscale = scale;

}
if(this._x > _root.character._x and !this.hitTest(_root.character)){
this._x -= movethy;
this.gotoAndStop(2);
this._xscale = -scale;
}
if(this.hitTest(_root.character)){
this.gotoAndStop(random(5));
movethy = 0;
}
else{ movethy = 7;}
}

Now this works quite well and the enemy stops when it hits the character, but the problem is, it wont complete a full attack, instead it plays a few frames of the attack MC. Now i have every attack in a different MC (Frames 2-5) inside the Enemy MC. How can i make the enemy pause when it reaches the character, then choose an attack to use?
From there i’ll be on my way and can script the hittest and so forth.

Any help is very much appreciated.

Do you have a “resting” movieclip/frames?

Make it go to that for the equivalent of 1/10th or 1/4 second (e.g. 40FPS, 4 frames for a tenth, and 10 for a quarter)

then assuming you labeled the attacks as “enemykick” and “enemypunch” and whatnot have it then do

enemyattack = Math.Random (1,2);
If (enemyattack == 1){
gotoAndPlay(“enemykick”);
}
If(enemyattack == 2){
gotoAndPlay(“enemypunch”);
}

This seems like it would work, but I’m still a ickle noob to AS, and I use 2004, so let me know if this works

Well first off, thank you for replying : )

Secondly: Do you have a “resting” movieclip/frames?

Make it go to that for the equivalent of 1/10th or 1/4 second (e.g. 40FPS, 4 frames for a tenth, and 10 for a quarter)

If you mean for me to code this, i am lost. See, i’ve learned some AS, but only what i’ve needed so far, so i don’t have a small wide knowledge, more a msall narrow knowledge of AS.

Apart from that, i put the code in, and it makes my enemy start off playing the whole of the “enemykick” (in my case “bertuppercut”) which is brilliant, but it loops this until i move the character away. When i do this the enemy follows the char and when it reaches the character, gets stuck looping the walk MC and doesn’t play an attacks at all. If you want, i can send you the fla. through an email and maybe we can iron this out : D

Once again, cheers for helping.