View Full Version : getURL from .txt file
mandrews
12-22-2005, 02:06 PM
i'm having trouble with putting the getURL address in a .txt file. here's the script i have on the movieclip:
on (press) {
getURL("http://"+_level0.myURL1, "_blank");
}
here's what's in the .txt file:
&myURL1=www.google.com
the movie clip is inside another clip from the main timeline if that matters (...level2 or 3?).
???
thanks.
richtestani
12-22-2005, 02:09 PM
I could be wrong, but doesn't getURL() get the url of a loaded file?
mandrews
12-22-2005, 02:15 PM
...?
i just know that the on press brings up a browser that says http://undefined in the address.
as if the flash file is not reading the .txt file correctly.
???
mandrews
12-22-2005, 02:19 PM
i think it has something to do with the levels because it works on another file where the script is on a mc thats one level down.
How did you load the text file? Can you show me that code?
mandrews
12-22-2005, 02:22 PM
onClipEvent (load){
this.loadVariables("comments.txt");
}
Where is that being called?
mandrews
12-22-2005, 02:44 PM
you mean where files located?
Inside which movieclip..whats that movieclips path from the main time line.
mandrews
12-22-2005, 02:51 PM
_root.mc1.mc2
ok, I havent used loadVariables in a long time, not since the advent of LoadVars(), by the way, always a better solution....So, either your variable will be _root.myurl1 or that path to myurl1.
issamneo
12-22-2005, 03:22 PM
first you have to check if your variable is in flash, you test that by tracing it, then the load will be easy
Which is exactly why LoadVars() is the better choice.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.