# Unpause Button Doesn't Work Correctly

**URL:** <https://forum.kirupa.com/t/unpause-button-doesnt-work-correctly/201134>\
**Category:** flash\
**Created:** [September 18, 2006, 8:48pm UTC](https://forum.kirupa.com/t/unpause-button-doesnt-work-correctly/201134 "2006-09-18T20:48:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![njoay](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@njoay](https://forum.kirupa.com/u/njoay)\
**Post date:** [September 18, 2006, 8:48pm UTC](https://forum.kirupa.com/t/unpause-button-doesnt-work-correctly/201134/1 "2006-09-18T20:48:29Z")

</div>

Hello all,

I would like to have a fully-functional pause toggle button, which I haven’t been able to accomplish. The AS on my pause button is below, and when I click on the pause button, the movie clips and the external swf with the instance named “ryan” does pause but when I attempt to un-pause the movie, the movie starts from the beginning of the ryan movie clip (aka ryan swf). How do get the button to un-pause directly at the point where it was paused?

Also there are more movie clips within “ryan” which doesn’t work correctly either. When I un-pause the movie the entire movie starts from the beginning again.

Below is the AS, please any help is appreciated!

var state:Boolean = false;

pause.onRelease = function() {  
if (!state) {  
\_root.screen.stop();  
\_root.end.stop();  
\_root.screen.ryan.ryan.stop();

```
} else {
    _root.end.play();
    _root.screen.ryan.ryan.play();
            _root.screen.ryan.ryan.play();
    _root.screen.ryan.ryan.link2.play();
    _root.screen.ryan.ryan.link3.play();
    _root.screen.ryan.ryan.link4.play();
    _root.screen.ryan.ryan.link5.play();
}
state = !state;

```

}
