Director Class
Posted by ricardorauber, Posted on October 7, 2010, Last updated July 1, 2011
Hello everybody! I'm so pleased to share with you my Director class for control scenes with or without transitions!
Version 1.3
New features, check this out!
rauberlabs.blogspot.com/2011/07/director-class-13.html
Video Tutorial: rauberlabs.blogspot.com/2010/12/director-video-tutorial.html
ATTENTION - All questions will now be answered at Director's sub-forum: developer.anscamobile.com/forums/director-class
It's very easy to use, just import it, add the groups to the main group and it's done! This zip file contains an example with all the transitions in this version. Also, there's a template.lua file that you can use in your own projects.
Feel free to ask anything about it at the forum or by e-mail, I'll be very pleased to ask your answers!
- Version 1.3:
https://bitbucket.org/ricardorauber/corona/downloads/director_by_ricardo...
- Version 1.2:
bitbucket.org/ricardorauber/corona/downloads/director_by_ricardo_...
- Version 1.1:
bitbucket.org/ricardorauber/corona/downloads/director_by_ricardo_...
- Version 1.0:
bitbucket.org/ricardorauber/corona/downloads/director_by_ricardo_...
See ya!
More Information: rauberlabs.blogspot.com/
twitter.com/rauberlabs
- Type:
- Utilities
- Tags:
- director,
- scene
- Login or register to post comments
Replies
Ansca Staff
Very nice, thanks for sharing!
- Login or register to post comments
- 0 votes
This is amazing, and admittedly, much better than what I was using. I'll definitely use this class, thanks for sharing Ricardo!
- Login or register to post comments
- 0 votes
Perfect, perfect, perfect!
Great job!!
- Login or register to post comments
- 0 votes
I wired this into my project and it works great! Thank you for sharing it, Ricardo.
- Login or register to post comments
- 0 votes
I love it. Thanx a lot :)
- Login or register to post comments
- 0 votes
You asked for additional code changes so here are two effects I added to mine:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ----------------------------------- -- EFFECT: Move From Top ----------------------------------- elseif effect == "moveFromTop" then nextView.x = 0 nextView.y = display.contentWidth*-1 -- loadScene (nextScene) -- showFx = transition.to ( nextView, { y=0, time=fxTime } ) showFx = transition.to ( currentView, { y=display.contentHeight, time=fxTime } ) -- timer.performWithDelay( fxTime, fxEnded ) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ----------------------------------- -- EFFECT: Move From Bottom ----------------------------------- elseif effect == "moveFromBottom" then nextView.x = 0 nextView.y = display.contentHeight -- loadScene (nextScene) -- showFx = transition.to ( nextView, { y=0, time=fxTime } ) showFx = transition.to ( currentView, { y=display.contentHeight*-1, time=fxTime } ) -- timer.performWithDelay( fxTime, fxEnded ) |
- Login or register to post comments
- 0 votes
Fantastic
- Login or register to post comments
- 0 votes
@awesomeware14 your move from top code creates doesn't transition smoothly, so I fixed it :)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ----------------------------------- -- EFFECT: Move From Top ----------------------------------- elseif effect == "moveFromTop" then nextView.x = 0 nextView.y = display.contentHeight*-1 -- loadScene (nextScene) -- showFx = transition.to ( nextView, { y=0, time=fxTime } ) showFx = transition.to ( currentView, { y=display.contentHeight, time=fxTime } ) -- timer.performWithDelay( fxTime, fxEnded ) |
// red.
- Login or register to post comments
- 0 votes
Well done, Ricardo. I like what I see so far and intend to put this to use in my next project. I will let you know how it goes when I am done. Thank you for sharing your code!