Run a function when another function was finished

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?