scrolling down & up or next page

hi how do i display text that can be scrolled up or down?

You can create text using https://docs.coronalabs.com/api/library/display/newText.html.

Then there are multiple ways of moving it around or scrolling it, e.g.

  1. add the text to a scrollView - https://docs.coronalabs.com/api/library/widget/newScrollView.html

  2. write a simple touch function that handles the scrolling, e.g.

    local function move( event ) if event.phase == “began” then display.getCurrentStage():setFocus( event.target ) elseif event.phase == “moved” then event.target.y = event.yStart + event.yDelta else display.getCurrentStage():setFocus( nil ) end return true end local text = display.newText( “Hello”, display.contentCenterX, display.contentCenterY, native.systemFontBold, 40 ) text:addEventListener( “touch”, move )