How can I change the animation speed at runtime?

My character implements the animation principles described in this tutorial: http://justaddli.me/tutorial.php?t=0&id=11

I am using a joystick to manipulate player horizontal movement. This allows the user to more fluidly control the walking speed. When the "handle" of the joystick is only a short distance from the center, it moves the character slower than when it's further away.

I want to adjust the animation transition speed of the sequence so when the player is moving slower, the animations change frames slower too. Otherwise, when the player walks slowly in one direction, his feet are always at a full sprint.

Thanks!
Darin

I believe you use the timeScale property.

player.timeScale = 2.0

1.0 = normal speed, 2.0 = 2x the speed. etc.

Is that timeScale new? I don't think I've seen it before. Probably just missed it in the docs. In theory Lime should be fine with that but if it doesn't work I will look into it.

it's from build 527, so it's maybe around 1.5 months old

Ah whoops, completely missed it then :-) Will have a look into it and see if it works.

Thanks for response. That was exactly what I was looking for... however, I think I need to add a couple more walking frames now... :)

Atleast the property is working though :-) ( I assume anyway )

views:1518 update:2011/10/18 8:54:01
corona forums © 2003-2011