Click here to Skip to main content
14,981,532 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i am so stuck right now.i am really mad about this, because i was trying to get scroll view working in Storyboard. I was fool around with a file / sample app in Corona with scroll view and it the scroll view works find because its not following Storyboard. when i go over to my game i worth storyboard implementation i put my images in the crate screen but when i try to insert the scroll view it doesn't work . can someone put this file in story board format i would appreciate it a lot. here is the file

display.setStatusBar( display.HiddenStatusBar )

local bg = display.newImage ("bg.png")

local widget = require( "widget" )

-- Our ScrollView listener
local function scrollListener( event )
local phase = event.phase
local direction = event.direction

if "began" == phase then
--print( "Began" )
elseif "moved" == phase then
--print( "Moved" )
elseif "ended" == phase then
--print( "Ended" )

-- If the scrollView has reached it's scroll limit
if event.limitReached then
if "up" == direction then
print( "Reached Top Limit" )
elseif "down" == direction then
print( "Reached Bottom Limit" )
elseif "left" == direction then
print( "Reached Left Limit" )
elseif "right" == direction then
print( "Reached Right Limit" )

return true

-- Create a ScrollView
local scrollView = widget.newScrollView
left = 0,
top = 0,
width = display.contentWidth,
height = display.contentHeight,
bottomPadding = 50,
id = "onBottom",
horizontalScrollDisabled = true ,
verticalScrollDisabled = false ,
hideBackground = true,
listener = scrollListener,

local worlds = display.newImage ("pink.png")
worlds.x = 100
worlds.y = 100
scrollView:insert( worlds)

local worlds1 = display.newImage ("pink.png")
worlds1.x = 100
worlds1.y = 800
scrollView:insert( worlds1)

local worlds2 = display.newImage ("pink.png")
worlds2.x = 100
worlds2.y = 500
scrollView:insert( worlds2)

local worlds3 = display.newImage ("pink.png")
worlds3.x = 100
worlds3.y = 1000
scrollView:insert( worlds3)

local worlds4 = display.newImage ("pink.png")
worlds4.x = 100
worlds4.y = 2000
scrollView:insert( worlds4)
i am a newbi to Corona SDK i would really appreciate if someone would answer my question if you need the file that i put into story board just live a comment an i edit but i don't see any reason because it doesn't work.i just want this file in story board format i really would love if someone answer thanks a million you guys .................:). CORONA NEWBI
<pre lang="PHP">

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900