Play full Mc in a single key press
<p>First, sorry to ask this silly question (I am new in AS3). I wasted more then 2 weeks on this problem, and am now posting it here.</p>

<p>I am making a hero move with the keyboard. I have three animations.</p>

<ol>
<li>Standby mode</li>
<li>walk front</li>
<li>walk behind</li>
</ol>

<p>It's working well so far, but the problem I'm facing in jumping the player is having to hold down the key to jump. I don't want the player to be required to hold the key to perform jumping. 
So I want to play the full MovieClip with one key press, and honestly I don't know which function I have to use or how to do it.</p>

<p><a href="https://drive.google.com/file/d/0By4vnFn0J42xSmVNei13Q216MXc/view?usp=sharing" rel="nofollow">Here is the file</a>, and here is my code</p>

<pre><code>import flash.display.Stage;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import flash.display.MovieClip;
import flash.events.Event;

kim.gotoAndStop("kim Stand");

var grav:int = 0;
var floor = 450;
var dPressed:Boolean = false;
var aPressed:Boolean = false;
var jumping:Boolean = false;

stage.addEventListener(KeyboardEvent.KEY_DOWN , keyDownHandaler);
stage.addEventListener(KeyboardEvent.KEY_UP , KeyUpHandaler);
stage.addEventListener(Event.ENTER_FRAME , gameLoop);

function keyDownHandaler(Devent:KeyboardEvent):void
{
    if (Devent.keyCode == Keyboard.D)
        {
            dPressed = true;
        }
    else if (Devent.keyCode == Keyboard.A)
        {
            aPressed = true;
        }
    else if (Devent.keyCode == Keyboard.W &amp;&amp; !jumping)
        {
            jumping = true;
        }
}

function KeyUpHandaler (Uevent:KeyboardEvent):void 
{
    if (Uevent.keyCode == Keyboard.D)
        {
            dPressed = false;
            kim.gotoAndStop("kim Stand");
        }
    else if(Uevent.keyCode == Keyboard.A)
    {
            aPressed = false;
            kim.gotoAndStop("kim Stand");
    }

    else if(Uevent.keyCode == Keyboard.W)
    {
            jumping = false;
            kim.gotoAndStop("kim Stand");
    }


}

function gameLoop(Levent:Event):void
{
    if (dPressed)
        {
            kim.x += 5;

            kim.gotoAndStop("kim Move Right");
        }
    else if(aPressed)
        {
            kim.x -= 5;
            kim.gotoAndStop("kim Move Left");
        }

    else if(jumping)
        {
            kim.gotoAndStop("kim Jump");
            kim.y -= 10;

        }

    gravity();

}

function gravity ():void
    {
        kim.y += grav;
        if (kim.y+kim.height/2 &lt;floor){
            grav++;
        }

        else {
            grav = 0;
            kim.y = floor - kim.height/2 ;

            }

    }
</code></pre>