THIS is working for me! (though it breaks the intro ...but I didn't use the intro!)
local screen_now_loading = fe.add_image("Loading.png", (fe.layout.width - 640)/2, (fe.layout.height - 480)/2, 0, 0);
fe.add_transition_callback( "launch_transition" );
function launch_transition( ttype, var, ttime ) {
switch ( ttype )
{
case Transition.StartLayout:
screen_now_loading.alpha = 0;
break;
case Transition.FromGame:
if ( ttime < 255 )
{
foreach (o in fe.obj)
o.alpha = ttime;
screen_now_loading.alpha = 0;
return true;
}
else
{
foreach (o in fe.obj)
o.alpha = 255;
screen_now_loading.alpha = 0;
}
break;
case Transition.EndLayout:
if ( ttime < 255 )
{
foreach (o in fe.obj)
o.alpha = 255 - ttime;
screen_now_loading.alpha = 0;
return true;
}
break;
case Transition.ToGame:
if ( ttime < 255 )
{
foreach (o in fe.obj)
o.alpha = 255 - ttime;
screen_now_loading.alpha = ttime;
return true;
}
screen_now_loading.alpha = 255;
break;
}
return false;
}
Top line... Loading.png... create one. Same line ... indicate size of the image you create... width / height.