# Pause Playhead

**URL:** <https://forum.kirupa.com/t/pause-playhead/189957>\
**Category:** flash\
**Created:** [June 7, 2006, 2:54pm UTC](https://forum.kirupa.com/t/pause-playhead/189957 "2006-06-07T14:54:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbstanley](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@bigbstanley](https://forum.kirupa.com/u/bigbstanley)\
**Post date:** [June 7, 2006, 2:54pm UTC](https://forum.kirupa.com/t/pause-playhead/189957/1 "2006-06-07T14:54:51Z")

</div>

What I have is a main flash file with several image flash files. I’m loading the image flash files into the main file by using:

```auto

_parent.portfolio_mc.loadMovie("logo1.swf");

```

What I want to happen is the have the playhead pause for several seconds in the logo1 file. So in the first frame of that movie I put this:

```auto

this._lockroot = true;

function wait(mc, n) {
mc.stop();
var myInterval = setInterval(function () {
mc.play();
clearInterval(myInterval);
}, n * 1000);// stop for n seconds
}

```

Then where ever I want the playhead to pause I use:

```auto

_root.wait(this, 1);

```

That works great! Here’s where the problem comes in. I have a button on each of the logo flash files that when clicked on, it loads the next logo file into itself. I use this:

```auto

on (release) {
    //f is a variable I call on the image flash file root timeline that I assign a number to

    if(_parent.f==1){
    _root.loadMovie("logo2.swf");
        }
    if(_parent.f==2){
    _root.loadMovie("logo3.swf");
        }
    if(_parent.f==3){
    _root.loadMovie("logo4.swf");
        }
    if(_parent.f==4){
    _root.loadMovie("logo5.swf");
        }
    if(_parent.f==5){
    _root.loadMovie("logo6.swf");
        }
    if(_parent.f==6){
    _root.loadMovie("logo7.swf");
    }
    if(_parent.f==7){
    _root.loadMovie("logo8.swf");
    }
    if(_parent.f==8){
    _root.loadMovie("logo1.swf");
    }
}

```

This does work however, because I use that function to pause the playhead for a number of seconds, if during that pause I click to go to the next movie, that function is carrying over.

So in other words, if logo1.swf has a section that I want the playhead to pause on for 10 seconds, but during those 10 seconds I click to go to logo2.swf and the playhead stops somewhere in this movie, those 10 seconds from logo1.swf are still being counted and starts to play logo2.swf after those 10 seconds are up. I need that function to basically be assigned to that specific movie only.

I know it’s confusing - any ideas though?
