0
My problem is that when the character moves diagonally, he doesn’t do the animation (which is the same as -x or x).
Here is 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 someone tell me what’s wrong?
Actually there is nothing moving there. You are changing properties of a Timeline, the correct thing would be to use the properties
x
andy
of the content you want to move. What’s inside these frames? It is almost impossible to detect what is occurring in your file without understanding the graphical part.– bio
my problem is only the animation n works
– Paulo R. Semedo
already checked the instance of the moveclips if it is all right? It seems that it just does not animate when you press two keys at the same time
– hugocsl
obg but I do not send pictures because I have no sophisticate reputation..
– Paulo R. Semedo
I’ve checked it all out
– Paulo R. Semedo