—Sorry posted this in the wrong place…moved to Newbie Q’s
I’m putting this in my Create Scene in Composer and making sure to add all of the variables to sceneGroup but I keep getting errors messages like:
Line: 101
Attempt to index global ‘sceneGroup’ (a nil value)
This is all pertaining to my Multiple Lines of Text which I followed using this tutorial here:
http://coronalabs.com/blog/2014/02/11/tutorial-methods-for-positioning-text/
It works great until I add these variable (below) to sceneGroup. Then no go. Thanks for your help.
[lua]
function scene:create( event )
local sceneGroup = self.view
Chapter1 = [[Chapter One]]
local textOptions1 = {
text = Chapter1,
x = display.contentCenterX + 220,
y = display.contentCenterY - 230,
width = 400,
height = 100,
fontSize =45,
align = “center”
}
local textField1 = display.newText(textOptions1)
textField1:setFillColor(0, 0, 0)
local myText = [[ Laughter danced off the walls and popcorn scented the air at the Quirkydale Academy. Like most schools throughout the galaxy, the students sat at desks and teachers wrote on Vid-Boards/Holo-Boards.
Today Quirkydale Academy celebrated Valentine’s Day. In the class at the end of the hall, Itty Bitty Kittie rested her elbow on her desk and her head on her hand as her green eyes drifted closed.]]
local textOptions2 = {
text = myText,
x = display.contentCenterX + 220,
y = display.contentCenterY + 110,
width = 420,
height = 500,
fontSize = 28,
align = “left”
}
local textField2 = display.newText(textOptions2)
textField2:setFillColor(0, 0, 0)
sceneGroup:insert(Chapter1)
sceneGroup:insert(textOptions1)
sceneGroup:insert (textField1)
sceneGroup:insert (myText)
sceneGroup:insert (textOptions2)
sceneGroup:insert (textField2)
[/lua]