# Functions overlapping

**URL:** <https://forum.kirupa.com/t/functions-overlapping/261761>\
**Category:** flash\
**Created:** [May 30, 2008, 4:15pm UTC](https://forum.kirupa.com/t/functions-overlapping/261761 "2008-05-30T16:15:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xstevenx](https://avatars.discourse-cdn.com/v4/letter/x/4491bb/32.png) [@xstevenx](https://forum.kirupa.com/u/xstevenx)\
**Post date:** [May 30, 2008, 4:15pm UTC](https://forum.kirupa.com/t/functions-overlapping/261761/1 "2008-05-30T16:15:23Z")

</div>

I have a function in a movieclip that opens it up and then another function inside a movieclip that is opened with the first that will close the whole thing. But the first function overlaps so the user can’t click the other movieclip to close. Is there some way to tell the first function to cease operating after it has opened the first time?

---

<div class="post-metadata">

**Author:** ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)\
**Post date:** [May 30, 2008, 4:54pm UTC](https://forum.kirupa.com/t/functions-overlapping/261761/2 "2008-05-30T16:54:54Z")

</div>

might want to use a flag variable, which you set depending on first click true/false

---

<div class="post-metadata">

**Author:** ![sparkdemon](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sparkdemon](https://forum.kirupa.com/u/sparkdemon)\
**Post date:** [May 30, 2008, 5:34pm UTC](https://forum.kirupa.com/t/functions-overlapping/261761/3 "2008-05-30T17:34:52Z")

</div>

is your operation to be some thing like the toggle button for play/pause on music players ?

---

<div class="post-metadata">

**Author:** ![xstevenx](https://avatars.discourse-cdn.com/v4/letter/x/4491bb/32.png) [@xstevenx](https://forum.kirupa.com/u/xstevenx)\
**Post date:** [May 30, 2008, 8:12pm UTC](https://forum.kirupa.com/t/functions-overlapping/261761/4 "2008-05-30T20:12:54Z")

</div>

> [@keitai](#):
>
> might want to use a flag variable, which you set depending on first click true/false

I’ll give that a try. Any links to similar things in tutorials or whatever would be helpful but I’ll try looking it up on my own. Thanks for the reply.

> [@sparkdemon](#):
>
> ```
> is your operation to be some thing like the toggle button for play/pause on music players ?
> 
> ```

No, I’m working on a portfolio type site. The first click opens a larger image and then a nested movieclip or button is used to close the larger image.
