openPopUp can it return a value

guys,

I am using the openPopUp to open another scene when a pause button is clicked.. works great... but on this scene I have a button that should restart the level when it is clicked..

i tried using...

director:closePopUp()
director:changeScene( "level1" )

this restarted the level but started saying that it did not know abt contentHeights and contentWidths.. odd errors...

so just to check my code... i added the following to the pause button event (rather than calling the "openPopUp ")
clean() -- I created a function to clean objects
director:changeScene( "level1" )
it works fine.....

my question is a two parter..
1. is there a way to call the clean() function in a particular scene?
2. is there a way to pass the button press back to the level so I can clean() then call the change...

or is there a better way?

views:1384 update:2011/10/12 18:33:00
corona forums © 2003-2011