It seems as if your call to getMission updates the Text with the new
value directly, but that could happen before the fade effect is
complete. Instead, collaborate between the getMission function and an
event listener on fadeOut that is listening for the effectEnd event to
manage updating the text. 

In the getMission function, if the effect has ended, update the text,
otherwise, save the new text into a variable. In the event listener on
the effect, if the new text has arrived, update the text, otherwise,
update a variable to indicate that the effect has ended.

You could also put this logic into one function that gets called from
both getMission and the event listener.

Reply via email to