#include for onRelease() like this or function?

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:


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();
            }
        }
    };
}

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

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

just include it at the start of the movie.:slight_smile: