Here's a starter for ten:
SetVirtualResolution(800,480)
// create and size a sprite
createSprite(1,0)
SetSpriteSize(1,40,40)
// position of the sprite
xpos = 400
ypos = 240
do
// capture touch event
touch = GetRawFirstTouchEvent(1)
// get all the basic information about the touch events
touch_type = GetRawTouchType(touch)
touch_xs = GetRawTouchStartX(touch)
touch_xc = GetRawTouchCurrentX(touch)
touch_xl = GetRawTouchLastX(touch)
// if touch is drag event then move the sprite
if touch_type = 3
xpos = xpos + (touch_xc - touch_xl)
endif
// position the sprite
SetSpritePositionByOffset(1,xpos,ypos)
print("drag finger left and right across screen")
sync()
loop
You basically want to look at the look at the GetRawTouch... commands.
To actually select something off the menu, you'll need to check if the RawTouchType is a 1 (ie screen is pressed then release within 1 second) and then use the GetRawTouchStartX() and GetRawTouchStartY() values to detect collision with the sprite or text if you want to use text in the menu rather than sprites.