# Run a function when another function was finished

**URL:** https://forum.kirupa.com/t/run-a-function-when-another-function-was-finished/300874
**Category:** Uncategorized
**Created:** [November 29, 2009, 1:40pm UTC](https://forum.kirupa.com/t/run-a-function-when-another-function-was-finished/300874 "2009-11-29T13:40:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kwanzinsky](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@Kwanzinsky](https://forum.kirupa.com/u/Kwanzinsky)
#### Post date: [November 29, 2009, 1:40pm UTC](https://forum.kirupa.com/t/run-a-function-when-another-function-was-finished/300874/1 "2009-11-29T13:40:08Z")

</div>

how to make it happend? does anyone can help me?

i’ve created photo gallery using AS3 and XML… then i have to loaded all the pictures into a single movie clip… and i’ve made this function…

function callContainer() {  
…  
…  
…  
callThumbs(); -\> function to load all pic from xml

}

function callButton() { -\> function to add button into stage  
…  
…  
}

i want to run callButton right after all pics are finished loading… how to do that?
