Hi Rob…
Thanks for been so patient with me, I’m learning, and I’m sorry if I don’t do thinks the way they should be done.
I guess I have to follow the same RULES as everyone else, (Even if they don’t make sense to me now)…maybe later.
– You do need to try to figure out some of this on your own. Read, Google, Watch YouTube tutorials.
I read, and I watch so many videos, and nothing…
I read this:
What is a scene purge?
Storyboard scene objects can have a scene.view property, which is a display group that holds all display objects for the scene. When a scene is purged, the scene.view
display group is completely removed (freeing all associated texture
memory), but the module still remains in memory. If you want the module
to be removed as well, use storyboard.removeScene() or storyboard.removeAll() instead.
and it has this sample…
local storyboard = require “storyboard”
– Purge all scenes (except for the one that is currently active)
storyboard.purgeAll()
------------------------------------------------ AND THAT’S IT…
I put that code here…
– --==***************************[EXIT SCENE]**********************************+±- –
function scene:exitScene( event )
local group = self.view
storyboard.purgeAll()
end
-------------------------------------- IT DOESN’T WORK
I try it at the end of the code…
– --==*************************[EVENT LISTENER]*********************************+±- –
scene:addEventListener( “createScene”, scene )
scene:addEventListener( “enterScene”, scene )
scene:addEventListener( “exitScene”, scene )
scene:addEventListener( “destroyScene”, scene )
storyboard.purgeAll()
return scene
-------------------------------------- IT DOESN’T WORK
At the beginning of the code
– --==***************************************************************************+±- –
– Music Theory Game
– By Victor M. Barba
– Copyright 2013 – All Rights Reserved
– Version 1.0
– --==***************************************************************************+±- –
local storyboard = require( “storyboard” )
local widget = require “widget”
local scene = storyboard.newScene()
local wrongSound = audio.loadSound( “wrongSound.mp3”)
storyboard.purgeAll()
-------------------------------------- IT DOESN’T WORK
THIS IS MY COMPLETE CODE
– --==***************************************************************************+±- –
– Music Theory Game
– By Victor M. Barba
– Copyright 2013 – All Rights Reserved
– Version 1.0
– --==***************************************************************************+±- –
local storyboard = require( “storyboard” )
local widget = require “widget”
local scene = storyboard.newScene()
local wrongSound = audio.loadSound( “wrongSound.mp3”)
– --==******************[FUNCTIONS TO GO TO ANOTHER SCENE]**********************+±- –
local function buttonLearnLevel1()
storyboard.gotoScene( “level1Q1”, “crossFade”, 1000 )
return true
end
– --==**************************[CREATE SCENE]**********************************+±- –
function scene:createScene( event )
local group = self.view
local background = display.newImage( “backgroundWrong1.png” )
buttonLearnLevel1 = widget.newButton{
defaultFile=“buttonWrong1release.png”,
overFile=“buttonWrong1over.png”,
onRelease = buttonLearnLevel1
}
buttonLearnLevel1.x = 890
buttonLearnLevel1.y = 650
---------------------------------------------------------------------insert into group----
group:insert ( background )
group:insert ( buttonLearnLevel1 )
end
– --==***************************[ENTER SCENE]**********************************+±- –
function scene:enterScene( event )
local group = self.view
local littleBees = display.newImage (“littleBees.png”)
littleBees.x = 28
littleBees.y = 30
transition.to(littleBees, {x=487, y=65, time=3000})
group:insert ( littleBees )
end
– --==***************************[EXIT SCENE]**********************************+±- –
function scene:exitScene( event )
local group = self.view
end
– --==**************************[DESTROY SCENE]*********************************+±- –
function scene:destroyScene( event )
local group = self.view
if buttonLearnLevel1 then
buttonLearnLevel1:removeSelf()
buttonLearnLevel1 = nil
end
if littleBees then
littleBees:removeSelf()
littleBees = nil
end
end
– --==*************************[EVENT LISTENER]*********************************+±- –
scene:addEventListener( “createScene”, scene )
scene:addEventListener( “enterScene”, scene )
scene:addEventListener( “exitScene”, scene )
scene:addEventListener( “destroyScene”, scene )
return scene
isn’t it much more easier if you already know, PLEASE, let me know where I should put that line of code,
instead of my trying every single possible way, myself
it will take me 3 or 4 weeks or more, maybe six months,
is that why it takes that long to learn to make apps?
The actual programming is not difficult…
finding the answers IS THE PROBLEM.
Believe me Rob, I have read the CORONA DOCS, when I need something, but IS NOT CLEAR AT ALL
is too technical, and is doesn’t have SIMPLE REAL SAMPLE CODES THAT YOU CAN APPLY.
I DON’T WANT TO BOTHER YOU or anyone else, I’m sorry if I’m been asking too many questions
my problem is that I’m 52 years old, I’m not 20, and I don’t have a lot of time left, so I want to learn faster
I know I can, with your help.
I hope this is not too long but I had to let you know how I feel.
Thank you
Victor
P.S. Please tell me how to go to another topic. This will be the last one in this one.