I take it you want to move the sprite across the screen when you press a key?
If so, you're not using the value of x in your code - change spr(256,50,50) to spr(256, x, 50) and it should work.
ok,thank you so much 😃