I swapped out the files in my main.lua and called intro.lua main.lua. Then, turned scene1.lua into my old intro.lua.
My next question…
I’m putting these into the scene1.lua…but still getting the error storyboard.gotoScene( “scene1”, “fade”, 400 ) can you help.Thanks.
function new()
local localGroup = display.newGroup();
-------------------------------------------------------------------------------
-- Create 5 buttons, using different optional attributes
-------------------------------------------------------------------------------
-- These are the functions triggered by the buttons
local button1Release = function( event )
if event.phase == "release" then
director:changeScene( "a", "fade" )
end
end
local buttonHandler = function( event )
if event.phase == "release" then
director:changeScene( "b", "fade" )
end
end
local buttonC = function( event )
if event.phase == "release" then
director:changeScene( "c", "fade" )
end
end
local link = function( event )
if event.phase == "release" then
director:changeScene( "a", "fade" )
end
end
local link = function( event )
if event.phase == "release" then
director:changeScene( "e", "fade" )
end
end
-- This button has individual press and release functions
-- (The label font defaults to native.systemFontBold if no font is specified)
local button1 = widget.newButton{
default = "buttonRed.png",
over = "buttonRedOver.png",
onPress = button1Press,
onRelease = button1Release,
label = "A",
emboss = true
}
-- These other four buttons share a single event handler function, identifying themselves by "id"
-- Note that if a general "onEvent" handler is assigned, it overrides the "onPress" and "onRelease" handling
-- Also, some label fonts may appear vertically offset in the Simulator, but not on device, due to
-- different device font rendering. The button object has an optional "offset" property for minor
-- vertical adjustment to the label position, if necessary (example: offset = -2)
local C = widget.newButton{
default = "buttonYellow.png",
over = "buttonYellowOver.png",
onEvent = buttonC,
id = "c",
label = "C",
font = "Trebuchet-BoldItalic",
labelColor = { default = { 51, 51, 51, 255 } },
fontSize = 22,
emboss = true
}
[import]uid: 88495 topic_id: 35021 reply_id: 139287[/import]