# LiL Robot Moves

**URL:** <https://forum.kirupa.com/t/lil-robot-moves/2561>\
**Category:** flash\
**Created:** [June 7, 2002, 1:25am UTC](https://forum.kirupa.com/t/lil-robot-moves/2561 "2002-06-07T01:25:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 7, 2002, 1:25am UTC](https://forum.kirupa.com/t/lil-robot-moves/2561/1 "2002-06-07T01:25:58Z")

</div>

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](http://www.angelfire.com/space/lyleden/html/Epi4beta.html)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 7, 2002, 5:21pm UTC](https://forum.kirupa.com/t/lil-robot-moves/2561/2 "2002-06-07T17:21:39Z")

</div>

Very nice Lil, very nice…

Well, you could use a variable :

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

```

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

```auto
 p=0 ;

```

That should do.

By the way, what is it for ?

pom 0]
