This is the solution, it's somewhat of a hack but it works very well:
if ( my_config["enable_gboxart"] == "Yes" )
{
local boxart = fe.add_artwork("boxart", flx*x, fly*y, flw*w, flh*h );
boxart.preserve_aspect_ratio = true;
local start_transition1 = { when = Transition.StartLayout, property = "y", start = fly*2.5, end = fly*y, time = my_delay+200 }
animation.add( PropertyAnimation( boxart, start_transition1 ) );
// stop StartLayout animation when ToNewSelection begins
function art_transition( ttype, var, ttime )
{
if ( ttype == Transition.ToNewSelection)
start_transition1.time = 1;
return false;
}
fe.add_transition_callback( "art_transition" );
local move_transition2 = { when = Transition.ToNewSelection, property = "y", start = fly*2.5, end = fly*y, time = my_delay+200 }
animation.add( PropertyAnimation( boxart, move_transition2 ) );
}