I had a quick go and this works fairly well, just needs some tweaking:
If drag = False
If TouchDown(0)
drag = True
dragStartY = TouchY(0)
dragTime = Millisecs()/500.0
dragScrollY = scrollY
Endif
If dragInertiaY<0 And scrollY>-4000
dragInertiaY+=1
scrollY = scrollY+(dragInertiaY)
Endif
If dragInertiaY>0 And scrollY<0
dragInertiaY-=1
scrollY = scrollY+(dragInertiaY)
Endif
Else
If TouchDown(0) = False
If Millisecs()/500.0 < dragTime+0.5
dragInertiaY=(dragCurrentY-dragStartY)/10
EndIf
drag = False
Else
dragCurrentY = TouchY(0)
Endif
dragAmountY = dragCurrentY - dragStartY
scrollY = dragScrollY + dragAmountY
Endif
|