I could do it like this:
local move_gameListBoxFadeIn = {
onStart = function( anim ) { if ( listbox_hidden == true) { time = 250; listbox_hidden = false; }
else { time = 0; } },
wait = true,
when = Transition.ToNewSelection, property = "x", start = flx*0.822, end = flx*0.51, tween = Tween.Expo
}
local move_gameListBoxFadeOut = {
onStop = function( anim ) { listbox_hidden = true },
when = Transition.ToNewSelection, property = "x", start = flx*0.51, end = flx*0.822, time = 250, delay=2000, tween = Tween.Expo
}
but the AM is shouting at me for using wait = true. Is there any other way of doing it?
edit: The main problem here is that onStart is not beeing called if the animation is triggered again before the first run finishes.