# Pause before function is performed

**URL:** <https://forum.kirupa.com/t/pause-before-function-is-performed/201975>\
**Category:** flash\
**Created:** [September 26, 2006, 7:26pm UTC](https://forum.kirupa.com/t/pause-before-function-is-performed/201975 "2006-09-26T19:26:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lariat1997](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lariat1997](https://forum.kirupa.com/u/lariat1997)\
**Post date:** [September 26, 2006, 7:26pm UTC](https://forum.kirupa.com/t/pause-before-function-is-performed/201975/1 "2006-09-26T19:26:43Z")

</div>

Hey all,

I have a movieclip that when pressed does stuff. I want the mc to finish playing before the function is executed. Below is the code that I’ve worked with do far.  
[COLOR=Blue]  
var spinningLogo:Button;  
var aboutUs\_mc:MovieClip;  
var capabilites\_mc:MovieClip;  
var techExp\_mc:MovieClip;  
var gallery\_mc:MovieClip;  
var benefits\_mc:MovieClip;  
var summary\_mc:MovieClip;  
var contactUs:MovieClip;

spinningLogo.onRelease = function():Void{  
this.gotoAndPlay(“smallLogo”);  
this.enabled = false;

pauseMe();

```
function pauseMe():Void
{
    aboutUs_mc.gotoAndPlay(2);
    capabilities_mc.gotoAndPlay(2);
    techExp_mc.gotoAndPlay(2);
    gallery_mc.gotoAndPlay(2);
    benefits_mc.gotoAndPlay(2);
    summary_mc.gotoAndPlay(2);
    contactUs_mc.gotoAndPlay(2);
}
    clearInterval();

```

};[/COLOR]

Please help me pause the function until the mc is finished playing.

Thanks.
