http://www.x-pressive.com/TextCandy_Corona/media.html watch tour demo and you will got what you want. [import]uid: 12704 topic_id: 15701 reply_id: 60480[/import]
Thanks Ricardo. Appreciate you looking into some of the issues we’re having. So, what’s the release date for 1.5? Can’t wait! [import]uid: 52748 topic_id: 15701 reply_id: 60511[/import]
It would be great if you could release an official module-less version before the other features as 1.5.1 or something. Maybe you could also throw in that iPad flip effect graphical glitch fix.
Thanks again for all your work on the director class! [import]uid: 60707 topic_id: 15701 reply_id: 60513[/import]
gtatarkin
I saw same skew samples, but Director deals with N kinds of content. As you already know how to do it, maybe you could help me sending a little sample to my e-mail. What do you think?
dave41
I don’t have a date yet, but I’m planning by the end of november.
chris.l.frederick
I don’t like to create too many versions of the same thing, it could go crazy! I was talking to a friend that is friend of the creators of Lua and they said that this is not a big issue. I will do it anyway but will release with 1.5. [import]uid: 8556 topic_id: 15701 reply_id: 60828[/import]
Actually, I would like a super-automatic-clean, where everything that is inserted to the group or related to objects inserted would be cleaned : no need to think about timers, transition or listeners.
:)) [import]uid: 9328 topic_id: 15701 reply_id: 62162[/import]
Something to add to your lists.
Doing something like this:
http://developer.anscamobile.com/code/preloader
It would be nice if Director has a clean built in way to handle that case. [import]uid: 22381 topic_id: 15701 reply_id: 63921[/import]
Here is another change for director 1.5.
It’s handy when you close a popup to be able to pass params back to the onClose function.
I use this technique to work around the fact that I can’t load another popup or a scene from within the popup. Essentially my onPopupClose function simply looks for app specific params telling it what it should do next e.g. if it finds showNextPopup, the feeds that to the director popup function.
This is how I changed the close method in director:
[lua]function director:closePopUp(params)
– removed a bunch of code to make this obvious
if type( popUpOnClose ) == “function” then
popUpOnClose(params)
end
return true
end[/lua] [import]uid: 22381 topic_id: 15701 reply_id: 63948[/import]
Hello,
I know some people want simplicity from the director class. Generally those are experienced corona users. Many of them are still using version 1.2a - old and fairly simple.
For those who want even simpler tool here is my alternative version:
Stripped down Director Class in 24 lines of code
http://developer.anscamobile.com/code/director-class-24-lines-code
It is based on director 1.2a. Please check it out, it might be useful for some.
Thanks [import]uid: 58303 topic_id: 15701 reply_id: 64336[/import]
I have a new feature/bugfix request for 1.5 regarding limited touch area.
Check http://developer.anscamobile.com/forum/2011/10/30/screen-dimensions-bug-touch-and-possibly-effects
for more details.
[import]uid: 73836 topic_id: 15701 reply_id: 64502[/import]
Ahh, more stuff to deal with in director 1.5.
See:
http://developer.anscamobile.com/node/16202#comment-63943
The back button is an important part of Android and needs to work as expected. When clicked it should close the popup.
EDIT:
After reading about how this might be done, I’m beginning to think that director should not handle it, because the action that needs to be handled will be pretty app specific.
If you find a nice clean way to add it, by all means do so, but you might want to make it off be default or require the user to register a listener.
Here is an example of code (untested as yet) that I’ve added to handle the physical key issue.
[lua]local function onAndroidKeyEvent( event )
if event.phase == “up” then
if event.keyName == “back” then
director:closePopUp({[“action”]=“cancel”})
return true
elseif event.keyName == “menu” then
director:openPopUp({ isPopup=true }, res.screens.GAME_MENU, onPopClosed )
return true
end
end
– for default behavior, return false.
return false
end
– Android Only! Handle the button clicks on the phone.
Runtime:addEventListener( “key”, onAndroidKeyEvent );[/lua]
[import]uid: 22381 topic_id: 15701 reply_id: 63944[/import]
Yet another change to director that shouldn’t take too long
Adding an onScreenCreated() method that a screen can override.
I’ve come across this situation twice s far in the app I’m currently working on.
There are times when I want to call director from within the new(params) function. or rather that there is no other place to call it.
For instance if you discover that something needs to have happened before you got there, and now you have to redirect the user to another screen.
This causes an error because director is not fully initialized yet.
For now I handle this by setting up a timer in the last lines of the constructor that delay the check I’m doing just long enough for new() to complete.
This is obviously less than optimal.
What i propose is that you add a method like the clean() method that is executed immediately on director finishing the initialization.
Something like onScreenCreated() this way you could override it the same way you do the clean() method if you need to do post processing after director is fully initialized.
This is how i modified director 1.4 to do this for me (just now):
in method fxEnded(event) just before the return:
[lua]if package.loaded[getCurrScene()].onScreenCreated then
local handler, message = pcall( package.loaded[getCurrScene()].onScreenCreated )
if not handler then
showError( “Failed to call onScreenCreated in module '” … getCurrScene() … “’ - Please verify the onScreenCreated() function.”, message )
return false
end
end[/lua]
It needs to be after the fx have been run, because its not initialized properly until that time.
I’m not positive yet that this is the best way to do it though, so if you dig into this feature let me know [import]uid: 22381 topic_id: 15701 reply_id: 64513[/import]
I seem to be having a similar problem. I can get a slider widget to show up but it doesn’t seem to want to go anywhere. Not sure if this is related to the director class but its super weird. [import]uid: 94309 topic_id: 15701 reply_id: 65684[/import]
+1 to allowing for leaving scene and then returning to it in the same state [import]uid: 94309 topic_id: 15701 reply_id: 65686[/import]
I haven’t tried it yet, but I think it would be cool if it would say very clearly, “It appears that you have used a : instead of a ; in line 3421.” LOL
Much appreciated,
J.K. [import]uid: 66117 topic_id: 15701 reply_id: 65689[/import]
I have been away for some time because of my job, sorry for the delay, guys!
Antheor
A “super-automatic-clean” is not that easy, I can’t see the active timers and transitions from director. The only way to do it would be creating those things inside director, something like “director.createTimer( … )” but I don’t think this is a good thing to do.
bpappin
I was thinking a lot about a preload screen, I will try to do something but can’t promise that would be available on Director 1.5.
Send parameters on pop up close will be done for 1.5.
There is a method called initVars that works exactly like you want on that onScreenCreated. The only thing is that it will be changed a little to work as it is supposed to.
claes.lindblom
I will do some tests with those variables.
iqsoup
If you change the scene, everything will be removed. You can use pop up or create groups and manage them inside your scene. I will put a sample like this.
Joe Kool
This kind of error usually happens when you are trying to insert a null display object inside a group. This is an issue that I reported to Ansca because of images filenames. If you have wrote the name wrong, it shows a warning instead of an error so it keep working and throws that error on localGroup:insert(object).
EVERYBODY
I am closing now the feature list and will post it here soon. Thanks so much for your suggestions! [import]uid: 8556 topic_id: 15701 reply_id: 66481[/import]
Ricardo, now that I better how your lib works, I must admit you are absolutely right about supercleaning …
BTW, it seems there is a bug (director 1.4) when switching scene and inserting object with negative x (display.newRect(x…)) :
a quick flash with only the object on screen then the scene. [import]uid: 9328 topic_id: 15701 reply_id: 66493[/import]
“BTW, it seems there is a bug (director 1.4) when switching scene and inserting object with negative x (display.newRect(x…)) :
a quick flash with only the object on screen then the scene.”
+1
This would be great in the next version!
Does anybody have a fix for this? [import]uid: 88922 topic_id: 15701 reply_id: 66961[/import]
Antheor
This is not a bug, is a development thing. As we don’t have vector masks, I can’t hide what is outside the visible area. Some developers may put stuff outside to move around the scene while playing a game or something like that.
A quick workaround is to start all the outside objects with “isVisible = false” and change to “true” inside the “localGroup.initVars” function.
Sample:
local localGroup = display.newGroup()
local img = display.newImageRect( "file.png", 200, 200)
img.x = - 500
img.y = 300
img.isVisible = false
localGroup.initVars = function()
img.isVisible = true
transition.to( img, {time = 1000, x = 800})
end
return localGroup
Director 1.4 have some issues with this but 1.5 will work fine. The function initVars will be called as soon as the transition between the scenes complete. [import]uid: 8556 topic_id: 15701 reply_id: 66964[/import]
Ok. thx for the tip.
BTW, you do “localGroup.initVars = function()”
instead of the classic “local initVars = function()” : is there a reason for that ? [import]uid: 9328 topic_id: 15701 reply_id: 67472[/import]
Antheor
Yes there is a reason, I created it like this because people wanted to reload scenes without going to another scene so all the scene functions are used as methods of the localGroup.
[code]
– Initiate variables after transition
localGroup.initVars = function()
…
end
– Clean variables after transition
localGroup.clean = function()
…
end
– Start variables when a page is shown on the screen (Books).
localGroup.start = function()
…
end
[/code] [import]uid: 8556 topic_id: 15701 reply_id: 67490[/import]