# \#include for onRelease() like this or function?

**URL:** <https://forum.kirupa.com/t/include-for-onrelease-like-this-or-function/184486>\
**Category:** flash\
**Created:** [April 5, 2006, 1:13pm UTC](https://forum.kirupa.com/t/include-for-onrelease-like-this-or-function/184486 "2006-04-05T13:13:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bootiteq](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@bootiteq](https://forum.kirupa.com/u/bootiteq)\
**Post date:** [April 5, 2006, 1:13pm UTC](https://forum.kirupa.com/t/include-for-onrelease-like-this-or-function/184486/1 "2006-04-05T13:13:29Z")

</div>

hello

im trying to make this code below as modular as possible.  
I would like to edit in only one place if possible, as opposed to every button.

any ideas would be greatly appreciated :q::rocker:

```auto

onClipEvent (mouseUp) {
    this.onRelease = function() {
        _parent._parent.bg_pic_linkage = "im6";
        url_target = "swfs/contact.swf";
        _parent.whichSection = "contact";
        /*
        
           can this bit below be #include 'd
            
        */
        if (_parent._parent.currMovie != _parent._parent.bg_pic_linkage) {
            if (_parent._parent.bg._currentframe == _parent._parent.bg.midframe) {
                _parent._parent.currMovie = _parent._parent.bg_pic_linkage;
                _parent._parent.bg.play();
                loadMovie(url_target, _parent._parent.content_mc);
                _parent.play();
            }
        }
    };
}

```

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 5, 2006, 1:21pm UTC](https://forum.kirupa.com/t/include-for-onrelease-like-this-or-function/184486/2 "2006-04-05T13:21:13Z")

</div>

I’m not sure but maybe you should do a global include with a function that you call from the buttons.

---

<div class="post-metadata">

**Author:** ![bootiteq](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@bootiteq](https://forum.kirupa.com/u/bootiteq)\
**Post date:** [April 5, 2006, 1:39pm UTC](https://forum.kirupa.com/t/include-for-onrelease-like-this-or-function/184486/3 "2006-04-05T13:39:20Z")

</div>

im an idiot…whats a global include member #1?

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 5, 2006, 1:55pm UTC](https://forum.kirupa.com/t/include-for-onrelease-like-this-or-function/184486/4 "2006-04-05T13:55:19Z")

</div>

just include it at the start of the movie.🙂
