are you trying to do something like this
Scrolling Menu
#constant xMax=1024
#constant yMax=600
#constant friction 0.09
#constant inventoryTotal=10
global oldsc
global sc=0
global level
xspd as float `X speed of tiles
xpos as float `X position of tiles
cpx as float `Current Pointer X `(from this frame)
lpx as float `Last Pointer X `(from last frame)
// set window properties
SetWindowSize( xMax, yMax, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( xMax, yMax ) // doesn't have to match the window
SetOrientationAllowed( 0, 0, 1, 1 ) // allow both portrait and landscoreape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
for num = 100 to 99+inventoryTotal
CreateSprite(num,0)
SetSpriteSize(num,256,256)
SetSpriteColor(num,random(1,255),random(1,255),random(1,255),255)
next num
loadInventoryImages() //need a routine here to grab the images
setInventorySprites() //position them
vw=GetVirtualWidth():vh=GetVirtualHeight():iw=GetImageWidth(100):ih=GetImageHeight(100)
xpos=0
xspd=0
cpx=0
lpx=0
oldsc=-1
level=1
exitSelected=0
rollingMenu=1
repeat
lpx=cpx
cpx=GetPointerX()
`
if GetPointerState()
xspd=cpx-lpx
endif
//friction
for k=1 to 3
if xspd<-friction*k*2
xspd=xspd+friction
elseif xspd>friction*k*2
xspd=xspd-friction
else
xspd=0
endif
next
//limits
if xpos>5
xspd=xspd/2
if GetPointerState()=0
xspd=xspd-1.5
endif
endif
if xpos<-(256*(inventoryTotal-4))
xspd=xspd/2
if GetPointerState()=0
xspd=xspd+1.5
endif
endif
xpos=xpos+xspd
count=0
for t = 100 to 99+inventoryTotal
SetSpritePosition(t,xpos+(count*256),vh-ih)
if GetPointerReleased()
exit
endif
inc count
next t
if GetPointerReleased()
num=GetSpriteHit(GetPointerX(),GetPointerY())
if num>=100 and num <=99+inventoryTotal
//place the object here
id=CloneSprite( num )
SetSpriteVisible(id,0)
SetSpriteImage(700,GetSpriteImageID(num))
rollingMenu=0
endif
endif
if rollingMenu=0
SetSpritePositionByOffset(id,GetPointerX(),GetPointerY())
if GetPointerPressed()
rollingMenu=1
endif
endif
sync()
until exitSelected=1
end
function loadInventoryImages()
for num = 100 to 199
createtexture(num,256,256,MakeColor(random(1,255),random(1,255),random(1,255)))
next num
endfunction
function setInventorySprites()
vw=GetVirtualWidth():vh=GetVirtualHeight():iw=GetImageWidth(100):ih=GetImageHeight(100)
for num=100 to 99+inventoryTotal
SetSpritePositionByOffset(num,(num-100)*iw,vh-ih)
next num
endfunction
function createTexture(ID as integer,width as integer, height as integer,color)
ClearScreen()
Render()
DrawBox(0,0,width,height,color,color,color,color,1)
Swap()
getimage(ID,0,0,width,height)
endfunction
fubar