hi dodo,
ich denke du kannst dein problem auf diese art lösen. ich schätze es ist eigentlich selbsterklärend. drum sag ich gar nicht mehr dazu
PHP-Code:
var currentAnimation:String = new String("");
function downKeys (ev:KeyboardEvent) {
var nextAnimation:String = currentAnimation;
if (keys[ev.keyCode] != null) {
keys[ev.keyCode].down = true;
}
if(ev.keyCode == Keyboard.RIGHT){
nextAnimation = 'run_right';
}
if(ev.keyCode == Keyboard.LEFT){
nextAnimation = 'run_left';
}
//animation wird nur gestartet, wenn sich der wert geändert hat
if(currentAnimation != nextAnimation){
player.gotoAndStop(currentAnimation);
}
}
mfg
sx