LiL Robot Moves

Ive made a little robot that i would lke to make him punch when u press ctrl. But the way im doing it now dosnt seem to work.

The robot is 1 movie clip with frames that show him jumping and punching. And when u press ctrl it would goto the frame with the puching animation. But if u press the ctrl jey again it will replay the frame cancelling the animaition and starting again.

Its been bugging me for ages now and i was wondering how would u make it that so u pres ctrl and it will play the puch, and u cant press ctrl again untill the puch animation finishes.

Any help would be much aprittiated.

heres the url for my Flash www.angelfire.com/space/l…4beta.html

Very nice Lil, very nice…

Well, you could use a variable :

 on (keyPress) bla bla
  if (!p) {
    // punch code
    p = 1 ;
  }

Then at the end of your puch animation, in the last frame

 p=0 ;

That should do.

By the way, what is it for ?

pom 0]