Are loadlevel.lua files needed?

Do you need to use loadlevel.lua before loading your level.lua?
Reason I asked is I notice some samples use it and im using
director class and when I change scene to option or select levels
everything working fine but when you hit the button to play level
(you selected a level) some objects from the level you picked
show up on screen and the game is a mess (all objects that showed
on screen are inserted into groups) so I was thinking is this why
they use a loadlevel.lua before a level? Is a loadlevel.lua role is to
prevent this from happening and actually loading your level properly?
Thanks in Advance [import]uid: 30314 topic_id: 7724 reply_id: 307724[/import]

Please help, my game runs fine on the corona simulator
but on Xcode Simulator or Actual Devices is not working.
I am using director class to change scenes. My option.lua
rules.lua selectlevel.lua all work fine when i hit option button
takes you to options if I hit select levels it takes me to
level select screen but the moment I hit level 1 (button) or
any level button the director does not change scene instead
objects from my lvl1.lua (if i hit level 1 button) will pop up
and will show up on my level select screen. All of my objects
are inserted into a group and i have the same structure on all
my lua files and all of em working fine except level.lua So I
notice alot samples use loadlevel.lua is this needed and if so
whats the purpose of a loadlevel.lua is this why my game not working? [import]uid: 30314 topic_id: 7724 reply_id: 27495[/import]

Are you removing the group objects? [import]uid: 11809 topic_id: 7724 reply_id: 27530[/import]

Wish I could help but I have no idea what loadlevel.lua is. I would ask you to post code so that we know what’s actually in that file, but I don’t use Director so maybe that’s a standard thing when using the Director class. [import]uid: 12108 topic_id: 7724 reply_id: 27535[/import]

Thanks for the help I manage to figure out what was
wrong by running a few test on my app it seem one of
my images being use in my levels (level.lua) was making
my game crash it was a .png but somehow it was not
counted like a .png so everytime I will select a level
that .png image will crash my game hopefully this helps
out those who are in similar situation.

Thanks Jhocking for replying most of my post lol
I have use some of your codes and they work great
thanks for sharing! [import]uid: 30314 topic_id: 7724 reply_id: 27587[/import]