hello everybody,
I am making one game in which I have to pass one page to another page how is possible??
please,
explain with some code [import]uid: 9664 topic_id: 2641 reply_id: 302641[/import]
hello everybody,
I am making one game in which I have to pass one page to another page how is possible??
please,
explain with some code [import]uid: 9664 topic_id: 2641 reply_id: 302641[/import]
There are no pages in Corona. Also, did you study the samples that ship with Corona and the samples in the code area? [import]uid: 5712 topic_id: 2641 reply_id: 7578[/import]
than if i want to go one page to another than what i have to do?? can u give me ship example please
[import]uid: 9664 topic_id: 2641 reply_id: 7581[/import]
You have just found a weak point of Corona, which is called “not so friendly scenes management”. As a temporary solution you can use the Director class or built your own mechanism (after studying the TabBars example in the Samples folder of your installation).
Ansca devs have promised some better documentation on this. I suspect it is a matter of time (and compaints) to see a well structured built-in scene management facility in Corona. But temporarily use the Director. Just note that you have to make a cleaner() function in your code to remove listeners and timers when changing scenes.
If you too find this task disanalogous to the easiness of doing other things with Corona, just express yourself and join the revolution movement towards a built-in Automated Scenes Management … 
[import]uid: 7356 topic_id: 2641 reply_id: 7592[/import]
I wouldn’t say its a weak point. The examples show bits of code running in the main.lua rather than scenes.
There are discussions on here about how to make scenes / separate .lua for each separate part of the app and you can load and unload them at will. What you have is one massive opengl canvas from which you can do anything you need within the scope of the API
So a scene could be in a group and you could fade the group away and kill its listener. It stays in memory but its gone in terms of presentation
You could just move it outside the viewable area. Like pausing a game and the menu appears above the frozen game.
You could set the app so each level / scene is in a separate .lua file. each with their own load and unload functions and you can load (require) and unload them at will saving memory.
In terms of managing bit applications I opt for the separate .lua files for levels and hiding a group for the menu. [import]uid: 5354 topic_id: 2641 reply_id: 7595[/import]
hey…thanks Magenda
with help of director class it pass to one scene to another scene
thank u
[import]uid: 9664 topic_id: 2641 reply_id: 7715[/import]
Just this post to join the “revolution movement towards a built-in Automated Scenes Management … :)” and also a “Library Components” …and more documented examples "eg. “passing value between scenes”.
THANKS in advance! [import]uid: 8970 topic_id: 2641 reply_id: 8692[/import]
you have to make variable as global not local and after next scene just write screen(previous).variable_name for example:
in screen1.lua
i = 1
i = i+1
in screen2.lua
j = screen1.i
like this you can pass any values from previous to any next scenes. [import]uid: 9664 topic_id: 2641 reply_id: 8695[/import]