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.
-
add the text to a scrollView - https://docs.coronalabs.com/api/library/widget/newScrollView.html
-
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 )