Groups | Blog | Home
all groups > flash actionscript > june 2004 >

flash actionscript : Open URL from an external txt document


Macyanya
6/14/2004 9:49:52 PM
I am having a problem with a link that should open a URL in a separate browser. Is there a way to store the URL withing a separate txt document? I am using Flash MX.

Jack.
6/14/2004 10:19:42 PM
in your textfile -
&vars1=www.flashkit.com|_top&
&vars2=www.amazon.com|_blank&
in Flash -
lv = new LoadVars();
lv.onLoad = function(){
link1 = this.vars1.split("|");
link2 = this.vars2.split("|");
};
lv.load("url.txt");

fKit.onRelease = function(){
trace("http://"+link1[0]+" "+link1[1]);
getURL("http://"+link1[0],link1[1]);
}; // replace window content _top

amazon.onRelease = function(){
trace("http://"+link2[0]+" "+link2[1]);
getURL("http://"+link2[0],link2[1]);
}; // in a new window _blank

hth
Dinghus
6/14/2004 10:20:21 PM
AddThis Social Bookmark Button