Although you have already had a capx from mrcgkh I will post this as I have spent a bit of time on it and think it is worth pursuing...
This i what i came up with - not quite what you asked for <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">
instead of "l,r,u,d" or "1,2,3,4" I went for x,y#x,y ie the change in x and the change in y which will allow for diagonal movement so to move left 3 times left (then back) it would look like "-1,0#-1,0#-1,0#1,0#1,0#1,0" the number represents the number of pixels per step . so "-10,10 would move the sprite - 10 pixels in x and plus 10 pixels in y.
I included a timer so the same "movement string" can run at different speeds.
https://db.tt/AJB1ZmkY
let us know how you get on ?