# Key Combination Problem

**URL:** <https://forum.kirupa.com/t/key-combination-problem/247628>\
**Category:** programming\
**Created:** [December 27, 2007, 2:58pm UTC](https://forum.kirupa.com/t/key-combination-problem/247628 "2007-12-27T14:58:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Irontigerz](https://avatars.discourse-cdn.com/v4/letter/i/35a633/32.png) [@Irontigerz](https://forum.kirupa.com/u/Irontigerz)\
**Post date:** [December 27, 2007, 2:58pm UTC](https://forum.kirupa.com/t/key-combination-problem/247628/1 "2007-12-27T14:58:17Z")

</div>

```php
onClipEvent (load)
{
    movement = 5
    var fight = false;
    
}
onClipEvent (enterFrame)
{
    if (fight == false)
    {
        if (Key.isDown(39))
        {
            setProperty("", _x, _x + 5);
            setProperty("", _xscale, 40);
        } // end if
        if (Key.isDown(37))
        {
            setProperty("", _x, _x - 5);
            setProperty("", _xscale, -40);
        } // end if
        if (Key.isDown(38))
        {
           this._y = this._y - movement;
        } // end if
        if (Key.isDown(40))
        {
          this._y = this._y + movement;
        } // end if
    } // end if
    if (Key.isDown(88))
    {
        gotoAndStop(2);
        fight = true;
    }
    else
    {
        fight = false;
    } // end else if

    var comb = keyDet.addCombination(39, 90, 88);
    onKeyCombination = gotoAndStop(3);
        fight = true;
    }

```

I want to make the flash file have a three button combination press, so that when it gets pressed it goes to kick frame, but the problem i have is when i export the move it’s automatically kicking without me press the three buttons, please could anyone help me to fix the problem.

p.s i am using the key detection action script as seen on [http://www.kirupa.com/developer/actionscript/multiple\_key\_detection.htm](http://www.kirupa.com/forum/../developer/actionscript/multiple_key_detection.htm)  
and thanks in advance:hugegrin:
