Adobe Flash AS 2.0

0

My problem is that when the character moves diagonally, he does not do the animation (which is the same as -x or x).

Here's my script:

onClipEvent (enterFrame){
    if (Key.isDown(Key.UP)){
    this.gotoAndStop(2);
}
    if (Key.isDown(Key.DOWN)){
    this.gotoAndStop(1);

}
if (Key.isDown(Key.RIGHT)){
    this.gotoAndStop(4);
}
    if (Key.isDown(Key.LEFT)){
    this.gotoAndStop(3);
}
    if (Key.isDown(Key.UP) and Key.isDown(Key.RIGHT)){
    this.gotoAndStop(2);
    _root.char.costas.nextFrame();
}
if (Key.isDown(Key.UP) and Key.isDown(Key.LEFT)){
    this.gotoAndStop(2);
    _root.char.costas.nextFrame();
    }

        if (Key.isDown(Key.DOWN) and Key.isDown(Key.RIGHT)){
    this.gotoAndStop(1);
    _root.char.frente.nextFrame();

}
        if (Key.isDown(Key.DOWN) and Key.isDown(Key.LEFT)){
    this.gotoAndStop(5); 


}
}

Please, could anyone tell me what's wrong?

    
asked by anonymous 20.06.2018 / 16:35

0 answers