# When function is finished

**URL:** https://forum.kirupa.com/t/when-function-is-finished/200589
**Category:** Uncategorized
**Created:** [September 13, 2006, 2:56pm UTC](https://forum.kirupa.com/t/when-function-is-finished/200589 "2006-09-13T14:56:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fried](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@fried](https://forum.kirupa.com/u/fried)
#### Post date: [September 13, 2006, 2:56pm UTC](https://forum.kirupa.com/t/when-function-is-finished/200589/1 "2006-09-13T14:56:36Z")

</div>

Hi guys,

I don’t know if I will explain this properly, but here goes: I have a function:

```auto
function toDo(){
           do this......
           do something else.... 
           do something else.....
}

```

When this function is finished doing everything it has to do, I want something else to be done for instance, gotoAndPlay(), but only when everything inside the function is done.

Thnx in advance.
