Hi, I’m using the Build 2012.812. My ScrollView doesn’t seem to work properly as if I’m to scroll slightly faster, the display object within disappears and not able to scroll back onto the screen. The scrollWidth parameter is currently set to the width of my display object, i’ve tried playing with that, but that too didn’t.
Can someone please give me some guidance? Thanks!
code:
require “sprite”
tilesheet = sprite.newSpriteSheet( “tiles3.png”, tilew, tileh )
local tileset1 = sprite.newSpriteSet( tilesheet, 1, 25 )
– attach background
local bg = display.newImage( “background.jpg” )
– attach tiles to stage
local stage = display.newGroup()
for i = 0, #map-1, 1 do
for j = 0, #(map[1])-1, 1 do
local tilesprite = sprite.newSprite ( tileset1 )
tilesprite.y = tileh * i + 20
tilesprite.x = tilew * j + 20
tilesprite.currentFrame = map[(i+1)][(j+1)]+1
stage:insert( tilesprite )
end
end
local widget = require “widget”
local scrollview = widget.newScrollView{
scrollHeight = 0,
scrollWidth = ((#(map[1])-stmapat)*tilew)-1,
friction = .1,
hideBackground = true,
}
scrollview:insert( stage )
scrollview.content.verticalScrollDisabled = true [import]uid: 146471 topic_id: 26187 reply_id: 326187[/import]