Im sry to ask here again but I have found my self to run into some other problems. I made my guy running and assign some spritemap to its movements (2 different spritemaps: left run cycle + idle, right run cycle + jump)
So everytimes I press the left or right imput it changes the graphic of the character and call the animation at the same time but my problem is that it freeze on the first frame everytime I do so. Does anyone have any idea whats going on?
public override function update():void
{
// Checking player input.
var hInput:int = 0;
if (Input.check(Key.LEFT))
{
(hInput -= 1) && (graphic = sprKoreanDudeJUMP) && (sprKoreanDudeJUMP.play("runleft", true));
}
else
{
(graphic = sprKoreanDude) && (sprKoreanDude.play("stand", true));
}
if (Input.check(Key.RIGHT))
{
(hInput += 1) && (graphic = sprKoreanDude) && (sprKoreanDude.play("run", true));
}
else
{
sprKoreanDude.play("stand", true);
}
if (Input.check(Key.SPACE))
{
(jump()) && (graphic = sprKoreanDudeJUMP) &&(sprKoreanDudeJUMP.play("jump", true));
}
else
{
a.y = GRAVITY;
v.y += a.y;
}
I find the people on this forum very nice and I greatly apreciate the help