# Best way to run function only when another is done?

**URL:** <https://forum.kirupa.com/t/best-way-to-run-function-only-when-another-is-done/293897>\
**Category:** flash\
**Created:** [August 5, 2009, 3:32pm UTC](https://forum.kirupa.com/t/best-way-to-run-function-only-when-another-is-done/293897 "2009-08-05T15:32:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbucker](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@humbucker](https://forum.kirupa.com/u/humbucker)\
**Post date:** [August 5, 2009, 3:32pm UTC](https://forum.kirupa.com/t/best-way-to-run-function-only-when-another-is-done/293897/1 "2009-08-05T15:32:14Z")

</div>

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,
