ok david, aqui va mas de mi codigo:
comienza asi:
display.setStatusBar(display.HiddenStatusBar)
local storyboard = require (“storyboard”)
storyboard.gotoScene(“inicio”)
y todo esto va dentro de inicio.lua :
local storyboard = require (“storyboard”)
local scene = storyboard.newScene()
local function hprimero( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton1”)
print( “Button was pressed and released” )
end
end
local function hsegundo( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton2” )
print( “Button was pressed and released” )
end
end
local function htercero( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton3” )
print( “Button was pressed and released” )
end
end
local function hcuarto( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton4” )
print( “Button was pressed and released” )
end
end
local function hquinto( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton5” )
print( “Button was pressed and released” )
end
end
local function hsexto( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton6” )
print( “Button was pressed and released” )
end
end
local function hseptimo( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton7” )
print( “Button was pressed and released” )
end
end
local function hoctavo( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton8” )
print( “Button was pressed and released” )
end
end
local function hnoveno( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton9” )
print( “Button was pressed and released” )
end
end
local function hdecimo( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton10” )
print( “Button was pressed and released” )
end
end
local function honceavo( event )
if ( “ended” == event.phase ) then
storyboard.gotoScene( “boton11”)
print( “Button was pressed and released” )
end
end
function scene : createScene( event)
background = display.newImage ( “background.gif”)
local text1 = display.newText (“herramientas”,50,93,“Arial”,20)
text1 : setFillColor(black)
local text2 = display.newText(“armas”,180,93,“Arial”,20)
text2 : setFillColor( black )
local text3 = display.newText(“armaduras”,305,93,“Arial”,20)
text3 : setFillColor( black )
local text4 = display.newText(“bloques”,435,93,“Arial”,20)
text4 : setFillColor( black )
local text5 = display.newText(“alimentos”,45,203,“Arial”,20)
text5 : setFillColor( black )
local text6 = display.newText(“miscelanea”,180,203,“Arial”,20)
text6 : setFillColor( black )
local text7 = display.newText(“mecanismos”,305,203,“Arial”,20)
text7 : setFillColor( black )
local text8 = display.newText(“transportes”,435,203,“Arial”,20)
text8 : setFillColor( black )
local text9 = display.newText(“lanas”,110,308,“Arial”,20)
text9 : setFillColor( black )
local text10 = display.newText(“colorantes”,240,308,“Arial”,20)
text10 : setFillColor( black )
local text11 = display.newText(“craft.basicos”,368,308,“Arial”,20)
text11 : setFillColor( black )
local widget = require( “widget” )
local herramientas = widget.newButton
{
left = -55,
top = -55,
defaultFile = “herramientas.gif”,
overFile = “herramientasover.gif”,
label = “”,
onEvent = hprimero
}
local alimentos = widget.newButton
{
left = -55,
top = 55,
defaultFile = “alimentos.gif”,
overFile = “alimentosover.gif”,
label = “”,
onEvent = hquinto
}
local armas = widget.newButton
{
left = 75,
top = -55,
defaultFile = “armas.gif”,
overFile = “armasover.gif”,
label = “”,
onEvent = hsegundo
}
local armaduras = widget.newButton
{
left = 200,
top = -55,
defaultFile = “armaduras.gif”,
overFile = “armadurasover.gif”,
label = “”,
onEvent = htercero
}
local bloques = widget.newButton
{
left = 330,
top = -55,
defaultFile = “bloques.gif”,
overFile = “bloquesover.gif”,
label = “”,
onEvent = hcuarto
}
local miscelanea = widget.newButton
{
left = 75,
top = 55,
defaultFile = “miscelanea.gif”,
overFile = “miscelaneaover.gif”,
label = “”,
onEvent = hsexto
}
local mecanismos = widget.newButton
{
left = 200,
top = 55,
defaultFile = “mecanismos.gif”,
overFile = “mecanismosover.gif”,
label = “”,
onEvent = hseptimo
}
local transportes = widget.newButton
{
left = 330,
top = 55,
defaultFile = “transportes.gif”,
overFile = “transportesover.gif”,
label = “”,
onEvent = hoctavo
}
local lana = widget.newButton
{
left = 8,
top = 160,
defaultFile = “lana.gif”,
overFile = “lanaover.gif”,
label = “”,
onEvent = hnoveno
}
local colorantes = widget.newButton
{
left = 135,
top = 160,
defaultFile = “colorantes.gif”,
overFile = “colorantesover.gif”,
label = “”,
onEvent = hdecimo
}
local basico = widget.newButton
{
left = 265,
top = 160,
defaultFile = “basico.gif”,
overFile = “basicoover.gif”,
label = “”,
onEvent = honceavo
}
– body
end
function scene : enterScene(event)
– body
end
function scene : exitScene(event)
– body
end
function scene : destroyScene(event)
– body
end
scene : addEventListener( “createScene”,scene)
scene : addEventListener( “enterScene”,scene)
scene : addEventListener( “exitScene”,scene)
scene : addEventListener( “destroyScene”,scene)
return scene
creo que el problema esta en la parte de enterScene, exitScene o destroyScene bueno espero que me ayudes
SALUDOS