can someone help me to fix this? ASAP!
Maybe you’ve called your file “home.lua”, and then called it with composer.gotoScene(“Home”) ?
The corona simulator doesn’t care about capitalisation, but android does.
no. i already check the codes.
local composer = require( “composer” )
local widget = require (“widget”)
local math = require (“math”)
local scene = composer.newScene()
– All code outside of the listener functions will only be executed ONCE unless “composer.removeScene()” is called.
– local forward references should go here
– “scene:create()”
function scene:create( event )
local sceneGroup = self.view
local temp = nil
local params = event.params
value = params.key
centerX = display.contentWidth / 2
centerY = display.contentHeight / 2
local background = display.newImageRect (“bg1.jpg”,570, display.contentHeight)
background.x = centerX
background.y = centerY
local myImage = display.newImage( “bg.png” )
myImage:scale(1,0.60)
– position the image
myImage:translate( 320,157)
function tryagain( event )
local options = {
effect = “fade”,
time = 500,
isModal = true,
}
composer.showOverlay( “tryagain”, options )
end
function congrats( event)
local options = {
effect = “fade”,
time = 500,
isModal = true,
}
composer.showOverlay(“congrats”, options)
end
function PauseGame( event )
local options = {
effect = “fade”,
time = 500,
isModal = true
}
composer.showOverlay(“PauseGame”, options)
end
local whichsound = audio.loadSound( “which is/letter/i.mp3” )
audio.play(whichsound)
local function XX( event )
if (“ended” == event.phase) then
– local whichsound = audio.loadSound( “singleletter/x.mp3” )
–audio.play(whichsound)
end
end
local XX = widget.newButton
{
width = 140,
height = 140,
defaultFile = “bago/x.png”,
overFile = “bago/x.png”,
onEvent = XX
}
XX.x = 220
XX.y = 80
XX:addEventListener(“touch”,tryagain)
local function SS(event )
if (“ended” == event.phase) then
– local whichsound = audio.loadSound( “singleletter/s.mp3” )
–audio.play(whichsound)
end
end
local SS = widget.newButton
{
width = 140,
height = 140,
defaultFile = “bago/s.png”,
overFile = “bago/s.png”,
onEvent = SS
}
SS.x = 410
SS.y = 80
SS:addEventListener(“touch”, tryagain)
local function II( event )
if (“ended” == event.phase) then
if(value ~= 9) then
value = params.key +1
value2 = params.key2 +1
local options = {
effect = “fade”,
time = 400,
params = {
key = value,
key2 = value2
}
}
local function Timer( event )
composer.gotoScene(mixedTable[value2],options)
end
timer.performWithDelay( 700, Timer)
else
local function Timer( event )
savelevel(true,false,false,false)
composer.gotoScene(“levelshouse”)
end
timer.performWithDelay( 700, Timer)
end
– local whichsound = audio.loadSound( “singleletter/i.mp3” )
–audio.play(whichsound)
end
end
local II = widget.newButton
{
width = 140,
height = 140,
defaultFile = “bago/i.png”,
overFile = “bago/i.png”,
onEvent = II
}
II.x = 220
II.y = 230
II:addEventListener(“touch”, congrats)
local function VV( event )
if(“ended” == event.phase) then
– local whichsound = audio.loadSound( “singleletter/v.mp3” )
–audio.play(whichsound)
end
end
local VV = widget.newButton
{
width = 140,
height = 140,
defaultFile = “bago/v.png”,
overFile = “bago/v.png”,
onEvent = VV
}
VV.x = 410
VV.y = 230
VV:addEventListener(“touch”, tryagain)
local function pause( event )
if (“ended” == event.phase) then
end
end
local pause = widget.newButton
{
width = 50,
height = 50,
defaultFile = “pausebutton.png”,
overFile = “pausebutton.png”,
onEvent = pause
}
pause.x = 0.1
pause.y = 40
pause:addEventListener(“touch”, PauseGame)
local function mother( event )
if (“ended” == event.phase) then
local whichsound = audio.loadSound( “which is/letter/i.mp3” )
audio.play(whichsound)
end
end
local mother = widget.newButton
{
width = 120,
height = 200,
defaultFile = “mother.png”,
overFile = “mother.png”,
onEvent = mother
}
mother.x =40
mother.y = 210
sceneGroup:insert(background)
sceneGroup:insert(myImage)
sceneGroup:insert(mother)
sceneGroup:insert(pause)
sceneGroup:insert(XX)
sceneGroup:insert(SS)
sceneGroup:insert(II)
sceneGroup:insert(VV)
end
– “scene:show()”
function scene:show( event )
local sceneGroup = self.view
local phase = event.phase
if ( phase == “will” ) then
– Called when the scene is still off screen (but is about to come on screen).
elseif ( phase == “did” ) then
– Called when the scene is now on screen.
– Insert code here to make the scene come alive.
– Example: start timers, begin animation, play audio, etc.
end
end
– “scene:hide()”
function scene:hide( event )
local sceneGroup = self.view
local phase = event.phase
if ( phase == “will” ) then
– Called when the scene is on screen (but is about to go off screen).
– Insert code here to “pause” the scene.
– Example: stop timers, stop animation, stop audio, etc.
elseif ( phase == “did” ) then
– Called immediately after scene goes off screen.
end
end
– “scene:destroy()”
function scene:destroy( event )
local sceneGroup = self.view
if back then
back.removeSelf()
back = nil
end
– Called prior to the removal of scene’s view (“sceneGroup”).
– Insert code here to clean up the scene.
– Example: remove display objects, save state, etc.
end
– Listener setup
scene:addEventListener( “create”, scene )
scene:addEventListener( “show”, scene )
scene:addEventListener( “hide”, scene )
scene:addEventListener( “destroy”, scene )
return scene
here is my code for Home…q7
Why do you have …'s in the name? In Unix and Windows, that is the meta character meaning go up one level of directory.
where is the 's? i see one but the codes are in comment
You said above: “here is my code for Home**… **q7”
The error message says it can’t find " Home**… **q7".
Why are you putting the two dot-dot’s ("…") in the file name? To the operating system this means go up one level in the folder structure.
Rob
Maybe you’ve called your file “home.lua”, and then called it with composer.gotoScene(“Home”) ?
The corona simulator doesn’t care about capitalisation, but android does.
no. i already check the codes.
local composer = require( “composer” )
local widget = require (“widget”)
local math = require (“math”)
local scene = composer.newScene()
– All code outside of the listener functions will only be executed ONCE unless “composer.removeScene()” is called.
– local forward references should go here
– “scene:create()”
function scene:create( event )
local sceneGroup = self.view
local temp = nil
local params = event.params
value = params.key
centerX = display.contentWidth / 2
centerY = display.contentHeight / 2
local background = display.newImageRect (“bg1.jpg”,570, display.contentHeight)
background.x = centerX
background.y = centerY
local myImage = display.newImage( “bg.png” )
myImage:scale(1,0.60)
– position the image
myImage:translate( 320,157)
function tryagain( event )
local options = {
effect = “fade”,
time = 500,
isModal = true,
}
composer.showOverlay( “tryagain”, options )
end
function congrats( event)
local options = {
effect = “fade”,
time = 500,
isModal = true,
}
composer.showOverlay(“congrats”, options)
end
function PauseGame( event )
local options = {
effect = “fade”,
time = 500,
isModal = true
}
composer.showOverlay(“PauseGame”, options)
end
local whichsound = audio.loadSound( “which is/letter/i.mp3” )
audio.play(whichsound)
local function XX( event )
if (“ended” == event.phase) then
– local whichsound = audio.loadSound( “singleletter/x.mp3” )
–audio.play(whichsound)
end
end
local XX = widget.newButton
{
width = 140,
height = 140,
defaultFile = “bago/x.png”,
overFile = “bago/x.png”,
onEvent = XX
}
XX.x = 220
XX.y = 80
XX:addEventListener(“touch”,tryagain)
local function SS(event )
if (“ended” == event.phase) then
– local whichsound = audio.loadSound( “singleletter/s.mp3” )
–audio.play(whichsound)
end
end
local SS = widget.newButton
{
width = 140,
height = 140,
defaultFile = “bago/s.png”,
overFile = “bago/s.png”,
onEvent = SS
}
SS.x = 410
SS.y = 80
SS:addEventListener(“touch”, tryagain)
local function II( event )
if (“ended” == event.phase) then
if(value ~= 9) then
value = params.key +1
value2 = params.key2 +1
local options = {
effect = “fade”,
time = 400,
params = {
key = value,
key2 = value2
}
}
local function Timer( event )
composer.gotoScene(mixedTable[value2],options)
end
timer.performWithDelay( 700, Timer)
else
local function Timer( event )
savelevel(true,false,false,false)
composer.gotoScene(“levelshouse”)
end
timer.performWithDelay( 700, Timer)
end
– local whichsound = audio.loadSound( “singleletter/i.mp3” )
–audio.play(whichsound)
end
end
local II = widget.newButton
{
width = 140,
height = 140,
defaultFile = “bago/i.png”,
overFile = “bago/i.png”,
onEvent = II
}
II.x = 220
II.y = 230
II:addEventListener(“touch”, congrats)
local function VV( event )
if(“ended” == event.phase) then
– local whichsound = audio.loadSound( “singleletter/v.mp3” )
–audio.play(whichsound)
end
end
local VV = widget.newButton
{
width = 140,
height = 140,
defaultFile = “bago/v.png”,
overFile = “bago/v.png”,
onEvent = VV
}
VV.x = 410
VV.y = 230
VV:addEventListener(“touch”, tryagain)
local function pause( event )
if (“ended” == event.phase) then
end
end
local pause = widget.newButton
{
width = 50,
height = 50,
defaultFile = “pausebutton.png”,
overFile = “pausebutton.png”,
onEvent = pause
}
pause.x = 0.1
pause.y = 40
pause:addEventListener(“touch”, PauseGame)
local function mother( event )
if (“ended” == event.phase) then
local whichsound = audio.loadSound( “which is/letter/i.mp3” )
audio.play(whichsound)
end
end
local mother = widget.newButton
{
width = 120,
height = 200,
defaultFile = “mother.png”,
overFile = “mother.png”,
onEvent = mother
}
mother.x =40
mother.y = 210
sceneGroup:insert(background)
sceneGroup:insert(myImage)
sceneGroup:insert(mother)
sceneGroup:insert(pause)
sceneGroup:insert(XX)
sceneGroup:insert(SS)
sceneGroup:insert(II)
sceneGroup:insert(VV)
end
– “scene:show()”
function scene:show( event )
local sceneGroup = self.view
local phase = event.phase
if ( phase == “will” ) then
– Called when the scene is still off screen (but is about to come on screen).
elseif ( phase == “did” ) then
– Called when the scene is now on screen.
– Insert code here to make the scene come alive.
– Example: start timers, begin animation, play audio, etc.
end
end
– “scene:hide()”
function scene:hide( event )
local sceneGroup = self.view
local phase = event.phase
if ( phase == “will” ) then
– Called when the scene is on screen (but is about to go off screen).
– Insert code here to “pause” the scene.
– Example: stop timers, stop animation, stop audio, etc.
elseif ( phase == “did” ) then
– Called immediately after scene goes off screen.
end
end
– “scene:destroy()”
function scene:destroy( event )
local sceneGroup = self.view
if back then
back.removeSelf()
back = nil
end
– Called prior to the removal of scene’s view (“sceneGroup”).
– Insert code here to clean up the scene.
– Example: remove display objects, save state, etc.
end
– Listener setup
scene:addEventListener( “create”, scene )
scene:addEventListener( “show”, scene )
scene:addEventListener( “hide”, scene )
scene:addEventListener( “destroy”, scene )
return scene
here is my code for Home…q7
Why do you have …'s in the name? In Unix and Windows, that is the meta character meaning go up one level of directory.
where is the 's? i see one but the codes are in comment
You said above: “here is my code for Home**… **q7”
The error message says it can’t find " Home**… **q7".
Why are you putting the two dot-dot’s ("…") in the file name? To the operating system this means go up one level in the folder structure.
Rob