View Full Version : loadmovie, url = loaded from textfile
Seticus
December 21st, 2002, 10:04 AM
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...
andr.in
December 21st, 2002, 10:07 AM
well what have you got your textfile?
Also check if the text file is in the same folder as the flash movie!
Seticus
December 21st, 2002, 10:12 AM
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
andr.in
December 21st, 2002, 10:36 AM
what is "url1 = _root.url1.text;"?
btw you testing it client-side?
Seticus
December 21st, 2002, 11:04 AM
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...
andr.in
December 21st, 2002, 11:25 AM
I mean that you did not upload it did ya? You just tested the main movie on your computer?
Seticus
December 21st, 2002, 04:35 PM
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
andr.in
December 22nd, 2002, 03:36 AM
how come iyt won't work... this is pissing me off!
Gimme the fla, textfile n' stuff I wanna see wut's wrong!! :pirate:
Mediashock
December 23rd, 2002, 01:31 PM
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
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.