# Use both onRelease and onReleaseOutside?

**URL:** <https://forum.kirupa.com/t/use-both-onrelease-and-onreleaseoutside/75056>\
**Category:** Uncategorized\
**Created:** [January 5, 2005, 5:06pm UTC](https://forum.kirupa.com/t/use-both-onrelease-and-onreleaseoutside/75056 "2005-01-05T17:06:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sixfortyfive](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/sixfortyfive/32/671_2.png) [@sixfortyfive](https://forum.kirupa.com/u/sixfortyfive)\
**Post date:** [January 5, 2005, 5:06pm UTC](https://forum.kirupa.com/t/use-both-onrelease-and-onreleaseoutside/75056/1 "2005-01-05T17:06:13Z")

</div>

Is there an easy way to use two event handlers together without repeating a function like this:

```auto
movieclip.onRelease = function() {
	_root.gotoAndStop(2);
};
movieclip.onReleaseOutside = function() {
	_root.gotoAndStop(2);
};

```

This would really help me clean up my code and reduce repetition.

I thought maybe this would work, but it doesn’t:

```auto
movieclip.onRelease && movieclip.onReleaseOutside = function() {
	_root.gotoAndStop(2);
};

```

Thanks!
