# \[CS3\] - Multiple commands onRelease

**URL:** <https://forum.kirupa.com/t/cs3-multiple-commands-onrelease/282518>\
**Category:** flash\
**Created:** [February 23, 2009, 4:05am UTC](https://forum.kirupa.com/t/cs3-multiple-commands-onrelease/282518 "2009-02-23T04:05:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dirk\_P\_Ho](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Dirk\_P\_Ho](https://forum.kirupa.com/u/Dirk_P_Ho)\
**Post date:** [February 23, 2009, 4:05am UTC](https://forum.kirupa.com/t/cs3-multiple-commands-onrelease/282518/1 "2009-02-23T04:05:59Z")

</div>

Hello there,

I have a .swf that opens in a popup. At the conclusion of the clip, I have a button. I would like the button to redirect the parent window and close itself.

stop();  
btn\_join.onRelease = function()  
{  
getURL(“[http://www.myurl.com](http://www.myurl.com)”, “\_parent”);  
}

btn\_join.onRelease = function()  
{  
getURL(“javascript:window.close()”);  
}

It seems I can do one or the other, is there a way to combine these and execute off one button click?

Thanks,  
Dirk
