# This.onRelease set variable and goto?

**URL:** <https://forum.kirupa.com/t/this-onrelease-set-variable-and-goto/203107>\
**Category:** Uncategorized\
**Created:** [October 7, 2006, 5:02pm UTC](https://forum.kirupa.com/t/this-onrelease-set-variable-and-goto/203107 "2006-10-07T17:02:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueant](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@blueant](https://forum.kirupa.com/u/blueant)\
**Post date:** [October 7, 2006, 5:02pm UTC](https://forum.kirupa.com/t/this-onrelease-set-variable-and-goto/203107/1 "2006-10-07T17:02:58Z")

</div>

Hi everyone,

working on something using an adaptation of the complex button tutorial.

Ive got the following…

```auto
this.onRelease = function() {
getURL("http://www.kirupa.com","_blank");
}

```

…which just sends the viewer straight to the page… but i need to set the destination in a variable, gotoandplay an outro section of the movie and then go to the destination set in the variable.

Ive done this absolutely fine previously using the following code…

```auto
on (release) {
    _global.page = "graphic_design.php"; 
    gotoAndPlay ("outro");
}

```

but i can’t seem to make the top code do this. i havent had any experience using ‘this.’ and im sure its pretty simple but i cant do it!

any suggestions would b appreciated!

thanks

helen
