chubob
February 3rd, 2004, 10:10 PM
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:button.onRelease = function() {
getURL(_root.mylink);
};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:_root.mylink = "http://www.sampleurl.com", "_blank";... 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 thisgetURL("http://www.sampleurl.com", "_blank");:h:
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:button.onRelease = function() {
getURL(_root.mylink);
};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:_root.mylink = "http://www.sampleurl.com", "_blank";... 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 thisgetURL("http://www.sampleurl.com", "_blank");:h: