Here's how i did the walking in Arabio World.
if character_left then
frameIndex = 2
frameOffset = round( sin( system.gettime / 75 ) )
drawImage x, y, frameIndex + frameOffset
By adjusting the denominator (i think it is called) within the sin() function i can adjust the speed of the animation. frameOffset oscillates between -1 to 1 with time which was perfect because the animation was lined up like that so the animation sequence becomes: -1 0 1 0 -1 0 1 0 … This could be done the same way with loopins instead of time, so yeah, i'm sure it would work nicely.
Anyways, this brings me to another thought. When doing a game like Arabio World where the character walks. One could use the character's x location on the map to decide what frame to show. With some modulus and some fraction multiplication one can probably make the character's legs seem to be really connected with the ground, rather then the cartoony-unrealistic effect Arabio World now has, where the character just seems to "wheel-spin" across the surface as if he was the Road Runner. Hmm… Why am i talking about this now? :S hehe oh well, over and out