Hi Everyone,
For my first Corona project I’m trying to build a phonics support program that goes with the phonics program at the school where I work. I’m trying to be memory wise and removing objects from a scene when the director class is called. Everything is fine unless I try to remove the “begin” button. The student is asked to click on “begin” to get started, but if I use the code to remove that button the program quits. Here’s the function I use to remove items. Does anyone have any ideas? I tried to just move the button off screen, but that causes issues in the next scene.
[code]function changeScene(e)
if(e.phase == “ended”) then
audio.stop();
audio.dispose(beepsAudio);
beepsAudio=nil;
w_lc1:removeSelf()
o_lc1:removeSelf()
r_lc1:removeSelf()
d_lc1:removeSelf()
marvin:removeSelf()
marvinRight45:removeSelf()
marvinRight:removeSelf()
marvinLeft45:removeSelf()
marvinLeft:removeSelf()
earBtn:removeSelf()
cancelBtn:removeSelf()
beginBlink:removeSelf()
skipBtn.x = _W;
beginBtn.x = _W;
director:changeScene(e.target.scene);
end
[import]uid: 48122 topic_id: 8590 reply_id: 308590[/import]