scene fade in alpha

btw, if you DO use crossFade for anything, you might instead want a version like this:

https://forums.coronalabs.com/topic/48146-legacy-storyboard-adding-a-proper-crossfade/

it presents a crossfade where the underlying scene remains opaque (eliminating a REALLY glitchy-looking in-between state of the built-in crossFade where BOTH scenes are partially transparent)  it was written for use with storyboard, but composer uses the exact same mechanism, so it’s easily ported.  (it will not, however, eliminate any intra-scene layered-alpha problems in the new scene as discussed here in this thread)

Thanks Dave.

Yes, the freeze is totally to do with the size of the next scene. In the app we’re doing, the user selects a page to goto so if preloading is being used it has to happen before the scene starts to transition. The problem is that there is no way to know when the preload has finished to start the transition. You could guess but either way, all this does is put a freeze or pause before the transition rather than in the middle as is currently happening.

Depending on the size of scenes, crossFade never works as advertised. When it is called, it must preload the next scene and then call the transition immediately so you get that thing where the code starts before the images have loaded. This results in a jerky or non-existent effect, just the next scene suddenly appearing.

Having investigated further, the issue seems to happen when using:

concurrent = true

But when using “fade” for instance when concurrent=false, there is no issue of jerky or unfinished transitions. The first scene fades out then the next fades in just fine. It must be preloading the next scene before starting the transition rather than at the same time as “crossFade” does…

This leads me to think about associating the fade in and out of our black rectangle with the alpha transition of the scenes used by Composer in “fade”.  Using an enterFrame listener, it would be possible to check when the scene begins to fade and tether that to the alpha properties of the black rectangle. I’ve yet to try that but did hear Ed talking about seeing someone doing something similar. I’ve asked if he remembers specifically where he saw it here if anyone has seen anything similar:
 

https://forums.coronalabs.com/topic/58973-corona-geek-128-custom-transitions-and-functions/#entry305081
 

btw aside, and just fwiw, cuz i’m NOT trying to steal any credit for Ingemar’s work, but I’m the one who showed him that trick.  ;)

https://forums.coronalabs.com/topic/48659-missing-composer-transition-effects/

re the scene-owned rects approach:  see my 5/19/2015 post above for the last sentence beginning “(alternatively…” – that approach does (or _can, _in the right circumstances) work, just using transitions (and thoughtful use of onComplete to trigger an immediate scene change half-way through WITHOUT its own transition – because this isn’t a “concurrent” effect - ie fade to black THEN fade from black).

the problem STILL though, is you don’t want to be stalling for a scene load at any time during a transition - whether composer’s or your own diy approach.  What you may want to consider is when user selects a scene, immediately transition to a permanently preloaded “loading” scene, passing it a parameter of the next scene to load, and have it do the work of load/create the next scene, THEN transition from your loading scene to the fully loaded/created game scene.

hth