# GetUrl and Variables problem

**URL:** <https://forum.kirupa.com/t/geturl-and-variables-problem/100947>\
**Category:** Uncategorized\
**Created:** [February 4, 2004, 3:10am UTC](https://forum.kirupa.com/t/geturl-and-variables-problem/100947 "2004-02-04T03:10:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chubob](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chubob/32/368_2.png) [@chubob](https://forum.kirupa.com/u/chubob)\
**Post date:** [February 4, 2004, 3:10am UTC](https://forum.kirupa.com/t/geturl-and-variables-problem/100947/1 "2004-02-04T03:10:51Z")

</div>

Hey guys, I’ve got a silly problem with actionscripting.  
I have o button on stage, and I want to add an action to this button by actionscripting. The action will tell the button to open a webpage BUT the URL will be in a variable so the code is:[AS]button.onRelease = function() {  
getURL(\_root.mylink);  
};[/AS]Now, I will set the value of the variable. The problem is that I want the URL to open in a “\_blank” Window. I’ve tried this:[AS]\_root.mylink = “[http://www.sampleurl.com](http://www.sampleurl.com)”, “\_blank”;[/AS]… can somebody tell me what’s wrong with setting the variable? every time a click the button it takes me to the webpage, but in the main window - not in a pop.  
If I were not using variables the code should be like this[AS]getURL(“[http://www.sampleurl.com](http://www.sampleurl.com)”, “\_blank”);[/AS]:h:
