Best way to run function only when another is done?

Hi,

I’m working on a website getting a lot of variables through a xml file and the rest of my animation depends on all these variables, could you tell me which best function or listener to add to run my remaining function ONLY when I’m sure everything’s loaded and done?

Thank you sincerly,