I'm trying to use an outside .txt file which contains a url link that the .swf reads to direct the browser to another page. This code works fine, but i have to double click on the .swf to get the link to work.-- (it happens in both safari and firefox). If anyone has any insight or knows of a better way, please let me know!

code in txt file:

on .fla button:

on (release) {
newURL = new LoadVars();
newURL.onLoad = function(success) {
if (!success) {
} else {
//do whatever you want to happen IF successful
//newURL = your textFile & link = variable in text file
webSite = newURL.link;
//set button code
button.onPress = function() {