sure [import]uid: 8556 topic_id: 2447 reply_id: 11765[/import]
Hi Ricardo,
Can you tell me how I would initiate a resume on exit function with Director? How would it be written and would it have to be on each .lua file or in the build settings? Thanks. [import]uid: 10083 topic_id: 2447 reply_id: 11815[/import]
Akenaten,
It depends on how your app is. Some apps just need to go back to a simple screen and others have a lot of things happening at the same time. I think that the best way to do it is using the SQLite or some file to store the variables and when it resume just query the information and build it again. [import]uid: 8556 topic_id: 2447 reply_id: 12713[/import]
this works for me the only problem is, when i load my scene1 (which is the 1st level in my game), i play my game, but if i click anywhere on the screen, it changes the scene to another one. how can i stop that from happening? i want it to change to scene1 then stay there no matter where i click [import]uid: 10827 topic_id: 2447 reply_id: 13079[/import]
izzthetruth
Take a look at your code, I think you putted the changeScene in the background object, so wherever you touch it will change. [import]uid: 8556 topic_id: 2447 reply_id: 13107[/import]
Video Tutorial: http://rauberlabs.blogspot.com/2010/12/director-video-tutorial.html [import]uid: 8556 topic_id: 2447 reply_id: 13799[/import]
Hi ricardo…thanks for the great work and awesome class!
I am new to Corona.
What is the difference between changescene() and loadscene()?
I am trying to create a slideshow app with 20 images where each image will transition to another image until all images have been displayed. What is the best approach? I am using
changescene() to load the images. The 1st screen/image displays fine; however, I can’t get the 2nd screen with the image to display.
Thanks again! [import]uid: 9936 topic_id: 2447 reply_id: 13993[/import]
Thanks a lot!
loadScene only open the file and loads it to the memory while changeScene does everything else like positioning views in the right place, making the transitions, calls loadScene and clean up memory. Please never use loadScene directly, use changeScene and all will be fine.
What kind of event you are using to call the next file? [import]uid: 8556 topic_id: 2447 reply_id: 13996[/import]
Wow! Thx for that fast reply.
That is probably the problem. I am not using any kind of event. I just figured that when screen 1 loads it will automatically call screen 2 with the changescreen() function, and then screen 2 will call screen 3, etc, etc.
Is there some type of page load event like there is in the web world? [import]uid: 9936 topic_id: 2447 reply_id: 13997[/import]
I probably need to use the enterframe event. Is that what you would recommend?
Thx! [import]uid: 9936 topic_id: 2447 reply_id: 14002[/import]
The best thing to do is use it in a touch event listener. [import]uid: 8556 topic_id: 2447 reply_id: 14006[/import]
There is no touching involved. It is an automated slideshow. Once you start the app, each image will transition to the next image without any user input. [import]uid: 9936 topic_id: 2447 reply_id: 14007[/import]
Do I need to create a local timer event function and call the changescene() function from it?
[import]uid: 9936 topic_id: 2447 reply_id: 14019[/import]
Thx for your help!
Just want to let you know that I got the image transitions to work with the timer functions.
All I need to do now is add some music and change the orientation to landscape. [import]uid: 9936 topic_id: 2447 reply_id: 14120[/import]
That’s great! Let me know when you send some game to the store! [import]uid: 8556 topic_id: 2447 reply_id: 14124[/import]
Thanks to Ricardo and to everyone that contributed to this. It’s really great. [import]uid: 8192 topic_id: 2447 reply_id: 14829[/import]
Ricardo thanks again for all your hard work on this amazing time saver!
As a quick little contribution, not all my scenes need to be cleaned, so I’ve added a check:
[lua]if string.lower(lastScene) ~= “main” and package.loaded[lastScene].clean then
package.loaded[lastScene].clean()
end[/lua]
A very small tweak, but something I think should probably be default. Include a clean function if you need it, otherwise it won’t break.
a. [import]uid: 12405 topic_id: 2447 reply_id: 15851[/import]
Ricardo,
Carlos graciously created a sub-forum for all Director discussions. Here’s the link :
http://developer.anscamobile.com/forums/director-class
Keep up the great work. Can’t wait to see your new release.
Lets move to your new forum home!
[import]uid: 11904 topic_id: 2447 reply_id: 16977[/import]
That’s great!! Thanks a lot and lets move to director’s sub-forum! [import]uid: 8556 topic_id: 2447 reply_id: 17036[/import]