Loadmovie, url = loaded from textfile

Well, this is my problem: I have a textfile: with:

  1. some text to be loaded into a textbox
  2. an url of an image I want to load into a movieclip
loadVariables("mytextfile.txt", "_root");
urlpic = _root.urlintext;
loadMovie(urlpic, "_root.pic");

This doesn’t work, and neither does: url1 = _root.url1.text;
I know this can be a stupid question, but I haven’t got any idea…

well what have you got your textfile?
Also check if the text file is in the same folder as the flash movie!

oh that’s not the problem, he just won’t use the text inside the url-textbox because I loaded it into it using loadvars. If you really want to know what’s in my text-file:

urlintext=here comes the url for my pic&text=here comes my text

what is “url1 = _root.url1.text;”?
btw you testing it client-side?

oh sorry, my mistake, I copied the wrong text, it should be this:
“urlpic = _root.urlintext.text;” doesn’t work. And tell me how I should test it client-side? Never done that I think…

I mean that you did not upload it did ya? You just tested the main movie on your computer?

that’s right, does that change anything? I don’t think so (could be) have you got any idea how to assing the text inside a textbox to a variable and then use the variable as a loadmovie-url, 'cause it really doesn’t work when you use my script above… Thanks

how come iyt won’t work… this is pissing me off!
Gimme the fla, textfile n’ stuff I wanna see wut’s wrong!! :pirate:

here u go… download the source fla…

also use this code

myvars = new LoadVars();
myvars.load(“text.txt”); // here you could make this path dynamic
myvars.onLoad = function(){
//this is where you tell what flash what to do with the variables loaded from the txt file.
_root.textf.text = myvars.title;
loadMovie(myvars.url,_root.pic);
}

oh yeah and also a test.jpg file in the root to test, i forgot to include it in the zip

Jakub Koter