How to to do Slide View?

Hey people I need help with using slide view for my game what I’m trying to do is have levels slide from like a slide view. So my problem is how would I do slide view on this code I have for my level select

[code]module(…, package.seeall)

function new()
local localGroup = display.newGroup()

require “ui”
local ui = require(“ui”)
local slideView = require(“slideView”)

backgroundMusic = audio.loadStream(“My Song.m4a”)

backgroundMusicChannel = audio.play( backgroundMusic, { channel=20, loops=-1, fadein=10000 } ) – play the background music on channel 1, loop infinitely, and fadein over 5 seconds
– play the laser on any available channel

local bk = display.newImage(“bk.png”)
bk.x = 240
bk.y = 160
localGroup:insert(bk)

local text = display.newText(“Level Select”, 170, 10,“Times New Roman”, 30)
localGroup:insert(text)

back = ui.newButton{
default = “arrow1.png”,
over = “arrow3.png”,
x = 30,
y = 30,
onEvent = onback,
}

forward = ui.newButton{
default = “arrow4.png”,
over = “arrow5.png”,
x = 450,
y = 30,
onEvent = onforward,
}

local function checkForFile ()
currentLevel = loadFile (“currentLevel.txt”)
if currentLevel == “empty” then
currentLevel = 1
saveFile(“currentLevel.txt”, currentLevel)
end
end
checkForFile()

–Table for levels
local level = {}

–Table for level text
local levelText = {}

–Function for open levels
local function goLevel (event)

director:changeScene(event.target.scene)
end

local startX = 45

iconPos = {}
iconPos[1] = {x=70, y=100}
iconPos[2] = {x=140, y=100}
iconPos[3] = {x=210, y=100}
iconPos[4] = {x=280, y=100}
iconPos[5] = {x=350, y=100}
iconPos[6] = {x=420, y=100}
iconPos[7] = {x=70, y=160}
iconPos[8] = {x=140, y=160}
iconPos[9] = {x=210, y=160}
iconPos[10] = {x=280, y=160}
iconPos[11] = {x=350, y=160}
iconPos[12] = {x=420, y=160}
iconPos[13] = {x=70, y=220}
iconPos[14] = {x=140, y=220}
iconPos[15] = {x=210, y=220}
iconPos[16] = {x=280, y=220}
iconPos[17] = {x=350, y=220}
iconPos[18] = {x=420, y=220}
iconPos[19] = {x=70, y=280}
iconPos[20] = {x=140, y=280}
iconPos[21] = {x=210, y=280}
iconPos[22] = {x=280, y=280}
iconPos[23] = {x=350, y=280}
iconPos[24] = {x=420, y=280}
iconPos[25] = {x=520, y=100}

iconPos2 = {}
iconPos2[1] = {x=70, y=100}
iconPos2[2] = {x=140, y=100}
iconPos2[3] = {x=210, y=100}
iconPos2[4] = {x=280, y=100}
iconPos2[5] = {x=350, y=100}
iconPos2[6] = {x=420, y=100}
iconPos2[7] = {x=70, y=160}
iconPos2[8] = {x=140, y=160}
iconPos2[9] = {x=210, y=160}
iconPos2[10] = {x=280, y=160}
iconPos2[11] = {x=350, y=160}
iconPos2[12] = {x=420, y=160}
iconPos2[13] = {x=70, y=220}
iconPos2[14] = {x=140, y=220}
iconPos2[15] = {x=210, y=220}
iconPos2[16] = {x=280, y=220}
iconPos2[17] = {x=350, y=220}
iconPos2[18] = {x=420, y=220}
iconPos2[19] = {x=70, y=280}
iconPos2[20] = {x=140, y=280}
iconPos2[21] = {x=210, y=280}
iconPos2[22] = {x=280, y=280}
iconPos2[23] = {x=350, y=280}
iconPos2[24] = {x=420, y=280}
iconPos2[25] = {x=520, y=100}

–Load level icons accordingly
local function setupLevels()
for i = 1, 25 do
if tonumber(currentLevel) >= i then
level[i] = display.newImageRect(“moon.png”, 50, 50)
level[i].x, level[i].y = startX*i, 50
level[i].x, level[i].y = iconPos[i].x, iconPos[i].y
localGroup:insert( level[i] )
level[i].scene = “level”…i…""
level[i]:addEventListener(“tap”, goLevel)
levelText[i] = display.newText(""…i…"", startX*i-2, 45, “Arial”, 20)
levelText[i]:setTextColor(0,0,0)
levelText[i].x, levelText[i].y = iconPos2[i].x, iconPos2[i].y
localGroup:insert( levelText[i] )
elseif tonumber(currentLevel) < i then
level[i] = display.newImageRect(“moonl.png”, 50, 50)
level[i].x, level[i].y = startX*i, 50
level[i].x, level[i].y = iconPos[i].x, iconPos[i].y
localGroup:insert( level[i] )
levelText[i] = display.newText(""…i…"", startX*i-2, 45, “Arial”, 20)
levelText[i]:setTextColor(255,255,255)
levelText[i].x, levelText[i].y = iconPos2[i].x, iconPos2[i].y
localGroup:insert( levelText[i] )
end
end
end
setupLevels()

return localGroup
end [/code]

This is the last thing I need for help having a slide view for my game so I can finish it. Please help appreciated thanks :slight_smile:

Also In the code as you see one of my levels are offscreen I want to use slide view so I can slide the screen to see that offscreen level please help again thanks alot :slight_smile: [import]uid: 17058 topic_id: 20895 reply_id: 320895[/import]

Check this out. It helped me a lot when I was doing the same thing.

http://developer.anscamobile.com/code/easy-slider-springboard-levelselect-howto [import]uid: 46082 topic_id: 20895 reply_id: 82398[/import]