Is there a way to send the new scene a parameter?

I was wondering if there is a way to send the scene a parameter in director when I change views.

For instance I have a People Menu that lists first names. When I click on a first name I change scene to a PersonDetail scene. I need the Person Detail to get the id of the person selected from the previous scene is there a clean way to do this?

I wish I could do something like
director:changeScene("personDetail", "moveFromLeft", idForPersonSelected)

But I don't think you can do that.

Suggestions? Our current idea, that would work but isn't good design is to just have a currentSelected person field in the database that gets set by the PeopleMenu and checked by the PersonDetail Scene. How would you do it?

Thanks,
Tim

You can save the value in another Lua file OR you can make it a global, like this:

_G.someinfo = 10

Then you can recall it in future scenes in the same way.

Peach :)

views:1344 update:2011/11/14 9:16:56
corona forums © 2003-2011