Can anyone tell me what’s wrong? When I click the back button, the back button disappears, and that’s about it. It doesn’t switch screens.
[code]
module(…, package.seeall)
function new()
local aarpGroup = display.newGroup()
local widget = require “widget”
local scrollView = require “scrollView”
local scroller = widget.newScrollView{
width = display.contentWidth,
height = display.contentHeight,
scrollWidth = 320,
scrollHeight = 0,
}
aarpGroup:insert(scroller)
local navBar = display.newImage(“navBar.png”, 0, 0, true )
navBar.x = display.contentWidth * 0.5
navBar.y = math.floor( display.screenOriginY + navBar.height * 0.5 )
– scroller:insert(navBar)
aarpGroup:insert(navBar)
local navHeader = display.newText(“AppleTalkFamily”, 0, 0, native.systemFontBold, 16 )
navHeader:setTextColor( 255, 255, 255 )
navHeader.x = display.contentWidth * 0.5
navHeader.y = navBar.y
– scroller:insert(navHeader)
aarpGroup:insert(navHeader)
local function goBack( event )
if event.phase == “release” then
director:changeScene(“menu”)
end
end
local backBtn = widget.newButton{
default = “backButton.png”,
over = “backButton_over.png”,
onRelease = goBack
}
backBtn.x = navHeader.x - 125
backBtn.y = navBar.y
–scroller:insert(backBtn)
aarpGroup:insert(backBtn)
local title = display.newText(“AARP”, 15, 15, native.systemFontBold, 24 )
title:setTextColor( 85, 205, 255 )
scroller:insert(title)
– aarpGroup:insert(title)
local bar = display.newRect( 0, title.y + 25, display.contentWidth, 2 )
bar:setFillColor( 85, 205, 255 )
bar.alpha = .7
scroller:insert(bar)
– aarpGroup:insert(bar)
local abbr = display.newText("’‘AppleTalk Address Resolution Protocol’’", 15, bar.y + 15, native.systemFontBold, 14)
abbr:setTextColor( 85, 205, 255 )
scroller:insert(abbr)
– aarpGroup:insert(abbr)
local aarpText = display.newText(“A bunch of text…”, 15, abbr.y + 50, 300, 0, native.systemFont, 12)
aarpText:setTextColor( 0 )
scroller:insert(aarpText)
– aarpGroup:insert(aarpText)
local title2 = display.newText(“ADSP”, 15, aarpText.y + 150, native.systemFontBold, 24)
title2:setTextColor( 85, 205, 255 )
scroller:insert(title2)
– aarpGroup:insert(title2)
local bar2 = display.newRect( 0, title2.y + 25, display.contentWidth, 2 )
bar2:setFillColor( 85, 205, 255 )
bar2.alpha = .7
scroller:insert(bar2)
– aarpGroup:insert(bar2)
local abbr2 = display.newText(“AppleTalk Data Stream Protocol”, 15, bar2.y + 15, native.systemFontBold, 14 )
abbr2:setTextColor( 85, 205, 255 )
scroller:insert(abbr2)
– aarpGroup:insert(abbr2)
local adspText = display.newText("A bunch of text… ", 15, abbr2.y + 15, 300, 0, native.systemFont, 12)
adspText:setTextColor( 0 )
scroller:insert(adspText)
– aarpGroup:insert(adspText)
return aarpGroup
end [import]uid: 114389 topic_id: 30275 reply_id: 330275[/import]